Merge
authordlong
Tue, 27 Oct 2015 01:45:03 -0400
changeset 33496 e6cd11ffb885
parent 33495 64a266b772e8 (current diff)
parent 33319 3d71824cad30 (diff)
child 33497 3fadd7701c2f
Merge
common/autoconf/builddeps.conf.example
common/autoconf/builddeps.conf.nfs.example
common/autoconf/builddeps.m4
jdk/src/java.base/share/classes/sun/misc/ConditionLock.java
jdk/src/java.base/share/classes/sun/misc/IOUtils.java
jdk/src/java.base/share/classes/sun/misc/Lock.java
jdk/src/java.base/share/native/libfdlibm/s_cbrt.c
--- a/.hgtags	Mon Oct 19 17:52:39 2015 +0300
+++ b/.hgtags	Tue Oct 27 01:45:03 2015 -0400
@@ -327,3 +327,6 @@
 6521875cb63e1d0121b30af56ebbc36db078c4c6 jdk9-b82
 f61a63b7d1e52e307abc0bfc751203155d362ec4 jdk9-b83
 51b2db2fa04c16d767b66113dbf08c5349ce382a jdk9-b84
+8392405ab038b22e69a3728e17dbdd9e3d3a22ed jdk9-b85
+7db0663a5e968059fa7c772172187ebd60b6492d jdk9-b86
+1a52a30674cd28c24d4d388150336121f2e9ddf9 jdk9-b87
--- a/.hgtags-top-repo	Mon Oct 19 17:52:39 2015 +0300
+++ b/.hgtags-top-repo	Tue Oct 27 01:45:03 2015 -0400
@@ -327,3 +327,6 @@
 42b56d1f418523ecb61a49d7493302c80c8009cc jdk9-b82
 ce5c14d97d95084504c32b9320cb33cce4235588 jdk9-b83
 1c8134475511ffe6726677e1418a89a7a45e92d6 jdk9-b84
+1f345217c9bab05f192d00cf1665b3286c49ccdb jdk9-b85
+2aa1daf98d3e2ee37f20f6858c53cc37020f6937 jdk9-b86
+fd4f4f7561074dc0dbc1772c8489c7b902b6b8a9 jdk9-b87
--- a/common/autoconf/basics.m4	Mon Oct 19 17:52:39 2015 +0300
+++ b/common/autoconf/basics.m4	Tue Oct 27 01:45:03 2015 -0400
@@ -288,7 +288,7 @@
   # Publish this variable in the help.
   AC_ARG_VAR($1, [Override default value for $1])
 
-  if test "x[$]$1" = x; then
+  if [[ -z "${$1+x}" ]]; then
     # The variable is not set by user, try to locate tool using the code snippet
     $2
   else
@@ -312,25 +312,32 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="[$]$1"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        AC_MSG_NOTICE([Will search for user supplied tool $1=$tool_basename])
-        AC_PATH_PROG($1, $tool_basename)
-        if test "x[$]$1" = x; then
-          AC_MSG_ERROR([User supplied tool $tool_basename could not be found])
+      # Check if we try to supply an empty value
+      if test "x[$]$1" = x; then
+        AC_MSG_NOTICE([Setting user supplied tool $1= (no value)])
+        AC_MSG_CHECKING([for $1])
+        AC_MSG_RESULT([disabled])
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="[$]$1"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          AC_MSG_NOTICE([Will search for user supplied tool $1=$tool_basename])
+          AC_PATH_PROG($1, $tool_basename)
+          if test "x[$]$1" = x; then
+            AC_MSG_ERROR([User supplied tool $tool_basename could not be found])
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          AC_MSG_NOTICE([Will use user supplied tool $1=$tool_specified])
+          AC_MSG_CHECKING([for $1])
+          if test ! -x "$tool_specified"; then
+            AC_MSG_RESULT([not found])
+            AC_MSG_ERROR([User supplied tool $1=$tool_specified does not exist or is not executable])
+          fi
+          AC_MSG_RESULT([$tool_specified])
         fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        AC_MSG_NOTICE([Will use user supplied tool $1=$tool_specified])
-        AC_MSG_CHECKING([for $1])
-        if test ! -x "$tool_specified"; then
-          AC_MSG_RESULT([not found])
-          AC_MSG_ERROR([User supplied tool $1=$tool_specified does not exist or is not executable])
-        fi
-        AC_MSG_RESULT([$tool_specified])
       fi
     fi
   fi
@@ -376,9 +383,7 @@
 [
   # Start with tools that do not need have cross compilation support
   # and can be expected to be found in the default PATH. These tools are
-  # used by configure. Nor are these tools expected to be found in the
-  # devkit from the builddeps server either, since they are
-  # needed to download the devkit.
+  # used by configure.
 
   # First are all the simple required tools.
   BASIC_REQUIRE_PROGS(BASENAME, basename)
@@ -437,6 +442,7 @@
   BASIC_PATH_PROGS(READLINK, [greadlink readlink])
   BASIC_PATH_PROGS(DF, df)
   BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
+  BASIC_PATH_PROGS(NICE, nice)
 ])
 
 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
--- a/common/autoconf/boot-jdk.m4	Mon Oct 19 17:52:39 2015 +0300
+++ b/common/autoconf/boot-jdk.m4	Tue Oct 27 01:45:03 2015 -0400
@@ -108,12 +108,6 @@
   fi
 ])
 
-# Test: Is bootjdk available from builddeps?
-AC_DEFUN([BOOTJDK_CHECK_BUILDDEPS],
-[
-  BDEPS_CHECK_MODULE(BOOT_JDK, bootjdk, xxx, [BOOT_JDK_FOUND=maybe], [BOOT_JDK_FOUND=no])
-])
-
 # Test: Is $JAVA_HOME set?
 AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
 [
@@ -276,9 +270,6 @@
     AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
   fi
 
-  # Test: Is bootjdk available from builddeps?
-  BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS])
-
   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
   BOOTJDK_DO_CHECK([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR])
 
--- a/common/autoconf/builddeps.conf.example	Mon Oct 19 17:52:39 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# This is a configuration example using builddeps
-# that are downloaded from an ftp server.
-# This is how you use it:
-
-#configure --with-builddeps-server=ftp://builddeps.server/adir \
-#          --with-builddeps-conf=..../builddeps.conf.example
-#          --with-builddeps-dir=/localdisk/mybuilddeps
-
-# Translate a configuration triplet/quadruplet into something
-# known by this configuration file.
-# If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
-REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
-REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
-
-# The needed cups builddeps are platform independent header files.
-# I.e. they need not be part of the devkit.
-builddep_cups=lib/cups_1_3_9.zip
-builddep_cups_CFLAGS=-I${depdir}
-
-# The devkit is the cross compiler tools and sys-roots
-# for the build platform.
-builddep_devkit=sdk/sdk-${rewritten_build}-20110921.tar.gz
-
-# The freetype dependency is partly platform dependent.
-# It is stored inside the sys-root.
-builddep_freetype2=sdk/sdk-${rewritten_build}-20110921.tar.gz
-builddep_freetype2_CFLAGS=-I${depdir}/${rewritten_target}/sys-root/usr/include/freetype2
-builddep_freetype2_LIBS=-lfreetype
-
-# There are many other build dependencies, but they are implicitly
-# found inside the devkit sys-root.
-
-# The boot jdk runs on the build system and is used to compile and run
-# Java build tools and of course, the bootstrap javac.
-builddep_bootjdk_BUILD_i386_pc_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-i586-17_nov_2011.zip
-builddep_bootjdk_BUILD_x86_64_pc_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-x64-17_nov_2011.zip
-builddep_bootjdk_BUILD_i686_unknown_linux_gnu=java/jdk-7u2-fcs-bin-b13-linux-i586-17_nov_2011.zip
-builddep_bootjdk_BUILD_x86_64_unknown_linux_gnu=java/jdk-7u2-fcs-bin-b13-linux-x64-17_nov_2011.zip
-builddep_bootjdk_BUILD_sparc_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-sparc-17_nov_2011.zip
-builddep_bootjdk_BUILD_sparcv9_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-sparcv9-17_nov_2011.zip
-builddep_bootjdk_BUILD_i386_pc_windows=java/jdk-7u2-fcs-bin-b13-windows-i586-17_nov_2011.zip
-builddep_bootjdk_BUILD_x86_64_pc_windows=java/jdk-7u2-fcs-bin-b13-windows-x64-17_nov_2011.zip
-builddep_bootjdk_ROOT=${depdir}/jdk7_02/jdk1.7.0_02
--- a/common/autoconf/builddeps.conf.nfs.example	Mon Oct 19 17:52:39 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-#
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# This is a configuration example using an nfs-mount /java
-# it will use the builddeps directly from the nfs mounted directory.
-# This is how you use it:
-
-#configure --with-builddeps-conf=..../builddeps.conf.nfs.example
-
-REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
-REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
-
-DEVTOOLS=/java/devtools
-
-builddep_cups=${DEVTOOLS}/linux/cups/include
-builddep_cups_CFLAGS=-I${depdir}
-
-JDK_ROOT=/java/re/jdk/7u4/latest/binaries
-builddep_bootjdk_BUILD_i386_pc_solaris2=${JDK_ROOT}/solaris-i586
-builddep_bootjdk_BUILD_x86_64_pc_solaris2=${JDK_ROOT}/solaris-amd64
-builddep_bootjdk_BUILD_i686_unknown_linux_gnu=${JDK_ROOT}/linux-i586
-builddep_bootjdk_BUILD_x86_64_unknown_linux_gnu=${JDK_ROOT}/linux-amd64
-builddep_bootjdk_ROOT=
--- a/common/autoconf/builddeps.m4	Mon Oct 19 17:52:39 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,247 +0,0 @@
-#
-# Copyright (c) 2011, 2012, 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.
-#
-
-AC_DEFUN_ONCE([BDEPS_SCAN_FOR_BUILDDEPS],
-[
-  define(LIST_OF_BUILD_DEPENDENCIES,)
-  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-    if test "x$with_builddeps_conf" != x; then
-      AC_MSG_CHECKING([for supplied builddeps configuration file])
-      builddepsfile=$with_builddeps_conf
-      if test -s $builddepsfile; then
-        . $builddepsfile
-        AC_MSG_RESULT([loaded!])
-      else
-        AC_MSG_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!])
-      fi
-    else
-      AC_MSG_CHECKING([for builddeps.conf files in sources...])
-      builddepsfile=`mktemp`
-      touch $builddepsfile
-      # Put all found confs into a single file.
-      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
-      # Source the file to acquire the variables
-      if test -s $builddepsfile; then
-        . $builddepsfile
-        AC_MSG_RESULT([found at least one!])
-      else
-        AC_MSG_ERROR([Could not find any builddeps.conf at all!])
-      fi
-    fi
-    # Create build and target names that use _ instead of "-" and ".".
-    # This is necessary to use them in variable names.
-    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
-    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
-    # Extract rewrite information for build and target
-    eval rewritten_build=\${REWRITE_${build_var}}
-    if test "x$rewritten_build" = x; then
-      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
-      echo Build stays the same $rewritten_build
-    else
-      echo Rewriting build for builddeps into $rewritten_build
-    fi
-    eval rewritten_target=\${REWRITE_${target_var}}
-    if test "x$rewritten_target" = x; then
-      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
-      echo Target stays the same $rewritten_target
-    else
-      echo Rewriting target for builddeps into $rewritten_target
-    fi
-    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
-    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
-  fi
-  AC_CHECK_PROGS(BDEPS_UNZIP, [7z unzip])
-  if test "x$BDEPS_UNZIP" = x7z; then
-    BDEPS_UNZIP="7z x"
-  fi
-
-  AC_CHECK_PROGS(BDEPS_FTP, [wget lftp ftp])
-])
-
-AC_DEFUN([BDEPS_FTPGET],
-[
-  # $1 is the ftp://abuilddeps.server.com/libs/cups.zip
-  # $2 is the local file name for the downloaded file.
-  VALID_TOOL=no
-  if test "x$BDEPS_FTP" = xwget; then
-    VALID_TOOL=yes
-    wget -O $2 $1
-  fi
-  if test "x$BDEPS_FTP" = xlftp; then
-    VALID_TOOL=yes
-    lftp -c "get $1 -o $2"
-  fi
-  if test "x$BDEPS_FTP" = xftp; then
-    VALID_TOOL=yes
-    FTPSERVER=`echo $1 | cut -f 3 -d '/'`
-    FTPPATH=`echo $1 | cut -f 4- -d '/'`
-    FTPUSERPWD=${FTPSERVER%%@*}
-    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-      FTPUSER=${userpwd%%:*}
-      FTPPWD=${userpwd#*@}
-      FTPSERVER=${FTPSERVER#*@}
-    else
-      FTPUSER=ftp
-      FTPPWD=ftp
-    fi
-    # the "pass" command does not work on some
-    # ftp clients (read ftp.exe) but if it works,
-    # passive mode is better!
-    ( \
-        echo "user $FTPUSER $FTPPWD"        ; \
-        echo "pass"                         ; \
-        echo "bin"                          ; \
-        echo "get $FTPPATH $2"              ; \
-    ) | ftp -in $FTPSERVER
-  fi
-  if test "x$VALID_TOOL" != xyes; then
-    AC_MSG_ERROR([I do not know how to use the tool: $BDEPS_FTP])
-  fi
-])
-
-AC_DEFUN([BDEPS_CHECK_MODULE],
-[
-  define([LIST_OF_BUILD_DEPENDENCIES],LIST_OF_BUILD_DEPENDENCIES[$2=$3'\n'])
-  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-    # Source the builddeps file again, to make sure it uses the latest variables!
-    . $builddepsfile
-    # Look for a target and build machine specific resource!
-    eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a target specific resource
-      eval resource=\${builddep_$2_TARGET_${rewritten_target_var}}
-    fi
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a build specific resource
-      eval resource=\${builddep_$2_BUILD_${rewritten_build_var}}
-    fi
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a generic resource
-      # (The $2 comes from M4 and not the shell, thus no need for eval here.)
-      resource=${builddep_$2}
-    fi
-    if test "x$resource" != x; then
-      AC_MSG_NOTICE([Using builddeps $resource for $2])
-      # If the resource in the builddeps.conf file is an existing directory,
-      # for example /java/linux/cups
-      if test -d ${resource}; then
-        depdir=${resource}
-      else
-        BDEPS_FETCH($2, $resource, $with_builddeps_server, $with_builddeps_dir, depdir)
-      fi
-      # Source the builddeps file again, because in the previous command, the depdir
-      # was updated to point at the current build dependency install directory.
-      . $builddepsfile
-      # Now extract variables from the builddeps.conf files.
-      theroot=${builddep_$2_ROOT}
-      thecflags=${builddep_$2_CFLAGS}
-      thelibs=${builddep_$2_LIBS}
-      if test "x$depdir" = x; then
-        AC_MSG_ERROR([Could not download build dependency $2])
-      fi
-      $1=$depdir
-      if test "x$theroot" != x; then
-        $1="$theroot"
-      fi
-      if test "x$thecflags" != x; then
-        $1_CFLAGS="$thecflags"
-      fi
-      if test "x$thelibs" != x; then
-        $1_LIBS="$thelibs"
-      fi
-      m4_default([$4], [:])
-      m4_ifvaln([$5], [else $5])
-    fi
-    m4_ifvaln([$5], [else $5])
-  fi
-])
-
-AC_DEFUN([BDEPS_FETCH],
-[
-  # $1 is for example mymodule
-  # $2 is for example libs/general/libmymod_1_2_3.zip
-  # $3 is for example ftp://mybuilddeps.myserver.com/builddeps
-  # $4 is for example /localhome/builddeps
-  # $5 is the name of the variable into which we store the depdir, eg MYMOD
-  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-  filename=`basename $2`
-  filebase=`echo $filename | sed 's/\.[[^\.]]*$//'`
-  filebase=${filename%%.*}
-  extension=${filename#*.}
-  installdir=$4/$filebase
-  if test ! -f $installdir/$filename.unpacked; then
-    AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir])
-    if test ! -d $installdir; then
-      mkdir -p $installdir
-    fi
-    if test ! -d $installdir; then
-      AC_MSG_ERROR([Could not create directory $installdir])
-    fi
-    tmpfile=`mktemp $installdir/$1.XXXXXXXXX`
-    touch $tmpfile
-    if test ! -f $tmpfile; then
-      AC_MSG_ERROR([Could not create files in directory $installdir])
-    fi
-    BDEPS_FTPGET([$3/$2] , [$tmpfile])
-    mv $tmpfile $installdir/$filename
-    if test ! -s $installdir/$filename; then
-      AC_MSG_ERROR([Could not download $3/$2])
-    fi
-    case "$extension" in
-      zip)  echo "Unzipping $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-        ;;
-      tar.gz) echo "Untaring $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-        ;;
-      tgz) echo "Untaring $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-        ;;
-      *) AC_MSG_ERROR([Cannot handle build depency archive with extension $extension])
-        ;;
-    esac
-  fi
-  if test -f $installdir/$filename.unpacked; then
-    $5=$installdir
-  fi
-])
-
-AC_DEFUN_ONCE([BDEPS_CONFIGURE_BUILDDEPS],
-[
-  AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
-      [use this configuration file for the builddeps])])
-
-  AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server],
-      [download and use build dependencies from this server url])])
-
-  AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
-      [store downloaded build dependencies here @<:@/localhome/builddeps@:>@])],
-      [],
-      [with_builddeps_dir=/localhome/builddeps])
-
-  AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group],
-      [chgrp the downloaded build dependencies to this group])])
-])
--- a/common/autoconf/configure.ac	Mon Oct 19 17:52:39 2015 +0300
+++ b/common/autoconf/configure.ac	Tue Oct 27 01:45:03 2015 -0400
@@ -39,7 +39,6 @@
 # Include these first...
 m4_include([basics.m4])
 m4_include([basics_windows.m4])
-m4_include([builddeps.m4])
 # ... then the rest
 m4_include([boot-jdk.m4])
 m4_include([build-performance.m4])
@@ -121,12 +120,6 @@
 # After basic tools have been setup, we can check build os specific details.
 PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION
 
-# Setup builddeps, for automatic downloading of tools we need.
-# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
-# boot-jdk setup, but we need to have basic tools setup first.
-BDEPS_CONFIGURE_BUILDDEPS
-BDEPS_SCAN_FOR_BUILDDEPS
-
 ###############################################################################
 #
 # Determine OpenJDK variants, options and version numbers.
@@ -211,14 +204,8 @@
 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
 BASIC_COMPILE_FIXPATH
 
-LIB_SETUP_INIT
-LIB_SETUP_X11
-LIB_SETUP_CUPS
-LIB_SETUP_FREETYPE
-LIB_SETUP_ALSA
-LIB_SETUP_MISC_LIBS
-LIB_SETUP_STATIC_LINK_LIBSTDCPP
-LIB_SETUP_ON_WINDOWS
+LIB_DETERMINE_DEPENDENCIES
+LIB_SETUP_LIBRARIES
 
 ###############################################################################
 #
--- a/common/autoconf/generated-configure.sh	Mon Oct 19 17:52:39 2015 +0300
+++ b/common/autoconf/generated-configure.sh	Tue Oct 27 01:45:03 2015 -0400
@@ -645,28 +645,24 @@
 ENABLE_INTREE_EC
 SALIB_NAME
 HOTSPOT_MAKE_ARGS
-MSVCP_DLL
-MSVCR_DLL
-LIBCXX
+LIBZIP_CAN_USE_MMAP
+LIBDL
+LIBM
+USE_EXTERNAL_LCMS
+LCMS_LIBS
+LCMS_CFLAGS
+USE_EXTERNAL_LIBZ
+USE_EXTERNAL_LIBPNG
+PNG_LIBS
+PNG_CFLAGS
+USE_EXTERNAL_LIBGIF
+USE_EXTERNAL_LIBJPEG
 LLVM_LIBS
 LLVM_LDFLAGS
 LLVM_CFLAGS
 LLVM_CONFIG
 LIBFFI_LIBS
 LIBFFI_CFLAGS
-STATIC_CXX_SETTING
-LIBDL
-LIBM
-LIBZIP_CAN_USE_MMAP
-USE_EXTERNAL_LIBZ
-USE_EXTERNAL_LIBPNG
-PNG_LIBS
-PNG_CFLAGS
-USE_EXTERNAL_LCMS
-LCMS_LIBS
-LCMS_CFLAGS
-USE_EXTERNAL_LIBGIF
-USE_EXTERNAL_LIBJPEG
 ALSA_LIBS
 ALSA_CFLAGS
 FREETYPE_BUNDLE_LIB_PATH
@@ -678,6 +674,10 @@
 X_PRE_LIBS
 X_CFLAGS
 XMKMF
+MSVCP_DLL
+MSVCR_DLL
+LIBCXX
+STATIC_CXX_SETTING
 FIXPATH
 GCOV_ENABLED
 ZIP_DEBUGINFO_FILES
@@ -849,8 +849,6 @@
 BUILD_HEADLESS
 SUPPORT_HEADFUL
 SUPPORT_HEADLESS
-BDEPS_FTP
-BDEPS_UNZIP
 OS_VERSION_MICRO
 OS_VERSION_MINOR
 OS_VERSION_MAJOR
@@ -948,6 +946,7 @@
 build_vendor
 build_cpu
 build
+NICE
 CPIO
 DF
 READLINK
@@ -1054,10 +1053,6 @@
 with_sdk_name
 with_conf_name
 with_output_sync
-with_builddeps_conf
-with_builddeps_server
-with_builddeps_dir
-with_builddeps_group
 enable_headful
 enable_hotspot_test_in_build
 with_cacerts_file
@@ -1089,6 +1084,9 @@
 enable_debug_symbols
 enable_zip_debug_info
 enable_native_coverage
+with_stdc__lib
+with_msvcr_dll
+with_msvcp_dll
 with_x
 with_cups
 with_cups_include
@@ -1100,14 +1098,14 @@
 with_alsa
 with_alsa_include
 with_alsa_lib
+with_libffi
+with_libffi_include
+with_libffi_lib
 with_libjpeg
 with_giflib
-with_lcms
 with_libpng
 with_zlib
-with_stdc__lib
-with_msvcr_dll
-with_msvcp_dll
+with_lcms
 with_dxsdk
 with_dxsdk_lib
 with_dxsdk_include
@@ -1169,6 +1167,7 @@
 READLINK
 DF
 CPIO
+NICE
 UNZIP
 ZIP
 LDD
@@ -1215,12 +1214,12 @@
 FREETYPE_LIBS
 ALSA_CFLAGS
 ALSA_LIBS
+LIBFFI_CFLAGS
+LIBFFI_LIBS
+PNG_CFLAGS
+PNG_LIBS
 LCMS_CFLAGS
 LCMS_LIBS
-PNG_CFLAGS
-PNG_LIBS
-LIBFFI_CFLAGS
-LIBFFI_LIBS
 CCACHE'
 
 
@@ -1898,13 +1897,6 @@
                           from important configuration options]
   --with-output-sync      set make output sync type if supported by make.
                           [recurse]
-  --with-builddeps-conf   use this configuration file for the builddeps
-  --with-builddeps-server download and use build dependencies from this server
-                          url
-  --with-builddeps-dir    store downloaded build dependencies here
-                          [/localhome/builddeps]
-  --with-builddeps-group  chgrp the downloaded build dependencies to this
-                          group
   --with-cacerts-file     specify alternative cacerts file
   --with-milestone        Set milestone value for build [internal]
   --with-update-version   Set update version value for build [b00]
@@ -1947,6 +1939,14 @@
                           '--help' to show possible values [platform
                           dependent]
   --with-jtreg            Regression Test Harness [probed]
+  --with-stdc++lib=<static>,<dynamic>,<default>
+                          force linking of the C++ runtime on Linux to either
+                          static or dynamic, default is static with dynamic as
+                          fallback
+  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
+                          (Windows only) [probed]
+  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
+                          (Windows only) [probed]
   --with-x                use the X Window System
   --with-cups             specify prefix directory for the cups package
                           (expecting the headers under PATH/include)
@@ -1964,24 +1964,21 @@
                           headers under PATH/include)
   --with-alsa-include     specify directory for the alsa include files
   --with-alsa-lib         specify directory for the alsa library
+  --with-libffi           specify prefix directory for the libffi package
+                          (expecting the libraries under PATH/lib and the
+                          headers under PATH/include)
+  --with-libffi-include   specify directory for the libffi include files
+  --with-libffi-lib       specify directory for the libffi library
   --with-libjpeg          use libjpeg from build system or OpenJDK source
                           (system, bundled) [bundled]
   --with-giflib           use giflib from build system or OpenJDK source
                           (system, bundled) [bundled]
-  --with-lcms             use lcms2 from build system or OpenJDK source
-                          (system, bundled) [bundled]
   --with-libpng           use libpng from build system or OpenJDK source
                           (system, bundled) [bundled]
   --with-zlib             use zlib from build system or OpenJDK source
                           (system, bundled) [bundled]
-  --with-stdc++lib=<static>,<dynamic>,<default>
-                          force linking of the C++ runtime on Linux to either
-                          static or dynamic, default is static with dynamic as
-                          fallback
-  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
-                          (Windows only) [probed]
-  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
-                          (Windows only) [probed]
+  --with-lcms             use lcms2 from build system or OpenJDK source
+                          (system, bundled) [bundled]
   --with-dxsdk            Deprecated. Option is kept for backwards
                           compatibility and is ignored
   --with-dxsdk-lib        Deprecated. Option is kept for backwards
@@ -2049,6 +2046,7 @@
   READLINK    Override default value for READLINK
   DF          Override default value for DF
   CPIO        Override default value for CPIO
+  NICE        Override default value for NICE
   UNZIP       Override default value for UNZIP
   ZIP         Override default value for ZIP
   LDD         Override default value for LDD
@@ -2098,13 +2096,13 @@
               linker flags for FREETYPE, overriding pkg-config
   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
-  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
-  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
-  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
-  PNG_LIBS    linker flags for PNG, overriding pkg-config
   LIBFFI_CFLAGS
               C compiler flags for LIBFFI, overriding pkg-config
   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
+  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
+  PNG_LIBS    linker flags for PNG, overriding pkg-config
+  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
+  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
   CCACHE      Override default value for CCACHE
 
 Use these variables to override the choices made by `configure' or to help
@@ -3559,41 +3557,6 @@
 
 
 
-#
-# Copyright (c) 2011, 2012, 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.
-#
-
-
-
-
-
-
-
-
-
-
-
 # ... then the rest
 #
 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
@@ -3656,9 +3619,6 @@
 # Test: Is bootjdk explicitely set by command line arguments?
 
 
-# Test: Is bootjdk available from builddeps?
-
-
 # Test: Is $JAVA_HOME set?
 
 
@@ -3832,7 +3792,7 @@
 
 
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -3909,8 +3869,8 @@
       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
     freetype)
       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
-    pulse)
-      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
+    ffi)
+      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
     x11)
       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
     ccache)
@@ -3930,8 +3890,6 @@
       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
     freetype)
       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
-    pulse)
-      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
     x11)
       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
     ccache)
@@ -4020,7 +3978,122 @@
 
 
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+# Major library component reside in separate files.
+#
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+################################################################################
+# Setup alsa (Advanced Linux Sound Architecture)
+################################################################################
+
+
+#
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+################################################################################
+# Setup bundled libraries.
+#
+# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
+# OpenJDK repository. Default is to use these libraries as bundled, but they
+# might be replaced by en external version by the user.
+################################################################################
+
+
+################################################################################
+# Setup libjpeg
+################################################################################
+
+
+################################################################################
+# Setup giflib
+################################################################################
+
+
+################################################################################
+# Setup libpng
+################################################################################
+
+
+################################################################################
+# Setup zlib
+################################################################################
+
+
+################################################################################
+# Setup lcms (Little CMS)
+################################################################################
+
+
+#
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -4044,24 +4117,163 @@
 # questions.
 #
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+################################################################################
+# Setup cups (Common Unix Printing System)
+################################################################################
+
+
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+################################################################################
+# Setup libffi (Foreign Function Interface)
+################################################################################
+
+
+#
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+################################################################################
+# Build the freetype lib from source
+################################################################################
+
+
+################################################################################
+# Check if a potential freeype library match is correct and usable
+################################################################################
+
+
+################################################################################
+# Setup freetype (The FreeType2 font rendering library)
+################################################################################
+
+
+#
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+################################################################################
+# Setup the standard C/C++ runtime libraries.
+#
+# Most importantly, determine if stdc++ should be linked statically or
+# dynamically.
+################################################################################
+
+
+#
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+################################################################################
+# Setup X11 Windows system
+################################################################################
+
+
+
+################################################################################
+# Determine which libraries are needed for this configuration
+################################################################################
+
+
+################################################################################
+# Parse library options, and setup needed libraries
+################################################################################
+
+
+################################################################################
+# Setup llvm (Low-Level VM)
+################################################################################
+
+
+################################################################################
+# Setup various libraries, typically small system libraries
+################################################################################
 
 
 #
@@ -4375,7 +4587,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1444077934
+DATE_WHEN_GENERATED=1444643341
 
 ###############################################################################
 #
@@ -4421,9 +4633,7 @@
 
   # Start with tools that do not need have cross compilation support
   # and can be expected to be found in the default PATH. These tools are
-  # used by configure. Nor are these tools expected to be found in the
-  # devkit from the builddeps server either, since they are
-  # needed to download the devkit.
+  # used by configure.
 
   # First are all the simple required tools.
 
@@ -4432,7 +4642,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$BASENAME" = x; then
+  if [ -z "${BASENAME+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in basename
 do
@@ -4545,14 +4755,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$BASENAME"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$BASENAME" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
+$as_echo_n "checking for BASENAME... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$BASENAME"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -4592,22 +4811,23 @@
 fi
 
 
-        if test "x$BASENAME" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
+          if test "x$BASENAME" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
 $as_echo_n "checking for BASENAME... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -4625,7 +4845,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$BASH" = x; then
+  if [ -z "${BASH+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in bash
 do
@@ -4738,14 +4958,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$BASH"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$BASH" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
+$as_echo_n "checking for BASH... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$BASH"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -4785,22 +5014,23 @@
 fi
 
 
-        if test "x$BASH" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
+          if test "x$BASH" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
 $as_echo_n "checking for BASH... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -4818,7 +5048,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$CAT" = x; then
+  if [ -z "${CAT+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in cat
 do
@@ -4931,14 +5161,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$CAT"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$CAT" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
+$as_echo_n "checking for CAT... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$CAT"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -4978,22 +5217,23 @@
 fi
 
 
-        if test "x$CAT" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
+          if test "x$CAT" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
 $as_echo_n "checking for CAT... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -5011,7 +5251,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$CHMOD" = x; then
+  if [ -z "${CHMOD+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in chmod
 do
@@ -5124,14 +5364,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$CHMOD"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$CHMOD" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
+$as_echo_n "checking for CHMOD... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$CHMOD"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -5171,22 +5420,23 @@
 fi
 
 
-        if test "x$CHMOD" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
+          if test "x$CHMOD" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
 $as_echo_n "checking for CHMOD... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -5204,7 +5454,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$CMP" = x; then
+  if [ -z "${CMP+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in cmp
 do
@@ -5317,14 +5567,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$CMP"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$CMP" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
+$as_echo_n "checking for CMP... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$CMP"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -5364,22 +5623,23 @@
 fi
 
 
-        if test "x$CMP" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
+          if test "x$CMP" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
 $as_echo_n "checking for CMP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -5397,7 +5657,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$COMM" = x; then
+  if [ -z "${COMM+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in comm
 do
@@ -5510,14 +5770,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$COMM"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$COMM" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
+$as_echo_n "checking for COMM... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$COMM"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -5557,22 +5826,23 @@
 fi
 
 
-        if test "x$COMM" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
+          if test "x$COMM" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
 $as_echo_n "checking for COMM... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -5590,7 +5860,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$CP" = x; then
+  if [ -z "${CP+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in cp
 do
@@ -5703,14 +5973,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$CP"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$CP" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
+$as_echo_n "checking for CP... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$CP"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -5750,22 +6029,23 @@
 fi
 
 
-        if test "x$CP" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
+          if test "x$CP" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
 $as_echo_n "checking for CP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -5783,7 +6063,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$CUT" = x; then
+  if [ -z "${CUT+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in cut
 do
@@ -5896,14 +6176,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$CUT"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$CUT" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
+$as_echo_n "checking for CUT... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$CUT"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -5943,22 +6232,23 @@
 fi
 
 
-        if test "x$CUT" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
+          if test "x$CUT" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
 $as_echo_n "checking for CUT... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -5976,7 +6266,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$DATE" = x; then
+  if [ -z "${DATE+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in date
 do
@@ -6089,14 +6379,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$DATE"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$DATE" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
+$as_echo_n "checking for DATE... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$DATE"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -6136,22 +6435,23 @@
 fi
 
 
-        if test "x$DATE" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
+          if test "x$DATE" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
 $as_echo_n "checking for DATE... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -6169,7 +6469,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$DIFF" = x; then
+  if [ -z "${DIFF+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in gdiff diff
 do
@@ -6282,14 +6582,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$DIFF"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$DIFF" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
+$as_echo_n "checking for DIFF... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$DIFF"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -6329,22 +6638,23 @@
 fi
 
 
-        if test "x$DIFF" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
+          if test "x$DIFF" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
 $as_echo_n "checking for DIFF... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -6362,7 +6672,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$DIRNAME" = x; then
+  if [ -z "${DIRNAME+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in dirname
 do
@@ -6475,14 +6785,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$DIRNAME"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$DIRNAME" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
+$as_echo_n "checking for DIRNAME... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$DIRNAME"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -6522,22 +6841,23 @@
 fi
 
 
-        if test "x$DIRNAME" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
+          if test "x$DIRNAME" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
 $as_echo_n "checking for DIRNAME... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -6555,7 +6875,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$ECHO" = x; then
+  if [ -z "${ECHO+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in echo
 do
@@ -6668,14 +6988,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$ECHO"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$ECHO" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
+$as_echo_n "checking for ECHO... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$ECHO"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -6715,22 +7044,23 @@
 fi
 
 
-        if test "x$ECHO" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
+          if test "x$ECHO" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
 $as_echo_n "checking for ECHO... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -6748,7 +7078,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$EXPR" = x; then
+  if [ -z "${EXPR+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in expr
 do
@@ -6861,14 +7191,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$EXPR"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$EXPR" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
+$as_echo_n "checking for EXPR... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$EXPR"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -6908,22 +7247,23 @@
 fi
 
 
-        if test "x$EXPR" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
+          if test "x$EXPR" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
 $as_echo_n "checking for EXPR... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -6941,7 +7281,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$FILE" = x; then
+  if [ -z "${FILE+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in file
 do
@@ -7054,14 +7394,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$FILE"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$FILE" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
+$as_echo_n "checking for FILE... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$FILE"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -7101,22 +7450,23 @@
 fi
 
 
-        if test "x$FILE" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
+          if test "x$FILE" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
 $as_echo_n "checking for FILE... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -7134,7 +7484,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$FIND" = x; then
+  if [ -z "${FIND+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in find
 do
@@ -7247,14 +7597,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$FIND"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$FIND" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
+$as_echo_n "checking for FIND... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$FIND"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -7294,22 +7653,23 @@
 fi
 
 
-        if test "x$FIND" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
+          if test "x$FIND" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
 $as_echo_n "checking for FIND... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -7327,7 +7687,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$HEAD" = x; then
+  if [ -z "${HEAD+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in head
 do
@@ -7440,14 +7800,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$HEAD"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$HEAD" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
+$as_echo_n "checking for HEAD... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$HEAD"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -7487,22 +7856,23 @@
 fi
 
 
-        if test "x$HEAD" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
+          if test "x$HEAD" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
 $as_echo_n "checking for HEAD... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -7520,7 +7890,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$LN" = x; then
+  if [ -z "${LN+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in ln
 do
@@ -7633,14 +8003,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$LN"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$LN" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
+$as_echo_n "checking for LN... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$LN"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -7680,22 +8059,23 @@
 fi
 
 
-        if test "x$LN" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
+          if test "x$LN" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
 $as_echo_n "checking for LN... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -7713,7 +8093,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$LS" = x; then
+  if [ -z "${LS+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in ls
 do
@@ -7826,14 +8206,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$LS"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$LS" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
+$as_echo_n "checking for LS... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$LS"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -7873,22 +8262,23 @@
 fi
 
 
-        if test "x$LS" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
+          if test "x$LS" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
 $as_echo_n "checking for LS... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -7906,7 +8296,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$MKDIR" = x; then
+  if [ -z "${MKDIR+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in mkdir
 do
@@ -8019,14 +8409,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$MKDIR"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$MKDIR" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
+$as_echo_n "checking for MKDIR... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$MKDIR"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -8066,22 +8465,23 @@
 fi
 
 
-        if test "x$MKDIR" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
+          if test "x$MKDIR" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
 $as_echo_n "checking for MKDIR... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -8099,7 +8499,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$MKTEMP" = x; then
+  if [ -z "${MKTEMP+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in mktemp
 do
@@ -8212,14 +8612,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$MKTEMP"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$MKTEMP" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
+$as_echo_n "checking for MKTEMP... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$MKTEMP"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -8259,22 +8668,23 @@
 fi
 
 
-        if test "x$MKTEMP" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
+          if test "x$MKTEMP" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
 $as_echo_n "checking for MKTEMP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -8292,7 +8702,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$MV" = x; then
+  if [ -z "${MV+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in mv
 do
@@ -8405,14 +8815,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$MV"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$MV" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
+$as_echo_n "checking for MV... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$MV"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -8452,22 +8871,23 @@
 fi
 
 
-        if test "x$MV" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
+          if test "x$MV" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
 $as_echo_n "checking for MV... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -8485,7 +8905,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$NAWK" = x; then
+  if [ -z "${NAWK+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in nawk gawk awk
 do
@@ -8598,14 +9018,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$NAWK"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$NAWK" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
+$as_echo_n "checking for NAWK... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$NAWK"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -8645,22 +9074,23 @@
 fi
 
 
-        if test "x$NAWK" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
+          if test "x$NAWK" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
 $as_echo_n "checking for NAWK... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -8678,7 +9108,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$PRINTF" = x; then
+  if [ -z "${PRINTF+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in printf
 do
@@ -8791,14 +9221,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$PRINTF"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$PRINTF" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
+$as_echo_n "checking for PRINTF... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$PRINTF"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -8838,22 +9277,23 @@
 fi
 
 
-        if test "x$PRINTF" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
+          if test "x$PRINTF" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
 $as_echo_n "checking for PRINTF... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -8871,7 +9311,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$RM" = x; then
+  if [ -z "${RM+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in rm
 do
@@ -8984,14 +9424,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$RM"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$RM" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
+$as_echo_n "checking for RM... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$RM"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -9031,22 +9480,23 @@
 fi
 
 
-        if test "x$RM" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
+          if test "x$RM" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
 $as_echo_n "checking for RM... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -9064,7 +9514,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$SH" = x; then
+  if [ -z "${SH+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in sh
 do
@@ -9177,14 +9627,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$SH"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$SH" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
+$as_echo_n "checking for SH... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$SH"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -9224,22 +9683,23 @@
 fi
 
 
-        if test "x$SH" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
+          if test "x$SH" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
 $as_echo_n "checking for SH... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -9257,7 +9717,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$SORT" = x; then
+  if [ -z "${SORT+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in sort
 do
@@ -9370,14 +9830,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$SORT"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$SORT" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
+$as_echo_n "checking for SORT... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$SORT"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -9417,22 +9886,23 @@
 fi
 
 
-        if test "x$SORT" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
+          if test "x$SORT" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
 $as_echo_n "checking for SORT... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -9450,7 +9920,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$TAIL" = x; then
+  if [ -z "${TAIL+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in tail
 do
@@ -9563,14 +10033,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$TAIL"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$TAIL" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
+$as_echo_n "checking for TAIL... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$TAIL"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -9610,22 +10089,23 @@
 fi
 
 
-        if test "x$TAIL" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
+          if test "x$TAIL" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
 $as_echo_n "checking for TAIL... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -9643,7 +10123,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$TAR" = x; then
+  if [ -z "${TAR+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in tar
 do
@@ -9756,14 +10236,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$TAR"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$TAR" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
+$as_echo_n "checking for TAR... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$TAR"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -9803,22 +10292,23 @@
 fi
 
 
-        if test "x$TAR" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
+          if test "x$TAR" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
 $as_echo_n "checking for TAR... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -9836,7 +10326,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$TEE" = x; then
+  if [ -z "${TEE+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in tee
 do
@@ -9949,14 +10439,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$TEE"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$TEE" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
+$as_echo_n "checking for TEE... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$TEE"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -9996,22 +10495,23 @@
 fi
 
 
-        if test "x$TEE" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
+          if test "x$TEE" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
 $as_echo_n "checking for TEE... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -10029,7 +10529,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$TOUCH" = x; then
+  if [ -z "${TOUCH+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in touch
 do
@@ -10142,14 +10642,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$TOUCH"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$TOUCH" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
+$as_echo_n "checking for TOUCH... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$TOUCH"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -10189,22 +10698,23 @@
 fi
 
 
-        if test "x$TOUCH" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
+          if test "x$TOUCH" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
 $as_echo_n "checking for TOUCH... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -10222,7 +10732,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$TR" = x; then
+  if [ -z "${TR+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in tr
 do
@@ -10335,14 +10845,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$TR"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$TR" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
+$as_echo_n "checking for TR... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$TR"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -10382,22 +10901,23 @@
 fi
 
 
-        if test "x$TR" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
+          if test "x$TR" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
 $as_echo_n "checking for TR... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -10415,7 +10935,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$UNAME" = x; then
+  if [ -z "${UNAME+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in uname
 do
@@ -10528,14 +11048,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$UNAME"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$UNAME" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
+$as_echo_n "checking for UNAME... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$UNAME"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -10575,22 +11104,23 @@
 fi
 
 
-        if test "x$UNAME" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
+          if test "x$UNAME" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
 $as_echo_n "checking for UNAME... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -10608,7 +11138,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$UNIQ" = x; then
+  if [ -z "${UNIQ+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in uniq
 do
@@ -10721,14 +11251,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$UNIQ"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$UNIQ" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
+$as_echo_n "checking for UNIQ... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$UNIQ"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -10768,22 +11307,23 @@
 fi
 
 
-        if test "x$UNIQ" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
+          if test "x$UNIQ" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
 $as_echo_n "checking for UNIQ... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -10801,7 +11341,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$WC" = x; then
+  if [ -z "${WC+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in wc
 do
@@ -10914,14 +11454,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$WC"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$WC" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
+$as_echo_n "checking for WC... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$WC"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -10961,22 +11510,23 @@
 fi
 
 
-        if test "x$WC" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
+          if test "x$WC" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
 $as_echo_n "checking for WC... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -10994,7 +11544,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$WHICH" = x; then
+  if [ -z "${WHICH+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in which
 do
@@ -11107,14 +11657,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$WHICH"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$WHICH" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
+$as_echo_n "checking for WHICH... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$WHICH"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -11154,22 +11713,23 @@
 fi
 
 
-        if test "x$WHICH" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
+          if test "x$WHICH" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
 $as_echo_n "checking for WHICH... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -11187,7 +11747,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$XARGS" = x; then
+  if [ -z "${XARGS+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in xargs
 do
@@ -11300,14 +11860,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$XARGS"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$XARGS" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
+$as_echo_n "checking for XARGS... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$XARGS"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -11347,22 +11916,23 @@
 fi
 
 
-        if test "x$XARGS" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
+          if test "x$XARGS" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
 $as_echo_n "checking for XARGS... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -11381,7 +11951,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$AWK" = x; then
+  if [ -z "${AWK+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in gawk mawk nawk awk
 do
@@ -11488,14 +12058,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$AWK"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$AWK" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
+$as_echo_n "checking for AWK... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$AWK"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -11535,22 +12114,23 @@
 fi
 
 
-        if test "x$AWK" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
+          if test "x$AWK" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
 $as_echo_n "checking for AWK... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -11566,7 +12146,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$GREP" = x; then
+  if [ -z "${GREP+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
@@ -11715,14 +12295,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$GREP"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$GREP" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
+$as_echo_n "checking for GREP... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$GREP"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -11762,22 +12351,23 @@
 fi
 
 
-        if test "x$GREP" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
+          if test "x$GREP" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
 $as_echo_n "checking for GREP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -11793,7 +12383,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$EGREP" = x; then
+  if [ -z "${EGREP+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
@@ -11950,14 +12540,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$EGREP"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$EGREP" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
+$as_echo_n "checking for EGREP... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$EGREP"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -11997,22 +12596,23 @@
 fi
 
 
-        if test "x$EGREP" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
+          if test "x$EGREP" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
 $as_echo_n "checking for EGREP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -12028,7 +12628,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$FGREP" = x; then
+  if [ -z "${FGREP+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
 $as_echo_n "checking for fgrep... " >&6; }
@@ -12185,14 +12785,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$FGREP"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$FGREP" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
+$as_echo_n "checking for FGREP... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$FGREP"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -12232,22 +12841,23 @@
 fi
 
 
-        if test "x$FGREP" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
+          if test "x$FGREP" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
 $as_echo_n "checking for FGREP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -12263,7 +12873,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$SED" = x; then
+  if [ -z "${SED+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
@@ -12424,14 +13034,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$SED"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$SED" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
+$as_echo_n "checking for SED... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$SED"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -12471,22 +13090,23 @@
 fi
 
 
-        if test "x$SED" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
+          if test "x$SED" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
 $as_echo_n "checking for SED... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -12511,7 +13131,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$CYGPATH" = x; then
+  if [ -z "${CYGPATH+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in cygpath
 do
@@ -12624,14 +13244,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$CYGPATH"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$CYGPATH" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
+$as_echo_n "checking for CYGPATH... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$CYGPATH"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -12671,33 +13300,34 @@
 fi
 
 
-        if test "x$CYGPATH" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
+          if test "x$CYGPATH" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
 $as_echo_n "checking for CYGPATH... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
-      fi
-    fi
-  fi
-
-
-
-
-  # Publish this variable in the help.
-
-
-  if test "x$READLINK" = x; then
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+  fi
+
+
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${READLINK+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in greadlink readlink
 do
@@ -12810,14 +13440,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$READLINK"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$READLINK" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
+$as_echo_n "checking for READLINK... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$READLINK"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -12857,33 +13496,34 @@
 fi
 
 
-        if test "x$READLINK" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
+          if test "x$READLINK" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
 $as_echo_n "checking for READLINK... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
-      fi
-    fi
-  fi
-
-
-
-
-  # Publish this variable in the help.
-
-
-  if test "x$DF" = x; then
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+  fi
+
+
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${DF+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in df
 do
@@ -12996,14 +13636,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$DF"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$DF" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
+$as_echo_n "checking for DF... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$DF"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -13043,33 +13692,34 @@
 fi
 
 
-        if test "x$DF" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
+          if test "x$DF" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
 $as_echo_n "checking for DF... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
-      fi
-    fi
-  fi
-
-
-
-
-  # Publish this variable in the help.
-
-
-  if test "x$CPIO" = x; then
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+  fi
+
+
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${CPIO+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in cpio bsdcpio
 do
@@ -13182,14 +13832,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$CPIO"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$CPIO" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
+$as_echo_n "checking for CPIO... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$CPIO"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -13229,22 +13888,219 @@
 fi
 
 
-        if test "x$CPIO" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
+          if test "x$CPIO" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
 $as_echo_n "checking for CPIO... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+  fi
+
+
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${NICE+x}" ]; then
+    # The variable is not set by user, try to locate tool using the code snippet
+    for ac_prog in nice
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_NICE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $NICE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+NICE=$ac_cv_path_NICE
+if test -n "$NICE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
+$as_echo "$NICE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$NICE" && break
+done
+
+  else
+    # The variable is set, but is it from the command line or the environment?
+
+    # Try to remove the string !NICE! from our list.
+    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
+    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
+      # If it failed, the variable was not from the command line. Ignore it,
+      # but warn the user (except for BASH, which is always set by the calling BASH).
+      if test "xNICE" != xBASH; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
+      fi
+      # Try to locate tool using the code snippet
+      for ac_prog in nice
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_NICE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $NICE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+NICE=$ac_cv_path_NICE
+if test -n "$NICE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
+$as_echo "$NICE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$NICE" && break
+done
+
+    else
+      # If it succeeded, then it was overridden by the user. We will use it
+      # for the tool.
+
+      # First remove it from the list of overridden variables, so we can test
+      # for unknown variables in the end.
+      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
+
+      # Check if we try to supply an empty value
+      if test "x$NICE" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
+$as_echo_n "checking for NICE... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$NICE"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
+set dummy $tool_basename; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_NICE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $NICE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+NICE=$ac_cv_path_NICE
+if test -n "$NICE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
+$as_echo "$NICE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+          if test "x$NICE" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
+$as_echo_n "checking for NICE... " >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -17383,7 +18239,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$UNZIP" = x; then
+  if [ -z "${UNZIP+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in unzip
 do
@@ -17496,14 +18352,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$UNZIP"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$UNZIP" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
+$as_echo_n "checking for UNZIP... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$UNZIP"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -17543,22 +18408,23 @@
 fi
 
 
-        if test "x$UNZIP" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
+          if test "x$UNZIP" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
 $as_echo_n "checking for UNZIP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -17576,7 +18442,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$ZIP" = x; then
+  if [ -z "${ZIP+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in zip
 do
@@ -17689,14 +18555,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$ZIP"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$ZIP" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
+$as_echo_n "checking for ZIP... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$ZIP"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -17736,22 +18611,23 @@
 fi
 
 
-        if test "x$ZIP" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
+          if test "x$ZIP" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
 $as_echo_n "checking for ZIP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -17771,7 +18647,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$LDD" = x; then
+  if [ -z "${LDD+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in ldd
 do
@@ -17884,14 +18760,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$LDD"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$LDD" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
+$as_echo_n "checking for LDD... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$LDD"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -17931,22 +18816,23 @@
 fi
 
 
-        if test "x$LDD" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
+          if test "x$LDD" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
 $as_echo_n "checking for LDD... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -17963,7 +18849,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$OTOOL" = x; then
+  if [ -z "${OTOOL+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in otool
 do
@@ -18076,14 +18962,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$OTOOL"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$OTOOL" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
+$as_echo_n "checking for OTOOL... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$OTOOL"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -18123,22 +19018,23 @@
 fi
 
 
-        if test "x$OTOOL" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
+          if test "x$OTOOL" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
 $as_echo_n "checking for OTOOL... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -18152,7 +19048,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$READELF" = x; then
+  if [ -z "${READELF+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in greadelf readelf
 do
@@ -18265,14 +19161,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$READELF"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$READELF" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
+$as_echo_n "checking for READELF... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$READELF"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -18312,33 +19217,34 @@
 fi
 
 
-        if test "x$READELF" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
+          if test "x$READELF" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
 $as_echo_n "checking for READELF... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
-      fi
-    fi
-  fi
-
-
-
-
-  # Publish this variable in the help.
-
-
-  if test "x$HG" = x; then
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+  fi
+
+
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${HG+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in hg
 do
@@ -18451,14 +19357,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$HG"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$HG" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
+$as_echo_n "checking for HG... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$HG"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -18498,33 +19413,34 @@
 fi
 
 
-        if test "x$HG" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
+          if test "x$HG" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
 $as_echo_n "checking for HG... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
-      fi
-    fi
-  fi
-
-
-
-
-  # Publish this variable in the help.
-
-
-  if test "x$STAT" = x; then
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+  fi
+
+
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${STAT+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in stat
 do
@@ -18637,14 +19553,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$STAT"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$STAT" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
+$as_echo_n "checking for STAT... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$STAT"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -18684,33 +19609,34 @@
 fi
 
 
-        if test "x$STAT" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
+          if test "x$STAT" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
 $as_echo_n "checking for STAT... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
-      fi
-    fi
-  fi
-
-
-
-
-  # Publish this variable in the help.
-
-
-  if test "x$TIME" = x; then
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+  fi
+
+
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${TIME+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in time
 do
@@ -18823,14 +19749,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$TIME"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$TIME" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
+$as_echo_n "checking for TIME... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$TIME"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -18870,33 +19805,34 @@
 fi
 
 
-        if test "x$TIME" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
+          if test "x$TIME" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
 $as_echo_n "checking for TIME... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
-      fi
-    fi
-  fi
-
-
-
-
-  # Publish this variable in the help.
-
-
-  if test "x$PATCH" = x; then
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+  fi
+
+
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${PATCH+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in gpatch patch
 do
@@ -19009,14 +19945,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$PATCH"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$PATCH" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
+$as_echo_n "checking for PATCH... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$PATCH"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -19056,22 +20001,23 @@
 fi
 
 
-        if test "x$PATCH" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
+          if test "x$PATCH" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
 $as_echo_n "checking for PATCH... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -19093,7 +20039,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$DSYMUTIL" = x; then
+  if [ -z "${DSYMUTIL+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in dsymutil
 do
@@ -19206,14 +20152,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$DSYMUTIL"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$DSYMUTIL" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
+$as_echo_n "checking for DSYMUTIL... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$DSYMUTIL"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -19253,22 +20208,23 @@
 fi
 
 
-        if test "x$DSYMUTIL" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
+          if test "x$DSYMUTIL" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
 $as_echo_n "checking for DSYMUTIL... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -19286,7 +20242,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$XATTR" = x; then
+  if [ -z "${XATTR+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in xattr
 do
@@ -19399,14 +20355,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$XATTR"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$XATTR" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
+$as_echo_n "checking for XATTR... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$XATTR"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -19446,22 +20411,23 @@
 fi
 
 
-        if test "x$XATTR" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
+          if test "x$XATTR" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
 $as_echo_n "checking for XATTR... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -19478,7 +20444,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$CODESIGN" = x; then
+  if [ -z "${CODESIGN+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in codesign
 do
@@ -19591,14 +20557,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$CODESIGN"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$CODESIGN" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
+$as_echo_n "checking for CODESIGN... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$CODESIGN"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -19638,22 +20613,23 @@
 fi
 
 
-        if test "x$CODESIGN" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
+          if test "x$CODESIGN" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
 $as_echo_n "checking for CODESIGN... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -19681,7 +20657,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$SETFILE" = x; then
+  if [ -z "${SETFILE+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in SetFile
 do
@@ -19794,14 +20770,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$SETFILE"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$SETFILE" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
+$as_echo_n "checking for SETFILE... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$SETFILE"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -19841,22 +20826,23 @@
 fi
 
 
-        if test "x$SETFILE" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
+          if test "x$SETFILE" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
 $as_echo_n "checking for SETFILE... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -20030,182 +21016,6 @@
 
 
 
-# Setup builddeps, for automatic downloading of tools we need.
-# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
-# boot-jdk setup, but we need to have basic tools setup first.
-
-
-# Check whether --with-builddeps-conf was given.
-if test "${with_builddeps_conf+set}" = set; then :
-  withval=$with_builddeps_conf;
-fi
-
-
-
-# Check whether --with-builddeps-server was given.
-if test "${with_builddeps_server+set}" = set; then :
-  withval=$with_builddeps_server;
-fi
-
-
-
-# Check whether --with-builddeps-dir was given.
-if test "${with_builddeps_dir+set}" = set; then :
-  withval=$with_builddeps_dir;
-else
-  with_builddeps_dir=/localhome/builddeps
-fi
-
-
-
-# Check whether --with-builddeps-group was given.
-if test "${with_builddeps_group+set}" = set; then :
-  withval=$with_builddeps_group;
-fi
-
-
-
-
-  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-    if test "x$with_builddeps_conf" != x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
-$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
-      builddepsfile=$with_builddeps_conf
-      if test -s $builddepsfile; then
-        . $builddepsfile
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
-$as_echo "loaded!" >&6; }
-      else
-        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
-      fi
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
-$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
-      builddepsfile=`mktemp`
-      touch $builddepsfile
-      # Put all found confs into a single file.
-      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
-      # Source the file to acquire the variables
-      if test -s $builddepsfile; then
-        . $builddepsfile
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
-$as_echo "found at least one!" >&6; }
-      else
-        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
-      fi
-    fi
-    # Create build and target names that use _ instead of "-" and ".".
-    # This is necessary to use them in variable names.
-    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
-    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
-    # Extract rewrite information for build and target
-    eval rewritten_build=\${REWRITE_${build_var}}
-    if test "x$rewritten_build" = x; then
-      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
-      echo Build stays the same $rewritten_build
-    else
-      echo Rewriting build for builddeps into $rewritten_build
-    fi
-    eval rewritten_target=\${REWRITE_${target_var}}
-    if test "x$rewritten_target" = x; then
-      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
-      echo Target stays the same $rewritten_target
-    else
-      echo Rewriting target for builddeps into $rewritten_target
-    fi
-    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
-    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
-  fi
-  for ac_prog in 7z unzip
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$BDEPS_UNZIP"; then
-  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
-if test -n "$BDEPS_UNZIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
-$as_echo "$BDEPS_UNZIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$BDEPS_UNZIP" && break
-done
-
-  if test "x$BDEPS_UNZIP" = x7z; then
-    BDEPS_UNZIP="7z x"
-  fi
-
-  for ac_prog in wget lftp ftp
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_BDEPS_FTP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$BDEPS_FTP"; then
-  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_BDEPS_FTP="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
-if test -n "$BDEPS_FTP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
-$as_echo "$BDEPS_FTP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$BDEPS_FTP" && break
-done
-
-
-
 ###############################################################################
 #
 # Determine OpenJDK variants, options and version numbers.
@@ -20637,330 +21447,6 @@
     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
   fi
 
-  # Test: Is bootjdk available from builddeps?
-
-  if test "x$BOOT_JDK_FOUND" = xno; then
-    # Now execute the test
-
-
-
-  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-    # Source the builddeps file again, to make sure it uses the latest variables!
-    . $builddepsfile
-    # Look for a target and build machine specific resource!
-    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a target specific resource
-      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
-    fi
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a build specific resource
-      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
-    fi
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a generic resource
-      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
-      resource=${builddep_bootjdk}
-    fi
-    if test "x$resource" != x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
-$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
-      # If the resource in the builddeps.conf file is an existing directory,
-      # for example /java/linux/cups
-      if test -d ${resource}; then
-        depdir=${resource}
-      else
-
-  # bootjdk is for example mymodule
-  # $resource is for example libs/general/libmymod_1_2_3.zip
-  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-  # $with_builddeps_dir is for example /localhome/builddeps
-  # depdir is the name of the variable into which we store the depdir, eg MYMOD
-  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-  filename=`basename $resource`
-  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-  filebase=${filename%%.*}
-  extension=${filename#*.}
-  installdir=$with_builddeps_dir/$filebase
-  if test ! -f $installdir/$filename.unpacked; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-    if test ! -d $installdir; then
-      mkdir -p $installdir
-    fi
-    if test ! -d $installdir; then
-      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-    fi
-    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
-    touch $tmpfile
-    if test ! -f $tmpfile; then
-      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-    fi
-
-  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-  # $tmpfile is the local file name for the downloaded file.
-  VALID_TOOL=no
-  if test "x$BDEPS_FTP" = xwget; then
-    VALID_TOOL=yes
-    wget -O $tmpfile $with_builddeps_server/$resource
-  fi
-  if test "x$BDEPS_FTP" = xlftp; then
-    VALID_TOOL=yes
-    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
-  fi
-  if test "x$BDEPS_FTP" = xftp; then
-    VALID_TOOL=yes
-    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-    FTPUSERPWD=${FTPSERVER%%@*}
-    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-      FTPUSER=${userpwd%%:*}
-      FTPPWD=${userpwd#*@}
-      FTPSERVER=${FTPSERVER#*@}
-    else
-      FTPUSER=ftp
-      FTPPWD=ftp
-    fi
-    # the "pass" command does not work on some
-    # ftp clients (read ftp.exe) but if it works,
-    # passive mode is better!
-    ( \
-        echo "user $FTPUSER $FTPPWD"        ; \
-        echo "pass"                         ; \
-        echo "bin"                          ; \
-        echo "get $FTPPATH $tmpfile"              ; \
-    ) | ftp -in $FTPSERVER
-  fi
-  if test "x$VALID_TOOL" != xyes; then
-    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
-  fi
-
-    mv $tmpfile $installdir/$filename
-    if test ! -s $installdir/$filename; then
-      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-    fi
-    case "$extension" in
-      zip)  echo "Unzipping $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-        ;;
-      tar.gz) echo "Untaring $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-        ;;
-      tgz) echo "Untaring $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-        ;;
-      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-        ;;
-    esac
-  fi
-  if test -f $installdir/$filename.unpacked; then
-    depdir=$installdir
-  fi
-
-      fi
-      # Source the builddeps file again, because in the previous command, the depdir
-      # was updated to point at the current build dependency install directory.
-      . $builddepsfile
-      # Now extract variables from the builddeps.conf files.
-      theroot=${builddep_bootjdk_ROOT}
-      thecflags=${builddep_bootjdk_CFLAGS}
-      thelibs=${builddep_bootjdk_LIBS}
-      if test "x$depdir" = x; then
-        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
-      fi
-      BOOT_JDK=$depdir
-      if test "x$theroot" != x; then
-        BOOT_JDK="$theroot"
-      fi
-      if test "x$thecflags" != x; then
-        BOOT_JDK_CFLAGS="$thecflags"
-      fi
-      if test "x$thelibs" != x; then
-        BOOT_JDK_LIBS="$thelibs"
-      fi
-      BOOT_JDK_FOUND=maybe
-      else BOOT_JDK_FOUND=no
-
-    fi
-    else BOOT_JDK_FOUND=no
-
-  fi
-
-
-
-    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
-    if test "x$BOOT_JDK_FOUND" = xmaybe; then
-      # Do we have a bin/java?
-      if test ! -x "$BOOT_JDK/bin/java"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
-$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
-        BOOT_JDK_FOUND=no
-      else
-        # Do we have a bin/javac?
-        if test ! -x "$BOOT_JDK/bin/javac"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
-$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
-          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
-$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
-          BOOT_JDK_FOUND=no
-        else
-          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
-          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
-
-          # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
-          if test "x$FOUND_CORRECT_VERSION" = x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
-$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
-            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
-            BOOT_JDK_FOUND=no
-          else
-            # We're done! :-)
-            BOOT_JDK_FOUND=yes
-
-  # Only process if variable expands to non-empty
-
-  if test "x$BOOT_JDK" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$BOOT_JDK"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    BOOT_JDK="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$BOOT_JDK"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    BOOT_JDK="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$BOOT_JDK"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
-$as_echo_n "checking for Boot JDK... " >&6; }
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
-$as_echo "$BOOT_JDK" >&6; }
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
-$as_echo_n "checking Boot JDK version... " >&6; }
-            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
-$as_echo "$BOOT_JDK_VERSION" >&6; }
-          fi # end check jdk version
-        fi # end check javac
-      fi # end check java
-    fi # end check boot jdk found
-  fi
-
-
   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
 
   if test "x$BOOT_JDK_FOUND" = xno; then
@@ -25703,7 +26189,7 @@
   if test "x$BOOT_JDK_FOUND" = xno; then
 
   # Print a helpful message on how to acquire the necessary build dependency.
-  # openjdk is the help tag: freetype, cups, pulse, alsa etc
+  # openjdk is the help tag: freetype, cups, alsa etc
   MISSING_DEPENDENCY=openjdk
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -25747,7 +26233,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$JAVA" = x; then
+  if [ -z "${JAVA+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
@@ -25800,14 +26286,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$JAVA"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$JAVA" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
+$as_echo_n "checking for JAVA... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$JAVA"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -25847,22 +26342,23 @@
 fi
 
 
-        if test "x$JAVA" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
+          if test "x$JAVA" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
 $as_echo_n "checking for JAVA... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -25874,7 +26370,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$JAVAC" = x; then
+  if [ -z "${JAVAC+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
@@ -25927,14 +26423,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$JAVAC"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$JAVAC" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
+$as_echo_n "checking for JAVAC... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$JAVAC"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -25974,22 +26479,23 @@
 fi
 
 
-        if test "x$JAVAC" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
+          if test "x$JAVAC" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
 $as_echo_n "checking for JAVAC... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -26001,7 +26507,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$JAVAH" = x; then
+  if [ -z "${JAVAH+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
@@ -26054,14 +26560,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$JAVAH"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$JAVAH" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
+$as_echo_n "checking for JAVAH... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$JAVAH"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -26101,22 +26616,23 @@
 fi
 
 
-        if test "x$JAVAH" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
+          if test "x$JAVAH" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
 $as_echo_n "checking for JAVAH... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -26128,7 +26644,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$JAR" = x; then
+  if [ -z "${JAR+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
@@ -26181,14 +26697,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$JAR"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$JAR" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
+$as_echo_n "checking for JAR... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$JAR"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -26228,22 +26753,23 @@
 fi
 
 
-        if test "x$JAR" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
+          if test "x$JAR" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
 $as_echo_n "checking for JAR... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -26255,7 +26781,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$JARSIGNER" = x; then
+  if [ -z "${JARSIGNER+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
@@ -26308,14 +26834,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$JARSIGNER"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$JARSIGNER" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
+$as_echo_n "checking for JARSIGNER... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$JARSIGNER"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -26355,22 +26890,23 @@
 fi
 
 
-        if test "x$JARSIGNER" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
+          if test "x$JARSIGNER" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
 $as_echo_n "checking for JARSIGNER... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -28607,7 +29143,7 @@
     if test "x$CC" = x; then
 
   # Print a helpful message on how to acquire the necessary build dependency.
-  # devkit is the help tag: freetype, cups, pulse, alsa etc
+  # devkit is the help tag: freetype, cups, alsa etc
   MISSING_DEPENDENCY=devkit
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -30355,7 +30891,7 @@
     if test "x$CXX" = x; then
 
   # Print a helpful message on how to acquire the necessary build dependency.
-  # devkit is the help tag: freetype, cups, pulse, alsa etc
+  # devkit is the help tag: freetype, cups, alsa etc
   MISSING_DEPENDENCY=devkit
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -32800,7 +33336,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$AS" = x; then
+  if [ -z "${AS+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in as
 do
@@ -32913,14 +33449,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$AS"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$AS" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
+$as_echo_n "checking for AS... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$AS"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -32960,22 +33505,23 @@
 fi
 
 
-        if test "x$AS" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
+          if test "x$AS" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
 $as_echo_n "checking for AS... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -33321,7 +33867,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$AR" = x; then
+  if [ -z "${AR+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     if test -n "$ac_tool_prefix"; then
   for ac_prog in ar
@@ -33544,14 +34090,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$AR"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$AR" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
+$as_echo_n "checking for AR... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$AR"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -33591,22 +34146,23 @@
 fi
 
 
-        if test "x$AR" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
+          if test "x$AR" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
 $as_echo_n "checking for AR... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -33907,7 +34463,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$LIPO" = x; then
+  if [ -z "${LIPO+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in lipo
 do
@@ -34020,14 +34576,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$LIPO"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$LIPO" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
+$as_echo_n "checking for LIPO... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$LIPO"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -34067,22 +34632,23 @@
 fi
 
 
-        if test "x$LIPO" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
+          if test "x$LIPO" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
 $as_echo_n "checking for LIPO... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -35433,7 +35999,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$STRIP" = x; then
+  if [ -z "${STRIP+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in strip
 do
@@ -35546,14 +36112,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$STRIP"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$STRIP" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
+$as_echo_n "checking for STRIP... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$STRIP"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -35593,22 +36168,23 @@
 fi
 
 
-        if test "x$STRIP" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
+          if test "x$STRIP" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
 $as_echo_n "checking for STRIP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -35905,7 +36481,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$NM" = x; then
+  if [ -z "${NM+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in nm
 do
@@ -36018,14 +36594,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$NM"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$NM" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
+$as_echo_n "checking for NM... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$NM"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -36065,22 +36650,23 @@
 fi
 
 
-        if test "x$NM" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
+          if test "x$NM" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
 $as_echo_n "checking for NM... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -36377,7 +36963,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$GNM" = x; then
+  if [ -z "${GNM+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in gnm
 do
@@ -36490,14 +37076,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$GNM"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$GNM" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
+$as_echo_n "checking for GNM... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$GNM"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -36537,22 +37132,23 @@
 fi
 
 
-        if test "x$GNM" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
+          if test "x$GNM" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
 $as_echo_n "checking for GNM... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -36851,7 +37447,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$STRIP" = x; then
+  if [ -z "${STRIP+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     if test -n "$ac_tool_prefix"; then
   for ac_prog in strip
@@ -37074,14 +37670,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$STRIP"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$STRIP" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
+$as_echo_n "checking for STRIP... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$STRIP"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -37121,22 +37726,23 @@
 fi
 
 
-        if test "x$STRIP" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
+          if test "x$STRIP" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
 $as_echo_n "checking for STRIP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -37433,7 +38039,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$NM" = x; then
+  if [ -z "${NM+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     if test -n "$ac_tool_prefix"; then
   for ac_prog in nm
@@ -37656,14 +38262,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$NM"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$NM" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
+$as_echo_n "checking for NM... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$NM"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -37703,22 +38318,23 @@
 fi
 
 
-        if test "x$NM" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
+          if test "x$NM" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
 $as_echo_n "checking for NM... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -38022,7 +38638,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$OBJCOPY" = x; then
+  if [ -z "${OBJCOPY+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     if test -n "$ac_tool_prefix"; then
   for ac_prog in gobjcopy objcopy
@@ -38245,14 +38861,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$OBJCOPY"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$OBJCOPY" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
+$as_echo_n "checking for OBJCOPY... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$OBJCOPY"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -38292,22 +38917,23 @@
 fi
 
 
-        if test "x$OBJCOPY" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
+          if test "x$OBJCOPY" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
 $as_echo_n "checking for OBJCOPY... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -38651,7 +39277,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$OBJDUMP" = x; then
+  if [ -z "${OBJDUMP+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     if test -n "$ac_tool_prefix"; then
   for ac_prog in gobjdump objdump
@@ -38874,14 +39500,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$OBJDUMP"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$OBJDUMP" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
+$as_echo_n "checking for OBJDUMP... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$OBJDUMP"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -38921,22 +39556,23 @@
 fi
 
 
-        if test "x$OBJDUMP" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
+          if test "x$OBJDUMP" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
 $as_echo_n "checking for OBJDUMP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -39260,7 +39896,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$BUILD_CC" = x; then
+  if [ -z "${BUILD_CC+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in cl cc gcc
 do
@@ -39373,14 +40009,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$BUILD_CC"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$BUILD_CC" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
+$as_echo_n "checking for BUILD_CC... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$BUILD_CC"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -39420,22 +40065,23 @@
 fi
 
 
-        if test "x$BUILD_CC" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
+          if test "x$BUILD_CC" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
 $as_echo_n "checking for BUILD_CC... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -39732,7 +40378,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$BUILD_CXX" = x; then
+  if [ -z "${BUILD_CXX+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in cl CC g++
 do
@@ -39845,14 +40491,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$BUILD_CXX"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$BUILD_CXX" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
+$as_echo_n "checking for BUILD_CXX... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$BUILD_CXX"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -39892,22 +40547,23 @@
 fi
 
 
-        if test "x$BUILD_CXX" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
+          if test "x$BUILD_CXX" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
 $as_echo_n "checking for BUILD_CXX... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -40204,7 +40860,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$BUILD_LD" = x; then
+  if [ -z "${BUILD_LD+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in ld
 do
@@ -40317,14 +40973,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$BUILD_LD"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$BUILD_LD" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_LD= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool BUILD_LD= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
+$as_echo_n "checking for BUILD_LD... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$BUILD_LD"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -40364,22 +41029,23 @@
 fi
 
 
-        if test "x$BUILD_LD" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
+          if test "x$BUILD_LD" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
 $as_echo_n "checking for BUILD_LD... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -41143,7 +41809,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$JTREGEXE" = x; then
+  if [ -z "${JTREGEXE+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in jtreg
 do
@@ -41256,14 +41922,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$JTREGEXE"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$JTREGEXE" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
+$as_echo_n "checking for JTREGEXE... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$JTREGEXE"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -41303,22 +41978,23 @@
 fi
 
 
-        if test "x$JTREGEXE" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
+          if test "x$JTREGEXE" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
 $as_echo_n "checking for JTREGEXE... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
@@ -41626,7 +42302,7 @@
     if test "x$COMPILE_TYPE" = xreduced; then
 
   # Print a helpful message on how to acquire the necessary build dependency.
-  # reduced is the help tag: freetype, cups, pulse, alsa etc
+  # reduced is the help tag: freetype, cups, alsa etc
   MISSING_DEPENDENCY=reduced
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -41783,7 +42459,7 @@
         if test "x$COMPILE_TYPE" = xreduced; then
 
   # Print a helpful message on how to acquire the necessary build dependency.
-  # reduced is the help tag: freetype, cups, pulse, alsa etc
+  # reduced is the help tag: freetype, cups, alsa etc
   MISSING_DEPENDENCY=reduced
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -43187,83 +43863,2814 @@
 
 
 
-
-  ###############################################################################
-  #
-  # OS specific settings that we never will need to probe.
-  #
-  if test "x$OPENJDK_TARGET_OS" = xlinux; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
-$as_echo_n "checking what is not needed on Linux?... " >&6; }
-    PULSE_NOT_NEEDED=yes
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
-$as_echo "pulse" >&6; }
-  fi
-
-  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
-$as_echo_n "checking what is not needed on Solaris?... " >&6; }
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
-$as_echo "alsa pulse" >&6; }
-  fi
-
-  if test "x$OPENJDK_TARGET_OS" = xaix; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
-$as_echo_n "checking what is not needed on AIX?... " >&6; }
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
-$as_echo "alsa pulse" >&6; }
-  fi
-
-
+  # Check if X11 is needed
+  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    # No X11 support on windows or macosx
+    NEEDS_LIB_X11=false
+  else
+    if test "x$SUPPORT_HEADFUL" = xno; then
+      # No X11 support if building headless-only
+      NEEDS_LIB_X11=false
+    else
+      # All other instances need X11
+      NEEDS_LIB_X11=true
+    fi
+  fi
+
+  # Check if cups is needed
   if test "x$OPENJDK_TARGET_OS" = xwindows; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
-$as_echo_n "checking what is not needed on Windows?... " >&6; }
-    CUPS_NOT_NEEDED=yes
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    X11_NOT_NEEDED=yes
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
-$as_echo "alsa cups pulse x11" >&6; }
-  fi
-
-  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
-$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    X11_NOT_NEEDED=yes
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
-$as_echo "alsa pulse x11" >&6; }
-  fi
-
-  if test "x$OPENJDK_TARGET_OS" = xbsd; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
-$as_echo_n "checking what is not needed on bsd?... " >&6; }
-    ALSA_NOT_NEEDED=yes
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
-$as_echo "alsa" >&6; }
-  fi
-
-  if test "x$OPENJDK" = "xfalse"; then
-    FREETYPE_NOT_NEEDED=yes
-  fi
-
-  if test "x$SUPPORT_HEADFUL" = xno; then
-    X11_NOT_NEEDED=yes
-  fi
-
-
-
-  ###############################################################################
-  #
-  # Check for X Windows
-  #
-
-  if test "x$X11_NOT_NEEDED" = xyes; then
+    # Windows have a separate print system
+    NEEDS_LIB_CUPS=false
+  else
+    NEEDS_LIB_CUPS=true
+  fi
+
+  # Check if freetype is needed
+  if test "x$OPENJDK" = "xtrue"; then
+    NEEDS_LIB_FREETYPE=true
+  else
+    NEEDS_LIB_FREETYPE=false
+  fi
+
+  # Check if alsa is needed
+  if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    NEEDS_LIB_ALSA=true
+  else
+    NEEDS_LIB_ALSA=false
+  fi
+
+  # Check if ffi is needed
+  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+    NEEDS_LIB_FFI=true
+  else
+    NEEDS_LIB_FFI=false
+  fi
+
+
+  # statically link libstdc++ before C++ ABI is stablized on Linux unless
+  # dynamic build is configured on command line.
+
+# Check whether --with-stdc++lib was given.
+if test "${with_stdc__lib+set}" = set; then :
+  withval=$with_stdc__lib;
+        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
+                && test "x$with_stdc__lib" != xdefault; then
+          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
+        fi
+
+else
+  with_stdc__lib=default
+
+fi
+
+
+  if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    # Test if -lstdc++ works.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
+$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    OLD_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS="$CXXFLAGS -lstdc++"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  has_dynamic_libstdcxx=yes
+else
+  has_dynamic_libstdcxx=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    CXXFLAGS="$OLD_CXXFLAGS"
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
+$as_echo "$has_dynamic_libstdcxx" >&6; }
+
+    # Test if stdc++ can be linked statically.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
+$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
+    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    OLD_LIBS="$LIBS"
+    OLD_CXX="$CXX"
+    LIBS="$STATIC_STDCXX_FLAGS"
+    CXX="$CC"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  has_static_libstdcxx=yes
+else
+  has_static_libstdcxx=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    LIBS="$OLD_LIBS"
+    CXX="$OLD_CXX"
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
+$as_echo "$has_static_libstdcxx" >&6; }
+
+    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
+      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
+    fi
+
+    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
+      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
+    fi
+
+    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
+      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
+    fi
+
+    # If dynamic was requested, it's available since it would fail above otherwise.
+    # If dynamic wasn't requested, go with static unless it isn't available.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
+$as_echo_n "checking how to link with libstdc++... " >&6; }
+    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+      LIBCXX="$LIBCXX -lstdc++"
+      LDCXX="$CXX"
+      STATIC_CXX_SETTING="STATIC_CXX=false"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
+$as_echo "dynamic" >&6; }
+    else
+      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
+      LDCXX="$CC"
+      STATIC_CXX_SETTING="STATIC_CXX=true"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
+$as_echo "static" >&6; }
+    fi
+  fi
+
+
+  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
+  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
+    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
+  fi
+
+  # TODO better (platform agnostic) test
+  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
+    LIBCXX="-lstdc++"
+  fi
+
+
+  # Setup Windows runtime dlls
+  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+
+
+# Check whether --with-msvcr-dll was given.
+if test "${with_msvcr_dll+set}" = set; then :
+  withval=$with_msvcr_dll;
+fi
+
+
+  if test "x$with_msvcr_dll" != x; then
+    # If given explicitely by user, do not probe. If not present, fail directly.
+
+  DLL_NAME="$MSVCR_NAME"
+  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
+  METHOD="--with-msvcr-dll"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+    if test "x$MSVC_DLL" = x; then
+      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
+    fi
+    MSVCR_DLL="$MSVC_DLL"
+  elif test "x$DEVKIT_MSVCR_DLL" != x; then
+
+  DLL_NAME="$MSVCR_NAME"
+  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
+  METHOD="devkit"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+    if test "x$MSVC_DLL" = x; then
+      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
+    fi
+    MSVCR_DLL="$MSVC_DLL"
+  else
+
+  DLL_NAME="${MSVCR_NAME}"
+  MSVC_DLL=
+
+  if test "x$MSVC_DLL" = x; then
+    # Probe: Using well-known location from Visual Studio 10.0
+    if test "x$VCINSTALLDIR" != x; then
+      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
+
+  windows_path="$CYGWIN_VC_INSTALL_DIR"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    CYGWIN_VC_INSTALL_DIR="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    CYGWIN_VC_INSTALL_DIR="$unix_path"
+  fi
+
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+      else
+        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+      fi
+      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
+
+  DLL_NAME="$DLL_NAME"
+  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+  METHOD="well-known location in VCINSTALLDIR"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+    fi
+  fi
+
+  if test "x$MSVC_DLL" = x; then
+    # Probe: Check in the Boot JDK directory.
+    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
+
+  DLL_NAME="$DLL_NAME"
+  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+  METHOD="well-known location in Boot JDK"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+  fi
+
+  if test "x$MSVC_DLL" = x; then
+    # Probe: Look in the Windows system32 directory
+    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
+
+  windows_path="$CYGWIN_SYSTEMROOT"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    CYGWIN_SYSTEMROOT="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    CYGWIN_SYSTEMROOT="$unix_path"
+  fi
+
+    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
+
+  DLL_NAME="$DLL_NAME"
+  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+  METHOD="well-known location in SYSTEMROOT"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+  fi
+
+  if test "x$MSVC_DLL" = x; then
+    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
+    if test "x$VS100COMNTOOLS" != x; then
+      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
+
+  windows_path="$CYGWIN_VS_TOOLS_DIR"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    CYGWIN_VS_TOOLS_DIR="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    CYGWIN_VS_TOOLS_DIR="$unix_path"
+  fi
+
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
+	    | $GREP -i /x64/ | $HEAD --lines 1`
+      else
+        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
+	    | $GREP -i /x86/ | $HEAD --lines 1`
+      fi
+
+  DLL_NAME="$DLL_NAME"
+  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+  METHOD="search of VS100COMNTOOLS"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+    fi
+  fi
+
+  if test "x$MSVC_DLL" = x; then
+    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
+    # (This was the original behaviour; kept since it might turn something up)
+    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
+	    | $GREP x64 | $HEAD --lines 1`
+      else
+        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
+	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
+        if test "x$POSSIBLE_MSVC_DLL" = x; then
+          # We're grasping at straws now...
+          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
+	      | $HEAD --lines 1`
+        fi
+      fi
+
+
+  DLL_NAME="$DLL_NAME"
+  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+  METHOD="search of VCINSTALLDIR"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+    fi
+  fi
+
+  if test "x$MSVC_DLL" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
+  fi
+
+    MSVCR_DLL="$MSVC_DLL"
+  fi
+
+
+
+# Check whether --with-msvcp-dll was given.
+if test "${with_msvcp_dll+set}" = set; then :
+  withval=$with_msvcp_dll;
+fi
+
+
+  if test "x$MSVCP_NAME" != "x"; then
+    if test "x$with_msvcp_dll" != x; then
+      # If given explicitely by user, do not probe. If not present, fail directly.
+
+  DLL_NAME="$MSVCP_NAME"
+  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
+  METHOD="--with-msvcp-dll"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+      if test "x$MSVC_DLL" = x; then
+        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
+      fi
+      MSVCP_DLL="$MSVC_DLL"
+    elif test "x$DEVKIT_MSVCP_DLL" != x; then
+
+  DLL_NAME="$MSVCP_NAME"
+  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
+  METHOD="devkit"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+      if test "x$MSVC_DLL" = x; then
+        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
+      fi
+      MSVCP_DLL="$MSVC_DLL"
+    else
+
+  DLL_NAME="${MSVCP_NAME}"
+  MSVC_DLL=
+
+  if test "x$MSVC_DLL" = x; then
+    # Probe: Using well-known location from Visual Studio 10.0
+    if test "x$VCINSTALLDIR" != x; then
+      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
+
+  windows_path="$CYGWIN_VC_INSTALL_DIR"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    CYGWIN_VC_INSTALL_DIR="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    CYGWIN_VC_INSTALL_DIR="$unix_path"
+  fi
+
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+      else
+        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+      fi
+      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
+
+  DLL_NAME="$DLL_NAME"
+  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+  METHOD="well-known location in VCINSTALLDIR"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+    fi
+  fi
+
+  if test "x$MSVC_DLL" = x; then
+    # Probe: Check in the Boot JDK directory.
+    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
+
+  DLL_NAME="$DLL_NAME"
+  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+  METHOD="well-known location in Boot JDK"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+  fi
+
+  if test "x$MSVC_DLL" = x; then
+    # Probe: Look in the Windows system32 directory
+    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
+
+  windows_path="$CYGWIN_SYSTEMROOT"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    CYGWIN_SYSTEMROOT="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    CYGWIN_SYSTEMROOT="$unix_path"
+  fi
+
+    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
+
+  DLL_NAME="$DLL_NAME"
+  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+  METHOD="well-known location in SYSTEMROOT"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+  fi
+
+  if test "x$MSVC_DLL" = x; then
+    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
+    if test "x$VS100COMNTOOLS" != x; then
+      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
+
+  windows_path="$CYGWIN_VS_TOOLS_DIR"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    CYGWIN_VS_TOOLS_DIR="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    CYGWIN_VS_TOOLS_DIR="$unix_path"
+  fi
+
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
+	    | $GREP -i /x64/ | $HEAD --lines 1`
+      else
+        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
+	    | $GREP -i /x86/ | $HEAD --lines 1`
+      fi
+
+  DLL_NAME="$DLL_NAME"
+  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+  METHOD="search of VS100COMNTOOLS"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+    fi
+  fi
+
+  if test "x$MSVC_DLL" = x; then
+    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
+    # (This was the original behaviour; kept since it might turn something up)
+    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
+	    | $GREP x64 | $HEAD --lines 1`
+      else
+        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
+	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
+        if test "x$POSSIBLE_MSVC_DLL" = x; then
+          # We're grasping at straws now...
+          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
+	      | $HEAD --lines 1`
+        fi
+      fi
+
+
+  DLL_NAME="$DLL_NAME"
+  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+  METHOD="search of VCINSTALLDIR"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+    fi
+  fi
+
+  if test "x$MSVC_DLL" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
+  fi
+
+      MSVCP_DLL="$MSVC_DLL"
+    fi
+
+  fi
+
+  fi
+
+
+  if test "x$NEEDS_LIB_X11" = xfalse; then
     if test "x${with_x}" != x; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
@@ -43271,10 +46678,24 @@
     X_CFLAGS=
     X_LIBS=
   else
-    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
-    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
-    # --x-libraries for the sysroot, if that seems to be correct.
-    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
+
+    if test "x${with_x}" = xno; then
+      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
+    fi
+
+    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
+      # The user has specified a X11 base directory. Use it for includes and
+      # libraries, unless explicitely overridden.
+      if test "x$x_includes" = xNONE; then
+        x_includes="${with_x}/include"
+      fi
+      if test "x$x_libraries" = xNONE; then
+        x_libraries="${with_x}/lib"
+      fi
+    else
+      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
+      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
+      # --x-libraries for the sysroot, if that seems to be correct.
       if test "x$SYSROOT" != "x"; then
         if test "x$x_includes" = xNONE; then
           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
@@ -43989,7 +47410,7 @@
     if test "x$no_x" = xyes; then
 
   # Print a helpful message on how to acquire the necessary build dependency.
-  # x11 is the help tag: freetype, cups, pulse, alsa etc
+  # x11 is the help tag: freetype, cups, alsa etc
   MISSING_DEPENDENCY=x11
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -44063,7 +47484,7 @@
     if test "x$X11_HEADERS_OK" = xno; then
 
   # Print a helpful message on how to acquire the necessary build dependency.
-  # x11 is the help tag: freetype, cups, pulse, alsa etc
+  # x11 is the help tag: freetype, cups, alsa etc
   MISSING_DEPENDENCY=x11
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -44126,17 +47547,12 @@
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-  fi # X11_NOT_NEEDED
-
-
-
-
-
-
-  ###############################################################################
-  #
-  # The common unix printing system cups is used to print from java.
-  #
+  fi # NEEDS_LIB_X11
+
+
+
+
+
 
 # Check whether --with-cups was given.
 if test "${with_cups+set}" = set; then :
@@ -44150,7 +47566,7 @@
 fi
 
 
-  if test "x$CUPS_NOT_NEEDED" = xyes; then
+  if test "x$NEEDS_LIB_CUPS" = xfalse; then
     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
@@ -44172,151 +47588,6 @@
       CUPS_FOUND=yes
     fi
     if test "x$CUPS_FOUND" = xno; then
-
-
-  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-    # Source the builddeps file again, to make sure it uses the latest variables!
-    . $builddepsfile
-    # Look for a target and build machine specific resource!
-    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a target specific resource
-      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
-    fi
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a build specific resource
-      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
-    fi
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a generic resource
-      # (The cups comes from M4 and not the shell, thus no need for eval here.)
-      resource=${builddep_cups}
-    fi
-    if test "x$resource" != x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
-$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
-      # If the resource in the builddeps.conf file is an existing directory,
-      # for example /java/linux/cups
-      if test -d ${resource}; then
-        depdir=${resource}
-      else
-
-  # cups is for example mymodule
-  # $resource is for example libs/general/libmymod_1_2_3.zip
-  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-  # $with_builddeps_dir is for example /localhome/builddeps
-  # depdir is the name of the variable into which we store the depdir, eg MYMOD
-  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-  filename=`basename $resource`
-  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-  filebase=${filename%%.*}
-  extension=${filename#*.}
-  installdir=$with_builddeps_dir/$filebase
-  if test ! -f $installdir/$filename.unpacked; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-    if test ! -d $installdir; then
-      mkdir -p $installdir
-    fi
-    if test ! -d $installdir; then
-      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-    fi
-    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
-    touch $tmpfile
-    if test ! -f $tmpfile; then
-      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-    fi
-
-  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-  # $tmpfile is the local file name for the downloaded file.
-  VALID_TOOL=no
-  if test "x$BDEPS_FTP" = xwget; then
-    VALID_TOOL=yes
-    wget -O $tmpfile $with_builddeps_server/$resource
-  fi
-  if test "x$BDEPS_FTP" = xlftp; then
-    VALID_TOOL=yes
-    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
-  fi
-  if test "x$BDEPS_FTP" = xftp; then
-    VALID_TOOL=yes
-    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-    FTPUSERPWD=${FTPSERVER%%@*}
-    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-      FTPUSER=${userpwd%%:*}
-      FTPPWD=${userpwd#*@}
-      FTPSERVER=${FTPSERVER#*@}
-    else
-      FTPUSER=ftp
-      FTPPWD=ftp
-    fi
-    # the "pass" command does not work on some
-    # ftp clients (read ftp.exe) but if it works,
-    # passive mode is better!
-    ( \
-        echo "user $FTPUSER $FTPPWD"        ; \
-        echo "pass"                         ; \
-        echo "bin"                          ; \
-        echo "get $FTPPATH $tmpfile"              ; \
-    ) | ftp -in $FTPSERVER
-  fi
-  if test "x$VALID_TOOL" != xyes; then
-    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
-  fi
-
-    mv $tmpfile $installdir/$filename
-    if test ! -s $installdir/$filename; then
-      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-    fi
-    case "$extension" in
-      zip)  echo "Unzipping $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-        ;;
-      tar.gz) echo "Untaring $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-        ;;
-      tgz) echo "Untaring $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-        ;;
-      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-        ;;
-    esac
-  fi
-  if test -f $installdir/$filename.unpacked; then
-    depdir=$installdir
-  fi
-
-      fi
-      # Source the builddeps file again, because in the previous command, the depdir
-      # was updated to point at the current build dependency install directory.
-      . $builddepsfile
-      # Now extract variables from the builddeps.conf files.
-      theroot=${builddep_cups_ROOT}
-      thecflags=${builddep_cups_CFLAGS}
-      thelibs=${builddep_cups_LIBS}
-      if test "x$depdir" = x; then
-        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
-      fi
-      CUPS=$depdir
-      if test "x$theroot" != x; then
-        CUPS="$theroot"
-      fi
-      if test "x$thecflags" != x; then
-        CUPS_CFLAGS="$thecflags"
-      fi
-      if test "x$thelibs" != x; then
-        CUPS_LIBS="$thelibs"
-      fi
-      CUPS_FOUND=yes
-
-    fi
-
-  fi
-
-    fi
-    if test "x$CUPS_FOUND" = xno; then
       # Are the cups headers installed in the default /usr/include location?
       for ac_header in cups/cups.h cups/ppd.h
 do :
@@ -44327,10 +47598,9 @@
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-            CUPS_FOUND=yes
-            CUPS_CFLAGS=
-            DEFAULT_CUPS=yes
-
+          CUPS_FOUND=yes
+          CUPS_CFLAGS=
+          DEFAULT_CUPS=yes
 
 fi
 
@@ -44357,7 +47627,7 @@
     if test "x$CUPS_FOUND" = xno; then
 
   # Print a helpful message on how to acquire the necessary build dependency.
-  # cups is the help tag: freetype, cups, pulse, alsa etc
+  # cups is the help tag: freetype, cups, alsa etc
   MISSING_DEPENDENCY=cups
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -44393,12 +47663,6 @@
 
 
 
-
-  ###############################################################################
-  #
-  # The ubiquitous freetype library is used to render fonts.
-  #
-
 # Check whether --with-freetype was given.
 if test "${with_freetype+set}" = set; then :
   withval=$with_freetype;
@@ -44434,7 +47698,7 @@
   FREETYPE_LIBS=
   FREETYPE_BUNDLE_LIB_PATH=
 
-  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
+  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
@@ -44457,15 +47721,15 @@
 
   # Check if the freetype sources are acessible..
   if ! test -d $FREETYPE_SRC_PATH; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
-$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
+$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
     BUILD_FREETYPE=no
   fi
   # ..and contain a vc2010 project file
   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
-$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
+$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
     BUILD_FREETYPE=no
   fi
   # Now check if configure found a version of 'msbuild.exe'
@@ -44477,7 +47741,6 @@
 
   # Ready to go..
   if test "x$BUILD_FREETYPE" = xyes; then
-
     # msbuild requires trailing slashes for output directories
     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
     freetype_lib_path_unix="$freetype_lib_path"
@@ -44527,37 +47790,37 @@
 
     # First we try to build the freetype.dll
     $ECHO -e "@echo off\n"\
-	     "$MSBUILD $vcxproj_path "\
-		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
-		       "/p:Configuration=\"Release Multithreaded\" "\
-		       "/p:Platform=$freetype_platform "\
-		       "/p:ConfigurationType=DynamicLibrary "\
-		       "/p:TargetName=freetype "\
-		       "/p:OutDir=\"$freetype_lib_path\" "\
-		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
+        "$MSBUILD $vcxproj_path "\
+        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
+        "/p:Configuration=\"Release Multithreaded\" "\
+        "/p:Platform=$freetype_platform "\
+        "/p:ConfigurationType=DynamicLibrary "\
+        "/p:TargetName=freetype "\
+        "/p:OutDir=\"$freetype_lib_path\" "\
+        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
     cmd /c freetype.bat
 
     if test -s "$freetype_lib_path_unix/freetype.dll"; then
       # If that succeeds we also build freetype.lib
       $ECHO -e "@echo off\n"\
-	       "$MSBUILD $vcxproj_path "\
-			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
-			 "/p:Configuration=\"Release Multithreaded\" "\
-			 "/p:Platform=$freetype_platform "\
-			 "/p:ConfigurationType=StaticLibrary "\
-			 "/p:TargetName=freetype "\
-			 "/p:OutDir=\"$freetype_lib_path\" "\
-			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
+          "$MSBUILD $vcxproj_path "\
+          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
+          "/p:Configuration=\"Release Multithreaded\" "\
+          "/p:Platform=$freetype_platform "\
+          "/p:ConfigurationType=StaticLibrary "\
+          "/p:TargetName=freetype "\
+          "/p:OutDir=\"$freetype_lib_path\" "\
+          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
       cmd /c freetype.bat
 
       if test -s "$freetype_lib_path_unix/freetype.lib"; then
-	# Once we build both, lib and dll, set freetype lib and include path appropriately
-	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
-	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
+        # Once we build both, lib and dll, set freetype lib and include path appropriately
+        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
+        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
       else
-	BUILD_FREETYPE=no
+        BUILD_FREETYPE=no
       fi
     else
       BUILD_FREETYPE=no
@@ -45278,168 +48541,6 @@
         fi
       fi
 
-      if test "x$FOUND_FREETYPE" != xyes; then
-        # Check builddeps
-
-
-  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-    # Source the builddeps file again, to make sure it uses the latest variables!
-    . $builddepsfile
-    # Look for a target and build machine specific resource!
-    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a target specific resource
-      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
-    fi
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a build specific resource
-      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
-    fi
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a generic resource
-      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
-      resource=${builddep_freetype2}
-    fi
-    if test "x$resource" != x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
-$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
-      # If the resource in the builddeps.conf file is an existing directory,
-      # for example /java/linux/cups
-      if test -d ${resource}; then
-        depdir=${resource}
-      else
-
-  # freetype2 is for example mymodule
-  # $resource is for example libs/general/libmymod_1_2_3.zip
-  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-  # $with_builddeps_dir is for example /localhome/builddeps
-  # depdir is the name of the variable into which we store the depdir, eg MYMOD
-  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-  filename=`basename $resource`
-  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-  filebase=${filename%%.*}
-  extension=${filename#*.}
-  installdir=$with_builddeps_dir/$filebase
-  if test ! -f $installdir/$filename.unpacked; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-    if test ! -d $installdir; then
-      mkdir -p $installdir
-    fi
-    if test ! -d $installdir; then
-      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-    fi
-    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
-    touch $tmpfile
-    if test ! -f $tmpfile; then
-      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-    fi
-
-  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-  # $tmpfile is the local file name for the downloaded file.
-  VALID_TOOL=no
-  if test "x$BDEPS_FTP" = xwget; then
-    VALID_TOOL=yes
-    wget -O $tmpfile $with_builddeps_server/$resource
-  fi
-  if test "x$BDEPS_FTP" = xlftp; then
-    VALID_TOOL=yes
-    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
-  fi
-  if test "x$BDEPS_FTP" = xftp; then
-    VALID_TOOL=yes
-    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-    FTPUSERPWD=${FTPSERVER%%@*}
-    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-      FTPUSER=${userpwd%%:*}
-      FTPPWD=${userpwd#*@}
-      FTPSERVER=${FTPSERVER#*@}
-    else
-      FTPUSER=ftp
-      FTPPWD=ftp
-    fi
-    # the "pass" command does not work on some
-    # ftp clients (read ftp.exe) but if it works,
-    # passive mode is better!
-    ( \
-        echo "user $FTPUSER $FTPPWD"        ; \
-        echo "pass"                         ; \
-        echo "bin"                          ; \
-        echo "get $FTPPATH $tmpfile"              ; \
-    ) | ftp -in $FTPSERVER
-  fi
-  if test "x$VALID_TOOL" != xyes; then
-    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
-  fi
-
-    mv $tmpfile $installdir/$filename
-    if test ! -s $installdir/$filename; then
-      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-    fi
-    case "$extension" in
-      zip)  echo "Unzipping $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-        ;;
-      tar.gz) echo "Untaring $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-        ;;
-      tgz) echo "Untaring $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-        ;;
-      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-        ;;
-    esac
-  fi
-  if test -f $installdir/$filename.unpacked; then
-    depdir=$installdir
-  fi
-
-      fi
-      # Source the builddeps file again, because in the previous command, the depdir
-      # was updated to point at the current build dependency install directory.
-      . $builddepsfile
-      # Now extract variables from the builddeps.conf files.
-      theroot=${builddep_freetype2_ROOT}
-      thecflags=${builddep_freetype2_CFLAGS}
-      thelibs=${builddep_freetype2_LIBS}
-      if test "x$depdir" = x; then
-        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
-      fi
-      FREETYPE=$depdir
-      if test "x$theroot" != x; then
-        FREETYPE="$theroot"
-      fi
-      if test "x$thecflags" != x; then
-        FREETYPE_CFLAGS="$thecflags"
-      fi
-      if test "x$thelibs" != x; then
-        FREETYPE_LIBS="$thelibs"
-      fi
-      FOUND_FREETYPE=yes
-      else FOUND_FREETYPE=no
-
-    fi
-    else FOUND_FREETYPE=no
-
-  fi
-
-        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
-        if test "x$FOUND_FREETYPE" = xyes; then
-          if test "x$BUNDLE_FREETYPE" = xyes; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
-$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
-            FOUND_FREETYPE=no
-          else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
-$as_echo_n "checking for freetype... " >&6; }
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
-$as_echo "yes (using builddeps)" >&6; }
-          fi
-        fi
-      fi
-
       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
       if test "x$SYSROOT" = x; then
         if test "x$FOUND_FREETYPE" != xyes; then
@@ -45519,7 +48620,7 @@
               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
               fi
-              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
+              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
               if test "x$BUNDLE_FREETYPE" = xyes; then
                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
@@ -48179,7 +51280,7 @@
       if test "x$FOUND_FREETYPE" != xyes; then
 
   # Print a helpful message on how to acquire the necessary build dependency.
-  # freetype is the help tag: freetype, cups, pulse, alsa etc
+  # freetype is the help tag: freetype, cups, alsa etc
   MISSING_DEPENDENCY=freetype
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -48522,7 +51623,7 @@
 
 
   # Print a helpful message on how to acquire the necessary build dependency.
-  # freetype is the help tag: freetype, cups, pulse, alsa etc
+  # freetype is the help tag: freetype, cups, alsa etc
   MISSING_DEPENDENCY=freetype
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -48583,11 +51684,6 @@
 
 
 
-  ###############################################################################
-  #
-  # Check for alsa headers and libraries. Used on Linux/GNU systems.
-  #
-
 # Check whether --with-alsa was given.
 if test "${with_alsa+set}" = set; then :
   withval=$with_alsa;
@@ -48606,7 +51702,7 @@
 fi
 
 
-  if test "x$ALSA_NOT_NEEDED" = xyes; then
+  if test "x$NEEDS_LIB_ALSA" = xfalse; then
     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
@@ -48633,153 +51729,6 @@
       ALSA_LIBS="-L${with_alsa_lib} -lasound"
       ALSA_FOUND=yes
     fi
-    if test "x$ALSA_FOUND" = xno; then
-
-
-  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-    # Source the builddeps file again, to make sure it uses the latest variables!
-    . $builddepsfile
-    # Look for a target and build machine specific resource!
-    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a target specific resource
-      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
-    fi
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a build specific resource
-      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
-    fi
-    if test "x$resource" = x; then
-      # Ok, lets instead look for a generic resource
-      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
-      resource=${builddep_alsa}
-    fi
-    if test "x$resource" != x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
-$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
-      # If the resource in the builddeps.conf file is an existing directory,
-      # for example /java/linux/cups
-      if test -d ${resource}; then
-        depdir=${resource}
-      else
-
-  # alsa is for example mymodule
-  # $resource is for example libs/general/libmymod_1_2_3.zip
-  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-  # $with_builddeps_dir is for example /localhome/builddeps
-  # depdir is the name of the variable into which we store the depdir, eg MYMOD
-  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-  filename=`basename $resource`
-  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-  filebase=${filename%%.*}
-  extension=${filename#*.}
-  installdir=$with_builddeps_dir/$filebase
-  if test ! -f $installdir/$filename.unpacked; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-    if test ! -d $installdir; then
-      mkdir -p $installdir
-    fi
-    if test ! -d $installdir; then
-      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-    fi
-    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
-    touch $tmpfile
-    if test ! -f $tmpfile; then
-      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-    fi
-
-  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-  # $tmpfile is the local file name for the downloaded file.
-  VALID_TOOL=no
-  if test "x$BDEPS_FTP" = xwget; then
-    VALID_TOOL=yes
-    wget -O $tmpfile $with_builddeps_server/$resource
-  fi
-  if test "x$BDEPS_FTP" = xlftp; then
-    VALID_TOOL=yes
-    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
-  fi
-  if test "x$BDEPS_FTP" = xftp; then
-    VALID_TOOL=yes
-    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-    FTPUSERPWD=${FTPSERVER%%@*}
-    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-      FTPUSER=${userpwd%%:*}
-      FTPPWD=${userpwd#*@}
-      FTPSERVER=${FTPSERVER#*@}
-    else
-      FTPUSER=ftp
-      FTPPWD=ftp
-    fi
-    # the "pass" command does not work on some
-    # ftp clients (read ftp.exe) but if it works,
-    # passive mode is better!
-    ( \
-        echo "user $FTPUSER $FTPPWD"        ; \
-        echo "pass"                         ; \
-        echo "bin"                          ; \
-        echo "get $FTPPATH $tmpfile"              ; \
-    ) | ftp -in $FTPSERVER
-  fi
-  if test "x$VALID_TOOL" != xyes; then
-    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
-  fi
-
-    mv $tmpfile $installdir/$filename
-    if test ! -s $installdir/$filename; then
-      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-    fi
-    case "$extension" in
-      zip)  echo "Unzipping $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-        ;;
-      tar.gz) echo "Untaring $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-        ;;
-      tgz) echo "Untaring $installdir/$filename..."
-        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-        ;;
-      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-        ;;
-    esac
-  fi
-  if test -f $installdir/$filename.unpacked; then
-    depdir=$installdir
-  fi
-
-      fi
-      # Source the builddeps file again, because in the previous command, the depdir
-      # was updated to point at the current build dependency install directory.
-      . $builddepsfile
-      # Now extract variables from the builddeps.conf files.
-      theroot=${builddep_alsa_ROOT}
-      thecflags=${builddep_alsa_CFLAGS}
-      thelibs=${builddep_alsa_LIBS}
-      if test "x$depdir" = x; then
-        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
-      fi
-      ALSA=$depdir
-      if test "x$theroot" != x; then
-        ALSA="$theroot"
-      fi
-      if test "x$thecflags" != x; then
-        ALSA_CFLAGS="$thecflags"
-      fi
-      if test "x$thelibs" != x; then
-        ALSA_LIBS="$thelibs"
-      fi
-      ALSA_FOUND=yes
-      else ALSA_FOUND=no
-
-    fi
-    else ALSA_FOUND=no
-
-  fi
-
-    fi
     # Do not try pkg-config if we have a sysroot set.
     if test "x$SYSROOT" = x; then
       if test "x$ALSA_FOUND" = xno; then
@@ -48868,6 +51817,7 @@
 
 else
   ALSA_FOUND=no
+
 fi
 
 done
@@ -48876,7 +51826,7 @@
     if test "x$ALSA_FOUND" = xno; then
 
   # Print a helpful message on how to acquire the necessary build dependency.
-  # alsa is the help tag: freetype, cups, pulse, alsa etc
+  # alsa is the help tag: freetype, cups, alsa etc
   MISSING_DEPENDENCY=alsa
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -48904,19 +51854,355 @@
     fi
   fi
 
-      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
-    fi
-  fi
-
-
-
-
-
-
-  ###############################################################################
-  #
-  # Check for the jpeg library
-  #
+      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
+    fi
+  fi
+
+
+
+
+
+
+# Check whether --with-libffi was given.
+if test "${with_libffi+set}" = set; then :
+  withval=$with_libffi;
+fi
+
+
+# Check whether --with-libffi-include was given.
+if test "${with_libffi_include+set}" = set; then :
+  withval=$with_libffi_include;
+fi
+
+
+# Check whether --with-libffi-lib was given.
+if test "${with_libffi_lib+set}" = set; then :
+  withval=$with_libffi_lib;
+fi
+
+
+  if test "x$NEEDS_LIB_FFI" = xfalse; then
+    if test "x${with_libffi}" != x || test "x${with_libffi_include}" != x || test "x${with_libffi_lib}" != x; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi is ignored" >&5
+$as_echo "$as_me: WARNING: libffi not used, so --with-libffi is ignored" >&2;}
+    fi
+    LIBFFI_CFLAGS=
+    LIBFFI_LIBS=
+  else
+    LIBFFI_FOUND=no
+
+    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
+      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
+    fi
+
+    if test "x${with_libffi}" != x; then
+      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
+      LIBFFI_CFLAGS="-I${with_libffi}/include"
+      LIBFFI_FOUND=yes
+    fi
+    if test "x${with_libffi_include}" != x; then
+      LIBFFI_CFLAGS="-I${with_libffi_include}"
+      LIBFFI_FOUND=yes
+    fi
+    if test "x${with_libffi_lib}" != x; then
+      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
+      LIBFFI_FOUND=yes
+    fi
+    # Do not try pkg-config if we have a sysroot set.
+    if test "x$SYSROOT" = x; then
+      if test "x$LIBFFI_FOUND" = xno; then
+        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
+$as_echo_n "checking for LIBFFI... " >&6; }
+
+if test -n "$LIBFFI_CFLAGS"; then
+    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$LIBFFI_LIBS"; then
+    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
+        else
+	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$LIBFFI_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                LIBFFI_FOUND=no
+elif test $pkg_failed = untried; then
+	LIBFFI_FOUND=no
+else
+	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
+	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	LIBFFI_FOUND=yes
+fi
+      fi
+    fi
+    if test "x$LIBFFI_FOUND" = xno; then
+      for ac_header in ffi.h
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
+if test "x$ac_cv_header_ffi_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_FFI_H 1
+_ACEOF
+
+            LIBFFI_FOUND=yes
+            LIBFFI_CFLAGS=
+            LIBFFI_LIBS=-lffi
+
+else
+  LIBFFI_FOUND=no
+
+fi
+
+done
+
+    fi
+    if test "x$LIBFFI_FOUND" = xno; then
+
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # ffi is the help tag: freetype, cups, alsa etc
+  MISSING_DEPENDENCY=ffi
+
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    cygwin_help $MISSING_DEPENDENCY
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    msys_help $MISSING_DEPENDENCY
+  else
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+      apt-get)
+        apt_help     $MISSING_DEPENDENCY ;;
+      yum)
+        yum_help     $MISSING_DEPENDENCY ;;
+      port)
+        port_help    $MISSING_DEPENDENCY ;;
+      pkgutil)
+        pkgutil_help $MISSING_DEPENDENCY ;;
+      pkgadd)
+        pkgadd_help  $MISSING_DEPENDENCY ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+  fi
+
+      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
+    fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
+$as_echo_n "checking if libffi works... " >&6; }
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+    OLD_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+    OLD_LIBS="$LIBS"
+    LIBS="$LIBS $LIBFFI_LIBS"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ffi.h>
+int
+main ()
+{
+
+          ffi_call(NULL, NULL, NULL, NULL);
+          return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  LIBFFI_WORKS=yes
+else
+  LIBFFI_WORKS=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    CFLAGS="$OLD_CFLAGS"
+    LIBS="$OLD_LIBS"
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
+$as_echo "$LIBFFI_WORKS" >&6; }
+
+    if test "x$LIBFFI_WORKS" = xno; then
+
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # ffi is the help tag: freetype, cups, alsa etc
+  MISSING_DEPENDENCY=ffi
+
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    cygwin_help $MISSING_DEPENDENCY
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    msys_help $MISSING_DEPENDENCY
+  else
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+      apt-get)
+        apt_help     $MISSING_DEPENDENCY ;;
+      yum)
+        yum_help     $MISSING_DEPENDENCY ;;
+      port)
+        port_help    $MISSING_DEPENDENCY ;;
+      pkgutil)
+        pkgutil_help $MISSING_DEPENDENCY ;;
+      pkgadd)
+        pkgadd_help  $MISSING_DEPENDENCY ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+  fi
+
+      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
+    fi
+  fi
+
+
+
+
+
+  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+    # Extract the first word of "llvm-config", so it can be a program name with args.
+set dummy llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LLVM_CONFIG"; then
+  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_LLVM_CONFIG="llvm-config"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
+if test -n "$LLVM_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
+$as_echo "$LLVM_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    if test "x$LLVM_CONFIG" != xllvm-config; then
+      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
+    fi
+
+    llvm_components="jit mcjit engine nativecodegen native"
+    unset LLVM_CFLAGS
+    for flag in $("$LLVM_CONFIG" --cxxflags); do
+      if echo "${flag}" | grep -q '^-[ID]'; then
+        if test "${flag}" != "-D_DEBUG" ; then
+          if test "${LLVM_CFLAGS}" != "" ; then
+            LLVM_CFLAGS="${LLVM_CFLAGS} "
+          fi
+          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
+        fi
+      fi
+    done
+    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
+    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
+
+    unset LLVM_LDFLAGS
+    for flag in $("${LLVM_CONFIG}" --ldflags); do
+      if echo "${flag}" | grep -q '^-L'; then
+        if test "${LLVM_LDFLAGS}" != ""; then
+          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
+        fi
+        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
+      fi
+    done
+
+    unset LLVM_LIBS
+    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
+      if echo "${flag}" | grep -q '^-l'; then
+        if test "${LLVM_LIBS}" != ""; then
+          LLVM_LIBS="${LLVM_LIBS} "
+        fi
+        LLVM_LIBS="${LLVM_LIBS}${flag}"
+      fi
+    done
+
+
+
+
+  fi
+
 
 
 # Check whether --with-libjpeg was given.
@@ -48927,17 +52213,12 @@
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
 $as_echo_n "checking for which libjpeg to use... " >&6; }
-
   # default is bundled
   DEFAULT_LIBJPEG=bundled
-
-  #
   # if user didn't specify, use DEFAULT_LIBJPEG
-  #
   if test "x${with_libjpeg}" = "x"; then
     with_libjpeg=${DEFAULT_LIBJPEG}
   fi
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
 $as_echo "${with_libjpeg}" >&6; }
 
@@ -49007,10 +52288,6 @@
 
 
 
-  ###############################################################################
-  #
-  # Check for the gif library
-  #
 
 
 # Check whether --with-giflib was given.
@@ -49019,20 +52296,14 @@
 fi
 
 
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
 $as_echo_n "checking for which giflib to use... " >&6; }
-
   # default is bundled
   DEFAULT_GIFLIB=bundled
-
-  #
   # if user didn't specify, use DEFAULT_GIFLIB
-  #
   if test "x${with_giflib}" = "x"; then
     with_giflib=${DEFAULT_GIFLIB}
   fi
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
 $as_echo "${with_giflib}" >&6; }
 
@@ -49101,119 +52372,7 @@
   fi
 
 
-  ###############################################################################
-  #
-  # Check for the lcms2 library
-  #
-
-
-# Check whether --with-lcms was given.
-if test "${with_lcms+set}" = set; then :
-  withval=$with_lcms;
-fi
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
-$as_echo_n "checking for which lcms to use... " >&6; }
-
-  DEFAULT_LCMS=bundled
-
-  #
-  # If user didn't specify, use DEFAULT_LCMS
-  #
-  if test "x${with_lcms}" = "x"; then
-      with_lcms=${DEFAULT_LCMS}
-  fi
-
-  if test "x${with_lcms}" = "xbundled"; then
-    USE_EXTERNAL_LCMS=false
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
-$as_echo "bundled" >&6; }
-  elif test "x${with_lcms}" = "xsystem"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
-$as_echo "system" >&6; }
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
-$as_echo_n "checking for LCMS... " >&6; }
-
-if test -n "$LCMS_CFLAGS"; then
-    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$LCMS_LIBS"; then
-    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
-        else
-	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$LCMS_PKG_ERRORS" >&5
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                LCMS_FOUND=no
-elif test $pkg_failed = untried; then
-	LCMS_FOUND=no
-else
-	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
-	LCMS_LIBS=$pkg_cv_LCMS_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	LCMS_FOUND=yes
-fi
-    if test "x${LCMS_FOUND}" = "xyes"; then
-      USE_EXTERNAL_LCMS=true
-    else
-      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
-    fi
-  else
-    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
-  fi
-
-
-
-  ###############################################################################
-  #
-  # Check for the png library
-  #
+
 
 
 # Check whether --with-libpng was given.
@@ -49222,16 +52381,12 @@
 fi
 
 
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
 $as_echo_n "checking for which libpng to use... " >&6; }
 
   # default is bundled
   DEFAULT_LIBPNG=bundled
-
-  #
   # if user didn't specify, use DEFAULT_LIBPNG
-  #
   if test "x${with_libpng}" = "x"; then
       with_libpng=${DEFAULT_LIBPNG}
   fi
@@ -49322,10 +52477,7 @@
   fi
 
 
-  ###############################################################################
-  #
-  # Check for the zlib library
-  #
+
 
 
 # Check whether --with-zlib was given.
@@ -49382,22 +52534,16 @@
 
   DEFAULT_ZLIB=bundled
   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    #
-    # On macosx default is system...on others default is
-    #
+    # On macosx default is system...on others default is bundled
     DEFAULT_ZLIB=system
   fi
 
   if test "x${ZLIB_FOUND}" != "xyes"; then
-    #
     # If we don't find any system...set default to bundled
-    #
     DEFAULT_ZLIB=bundled
   fi
 
-  #
   # If user didn't specify, use DEFAULT_ZLIB
-  #
   if test "x${with_zlib}" = "x"; then
     with_zlib=${DEFAULT_ZLIB}
   fi
@@ -49422,45 +52568,117 @@
 
 
 
-  ###############################################################################
-  LIBZIP_CAN_USE_MMAP=true
-
-
-
-  ###############################################################################
-  #
-  # Check if altzone exists in time.h
-  #
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <time.h>
-int
-main ()
-{
-return (int)altzone;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  has_altzone=yes
-else
-  has_altzone=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  if test "x$has_altzone" = xyes; then
-
-$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
-
-  fi
-
-  ###############################################################################
-  #
-  # Check the maths library
-  #
-
+
+
+# Check whether --with-lcms was given.
+if test "${with_lcms+set}" = set; then :
+  withval=$with_lcms;
+fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
+$as_echo_n "checking for which lcms to use... " >&6; }
+
+  DEFAULT_LCMS=bundled
+  # If user didn't specify, use DEFAULT_LCMS
+  if test "x${with_lcms}" = "x"; then
+      with_lcms=${DEFAULT_LCMS}
+  fi
+
+  if test "x${with_lcms}" = "xbundled"; then
+    USE_EXTERNAL_LCMS=false
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
+$as_echo "bundled" >&6; }
+  elif test "x${with_lcms}" = "xsystem"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
+$as_echo "system" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
+$as_echo_n "checking for LCMS... " >&6; }
+
+if test -n "$LCMS_CFLAGS"; then
+    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$LCMS_LIBS"; then
+    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
+        else
+	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$LCMS_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                LCMS_FOUND=no
+elif test $pkg_failed = untried; then
+	LCMS_FOUND=no
+else
+	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
+	LCMS_LIBS=$pkg_cv_LCMS_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	LCMS_FOUND=yes
+fi
+    if test "x${LCMS_FOUND}" = "xyes"; then
+      USE_EXTERNAL_LCMS=true
+    else
+      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
+    fi
+  else
+    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
+  fi
+
+
+
+
+
+
+
+
+
+
+
+  # Setup libm (the maths library)
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
 $as_echo_n "checking for cos in -lm... " >&6; }
 if ${ac_cv_lib_m_cos+:} false; then :
@@ -49506,18 +52724,15 @@
 
 else
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
 $as_echo "$as_me: Maths library was not found" >&6;}
 
-
-fi
-
-
-
-  ###############################################################################
-  #
-  # Check for libdl.so
-
+fi
+
+  LIBM=-lm
+
+
+  # Setup libdl (for dynamic library loading)
   save_LIBS="$LIBS"
   LIBS=""
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
@@ -49569,2947 +52784,10 @@
 
   LIBS="$save_LIBS"
 
-
-  ###############################################################################
-  #
-  # statically link libstdc++ before C++ ABI is stablized on Linux unless
-  # dynamic build is configured on command line.
-  #
-
-# Check whether --with-stdc++lib was given.
-if test "${with_stdc__lib+set}" = set; then :
-  withval=$with_stdc__lib;
-        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
-                && test "x$with_stdc__lib" != xdefault; then
-          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
-        fi
-
-else
-  with_stdc__lib=default
-
-fi
-
-
-  if test "x$OPENJDK_TARGET_OS" = xlinux; then
-    # Test if -lstdc++ works.
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
-$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    OLD_CXXFLAGS="$CXXFLAGS"
-    CXXFLAGS="$CXXFLAGS -lstdc++"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  has_dynamic_libstdcxx=yes
-else
-  has_dynamic_libstdcxx=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    CXXFLAGS="$OLD_CXXFLAGS"
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
-$as_echo "$has_dynamic_libstdcxx" >&6; }
-
-    # Test if stdc++ can be linked statically.
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
-$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
-    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    OLD_LIBS="$LIBS"
-    OLD_CXX="$CXX"
-    LIBS="$STATIC_STDCXX_FLAGS"
-    CXX="$CC"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  has_static_libstdcxx=yes
-else
-  has_static_libstdcxx=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LIBS="$OLD_LIBS"
-    CXX="$OLD_CXX"
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
-$as_echo "$has_static_libstdcxx" >&6; }
-
-    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
-      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
-    fi
-
-    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
-      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
-    fi
-
-    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
-      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
-    fi
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
-$as_echo_n "checking how to link with libstdc++... " >&6; }
-    # If dynamic was requested, it's available since it would fail above otherwise.
-    # If dynamic wasn't requested, go with static unless it isn't available.
-    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
-      LIBCXX="$LIBCXX -lstdc++"
-      LDCXX="$CXX"
-      STATIC_CXX_SETTING="STATIC_CXX=false"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
-$as_echo "dynamic" >&6; }
-    else
-      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
-      LDCXX="$CC"
-      STATIC_CXX_SETTING="STATIC_CXX=true"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
-$as_echo "static" >&6; }
-    fi
-  fi
-
-
-  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
-    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
-$as_echo_n "checking for LIBFFI... " >&6; }
-
-if test -n "$LIBFFI_CFLAGS"; then
-    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$LIBFFI_LIBS"; then
-    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
-        else
-	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$LIBFFI_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements (libffi) were not met:
-
-$LIBFFI_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables LIBFFI_CFLAGS
-and LIBFFI_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
-elif test $pkg_failed = untried; then
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables LIBFFI_CFLAGS
-and LIBFFI_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
-	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	:
-fi
-
-  fi
-
-  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
-    # Extract the first word of "llvm-config", so it can be a program name with args.
-set dummy llvm-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$LLVM_CONFIG"; then
-  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_LLVM_CONFIG="llvm-config"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
-if test -n "$LLVM_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
-$as_echo "$LLVM_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    if test "x$LLVM_CONFIG" != xllvm-config; then
-      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
-    fi
-
-    llvm_components="jit mcjit engine nativecodegen native"
-    unset LLVM_CFLAGS
-    for flag in $("$LLVM_CONFIG" --cxxflags); do
-      if echo "${flag}" | grep -q '^-[ID]'; then
-        if test "${flag}" != "-D_DEBUG" ; then
-          if test "${LLVM_CFLAGS}" != "" ; then
-            LLVM_CFLAGS="${LLVM_CFLAGS} "
-          fi
-          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
-        fi
-      fi
-    done
-    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
-    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
-
-    unset LLVM_LDFLAGS
-    for flag in $("${LLVM_CONFIG}" --ldflags); do
-      if echo "${flag}" | grep -q '^-L'; then
-        if test "${LLVM_LDFLAGS}" != ""; then
-          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
-        fi
-        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
-      fi
-    done
-
-    unset LLVM_LIBS
-    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
-      if echo "${flag}" | grep -q '^-l'; then
-        if test "${LLVM_LIBS}" != ""; then
-          LLVM_LIBS="${LLVM_LIBS} "
-        fi
-        LLVM_LIBS="${LLVM_LIBS}${flag}"
-      fi
-    done
-
-
-
-
-  fi
-
-  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
-  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
-    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
-  fi
-
-  # TODO better (platform agnostic) test
-  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
-    LIBCXX="-lstdc++"
-  fi
-
-
-
-
+  # Deprecated libraries, keep the flags for backwards compatibility
   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
 
 
-# Check whether --with-msvcr-dll was given.
-if test "${with_msvcr_dll+set}" = set; then :
-  withval=$with_msvcr_dll;
-fi
-
-
-  if test "x$with_msvcr_dll" != x; then
-    # If given explicitely by user, do not probe. If not present, fail directly.
-
-  DLL_NAME="$MSVCR_NAME"
-  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
-  METHOD="--with-msvcr-dll"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-    if test "x$MSVC_DLL" = x; then
-      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
-    fi
-    MSVCR_DLL="$MSVC_DLL"
-  elif test "x$DEVKIT_MSVCR_DLL" != x; then
-
-  DLL_NAME="$MSVCR_NAME"
-  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
-  METHOD="devkit"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-    if test "x$MSVC_DLL" = x; then
-      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
-    fi
-    MSVCR_DLL="$MSVC_DLL"
-  else
-
-  DLL_NAME="${MSVCR_NAME}"
-  MSVC_DLL=
-
-  if test "x$MSVC_DLL" = x; then
-    # Probe: Using well-known location from Visual Studio 10.0
-    if test "x$VCINSTALLDIR" != x; then
-      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
-
-  windows_path="$CYGWIN_VC_INSTALL_DIR"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    CYGWIN_VC_INSTALL_DIR="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    CYGWIN_VC_INSTALL_DIR="$unix_path"
-  fi
-
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
-      else
-        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
-      fi
-      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
-
-  DLL_NAME="$DLL_NAME"
-  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
-  METHOD="well-known location in VCINSTALLDIR"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-    fi
-  fi
-
-  if test "x$MSVC_DLL" = x; then
-    # Probe: Check in the Boot JDK directory.
-    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
-
-  DLL_NAME="$DLL_NAME"
-  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
-  METHOD="well-known location in Boot JDK"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-  fi
-
-  if test "x$MSVC_DLL" = x; then
-    # Probe: Look in the Windows system32 directory
-    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
-
-  windows_path="$CYGWIN_SYSTEMROOT"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    CYGWIN_SYSTEMROOT="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    CYGWIN_SYSTEMROOT="$unix_path"
-  fi
-
-    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
-
-  DLL_NAME="$DLL_NAME"
-  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
-  METHOD="well-known location in SYSTEMROOT"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-  fi
-
-  if test "x$MSVC_DLL" = x; then
-    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
-    if test "x$VS100COMNTOOLS" != x; then
-      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
-
-  windows_path="$CYGWIN_VS_TOOLS_DIR"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    CYGWIN_VS_TOOLS_DIR="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    CYGWIN_VS_TOOLS_DIR="$unix_path"
-  fi
-
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
-	    | $GREP -i /x64/ | $HEAD --lines 1`
-      else
-        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
-	    | $GREP -i /x86/ | $HEAD --lines 1`
-      fi
-
-  DLL_NAME="$DLL_NAME"
-  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
-  METHOD="search of VS100COMNTOOLS"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-    fi
-  fi
-
-  if test "x$MSVC_DLL" = x; then
-    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
-    # (This was the original behaviour; kept since it might turn something up)
-    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
-	    | $GREP x64 | $HEAD --lines 1`
-      else
-        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
-	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
-        if test "x$POSSIBLE_MSVC_DLL" = x; then
-          # We're grasping at straws now...
-          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
-	      | $HEAD --lines 1`
-        fi
-      fi
-
-
-  DLL_NAME="$DLL_NAME"
-  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
-  METHOD="search of VCINSTALLDIR"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-    fi
-  fi
-
-  if test "x$MSVC_DLL" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
-  fi
-
-    MSVCR_DLL="$MSVC_DLL"
-  fi
-
-
-
-# Check whether --with-msvcp-dll was given.
-if test "${with_msvcp_dll+set}" = set; then :
-  withval=$with_msvcp_dll;
-fi
-
-
-  if test "x$MSVCP_NAME" != "x"; then
-    if test "x$with_msvcp_dll" != x; then
-      # If given explicitely by user, do not probe. If not present, fail directly.
-
-  DLL_NAME="$MSVCP_NAME"
-  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
-  METHOD="--with-msvcp-dll"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-      if test "x$MSVC_DLL" = x; then
-        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
-      fi
-      MSVCP_DLL="$MSVC_DLL"
-    elif test "x$DEVKIT_MSVCP_DLL" != x; then
-
-  DLL_NAME="$MSVCP_NAME"
-  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
-  METHOD="devkit"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-      if test "x$MSVC_DLL" = x; then
-        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
-      fi
-      MSVCP_DLL="$MSVC_DLL"
-    else
-
-  DLL_NAME="${MSVCP_NAME}"
-  MSVC_DLL=
-
-  if test "x$MSVC_DLL" = x; then
-    # Probe: Using well-known location from Visual Studio 10.0
-    if test "x$VCINSTALLDIR" != x; then
-      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
-
-  windows_path="$CYGWIN_VC_INSTALL_DIR"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    CYGWIN_VC_INSTALL_DIR="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    CYGWIN_VC_INSTALL_DIR="$unix_path"
-  fi
-
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
-      else
-        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
-      fi
-      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
-
-  DLL_NAME="$DLL_NAME"
-  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
-  METHOD="well-known location in VCINSTALLDIR"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-    fi
-  fi
-
-  if test "x$MSVC_DLL" = x; then
-    # Probe: Check in the Boot JDK directory.
-    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
-
-  DLL_NAME="$DLL_NAME"
-  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
-  METHOD="well-known location in Boot JDK"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-  fi
-
-  if test "x$MSVC_DLL" = x; then
-    # Probe: Look in the Windows system32 directory
-    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
-
-  windows_path="$CYGWIN_SYSTEMROOT"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    CYGWIN_SYSTEMROOT="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    CYGWIN_SYSTEMROOT="$unix_path"
-  fi
-
-    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
-
-  DLL_NAME="$DLL_NAME"
-  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
-  METHOD="well-known location in SYSTEMROOT"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-  fi
-
-  if test "x$MSVC_DLL" = x; then
-    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
-    if test "x$VS100COMNTOOLS" != x; then
-      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
-
-  windows_path="$CYGWIN_VS_TOOLS_DIR"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    CYGWIN_VS_TOOLS_DIR="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    CYGWIN_VS_TOOLS_DIR="$unix_path"
-  fi
-
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
-	    | $GREP -i /x64/ | $HEAD --lines 1`
-      else
-        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
-	    | $GREP -i /x86/ | $HEAD --lines 1`
-      fi
-
-  DLL_NAME="$DLL_NAME"
-  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
-  METHOD="search of VS100COMNTOOLS"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-    fi
-  fi
-
-  if test "x$MSVC_DLL" = x; then
-    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
-    # (This was the original behaviour; kept since it might turn something up)
-    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
-	    | $GREP x64 | $HEAD --lines 1`
-      else
-        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
-	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
-        if test "x$POSSIBLE_MSVC_DLL" = x; then
-          # We're grasping at straws now...
-          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
-	      | $HEAD --lines 1`
-        fi
-      fi
-
-
-  DLL_NAME="$DLL_NAME"
-  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
-  METHOD="search of VCINSTALLDIR"
-  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
-    # Need to check if the found msvcr is correct architecture
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
-    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
-      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH="PE32 executable"
-      else
-        CORRECT_MSVCR_ARCH="PE32+ executable"
-      fi
-    else
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-        CORRECT_MSVCR_ARCH=386
-      else
-        CORRECT_MSVCR_ARCH=x86-64
-      fi
-    fi
-    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-      MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVC_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVC_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-style (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVC_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVC_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVC_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
-    fi
-  fi
-
-    fi
-  fi
-
-  if test "x$MSVC_DLL" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
-  fi
-
-      MSVCP_DLL="$MSVC_DLL"
-    fi
-
-  fi
-
-
-
 # Check whether --with-dxsdk was given.
 if test "${with_dxsdk+set}" = set; then :
   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
@@ -52537,6 +52815,21 @@
 
   fi
 
+  # Control if libzip can use mmap. Available for purposes of overriding.
+  LIBZIP_CAN_USE_MMAP=true
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 ###############################################################################
 #
@@ -53089,7 +53382,7 @@
   # Publish this variable in the help.
 
 
-  if test "x$CCACHE" = x; then
+  if [ -z "${CCACHE+x}" ]; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in ccache
 do
@@ -53202,14 +53495,23 @@
       # for unknown variables in the end.
       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
 
-      # Check if the provided tool contains a complete path.
-      tool_specified="$CCACHE"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
+      # Check if we try to supply an empty value
+      if test "x$CCACHE" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
+$as_echo_n "checking for CCACHE... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$CCACHE"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
 set dummy $tool_basename; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -53249,22 +53551,23 @@
 fi
 
 
-        if test "x$CCACHE" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
+          if test "x$CCACHE" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
 $as_echo_n "checking for CCACHE... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
       fi
     fi
   fi
--- a/common/autoconf/help.m4	Mon Oct 19 17:52:39 2015 +0300
+++ b/common/autoconf/help.m4	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
 AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
 [
   # Print a helpful message on how to acquire the necessary build dependency.
-  # $1 is the help tag: freetype, cups, pulse, alsa etc
+  # $1 is the help tag: freetype, cups, alsa etc
   MISSING_DEPENDENCY=$1
 
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -109,8 +109,8 @@
       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
     freetype)
       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
-    pulse)
-      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
+    ffi)
+      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
     x11)
       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
     ccache)
@@ -130,8 +130,6 @@
       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
     freetype)
       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
-    pulse)
-      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
     x11)
       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
     ccache)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-alsa.m4	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,90 @@
+#
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+################################################################################
+# Setup alsa (Advanced Linux Sound Architecture)
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_ALSA],
+[
+  AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa],
+      [specify prefix directory for the alsa package
+      (expecting the libraries under PATH/lib and the headers under PATH/include)])])
+  AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include],
+      [specify directory for the alsa include files])])
+  AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib],
+      [specify directory for the alsa library])])
+
+  if test "x$NEEDS_LIB_ALSA" = xfalse; then
+    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
+      AC_MSG_WARN([alsa not used, so --with-alsa is ignored])
+    fi
+    ALSA_CFLAGS=
+    ALSA_LIBS=
+  else
+    ALSA_FOUND=no
+
+    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
+      AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.])
+    fi
+
+    if test "x${with_alsa}" != x; then
+      ALSA_LIBS="-L${with_alsa}/lib -lasound"
+      ALSA_CFLAGS="-I${with_alsa}/include"
+      ALSA_FOUND=yes
+    fi
+    if test "x${with_alsa_include}" != x; then
+      ALSA_CFLAGS="-I${with_alsa_include}"
+      ALSA_FOUND=yes
+    fi
+    if test "x${with_alsa_lib}" != x; then
+      ALSA_LIBS="-L${with_alsa_lib} -lasound"
+      ALSA_FOUND=yes
+    fi
+    # Do not try pkg-config if we have a sysroot set.
+    if test "x$SYSROOT" = x; then
+      if test "x$ALSA_FOUND" = xno; then
+        PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
+      fi
+    fi
+    if test "x$ALSA_FOUND" = xno; then
+      AC_CHECK_HEADERS([alsa/asoundlib.h],
+          [
+            ALSA_FOUND=yes
+            ALSA_CFLAGS=-Iignoreme
+            ALSA_LIBS=-lasound
+            DEFAULT_ALSA=yes
+          ],
+          [ALSA_FOUND=no]
+      )
+    fi
+    if test "x$ALSA_FOUND" = xno; then
+      HELP_MSG_MISSING_DEPENDENCY([alsa])
+      AC_MSG_ERROR([Could not find alsa! $HELP_MSG])
+    fi
+  fi
+
+  AC_SUBST(ALSA_CFLAGS)
+  AC_SUBST(ALSA_LIBS)
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-bundled.m4	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,226 @@
+#
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+################################################################################
+# Setup bundled libraries.
+#
+# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
+# OpenJDK repository. Default is to use these libraries as bundled, but they
+# might be replaced by en external version by the user.
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_BUNDLED_LIBS],
+[
+  LIB_SETUP_LIBJPEG
+  LIB_SETUP_GIFLIB
+  LIB_SETUP_LIBPNG
+  LIB_SETUP_ZLIB
+  LIB_SETUP_LCMS
+])
+
+################################################################################
+# Setup libjpeg
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_LIBJPEG],
+[
+  AC_ARG_WITH(libjpeg, [AS_HELP_STRING([--with-libjpeg],
+      [use libjpeg from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+
+  AC_MSG_CHECKING([for which libjpeg to use])
+  # default is bundled
+  DEFAULT_LIBJPEG=bundled
+  # if user didn't specify, use DEFAULT_LIBJPEG
+  if test "x${with_libjpeg}" = "x"; then
+    with_libjpeg=${DEFAULT_LIBJPEG}
+  fi
+  AC_MSG_RESULT(${with_libjpeg})
+
+  if test "x${with_libjpeg}" = "xbundled"; then
+    USE_EXTERNAL_LIBJPEG=false
+  elif test "x${with_libjpeg}" = "xsystem"; then
+    AC_CHECK_HEADER(jpeglib.h, [],
+        [ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])])
+    AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [],
+        [ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])])
+
+    USE_EXTERNAL_LIBJPEG=true
+  else
+    AC_MSG_ERROR([Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'])
+  fi
+
+  AC_SUBST(USE_EXTERNAL_LIBJPEG)
+])
+
+################################################################################
+# Setup giflib
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_GIFLIB],
+[
+  AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib],
+      [use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+
+  AC_MSG_CHECKING([for which giflib to use])
+  # default is bundled
+  DEFAULT_GIFLIB=bundled
+  # if user didn't specify, use DEFAULT_GIFLIB
+  if test "x${with_giflib}" = "x"; then
+    with_giflib=${DEFAULT_GIFLIB}
+  fi
+  AC_MSG_RESULT(${with_giflib})
+
+  if test "x${with_giflib}" = "xbundled"; then
+    USE_EXTERNAL_LIBGIF=false
+  elif test "x${with_giflib}" = "xsystem"; then
+    AC_CHECK_HEADER(gif_lib.h, [],
+        [ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])])
+    AC_CHECK_LIB(gif, DGifGetCode, [],
+        [ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])])
+
+    USE_EXTERNAL_LIBGIF=true
+  else
+    AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'])
+  fi
+
+  AC_SUBST(USE_EXTERNAL_LIBGIF)
+])
+
+################################################################################
+# Setup libpng
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_LIBPNG],
+[
+  AC_ARG_WITH(libpng, [AS_HELP_STRING([--with-libpng],
+     [use libpng from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+
+  AC_MSG_CHECKING([for which libpng to use])
+
+  # default is bundled
+  DEFAULT_LIBPNG=bundled
+  # if user didn't specify, use DEFAULT_LIBPNG
+  if test "x${with_libpng}" = "x"; then
+      with_libpng=${DEFAULT_LIBPNG}
+  fi
+
+  if test "x${with_libpng}" = "xbundled"; then
+      USE_EXTERNAL_LIBPNG=false
+      AC_MSG_RESULT([bundled])
+  elif test "x${with_libpng}" = "xsystem"; then
+      PKG_CHECK_MODULES(PNG, libpng,
+                   [ LIBPNG_FOUND=yes ],
+                   [ LIBPNG_FOUND=no ])
+      if test "x${LIBPNG_FOUND}" = "xyes"; then
+          USE_EXTERNAL_LIBPNG=true
+          AC_MSG_RESULT([system])
+      else
+          AC_MSG_RESULT([system not found])
+          AC_MSG_ERROR([--with-libpng=system specified, but no libpng found!])
+      fi
+  else
+      AC_MSG_ERROR([Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'])
+  fi
+
+  AC_SUBST(USE_EXTERNAL_LIBPNG)
+])
+
+################################################################################
+# Setup zlib
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_ZLIB],
+[
+  AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
+      [use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+
+  AC_CHECK_LIB(z, compress,
+      [ ZLIB_FOUND=yes ],
+      [ ZLIB_FOUND=no ])
+
+  AC_MSG_CHECKING([for which zlib to use])
+
+  DEFAULT_ZLIB=bundled
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    # On macosx default is system...on others default is bundled
+    DEFAULT_ZLIB=system
+  fi
+
+  if test "x${ZLIB_FOUND}" != "xyes"; then
+    # If we don't find any system...set default to bundled
+    DEFAULT_ZLIB=bundled
+  fi
+
+  # If user didn't specify, use DEFAULT_ZLIB
+  if test "x${with_zlib}" = "x"; then
+    with_zlib=${DEFAULT_ZLIB}
+  fi
+
+  if test "x${with_zlib}" = "xbundled"; then
+    USE_EXTERNAL_LIBZ=false
+    AC_MSG_RESULT([bundled])
+  elif test "x${with_zlib}" = "xsystem"; then
+    if test "x${ZLIB_FOUND}" = "xyes"; then
+      USE_EXTERNAL_LIBZ=true
+      AC_MSG_RESULT([system])
+    else
+      AC_MSG_RESULT([system not found])
+      AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!])
+    fi
+  else
+    AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'])
+  fi
+
+  AC_SUBST(USE_EXTERNAL_LIBZ)
+])
+
+################################################################################
+# Setup lcms (Little CMS)
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_LCMS],
+[
+  AC_ARG_WITH(lcms, [AS_HELP_STRING([--with-lcms],
+      [use lcms2 from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+
+  AC_MSG_CHECKING([for which lcms to use])
+
+  DEFAULT_LCMS=bundled
+  # If user didn't specify, use DEFAULT_LCMS
+  if test "x${with_lcms}" = "x"; then
+      with_lcms=${DEFAULT_LCMS}
+  fi
+
+  if test "x${with_lcms}" = "xbundled"; then
+    USE_EXTERNAL_LCMS=false
+    AC_MSG_RESULT([bundled])
+  elif test "x${with_lcms}" = "xsystem"; then
+    AC_MSG_RESULT([system])
+    PKG_CHECK_MODULES([LCMS], [lcms2], [LCMS_FOUND=yes], [LCMS_FOUND=no])
+    if test "x${LCMS_FOUND}" = "xyes"; then
+      USE_EXTERNAL_LCMS=true
+    else
+      AC_MSG_ERROR([--with-lcms=system specified, but no lcms found!])
+    fi
+  else
+    AC_MSG_ERROR([Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'])
+  fi
+
+  AC_SUBST(USE_EXTERNAL_LCMS)
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-cups.m4	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,87 @@
+#
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+################################################################################
+# Setup cups (Common Unix Printing System)
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_CUPS],
+[
+  AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
+      [specify prefix directory for the cups package
+      (expecting the headers under PATH/include)])])
+  AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
+      [specify directory for the cups include files])])
+
+  if test "x$NEEDS_LIB_CUPS" = xfalse; then
+    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
+      AC_MSG_WARN([cups not used, so --with-cups is ignored])
+    fi
+    CUPS_CFLAGS=
+  else
+    CUPS_FOUND=no
+
+    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
+      AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
+    fi
+
+    if test "x${with_cups}" != x; then
+      CUPS_CFLAGS="-I${with_cups}/include"
+      CUPS_FOUND=yes
+    fi
+    if test "x${with_cups_include}" != x; then
+      CUPS_CFLAGS="-I${with_cups_include}"
+      CUPS_FOUND=yes
+    fi
+    if test "x$CUPS_FOUND" = xno; then
+      # Are the cups headers installed in the default /usr/include location?
+      AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], [
+          CUPS_FOUND=yes
+          CUPS_CFLAGS=
+          DEFAULT_CUPS=yes
+      ])
+    fi
+    if test "x$CUPS_FOUND" = xno; then
+      # Getting nervous now? Lets poke around for standard Solaris third-party
+      # package installation locations.
+      AC_MSG_CHECKING([for cups headers])
+      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
+        # An SFW package seems to be installed!
+        CUPS_FOUND=yes
+        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
+      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
+        # A CSW package seems to be installed!
+        CUPS_FOUND=yes
+        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
+      fi
+      AC_MSG_RESULT([$CUPS_FOUND])
+    fi
+    if test "x$CUPS_FOUND" = xno; then
+      HELP_MSG_MISSING_DEPENDENCY([cups])
+      AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
+    fi
+  fi
+
+  AC_SUBST(CUPS_CFLAGS)
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-ffi.m4	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,114 @@
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+################################################################################
+# Setup libffi (Foreign Function Interface)
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
+[
+  AC_ARG_WITH(libffi, [AS_HELP_STRING([--with-libffi],
+      [specify prefix directory for the libffi package
+      (expecting the libraries under PATH/lib and the headers under PATH/include)])])
+  AC_ARG_WITH(libffi-include, [AS_HELP_STRING([--with-libffi-include],
+      [specify directory for the libffi include files])])
+  AC_ARG_WITH(libffi-lib, [AS_HELP_STRING([--with-libffi-lib],
+      [specify directory for the libffi library])])
+
+  if test "x$NEEDS_LIB_FFI" = xfalse; then
+    if test "x${with_libffi}" != x || test "x${with_libffi_include}" != x || test "x${with_libffi_lib}" != x; then
+      AC_MSG_WARN([libffi not used, so --with-libffi is ignored])
+    fi
+    LIBFFI_CFLAGS=
+    LIBFFI_LIBS=
+  else
+    LIBFFI_FOUND=no
+
+    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
+      AC_MSG_ERROR([It is not possible to disable the use of libffi. Remove the --without-libffi option.])
+    fi
+
+    if test "x${with_libffi}" != x; then
+      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
+      LIBFFI_CFLAGS="-I${with_libffi}/include"
+      LIBFFI_FOUND=yes
+    fi
+    if test "x${with_libffi_include}" != x; then
+      LIBFFI_CFLAGS="-I${with_libffi_include}"
+      LIBFFI_FOUND=yes
+    fi
+    if test "x${with_libffi_lib}" != x; then
+      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
+      LIBFFI_FOUND=yes
+    fi
+    # Do not try pkg-config if we have a sysroot set.
+    if test "x$SYSROOT" = x; then
+      if test "x$LIBFFI_FOUND" = xno; then
+        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
+        PKG_CHECK_MODULES([LIBFFI], [libffi], [LIBFFI_FOUND=yes], [LIBFFI_FOUND=no])
+      fi
+    fi
+    if test "x$LIBFFI_FOUND" = xno; then
+      AC_CHECK_HEADERS([ffi.h],
+          [
+            LIBFFI_FOUND=yes
+            LIBFFI_CFLAGS=
+            LIBFFI_LIBS=-lffi
+          ],
+          [LIBFFI_FOUND=no]
+      )
+    fi
+    if test "x$LIBFFI_FOUND" = xno; then
+      HELP_MSG_MISSING_DEPENDENCY([ffi])
+      AC_MSG_ERROR([Could not find libffi! $HELP_MSG])
+    fi
+
+    AC_MSG_CHECKING([if libffi works])
+    AC_LANG_PUSH(C)
+    OLD_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+    OLD_LIBS="$LIBS"
+    LIBS="$LIBS $LIBFFI_LIBS"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <ffi.h>],
+        [
+          ffi_call(NULL, NULL, NULL, NULL);
+          return 0;
+        ])],
+        [LIBFFI_WORKS=yes],
+        [LIBFFI_WORKS=no]
+    )
+    CFLAGS="$OLD_CFLAGS"
+    LIBS="$OLD_LIBS"
+    AC_LANG_POP(C)
+    AC_MSG_RESULT([$LIBFFI_WORKS])
+
+    if test "x$LIBFFI_WORKS" = xno; then
+      HELP_MSG_MISSING_DEPENDENCY([ffi])
+      AC_MSG_ERROR([Found libffi but could not link and compile with it. $HELP_MSG])
+    fi
+  fi
+
+  AC_SUBST(LIBFFI_CFLAGS)
+  AC_SUBST(LIBFFI_LIBS)
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-freetype.m4	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,420 @@
+#
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+################################################################################
+# Build the freetype lib from source
+################################################################################
+AC_DEFUN([LIB_BUILD_FREETYPE],
+[
+  FREETYPE_SRC_PATH="$1"
+  BUILD_FREETYPE=yes
+
+  # Check if the freetype sources are acessible..
+  if ! test -d $FREETYPE_SRC_PATH; then
+    AC_MSG_WARN([--with-freetype-src specified, but can not find path "$FREETYPE_SRC_PATH" - ignoring --with-freetype-src])
+    BUILD_FREETYPE=no
+  fi
+  # ..and contain a vc2010 project file
+  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
+  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
+    AC_MSG_WARN([Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src])
+    BUILD_FREETYPE=no
+  fi
+  # Now check if configure found a version of 'msbuild.exe'
+  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
+    AC_MSG_WARN([Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src])
+    BUILD_FREETYPE=no
+  fi
+
+  # Ready to go..
+  if test "x$BUILD_FREETYPE" = xyes; then
+    # msbuild requires trailing slashes for output directories
+    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
+    freetype_lib_path_unix="$freetype_lib_path"
+    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
+    BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(vcxproj_path)
+    BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_lib_path)
+    BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_obj_path)
+    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+      freetype_platform=x64
+    else
+      freetype_platform=win32
+    fi
+
+    # The original freetype project file is for VS 2010 (i.e. 'v100'),
+    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
+    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
+    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
+    AC_MSG_NOTICE([Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ...])
+
+    # First we try to build the freetype.dll
+    $ECHO -e "@echo off\n"\
+        "$MSBUILD $vcxproj_path "\
+        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
+        "/p:Configuration=\"Release Multithreaded\" "\
+        "/p:Platform=$freetype_platform "\
+        "/p:ConfigurationType=DynamicLibrary "\
+        "/p:TargetName=freetype "\
+        "/p:OutDir=\"$freetype_lib_path\" "\
+        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
+    cmd /c freetype.bat
+
+    if test -s "$freetype_lib_path_unix/freetype.dll"; then
+      # If that succeeds we also build freetype.lib
+      $ECHO -e "@echo off\n"\
+          "$MSBUILD $vcxproj_path "\
+          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
+          "/p:Configuration=\"Release Multithreaded\" "\
+          "/p:Platform=$freetype_platform "\
+          "/p:ConfigurationType=StaticLibrary "\
+          "/p:TargetName=freetype "\
+          "/p:OutDir=\"$freetype_lib_path\" "\
+          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
+      cmd /c freetype.bat
+
+      if test -s "$freetype_lib_path_unix/freetype.lib"; then
+        # Once we build both, lib and dll, set freetype lib and include path appropriately
+        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
+        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
+        AC_MSG_NOTICE([Compiling freetype sources succeeded! (see freetype.log for build results)])
+      else
+        BUILD_FREETYPE=no
+      fi
+    else
+      BUILD_FREETYPE=no
+    fi
+  fi
+])
+
+################################################################################
+# Check if a potential freeype library match is correct and usable
+################################################################################
+AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
+[
+  POTENTIAL_FREETYPE_INCLUDE_PATH="$1"
+  POTENTIAL_FREETYPE_LIB_PATH="$2"
+  METHOD="$3"
+
+  # Let's start with an optimistic view of the world :-)
+  FOUND_FREETYPE=yes
+
+  # First look for the canonical freetype main include file ft2build.h.
+  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
+    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+      # Fail.
+      FOUND_FREETYPE=no
+    fi
+  fi
+
+  if test "x$FOUND_FREETYPE" = xyes; then
+    # Include file found, let's continue the sanity check.
+    AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD])
+
+    # Reset to default value
+    FREETYPE_BASE_NAME=freetype
+    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
+      if test "x$OPENJDK_TARGET_OS" = xmacosx \
+          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
+        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
+        # for the .6 version explicitly.
+        FREETYPE_BASE_NAME=freetype.6
+        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+        AC_MSG_NOTICE([Compensating for missing symlink by using version 6 explicitly])
+      else
+        AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.])
+        FOUND_FREETYPE=no
+      fi
+    else
+      if test "x$OPENJDK_TARGET_OS" = xwindows; then
+        # On Windows, we will need both .lib and .dll file.
+        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
+          AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location.])
+          FOUND_FREETYPE=no
+        fi
+      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
+          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
+        # Found lib in isa dir, use that instead.
+        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
+        AC_MSG_NOTICE([Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead])
+      fi
+    fi
+  fi
+
+  if test "x$FOUND_FREETYPE" = xyes; then
+    BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_INCLUDE_PATH)
+    BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_LIB_PATH)
+
+    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
+    AC_MSG_CHECKING([for freetype includes])
+    AC_MSG_RESULT([$FREETYPE_INCLUDE_PATH])
+    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
+    AC_MSG_CHECKING([for freetype libraries])
+    AC_MSG_RESULT([$FREETYPE_LIB_PATH])
+  fi
+])
+
+################################################################################
+# Setup freetype (The FreeType2 font rendering library)
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
+[
+  AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
+      [specify prefix directory for the freetype package
+      (expecting the libraries under PATH/lib and the headers under PATH/include)])])
+  AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include],
+      [specify directory for the freetype include files])])
+  AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib],
+      [specify directory for the freetype library])])
+  AC_ARG_WITH(freetype-src, [AS_HELP_STRING([--with-freetype-src],
+      [specify directory with freetype sources to automatically build the library (experimental, Windows-only)])])
+  AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling],
+      [disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])])
+
+  # Need to specify explicitly since it needs to be overridden on some versions of macosx
+  FREETYPE_BASE_NAME=freetype
+  FREETYPE_CFLAGS=
+  FREETYPE_LIBS=
+  FREETYPE_BUNDLE_LIB_PATH=
+
+  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
+    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
+      AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
+    fi
+    if test "x$enable_freetype_bundling" != x; then
+      AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored])
+    fi
+  else
+    # freetype is needed to build; go get it!
+
+    BUNDLE_FREETYPE="$enable_freetype_bundling"
+
+    if  test "x$with_freetype_src" != x; then
+      if test "x$OPENJDK_TARGET_OS" = xwindows; then
+        # Try to build freetype if --with-freetype-src was given on Windows
+        LIB_BUILD_FREETYPE([$with_freetype_src])
+        if test "x$BUILD_FREETYPE" = xyes; then
+          # Okay, we built it. Check that it works.
+          LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype-src])
+          if test "x$FOUND_FREETYPE" != xyes; then
+            AC_MSG_ERROR([Can not use the built freetype at location given by --with-freetype-src])
+          fi
+        else
+          AC_MSG_NOTICE([User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)])
+          AC_MSG_ERROR([Consider building freetype manually and using --with-freetype instead.])
+        fi
+      else
+        AC_MSG_WARN([--with-freetype-src is currently only supported on Windows - ignoring])
+      fi
+    fi
+
+    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
+      # User has specified settings
+
+      if test "x$BUNDLE_FREETYPE" = x; then
+        # If not specified, default is to bundle freetype
+        BUNDLE_FREETYPE=yes
+      fi
+
+      if test "x$with_freetype" != x; then
+        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
+        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
+      fi
+
+      # Allow --with-freetype-lib and --with-freetype-include to override
+      if test "x$with_freetype_include" != x; then
+        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
+      fi
+      if test "x$with_freetype_lib" != x; then
+        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
+      fi
+
+      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
+        # Okay, we got it. Check that it works.
+        LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype])
+        if test "x$FOUND_FREETYPE" != xyes; then
+          AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype])
+        fi
+      else
+        # User specified only one of lib or include. This is an error.
+        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
+          AC_MSG_NOTICE([User specified --with-freetype-lib but not --with-freetype-include])
+          AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
+        else
+          AC_MSG_NOTICE([User specified --with-freetype-include but not --with-freetype-lib])
+          AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
+        fi
+      fi
+    else
+      # User did not specify settings, but we need freetype. Try to locate it.
+
+      if test "x$BUNDLE_FREETYPE" = x; then
+        # If not specified, default is to bundle freetype only on windows
+        if test "x$OPENJDK_TARGET_OS" = xwindows; then
+          BUNDLE_FREETYPE=yes
+        else
+          BUNDLE_FREETYPE=no
+        fi
+      fi
+
+      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
+      if test "x$SYSROOT" = x; then
+        if test "x$FOUND_FREETYPE" != xyes; then
+          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
+          if test "x$PKG_CONFIG" != x; then
+            PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
+            if test "x$FOUND_FREETYPE" = xyes; then
+              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
+              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
+              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
+              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
+              fi
+              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
+              if test "x$BUNDLE_FREETYPE" = xyes; then
+                AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that])
+                FOUND_FREETYPE=no
+              else
+                AC_MSG_CHECKING([for freetype])
+                AC_MSG_RESULT([yes (using pkg-config)])
+              fi
+            fi
+          fi
+        fi
+      fi
+
+      if test "x$FOUND_FREETYPE" != xyes; then
+        # Check in well-known locations
+        if test "x$OPENJDK_TARGET_OS" = xwindows; then
+          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
+          BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
+          LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
+          if test "x$FOUND_FREETYPE" != xyes; then
+            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
+            BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
+            LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
+          fi
+        else
+          FREETYPE_BASE_DIR="$SYSROOT/usr"
+          LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
+
+          if test "x$FOUND_FREETYPE" != xyes; then
+            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
+            LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
+          fi
+
+          if test "x$FOUND_FREETYPE" != xyes; then
+            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
+            LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
+          fi
+
+          if test "x$FOUND_FREETYPE" != xyes; then
+            FREETYPE_BASE_DIR="$SYSROOT/usr"
+            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+              LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location])
+            else
+              LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
+              if test "x$FOUND_FREETYPE" != xyes; then
+                LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
+              fi
+            fi
+          fi
+        fi
+      fi # end check in well-known locations
+
+      if test "x$FOUND_FREETYPE" != xyes; then
+        HELP_MSG_MISSING_DEPENDENCY([freetype])
+        AC_MSG_ERROR([Could not find freetype! $HELP_MSG ])
+      fi
+    fi # end user specified settings
+
+    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
+    if test "x$FREETYPE_CFLAGS" = x; then
+      BASIC_FIXUP_PATH(FREETYPE_INCLUDE_PATH)
+      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
+        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
+      else
+        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
+      fi
+    fi
+
+    if test "x$FREETYPE_LIBS" = x; then
+      BASIC_FIXUP_PATH(FREETYPE_LIB_PATH)
+      if test "x$OPENJDK_TARGET_OS" = xwindows; then
+        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
+      else
+        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
+      fi
+    fi
+
+    # Try to compile it
+    AC_MSG_CHECKING([if we can compile and link with freetype])
+    AC_LANG_PUSH(C++)
+    PREV_CXXCFLAGS="$CXXFLAGS"
+    PREV_LIBS="$LIBS"
+    PREV_CXX="$CXX"
+    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
+    LIBS="$LIBS $FREETYPE_LIBS"
+    CXX="$FIXPATH $CXX"
+    AC_LINK_IFELSE([AC_LANG_SOURCE([[
+          #include<ft2build.h>
+          #include FT_FREETYPE_H
+          int main () {
+            FT_Init_FreeType(NULL);
+            return 0;
+          }
+        ]])],
+        [
+          AC_MSG_RESULT([yes])
+        ],
+        [
+          AC_MSG_RESULT([no])
+          AC_MSG_NOTICE([Could not compile and link with freetype. This might be a 32/64-bit mismatch.])
+          AC_MSG_NOTICE([Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS])
+
+          HELP_MSG_MISSING_DEPENDENCY([freetype])
+
+          AC_MSG_ERROR([Can not continue without freetype. $HELP_MSG])
+        ]
+    )
+    CXXCFLAGS="$PREV_CXXFLAGS"
+    LIBS="$PREV_LIBS"
+    CXX="$PREV_CXX"
+    AC_LANG_POP(C++)
+
+    AC_MSG_CHECKING([if we should bundle freetype])
+    if test "x$BUNDLE_FREETYPE" = xyes; then
+      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
+    fi
+    AC_MSG_RESULT([$BUNDLE_FREETYPE])
+
+  fi # end freetype needed
+
+  AC_SUBST(FREETYPE_BUNDLE_LIB_PATH)
+  AC_SUBST(FREETYPE_CFLAGS)
+  AC_SUBST(FREETYPE_LIBS)
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-std.m4	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,120 @@
+#
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+################################################################################
+# Setup the standard C/C++ runtime libraries.
+#
+# Most importantly, determine if stdc++ should be linked statically or
+# dynamically.
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_STD_LIBS],
+[
+  # statically link libstdc++ before C++ ABI is stablized on Linux unless
+  # dynamic build is configured on command line.
+  AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>],
+      [force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])],
+      [
+        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
+                && test "x$with_stdc__lib" != xdefault; then
+          AC_MSG_ERROR([Bad parameter value --with-stdc++lib=$with_stdc__lib!])
+        fi
+      ],
+      [with_stdc__lib=default]
+  )
+
+  if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    # Test if -lstdc++ works.
+    AC_MSG_CHECKING([if dynamic link of stdc++ is possible])
+    AC_LANG_PUSH(C++)
+    OLD_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS="$CXXFLAGS -lstdc++"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
+        [has_dynamic_libstdcxx=yes],
+        [has_dynamic_libstdcxx=no])
+    CXXFLAGS="$OLD_CXXFLAGS"
+    AC_LANG_POP(C++)
+    AC_MSG_RESULT([$has_dynamic_libstdcxx])
+
+    # Test if stdc++ can be linked statically.
+    AC_MSG_CHECKING([if static link of stdc++ is possible])
+    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
+    AC_LANG_PUSH(C++)
+    OLD_LIBS="$LIBS"
+    OLD_CXX="$CXX"
+    LIBS="$STATIC_STDCXX_FLAGS"
+    CXX="$CC"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
+        [has_static_libstdcxx=yes],
+        [has_static_libstdcxx=no])
+    LIBS="$OLD_LIBS"
+    CXX="$OLD_CXX"
+    AC_LANG_POP(C++)
+    AC_MSG_RESULT([$has_static_libstdcxx])
+
+    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
+      AC_MSG_ERROR([Cannot link to stdc++, neither dynamically nor statically!])
+    fi
+
+    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
+      AC_MSG_ERROR([Static linking of libstdc++ was not possible!])
+    fi
+
+    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
+      AC_MSG_ERROR([Dynamic linking of libstdc++ was not possible!])
+    fi
+
+    # If dynamic was requested, it's available since it would fail above otherwise.
+    # If dynamic wasn't requested, go with static unless it isn't available.
+    AC_MSG_CHECKING([how to link with libstdc++])
+    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+      LIBCXX="$LIBCXX -lstdc++"
+      LDCXX="$CXX"
+      STATIC_CXX_SETTING="STATIC_CXX=false"
+      AC_MSG_RESULT([dynamic])
+    else
+      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
+      LDCXX="$CC"
+      STATIC_CXX_SETTING="STATIC_CXX=true"
+      AC_MSG_RESULT([static])
+    fi
+  fi
+  AC_SUBST(STATIC_CXX_SETTING)
+
+  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
+  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
+    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
+  fi
+
+  # TODO better (platform agnostic) test
+  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
+    LIBCXX="-lstdc++"
+  fi
+  AC_SUBST(LIBCXX)
+
+  # Setup Windows runtime dlls
+  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    TOOLCHAIN_SETUP_VS_RUNTIME_DLLS
+  fi
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-x11.m4	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,135 @@
+#
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+################################################################################
+# Setup X11 Windows system
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_X11],
+[
+  if test "x$NEEDS_LIB_X11" = xfalse; then
+    if test "x${with_x}" != x; then
+      AC_MSG_WARN([X11 is not used, so --with-x is ignored])
+    fi
+    X_CFLAGS=
+    X_LIBS=
+  else
+
+    if test "x${with_x}" = xno; then
+      AC_MSG_ERROR([It is not possible to disable the use of X11. Remove the --without-x option.])
+    fi
+
+    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
+      # The user has specified a X11 base directory. Use it for includes and
+      # libraries, unless explicitely overridden.
+      if test "x$x_includes" = xNONE; then
+        x_includes="${with_x}/include"
+      fi
+      if test "x$x_libraries" = xNONE; then
+        x_libraries="${with_x}/lib"
+      fi
+    else
+      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
+      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
+      # --x-libraries for the sysroot, if that seems to be correct.
+      if test "x$SYSROOT" != "x"; then
+        if test "x$x_includes" = xNONE; then
+          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
+            x_includes="$SYSROOT/usr/X11R6/include"
+          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
+            x_includes="$SYSROOT/usr/include"
+          fi
+        fi
+        if test "x$x_libraries" = xNONE; then
+          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
+            x_libraries="$SYSROOT/usr/X11R6/lib"
+          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+            x_libraries="$SYSROOT/usr/lib64"
+          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
+            x_libraries="$SYSROOT/usr/lib"
+          fi
+        fi
+      fi
+    fi
+
+    # Now let autoconf do it's magic
+    AC_PATH_X
+    AC_PATH_XTRA
+
+    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
+    # this doesn't make sense so we remove it.
+    if test "x$COMPILE_TYPE" = xcross; then
+      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
+    fi
+
+    if test "x$no_x" = xyes; then
+      HELP_MSG_MISSING_DEPENDENCY([x11])
+      AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
+    fi
+
+    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+      OPENWIN_HOME="/usr/openwin"
+      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
+      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
+          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
+          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
+          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
+    fi
+
+    AC_LANG_PUSH(C)
+    OLD_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
+
+    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
+    AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
+        [X11_HEADERS_OK=yes],
+        [X11_HEADERS_OK=no; break],
+        [
+          # include <X11/Xlib.h>
+          # include <X11/Xutil.h>
+        ]
+    )
+
+    if test "x$X11_HEADERS_OK" = xno; then
+      HELP_MSG_MISSING_DEPENDENCY([x11])
+      AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG])
+    fi
+
+    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
+    # defined in libawt_xawt.
+    AC_MSG_CHECKING([if XlinearGradient is defined in Xrender.h])
+    AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],
+            [[XLinearGradient x;]])],
+        [AC_MSG_RESULT([yes])],
+        [AC_MSG_RESULT([no])
+         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"])
+
+    CFLAGS="$OLD_CFLAGS"
+    AC_LANG_POP(C)
+  fi # NEEDS_LIB_X11
+
+  AC_SUBST(X_CFLAGS)
+  AC_SUBST(X_LIBS)
+])
--- a/common/autoconf/libraries.m4	Mon Oct 19 17:52:39 2015 +0300
+++ b/common/autoconf/libraries.m4	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -23,1044 +23,85 @@
 # questions.
 #
 
-AC_DEFUN_ONCE([LIB_SETUP_INIT],
-[
-
-  ###############################################################################
-  #
-  # OS specific settings that we never will need to probe.
-  #
-  if test "x$OPENJDK_TARGET_OS" = xlinux; then
-    AC_MSG_CHECKING([what is not needed on Linux?])
-    PULSE_NOT_NEEDED=yes
-    AC_MSG_RESULT([pulse])
-  fi
-
-  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-    AC_MSG_CHECKING([what is not needed on Solaris?])
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    AC_MSG_RESULT([alsa pulse])
-  fi
-
-  if test "x$OPENJDK_TARGET_OS" = xaix; then
-    AC_MSG_CHECKING([what is not needed on AIX?])
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    AC_MSG_RESULT([alsa pulse])
-  fi
-
-
-  if test "x$OPENJDK_TARGET_OS" = xwindows; then
-    AC_MSG_CHECKING([what is not needed on Windows?])
-    CUPS_NOT_NEEDED=yes
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    X11_NOT_NEEDED=yes
-    AC_MSG_RESULT([alsa cups pulse x11])
-  fi
-
-  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    AC_MSG_CHECKING([what is not needed on MacOSX?])
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    X11_NOT_NEEDED=yes
-    AC_MSG_RESULT([alsa pulse x11])
-  fi
-
-  if test "x$OPENJDK_TARGET_OS" = xbsd; then
-    AC_MSG_CHECKING([what is not needed on bsd?])
-    ALSA_NOT_NEEDED=yes
-    AC_MSG_RESULT([alsa])
-  fi
-
-  if test "x$OPENJDK" = "xfalse"; then
-    FREETYPE_NOT_NEEDED=yes
-  fi
-
-  if test "x$SUPPORT_HEADFUL" = xno; then
-    X11_NOT_NEEDED=yes
-  fi
-])
-
-AC_DEFUN_ONCE([LIB_SETUP_X11],
-[
-
-  ###############################################################################
-  #
-  # Check for X Windows
-  #
-
-  if test "x$X11_NOT_NEEDED" = xyes; then
-    if test "x${with_x}" != x; then
-      AC_MSG_WARN([X11 is not used, so --with-x is ignored])
-    fi
-    X_CFLAGS=
-    X_LIBS=
-  else
-    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
-    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
-    # --x-libraries for the sysroot, if that seems to be correct.
-    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
-      if test "x$SYSROOT" != "x"; then
-        if test "x$x_includes" = xNONE; then
-          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
-            x_includes="$SYSROOT/usr/X11R6/include"
-          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
-            x_includes="$SYSROOT/usr/include"
-          fi
-        fi
-        if test "x$x_libraries" = xNONE; then
-          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
-            x_libraries="$SYSROOT/usr/X11R6/lib"
-          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-            x_libraries="$SYSROOT/usr/lib64"
-          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
-            x_libraries="$SYSROOT/usr/lib"
-          fi
-        fi
-      fi
-    fi
-
-    # Now let autoconf do it's magic
-    AC_PATH_X
-    AC_PATH_XTRA
-
-    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
-    # this doesn't make sense so we remove it.
-    if test "x$COMPILE_TYPE" = xcross; then
-      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
-    fi
+# Major library component reside in separate files.
+m4_include([lib-alsa.m4])
+m4_include([lib-bundled.m4])
+m4_include([lib-cups.m4])
+m4_include([lib-ffi.m4])
+m4_include([lib-freetype.m4])
+m4_include([lib-std.m4])
+m4_include([lib-x11.m4])
 
-    if test "x$no_x" = xyes; then
-      HELP_MSG_MISSING_DEPENDENCY([x11])
-      AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
-    fi
-
-    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-      OPENWIN_HOME="/usr/openwin"
-      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
-      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
-          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
-          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
-          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
-    fi
-
-    AC_LANG_PUSH(C)
-    OLD_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
-
-    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
-    AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
-        [X11_HEADERS_OK=yes],
-        [X11_HEADERS_OK=no; break],
-        [
-          # include <X11/Xlib.h>
-          # include <X11/Xutil.h>
-        ]
-    )
-
-    if test "x$X11_HEADERS_OK" = xno; then
-      HELP_MSG_MISSING_DEPENDENCY([x11])
-      AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG])
-    fi
-
-    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
-    # defined in libawt_xawt.
-    AC_MSG_CHECKING([if XlinearGradient is defined in Xrender.h])
-    AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],
-            [[XLinearGradient x;]])],
-        [AC_MSG_RESULT([yes])],
-        [AC_MSG_RESULT([no])
-         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"])
-
-    CFLAGS="$OLD_CFLAGS"
-    AC_LANG_POP(C)
-  fi # X11_NOT_NEEDED
-
-  AC_SUBST(X_CFLAGS)
-  AC_SUBST(X_LIBS)
-])
-
-AC_DEFUN_ONCE([LIB_SETUP_CUPS],
+################################################################################
+# Determine which libraries are needed for this configuration
+################################################################################
+AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
 [
-
-  ###############################################################################
-  #
-  # The common unix printing system cups is used to print from java.
-  #
-  AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
-      [specify prefix directory for the cups package
-      (expecting the headers under PATH/include)])])
-  AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
-      [specify directory for the cups include files])])
-
-  if test "x$CUPS_NOT_NEEDED" = xyes; then
-    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
-      AC_MSG_WARN([cups not used, so --with-cups is ignored])
-    fi
-    CUPS_CFLAGS=
+  # Check if X11 is needed
+  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    # No X11 support on windows or macosx
+    NEEDS_LIB_X11=false
   else
-    CUPS_FOUND=no
-
-    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
-      AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
-    fi
-
-    if test "x${with_cups}" != x; then
-      CUPS_CFLAGS="-I${with_cups}/include"
-      CUPS_FOUND=yes
-    fi
-    if test "x${with_cups_include}" != x; then
-      CUPS_CFLAGS="-I${with_cups_include}"
-      CUPS_FOUND=yes
-    fi
-    if test "x$CUPS_FOUND" = xno; then
-      BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes])
-    fi
-    if test "x$CUPS_FOUND" = xno; then
-      # Are the cups headers installed in the default /usr/include location?
-      AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
-          [
-            CUPS_FOUND=yes
-            CUPS_CFLAGS=
-            DEFAULT_CUPS=yes
-          ]
-      )
-    fi
-    if test "x$CUPS_FOUND" = xno; then
-      # Getting nervous now? Lets poke around for standard Solaris third-party
-      # package installation locations.
-      AC_MSG_CHECKING([for cups headers])
-      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
-        # An SFW package seems to be installed!
-        CUPS_FOUND=yes
-        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
-      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
-        # A CSW package seems to be installed!
-        CUPS_FOUND=yes
-        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
-      fi
-      AC_MSG_RESULT([$CUPS_FOUND])
-    fi
-    if test "x$CUPS_FOUND" = xno; then
-      HELP_MSG_MISSING_DEPENDENCY([cups])
-      AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
+    if test "x$SUPPORT_HEADFUL" = xno; then
+      # No X11 support if building headless-only
+      NEEDS_LIB_X11=false
+    else
+      # All other instances need X11
+      NEEDS_LIB_X11=true
     fi
   fi
 
-  AC_SUBST(CUPS_CFLAGS)
-
-])
-
-AC_DEFUN([LIB_BUILD_FREETYPE],
-[
-  FREETYPE_SRC_PATH="$1"
-  BUILD_FREETYPE=yes
-
-  # Check if the freetype sources are acessible..
-  if ! test -d $FREETYPE_SRC_PATH; then
-    AC_MSG_WARN([--with-freetype-src specified, but can't find path "$FREETYPE_SRC_PATH" - ignoring --with-freetype-src])
-    BUILD_FREETYPE=no
-  fi
-  # ..and contain a vc2010 project file
-  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
-  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
-    AC_MSG_WARN([Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src])
-    BUILD_FREETYPE=no
-  fi
-  # Now check if configure found a version of 'msbuild.exe'
-  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
-    AC_MSG_WARN([Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src])
-    BUILD_FREETYPE=no
+  # Check if cups is needed
+  if test "x$OPENJDK_TARGET_OS" = xwindows; then
+    # Windows have a separate print system
+    NEEDS_LIB_CUPS=false
+  else
+    NEEDS_LIB_CUPS=true
   fi
 
-  # Ready to go..
-  if test "x$BUILD_FREETYPE" = xyes; then
-
-    # msbuild requires trailing slashes for output directories
-    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
-    freetype_lib_path_unix="$freetype_lib_path"
-    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
-    BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(vcxproj_path)
-    BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_lib_path)
-    BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_obj_path)
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-      freetype_platform=x64
-    else
-      freetype_platform=win32
-    fi
-
-    # The original freetype project file is for VS 2010 (i.e. 'v100'),
-    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
-    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
-    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
-    AC_MSG_NOTICE([Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ...])
-
-    # First we try to build the freetype.dll
-    $ECHO -e "@echo off\n"\
-	     "$MSBUILD $vcxproj_path "\
-		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
-		       "/p:Configuration=\"Release Multithreaded\" "\
-		       "/p:Platform=$freetype_platform "\
-		       "/p:ConfigurationType=DynamicLibrary "\
-		       "/p:TargetName=freetype "\
-		       "/p:OutDir=\"$freetype_lib_path\" "\
-		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
-    cmd /c freetype.bat
-
-    if test -s "$freetype_lib_path_unix/freetype.dll"; then
-      # If that succeeds we also build freetype.lib
-      $ECHO -e "@echo off\n"\
-	       "$MSBUILD $vcxproj_path "\
-			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
-			 "/p:Configuration=\"Release Multithreaded\" "\
-			 "/p:Platform=$freetype_platform "\
-			 "/p:ConfigurationType=StaticLibrary "\
-			 "/p:TargetName=freetype "\
-			 "/p:OutDir=\"$freetype_lib_path\" "\
-			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
-      cmd /c freetype.bat
-
-      if test -s "$freetype_lib_path_unix/freetype.lib"; then
-	# Once we build both, lib and dll, set freetype lib and include path appropriately
-	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
-	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
-	AC_MSG_NOTICE([Compiling freetype sources succeeded! (see freetype.log for build results)])
-      else
-	BUILD_FREETYPE=no
-      fi
-    else
-      BUILD_FREETYPE=no
-    fi
-  fi
-])
-
-AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
-[
-  POTENTIAL_FREETYPE_INCLUDE_PATH="$1"
-  POTENTIAL_FREETYPE_LIB_PATH="$2"
-  METHOD="$3"
-
-  # Let's start with an optimistic view of the world :-)
-  FOUND_FREETYPE=yes
-
-  # First look for the canonical freetype main include file ft2build.h.
-  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
-    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
-    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
-    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
-      # Fail.
-      FOUND_FREETYPE=no
-    fi
+  # Check if freetype is needed
+  if test "x$OPENJDK" = "xtrue"; then
+    NEEDS_LIB_FREETYPE=true
+  else
+    NEEDS_LIB_FREETYPE=false
   fi
 
-  if test "x$FOUND_FREETYPE" = xyes; then
-    # Include file found, let's continue the sanity check.
-    AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD])
-
-    # Reset to default value
-    FREETYPE_BASE_NAME=freetype
-    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
-    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
-      if test "x$OPENJDK_TARGET_OS" = xmacosx \
-          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
-        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
-        # for the .6 version explicitly.
-        FREETYPE_BASE_NAME=freetype.6
-        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
-        AC_MSG_NOTICE([Compensating for missing symlink by using version 6 explicitly])
-      else
-        AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.])
-        FOUND_FREETYPE=no
-      fi
-    else
-      if test "x$OPENJDK_TARGET_OS" = xwindows; then
-        # On Windows, we will need both .lib and .dll file.
-        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
-          AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location.])
-          FOUND_FREETYPE=no
-        fi
-      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
-          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
-        # Found lib in isa dir, use that instead.
-        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
-        AC_MSG_NOTICE([Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead])
-      fi
-    fi
+  # Check if alsa is needed
+  if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    NEEDS_LIB_ALSA=true
+  else
+    NEEDS_LIB_ALSA=false
   fi
 
-  if test "x$FOUND_FREETYPE" = xyes; then
-    BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_INCLUDE_PATH)
-    BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_LIB_PATH)
-
-    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
-    AC_MSG_CHECKING([for freetype includes])
-    AC_MSG_RESULT([$FREETYPE_INCLUDE_PATH])
-    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
-    AC_MSG_CHECKING([for freetype libraries])
-    AC_MSG_RESULT([$FREETYPE_LIB_PATH])
+  # Check if ffi is needed
+  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+    NEEDS_LIB_FFI=true
+  else
+    NEEDS_LIB_FFI=false
   fi
 ])
 
-AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
+################################################################################
+# Parse library options, and setup needed libraries
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
 [
-
-  ###############################################################################
-  #
-  # The ubiquitous freetype library is used to render fonts.
-  #
-  AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
-      [specify prefix directory for the freetype package
-      (expecting the libraries under PATH/lib and the headers under PATH/include)])])
-  AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include],
-      [specify directory for the freetype include files])])
-  AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib],
-      [specify directory for the freetype library])])
-  AC_ARG_WITH(freetype-src, [AS_HELP_STRING([--with-freetype-src],
-      [specify directory with freetype sources to automatically build the library (experimental, Windows-only)])])
-  AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling],
-      [disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])])
-
-  # Need to specify explicitly since it needs to be overridden on some versions of macosx
-  FREETYPE_BASE_NAME=freetype
-  FREETYPE_CFLAGS=
-  FREETYPE_LIBS=
-  FREETYPE_BUNDLE_LIB_PATH=
-
-  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
-    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
-      AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
-    fi
-    if test "x$enable_freetype_bundling" != x; then
-      AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored])
-    fi
-  else
-    # freetype is needed to build; go get it!
-
-    BUNDLE_FREETYPE="$enable_freetype_bundling"
-
-    if  test "x$with_freetype_src" != x; then
-      if test "x$OPENJDK_TARGET_OS" = xwindows; then
-        # Try to build freetype if --with-freetype-src was given on Windows
-        LIB_BUILD_FREETYPE([$with_freetype_src])
-        if test "x$BUILD_FREETYPE" = xyes; then
-          # Okay, we built it. Check that it works.
-          LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype-src])
-          if test "x$FOUND_FREETYPE" != xyes; then
-            AC_MSG_ERROR([Can not use the built freetype at location given by --with-freetype-src])
-          fi
-        else
-          AC_MSG_NOTICE([User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)])
-          AC_MSG_ERROR([Consider building freetype manually and using --with-freetype instead.])
-        fi
-      else
-        AC_MSG_WARN([--with-freetype-src is currently only supported on Windows - ignoring])
-      fi
-    fi
-
-    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
-      # User has specified settings
-
-      if test "x$BUNDLE_FREETYPE" = x; then
-        # If not specified, default is to bundle freetype
-        BUNDLE_FREETYPE=yes
-      fi
-
-      if test "x$with_freetype" != x; then
-        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
-        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
-      fi
-
-      # Allow --with-freetype-lib and --with-freetype-include to override
-      if test "x$with_freetype_include" != x; then
-        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
-      fi
-      if test "x$with_freetype_lib" != x; then
-        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
-      fi
-
-      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
-        # Okay, we got it. Check that it works.
-        LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype])
-        if test "x$FOUND_FREETYPE" != xyes; then
-          AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype])
-        fi
-      else
-        # User specified only one of lib or include. This is an error.
-        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
-          AC_MSG_NOTICE([User specified --with-freetype-lib but not --with-freetype-include])
-          AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
-        else
-          AC_MSG_NOTICE([User specified --with-freetype-include but not --with-freetype-lib])
-          AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
-        fi
-      fi
-    else
-      # User did not specify settings, but we need freetype. Try to locate it.
-
-      if test "x$BUNDLE_FREETYPE" = x; then
-        # If not specified, default is to bundle freetype only on windows
-        if test "x$OPENJDK_TARGET_OS" = xwindows; then
-          BUNDLE_FREETYPE=yes
-        else
-          BUNDLE_FREETYPE=no
-        fi
-      fi
-
-      if test "x$FOUND_FREETYPE" != xyes; then
-        # Check builddeps
-        BDEPS_CHECK_MODULE(FREETYPE, freetype2, xxx, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
-        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
-        if test "x$FOUND_FREETYPE" = xyes; then
-          if test "x$BUNDLE_FREETYPE" = xyes; then
-            AC_MSG_NOTICE([Found freetype using builddeps, but ignoring since we can not bundle that])
-            FOUND_FREETYPE=no
-          else
-            AC_MSG_CHECKING([for freetype])
-            AC_MSG_RESULT([yes (using builddeps)])
-          fi
-        fi
-      fi
-
-      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
-      if test "x$SYSROOT" = x; then
-        if test "x$FOUND_FREETYPE" != xyes; then
-          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
-          if test "x$PKG_CONFIG" != x; then
-            PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
-            if test "x$FOUND_FREETYPE" = xyes; then
-              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
-              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
-              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
-              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
-              fi
-              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
-              if test "x$BUNDLE_FREETYPE" = xyes; then
-                AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that])
-                FOUND_FREETYPE=no
-              else
-                AC_MSG_CHECKING([for freetype])
-                AC_MSG_RESULT([yes (using pkg-config)])
-              fi
-            fi
-          fi
-        fi
-      fi
-
-      if test "x$FOUND_FREETYPE" != xyes; then
-        # Check in well-known locations
-        if test "x$OPENJDK_TARGET_OS" = xwindows; then
-          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
-          BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
-          LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
-          if test "x$FOUND_FREETYPE" != xyes; then
-            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
-            BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
-            LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
-          fi
-        else
-          FREETYPE_BASE_DIR="$SYSROOT/usr"
-          LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
-
-          if test "x$FOUND_FREETYPE" != xyes; then
-            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
-            LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
-          fi
-
-          if test "x$FOUND_FREETYPE" != xyes; then
-            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
-            LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
-          fi
-
-          if test "x$FOUND_FREETYPE" != xyes; then
-            FREETYPE_BASE_DIR="$SYSROOT/usr"
-            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-              LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location])
-            else
-              LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
-              if test "x$FOUND_FREETYPE" != xyes; then
-                LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
-              fi
-            fi
-          fi
-        fi
-      fi # end check in well-known locations
-
-      if test "x$FOUND_FREETYPE" != xyes; then
-        HELP_MSG_MISSING_DEPENDENCY([freetype])
-        AC_MSG_ERROR([Could not find freetype! $HELP_MSG ])
-      fi
-    fi # end user specified settings
-
-    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
-    if test "x$FREETYPE_CFLAGS" = x; then
-      BASIC_FIXUP_PATH(FREETYPE_INCLUDE_PATH)
-      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
-        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
-      else
-        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
-      fi
-    fi
-
-    if test "x$FREETYPE_LIBS" = x; then
-      BASIC_FIXUP_PATH(FREETYPE_LIB_PATH)
-      if test "x$OPENJDK_TARGET_OS" = xwindows; then
-        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
-      else
-        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
-      fi
-    fi
-
-    # Try to compile it
-    AC_MSG_CHECKING([if we can compile and link with freetype])
-    AC_LANG_PUSH(C++)
-    PREV_CXXCFLAGS="$CXXFLAGS"
-    PREV_LIBS="$LIBS"
-    PREV_CXX="$CXX"
-    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
-    LIBS="$LIBS $FREETYPE_LIBS"
-    CXX="$FIXPATH $CXX"
-    AC_LINK_IFELSE([AC_LANG_SOURCE([[
-          #include<ft2build.h>
-          #include FT_FREETYPE_H
-          int main () {
-            FT_Init_FreeType(NULL);
-            return 0;
-          }
-        ]])],
-        [
-          AC_MSG_RESULT([yes])
-        ],
-        [
-          AC_MSG_RESULT([no])
-          AC_MSG_NOTICE([Could not compile and link with freetype. This might be a 32/64-bit mismatch.])
-          AC_MSG_NOTICE([Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS])
-
-          HELP_MSG_MISSING_DEPENDENCY([freetype])
-
-          AC_MSG_ERROR([Can not continue without freetype. $HELP_MSG])
-        ]
-    )
-    CXXCFLAGS="$PREV_CXXFLAGS"
-    LIBS="$PREV_LIBS"
-    CXX="$PREV_CXX"
-    AC_LANG_POP(C++)
-
-    AC_MSG_CHECKING([if we should bundle freetype])
-    if test "x$BUNDLE_FREETYPE" = xyes; then
-      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
-    fi
-    AC_MSG_RESULT([$BUNDLE_FREETYPE])
-
-  fi # end freetype needed
-
-  AC_SUBST(FREETYPE_BUNDLE_LIB_PATH)
-  AC_SUBST(FREETYPE_CFLAGS)
-  AC_SUBST(FREETYPE_LIBS)
-])
-
-AC_DEFUN_ONCE([LIB_SETUP_ALSA],
-[
-
-  ###############################################################################
-  #
-  # Check for alsa headers and libraries. Used on Linux/GNU systems.
-  #
-  AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa],
-      [specify prefix directory for the alsa package
-      (expecting the libraries under PATH/lib and the headers under PATH/include)])])
-  AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include],
-      [specify directory for the alsa include files])])
-  AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib],
-      [specify directory for the alsa library])])
-
-  if test "x$ALSA_NOT_NEEDED" = xyes; then
-    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
-      AC_MSG_WARN([alsa not used, so --with-alsa is ignored])
-    fi
-    ALSA_CFLAGS=
-    ALSA_LIBS=
-  else
-    ALSA_FOUND=no
-
-    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
-      AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.])
-    fi
-
-    if test "x${with_alsa}" != x; then
-      ALSA_LIBS="-L${with_alsa}/lib -lasound"
-      ALSA_CFLAGS="-I${with_alsa}/include"
-      ALSA_FOUND=yes
-    fi
-    if test "x${with_alsa_include}" != x; then
-      ALSA_CFLAGS="-I${with_alsa_include}"
-      ALSA_FOUND=yes
-    fi
-    if test "x${with_alsa_lib}" != x; then
-      ALSA_LIBS="-L${with_alsa_lib} -lasound"
-      ALSA_FOUND=yes
-    fi
-    if test "x$ALSA_FOUND" = xno; then
-      BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no])
-    fi
-    # Do not try pkg-config if we have a sysroot set.
-    if test "x$SYSROOT" = x; then
-      if test "x$ALSA_FOUND" = xno; then
-        PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
-      fi
-    fi
-    if test "x$ALSA_FOUND" = xno; then
-      AC_CHECK_HEADERS([alsa/asoundlib.h],
-          [
-            ALSA_FOUND=yes
-            ALSA_CFLAGS=-Iignoreme
-            ALSA_LIBS=-lasound
-            DEFAULT_ALSA=yes
-          ],
-          [ALSA_FOUND=no])
-    fi
-    if test "x$ALSA_FOUND" = xno; then
-      HELP_MSG_MISSING_DEPENDENCY([alsa])
-      AC_MSG_ERROR([Could not find alsa! $HELP_MSG ])
-    fi
-  fi
-
-  AC_SUBST(ALSA_CFLAGS)
-  AC_SUBST(ALSA_LIBS)
+  LIB_SETUP_STD_LIBS
+  LIB_SETUP_X11
+  LIB_SETUP_CUPS
+  LIB_SETUP_FREETYPE
+  LIB_SETUP_ALSA
+  LIB_SETUP_LIBFFI
+  LIB_SETUP_LLVM
+  LIB_SETUP_BUNDLED_LIBS
+  LIB_SETUP_MISC_LIBS
 ])
 
-AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
+################################################################################
+# Setup llvm (Low-Level VM)
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_LLVM],
 [
-
-  ###############################################################################
-  #
-  # Check for the jpeg library
-  #
-
-  AC_ARG_WITH(libjpeg, [AS_HELP_STRING([--with-libjpeg],
-      [use libjpeg from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
-
-  AC_MSG_CHECKING([for which libjpeg to use])
-
-  # default is bundled
-  DEFAULT_LIBJPEG=bundled
-
-  #
-  # if user didn't specify, use DEFAULT_LIBJPEG
-  #
-  if test "x${with_libjpeg}" = "x"; then
-    with_libjpeg=${DEFAULT_LIBJPEG}
-  fi
-
-  AC_MSG_RESULT(${with_libjpeg})
-
-  if test "x${with_libjpeg}" = "xbundled"; then
-    USE_EXTERNAL_LIBJPEG=false
-  elif test "x${with_libjpeg}" = "xsystem"; then
-    AC_CHECK_HEADER(jpeglib.h, [],
-        [ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])])
-    AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [],
-        [ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])])
-
-    USE_EXTERNAL_LIBJPEG=true
-  else
-    AC_MSG_ERROR([Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'])
-  fi
-
-  AC_SUBST(USE_EXTERNAL_LIBJPEG)
-
-  ###############################################################################
-  #
-  # Check for the gif library
-  #
-
-  AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib],
-      [use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
-
-
-  AC_MSG_CHECKING([for which giflib to use])
-
-  # default is bundled
-  DEFAULT_GIFLIB=bundled
-
-  #
-  # if user didn't specify, use DEFAULT_GIFLIB
-  #
-  if test "x${with_giflib}" = "x"; then
-    with_giflib=${DEFAULT_GIFLIB}
-  fi
-
-  AC_MSG_RESULT(${with_giflib})
-
-  if test "x${with_giflib}" = "xbundled"; then
-    USE_EXTERNAL_LIBGIF=false
-  elif test "x${with_giflib}" = "xsystem"; then
-    AC_CHECK_HEADER(gif_lib.h, [],
-        [ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])])
-    AC_CHECK_LIB(gif, DGifGetCode, [],
-        [ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])])
-
-    USE_EXTERNAL_LIBGIF=true
-  else
-    AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'])
-  fi
-  AC_SUBST(USE_EXTERNAL_LIBGIF)
-
-  ###############################################################################
-  #
-  # Check for the lcms2 library
-  #
-
-  AC_ARG_WITH(lcms, [AS_HELP_STRING([--with-lcms],
-  	[use lcms2 from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
-
-  AC_MSG_CHECKING([for which lcms to use])
-
-  DEFAULT_LCMS=bundled
-
-  #
-  # If user didn't specify, use DEFAULT_LCMS
-  #
-  if test "x${with_lcms}" = "x"; then
-      with_lcms=${DEFAULT_LCMS}
-  fi
-
-  if test "x${with_lcms}" = "xbundled"; then
-    USE_EXTERNAL_LCMS=false
-    AC_MSG_RESULT([bundled])
-  elif test "x${with_lcms}" = "xsystem"; then
-    AC_MSG_RESULT([system])
-    PKG_CHECK_MODULES([LCMS], [lcms2], [LCMS_FOUND=yes], [LCMS_FOUND=no])
-    if test "x${LCMS_FOUND}" = "xyes"; then
-      USE_EXTERNAL_LCMS=true
-    else
-      AC_MSG_ERROR([--with-lcms=system specified, but no lcms found!])
-    fi
-  else
-    AC_MSG_ERROR([Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'])
-  fi
-
-  AC_SUBST(USE_EXTERNAL_LCMS)
-
-  ###############################################################################
-  #
-  # Check for the png library
-  #
-
-  AC_ARG_WITH(libpng, [AS_HELP_STRING([--with-libpng],
-     [use libpng from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
-
-
-  AC_MSG_CHECKING([for which libpng to use])
-
-  # default is bundled
-  DEFAULT_LIBPNG=bundled
-
-  #
-  # if user didn't specify, use DEFAULT_LIBPNG
-  #
-  if test "x${with_libpng}" = "x"; then
-      with_libpng=${DEFAULT_LIBPNG}
-  fi
-
-  if test "x${with_libpng}" = "xbundled"; then
-      USE_EXTERNAL_LIBPNG=false
-      AC_MSG_RESULT([bundled])
-  elif test "x${with_libpng}" = "xsystem"; then
-      PKG_CHECK_MODULES(PNG, libpng,
-                   [ LIBPNG_FOUND=yes ],
-                   [ LIBPNG_FOUND=no ])
-      if test "x${LIBPNG_FOUND}" = "xyes"; then
-          USE_EXTERNAL_LIBPNG=true
-          AC_MSG_RESULT([system])
-      else
-          AC_MSG_RESULT([system not found])
-          AC_MSG_ERROR([--with-libpng=system specified, but no libpng found!])
-      fi
-  else
-      AC_MSG_ERROR([Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'])
-  fi
-  AC_SUBST(USE_EXTERNAL_LIBPNG)
-
-  ###############################################################################
-  #
-  # Check for the zlib library
-  #
-
-  AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
-      [use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
-
-  AC_CHECK_LIB(z, compress,
-      [ ZLIB_FOUND=yes ],
-      [ ZLIB_FOUND=no ])
-
-  AC_MSG_CHECKING([for which zlib to use])
-
-  DEFAULT_ZLIB=bundled
-  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    #
-    # On macosx default is system...on others default is
-    #
-    DEFAULT_ZLIB=system
-  fi
-
-  if test "x${ZLIB_FOUND}" != "xyes"; then
-    #
-    # If we don't find any system...set default to bundled
-    #
-    DEFAULT_ZLIB=bundled
-  fi
-
-  #
-  # If user didn't specify, use DEFAULT_ZLIB
-  #
-  if test "x${with_zlib}" = "x"; then
-    with_zlib=${DEFAULT_ZLIB}
-  fi
-
-  if test "x${with_zlib}" = "xbundled"; then
-    USE_EXTERNAL_LIBZ=false
-    AC_MSG_RESULT([bundled])
-  elif test "x${with_zlib}" = "xsystem"; then
-    if test "x${ZLIB_FOUND}" = "xyes"; then
-      USE_EXTERNAL_LIBZ=true
-      AC_MSG_RESULT([system])
-    else
-      AC_MSG_RESULT([system not found])
-      AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!])
-    fi
-  else
-    AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'])
-  fi
-
-  AC_SUBST(USE_EXTERNAL_LIBZ)
-
-  ###############################################################################
-  LIBZIP_CAN_USE_MMAP=true
-
-  AC_SUBST(LIBZIP_CAN_USE_MMAP)
-
-  ###############################################################################
-  #
-  # Check if altzone exists in time.h
-  #
-
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [return (int)altzone;])],
-      [has_altzone=yes],
-      [has_altzone=no])
-  if test "x$has_altzone" = xyes; then
-    AC_DEFINE([HAVE_ALTZONE], 1, [Define if you have the external 'altzone' variable in time.h])
-  fi
-
-  ###############################################################################
-  #
-  # Check the maths library
-  #
-
-  AC_CHECK_LIB(m, cos, [],
-      [
-        AC_MSG_NOTICE([Maths library was not found])
-      ]
-  )
-  AC_SUBST(LIBM)
-
-  ###############################################################################
-  #
-  # Check for libdl.so
-
-  save_LIBS="$LIBS"
-  LIBS=""
-  AC_CHECK_LIB(dl,dlopen)
-  LIBDL="$LIBS"
-  AC_SUBST(LIBDL)
-  LIBS="$save_LIBS"
-])
-
-AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
-[
-  ###############################################################################
-  #
-  # statically link libstdc++ before C++ ABI is stablized on Linux unless
-  # dynamic build is configured on command line.
-  #
-  AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>],
-      [force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])],
-      [
-        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
-                && test "x$with_stdc__lib" != xdefault; then
-          AC_MSG_ERROR([Bad parameter value --with-stdc++lib=$with_stdc__lib!])
-        fi
-      ],
-      [with_stdc__lib=default]
-  )
-
-  if test "x$OPENJDK_TARGET_OS" = xlinux; then
-    # Test if -lstdc++ works.
-    AC_MSG_CHECKING([if dynamic link of stdc++ is possible])
-    AC_LANG_PUSH(C++)
-    OLD_CXXFLAGS="$CXXFLAGS"
-    CXXFLAGS="$CXXFLAGS -lstdc++"
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
-        [has_dynamic_libstdcxx=yes],
-        [has_dynamic_libstdcxx=no])
-    CXXFLAGS="$OLD_CXXFLAGS"
-    AC_LANG_POP(C++)
-    AC_MSG_RESULT([$has_dynamic_libstdcxx])
-
-    # Test if stdc++ can be linked statically.
-    AC_MSG_CHECKING([if static link of stdc++ is possible])
-    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
-    AC_LANG_PUSH(C++)
-    OLD_LIBS="$LIBS"
-    OLD_CXX="$CXX"
-    LIBS="$STATIC_STDCXX_FLAGS"
-    CXX="$CC"
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
-        [has_static_libstdcxx=yes],
-        [has_static_libstdcxx=no])
-    LIBS="$OLD_LIBS"
-    CXX="$OLD_CXX"
-    AC_LANG_POP(C++)
-    AC_MSG_RESULT([$has_static_libstdcxx])
-
-    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
-      AC_MSG_ERROR([Cannot link to stdc++, neither dynamically nor statically!])
-    fi
-
-    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
-      AC_MSG_ERROR([Static linking of libstdc++ was not possible!])
-    fi
-
-    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
-      AC_MSG_ERROR([Dynamic linking of libstdc++ was not possible!])
-    fi
-
-    AC_MSG_CHECKING([how to link with libstdc++])
-    # If dynamic was requested, it's available since it would fail above otherwise.
-    # If dynamic wasn't requested, go with static unless it isn't available.
-    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
-      LIBCXX="$LIBCXX -lstdc++"
-      LDCXX="$CXX"
-      STATIC_CXX_SETTING="STATIC_CXX=false"
-      AC_MSG_RESULT([dynamic])
-    else
-      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
-      LDCXX="$CC"
-      STATIC_CXX_SETTING="STATIC_CXX=true"
-      AC_MSG_RESULT([static])
-    fi
-  fi
-  AC_SUBST(STATIC_CXX_SETTING)
-
-  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
-    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
-    PKG_CHECK_MODULES([LIBFFI], [libffi])
-
-  fi
-
   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
     AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config])
 
@@ -1107,26 +148,36 @@
     AC_SUBST(LLVM_LDFLAGS)
     AC_SUBST(LLVM_LIBS)
   fi
-
-  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
-  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
-    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
-  fi
-
-  # TODO better (platform agnostic) test
-  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
-    LIBCXX="-lstdc++"
-  fi
-
-  AC_SUBST(LIBCXX)
 ])
 
-AC_DEFUN_ONCE([LIB_SETUP_ON_WINDOWS],
+################################################################################
+# Setup various libraries, typically small system libraries
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
 [
+  # Setup libm (the maths library)
+  AC_CHECK_LIB(m, cos, [], [
+      AC_MSG_NOTICE([Maths library was not found])
+  ])
+  LIBM=-lm
+  AC_SUBST(LIBM)
+
+  # Setup libdl (for dynamic library loading)
+  save_LIBS="$LIBS"
+  LIBS=""
+  AC_CHECK_LIB(dl, dlopen)
+  LIBDL="$LIBS"
+  AC_SUBST(LIBDL)
+  LIBS="$save_LIBS"
+
+  # Deprecated libraries, keep the flags for backwards compatibility
   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-    TOOLCHAIN_SETUP_VS_RUNTIME_DLLS
     BASIC_DEPRECATED_ARG_WITH([dxsdk])
     BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
     BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
   fi
+
+  # Control if libzip can use mmap. Available for purposes of overriding.
+  LIBZIP_CAN_USE_MMAP=true
+  AC_SUBST(LIBZIP_CAN_USE_MMAP)
 ])
--- a/common/autoconf/spec.gmk.in	Mon Oct 19 17:52:39 2015 +0300
+++ b/common/autoconf/spec.gmk.in	Tue Oct 27 01:45:03 2015 -0400
@@ -96,7 +96,7 @@
 REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
 
 @SET_OPENJDK@
-LIBM:=-lm
+LIBM:=@LIBM@
 LIBDL:=@LIBDL@
 
 # colon or semicolon
@@ -499,6 +499,7 @@
 MKDIR:=@MKDIR@
 MV:=@MV@
 NAWK:=@NAWK@
+NICE:=@NICE@
 PATCH:=@PATCH@
 PRINTF:=@PRINTF@
 PWD:=@THEPWDCMD@
--- a/corba/.hgtags	Mon Oct 19 17:52:39 2015 +0300
+++ b/corba/.hgtags	Tue Oct 27 01:45:03 2015 -0400
@@ -327,3 +327,6 @@
 c20d8ebddaa6fb09cc81d3edf3d1d05f4232700a jdk9-b82
 ca8a1719588424f6e04e943790c7fcb7cb0b8c8f jdk9-b83
 df70bb200356fec686681f0295c50cc3ed43c3b3 jdk9-b84
+3ec06af1368924469f7ce60a00324bac55eaeecc jdk9-b85
+0a3f0d25c201b40575a7c3920fce4d6f4d3ae310 jdk9-b86
+a5c40ac9b916ff44d512ee764fa919ed2097e149 jdk9-b87
--- a/hotspot/.hgtags	Mon Oct 19 17:52:39 2015 +0300
+++ b/hotspot/.hgtags	Tue Oct 27 01:45:03 2015 -0400
@@ -487,3 +487,6 @@
 1c453a12be3036d482abef1dd470f8aff536b6b9 jdk9-b82
 3ed0df2c553a80e0e26b91a6ce08806ea17a066a jdk9-b83
 184c4328444974edd6b3b490b9d0177ace7e331c jdk9-b84
+03845376ea9dbf9690b6a9cfb4ed63f8cc0541c0 jdk9-b85
+1ae4191359d811a51512f17dca80ffe79837a5ff jdk9-b86
+d7ffd16382fe7071181b967932b47cff6d1312e1 jdk9-b87
--- a/hotspot/test/compiler/classUnloading/anonymousClass/TestAnonymousClassUnloading.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/hotspot/test/compiler/classUnloading/anonymousClass/TestAnonymousClassUnloading.java	Tue Oct 27 01:45:03 2015 -0400
@@ -23,8 +23,8 @@
 
 import sun.hotspot.WhiteBox;
 import sun.misc.Unsafe;
-import sun.misc.IOUtils;
 
+import java.io.IOException;
 import java.lang.reflect.Method;
 import java.net.URL;
 import java.net.URLConnection;
@@ -109,7 +109,13 @@
         // (1) Load an anonymous version of this class using the corresponding Unsafe method
         URL classUrl = TestAnonymousClassUnloading.class.getResource("TestAnonymousClassUnloading.class");
         URLConnection connection = classUrl.openConnection();
-        byte[] classBytes = IOUtils.readFully(connection.getInputStream(), connection.getContentLength(), true);
+
+        int length = connection.getContentLength();
+        byte[] classBytes = connection.getInputStream().readAllBytes();
+        if (length != -1 && classBytes.length != length) {
+            throw new IOException("Expected:" + length + ", actual: " + classBytes.length);
+        }
+
         Class<?> anonymousClass = UNSAFE.defineAnonymousClass(TestAnonymousClassUnloading.class, classBytes, null);
 
         // (2) Make sure all paths of doWork are profiled and compiled
--- a/hotspot/test/runtime/8003720/VictimClassLoader.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/hotspot/test/runtime/8003720/VictimClassLoader.java	Tue Oct 27 01:45:03 2015 -0400
@@ -72,8 +72,10 @@
     }
 
     static byte[] readFully(java.io.InputStream in, int len) throws java.io.IOException {
-        // Warning here:
-        return sun.misc.IOUtils.readFully(in, len, true);
+        byte[] b = in.readAllBytes();
+        if (len != -1 && b.length != len)
+            throw new java.io.IOException("Expected:" + len + ", actual:" + b.length);
+        return b;
     }
 
     public void finalize() {
--- a/jaxp/.hgtags	Mon Oct 19 17:52:39 2015 +0300
+++ b/jaxp/.hgtags	Tue Oct 27 01:45:03 2015 -0400
@@ -327,3 +327,6 @@
 53fe3c103b6fdf48e2b2676c0c4818ef5a10fa21 jdk9-b82
 497bc2654e11684b11de46744227883d7e760f35 jdk9-b83
 91795d86744f3074d1e59b1e75d9c851c098688f jdk9-b84
+1d9850c1b35c74e8b5c17970ed5d46dc0fc33f06 jdk9-b85
+88d9b1f6b73e0c46fcb5ccabe1231a30ce758a22 jdk9-b86
+eb435c878c2cbbfb043d0b205f4d5bd6faffd44a jdk9-b87
--- a/jaxws/.hgtags	Mon Oct 19 17:52:39 2015 +0300
+++ b/jaxws/.hgtags	Tue Oct 27 01:45:03 2015 -0400
@@ -330,3 +330,6 @@
 52d9ad2536ba6c6f1cc5561c0a0ee2b4847fd62c jdk9-b82
 d7ee8157f4feced67924e421225c6f844079a03d jdk9-b83
 51729143f8fe038f52cf55720c4c1f89267f5948 jdk9-b84
+67b626ec730d2601d95ef036d06be34b37fa9ce6 jdk9-b85
+5289646179079394890a34a898a8ab70fcde0331 jdk9-b86
+f7dba191a38cfc29665b0d77174615a530803297 jdk9-b87
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java	Tue Oct 27 01:45:03 2015 -0400
@@ -30,6 +30,7 @@
 import com.sun.xml.internal.bind.util.Which;
 
 import javax.lang.model.SourceVersion;
+import javax.tools.Diagnostic;
 import javax.tools.DiagnosticCollector;
 import javax.tools.JavaCompiler;
 import javax.tools.JavaFileObject;
@@ -248,7 +249,12 @@
             if (episode != null)
                 r.setEpisodeFile(episode);
             task.setProcessors(Collections.singleton(r));
-            return task.call();
+            boolean res = task.call();
+            //Print messages generated by compiler
+            for (Diagnostic<? extends JavaFileObject> d : diagnostics.getDiagnostics()) {
+                 System.err.println(d.toString());
+            }
+            return res;
         }
     }
 
--- a/jdk/.hgtags	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/.hgtags	Tue Oct 27 01:45:03 2015 -0400
@@ -327,3 +327,7 @@
 b10b64263b563e21f055c881444f625ec618b826 jdk9-b82
 d11f25ce3c545823f53bb978d454a4d2901abac3 jdk9-b83
 757ef7f6d0042934edea3e0bf616fad2c1a22789 jdk9-b84
+fe40b31c0e526d357cf5b62044fea006e43b53a5 jdk9-b85
+e8a66c0b05d786a282a7ff1d7eb4989afa30c891 jdk9-b86
+110fc90bdfa0fe59606c047c2301ed75d2bad6cf jdk9-b87
+6e50b992bef4def597a5033e696e5b1d4fe5b294 jdk9-b88
--- a/jdk/make/data/characterdata/CharacterData00.java.template	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/data/characterdata/CharacterData00.java.template	Tue Oct 27 01:45:03 2015 -0400
@@ -136,101 +136,179 @@
         if ((val & $$maskLowerCase) != 0) {
           if ((val & $$maskCaseOffset) == $$maskCaseOffset) {
             switch(ch) {
-              // map the offset overflow chars
-            case 0x0130 : mapChar = 0x0069; break;
-            case 0x2126 : mapChar = 0x03C9; break;
-            case 0x212A : mapChar = 0x006B; break;
-            case 0x212B : mapChar = 0x00E5; break;
-              // map the titlecase chars with both a 1:M uppercase map
-              // and a lowercase map
-            case 0x1F88 : mapChar = 0x1F80; break;
-            case 0x1F89 : mapChar = 0x1F81; break;
-            case 0x1F8A : mapChar = 0x1F82; break;
-            case 0x1F8B : mapChar = 0x1F83; break;
-            case 0x1F8C : mapChar = 0x1F84; break;
-            case 0x1F8D : mapChar = 0x1F85; break;
-            case 0x1F8E : mapChar = 0x1F86; break;
-            case 0x1F8F : mapChar = 0x1F87; break;
-            case 0x1F98 : mapChar = 0x1F90; break;
-            case 0x1F99 : mapChar = 0x1F91; break;
-            case 0x1F9A : mapChar = 0x1F92; break;
-            case 0x1F9B : mapChar = 0x1F93; break;
-            case 0x1F9C : mapChar = 0x1F94; break;
-            case 0x1F9D : mapChar = 0x1F95; break;
-            case 0x1F9E : mapChar = 0x1F96; break;
-            case 0x1F9F : mapChar = 0x1F97; break;
-            case 0x1FA8 : mapChar = 0x1FA0; break;
-            case 0x1FA9 : mapChar = 0x1FA1; break;
-            case 0x1FAA : mapChar = 0x1FA2; break;
-            case 0x1FAB : mapChar = 0x1FA3; break;
-            case 0x1FAC : mapChar = 0x1FA4; break;
-            case 0x1FAD : mapChar = 0x1FA5; break;
-            case 0x1FAE : mapChar = 0x1FA6; break;
-            case 0x1FAF : mapChar = 0x1FA7; break;
-            case 0x1FBC : mapChar = 0x1FB3; break;
-            case 0x1FCC : mapChar = 0x1FC3; break;
-            case 0x1FFC : mapChar = 0x1FF3; break;
-
-            case 0x023A : mapChar = 0x2C65; break;
-            case 0x023E : mapChar = 0x2C66; break;
-            case 0x10A0 : mapChar = 0x2D00; break;
-            case 0x10A1 : mapChar = 0x2D01; break;
-            case 0x10A2 : mapChar = 0x2D02; break;
-            case 0x10A3 : mapChar = 0x2D03; break;
-            case 0x10A4 : mapChar = 0x2D04; break;
-            case 0x10A5 : mapChar = 0x2D05; break;
-            case 0x10A6 : mapChar = 0x2D06; break;
-            case 0x10A7 : mapChar = 0x2D07; break;
-            case 0x10A8 : mapChar = 0x2D08; break;
-            case 0x10A9 : mapChar = 0x2D09; break;
-            case 0x10AA : mapChar = 0x2D0A; break;
-            case 0x10AB : mapChar = 0x2D0B; break;
-            case 0x10AC : mapChar = 0x2D0C; break;
-            case 0x10AD : mapChar = 0x2D0D; break;
-            case 0x10AE : mapChar = 0x2D0E; break;
-            case 0x10AF : mapChar = 0x2D0F; break;
-            case 0x10B0 : mapChar = 0x2D10; break;
-            case 0x10B1 : mapChar = 0x2D11; break;
-            case 0x10B2 : mapChar = 0x2D12; break;
-            case 0x10B3 : mapChar = 0x2D13; break;
-            case 0x10B4 : mapChar = 0x2D14; break;
-            case 0x10B5 : mapChar = 0x2D15; break;
-            case 0x10B6 : mapChar = 0x2D16; break;
-            case 0x10B7 : mapChar = 0x2D17; break;
-            case 0x10B8 : mapChar = 0x2D18; break;
-            case 0x10B9 : mapChar = 0x2D19; break;
-            case 0x10BA : mapChar = 0x2D1A; break;
-            case 0x10BB : mapChar = 0x2D1B; break;
-            case 0x10BC : mapChar = 0x2D1C; break;
-            case 0x10BD : mapChar = 0x2D1D; break;
-            case 0x10BE : mapChar = 0x2D1E; break;
-            case 0x10BF : mapChar = 0x2D1F; break;
-            case 0x10C0 : mapChar = 0x2D20; break;
-            case 0x10C1 : mapChar = 0x2D21; break;
-            case 0x10C2 : mapChar = 0x2D22; break;
-            case 0x10C3 : mapChar = 0x2D23; break;
-            case 0x10C4 : mapChar = 0x2D24; break;
-            case 0x10C5 : mapChar = 0x2D25; break;
-            case 0x10C7 : mapChar = 0x2D27; break;
-            case 0x10CD : mapChar = 0x2D2D; break;
-            case 0x1E9E : mapChar = 0x00DF; break;
-            case 0x2C62 : mapChar = 0x026B; break;
-            case 0x2C63 : mapChar = 0x1D7D; break;
-            case 0x2C64 : mapChar = 0x027D; break;
-            case 0x2C6D : mapChar = 0x0251; break;
-            case 0x2C6E : mapChar = 0x0271; break;
-            case 0x2C6F : mapChar = 0x0250; break;
-            case 0x2C70 : mapChar = 0x0252; break;
-            case 0x2C7E : mapChar = 0x023F; break;
-            case 0x2C7F : mapChar = 0x0240; break;
-            case 0xA77D : mapChar = 0x1D79; break;
-            case 0xA78D : mapChar = 0x0265; break;
-            case 0xA7AA : mapChar = 0x0266; break;
-            case 0xA7AB : mapChar = 0x025C; break;
-            case 0xA7AC : mapChar = 0x0261; break;
-            case 0xA7AD : mapChar = 0x026C; break;
-            case 0xA7B0 : mapChar = 0x029E; break;
-            case 0xA7B1 : mapChar = 0x0287; break;
+            case 0x0130: mapChar = 0x0069; break;
+            case 0x023A: mapChar = 0x2C65; break;
+            case 0x023E: mapChar = 0x2C66; break;
+            case 0x10A0: mapChar = 0x2D00; break;
+            case 0x10A1: mapChar = 0x2D01; break;
+            case 0x10A2: mapChar = 0x2D02; break;
+            case 0x10A3: mapChar = 0x2D03; break;
+            case 0x10A4: mapChar = 0x2D04; break;
+            case 0x10A5: mapChar = 0x2D05; break;
+            case 0x10A6: mapChar = 0x2D06; break;
+            case 0x10A7: mapChar = 0x2D07; break;
+            case 0x10A8: mapChar = 0x2D08; break;
+            case 0x10A9: mapChar = 0x2D09; break;
+            case 0x10AA: mapChar = 0x2D0A; break;
+            case 0x10AB: mapChar = 0x2D0B; break;
+            case 0x10AC: mapChar = 0x2D0C; break;
+            case 0x10AD: mapChar = 0x2D0D; break;
+            case 0x10AE: mapChar = 0x2D0E; break;
+            case 0x10AF: mapChar = 0x2D0F; break;
+            case 0x10B0: mapChar = 0x2D10; break;
+            case 0x10B1: mapChar = 0x2D11; break;
+            case 0x10B2: mapChar = 0x2D12; break;
+            case 0x10B3: mapChar = 0x2D13; break;
+            case 0x10B4: mapChar = 0x2D14; break;
+            case 0x10B5: mapChar = 0x2D15; break;
+            case 0x10B6: mapChar = 0x2D16; break;
+            case 0x10B7: mapChar = 0x2D17; break;
+            case 0x10B8: mapChar = 0x2D18; break;
+            case 0x10B9: mapChar = 0x2D19; break;
+            case 0x10BA: mapChar = 0x2D1A; break;
+            case 0x10BB: mapChar = 0x2D1B; break;
+            case 0x10BC: mapChar = 0x2D1C; break;
+            case 0x10BD: mapChar = 0x2D1D; break;
+            case 0x10BE: mapChar = 0x2D1E; break;
+            case 0x10BF: mapChar = 0x2D1F; break;
+            case 0x10C0: mapChar = 0x2D20; break;
+            case 0x10C1: mapChar = 0x2D21; break;
+            case 0x10C2: mapChar = 0x2D22; break;
+            case 0x10C3: mapChar = 0x2D23; break;
+            case 0x10C4: mapChar = 0x2D24; break;
+            case 0x10C5: mapChar = 0x2D25; break;
+            case 0x10C7: mapChar = 0x2D27; break;
+            case 0x10CD: mapChar = 0x2D2D; break;
+            case 0x13A0: mapChar = 0xAB70; break;
+            case 0x13A1: mapChar = 0xAB71; break;
+            case 0x13A2: mapChar = 0xAB72; break;
+            case 0x13A3: mapChar = 0xAB73; break;
+            case 0x13A4: mapChar = 0xAB74; break;
+            case 0x13A5: mapChar = 0xAB75; break;
+            case 0x13A6: mapChar = 0xAB76; break;
+            case 0x13A7: mapChar = 0xAB77; break;
+            case 0x13A8: mapChar = 0xAB78; break;
+            case 0x13A9: mapChar = 0xAB79; break;
+            case 0x13AA: mapChar = 0xAB7A; break;
+            case 0x13AB: mapChar = 0xAB7B; break;
+            case 0x13AC: mapChar = 0xAB7C; break;
+            case 0x13AD: mapChar = 0xAB7D; break;
+            case 0x13AE: mapChar = 0xAB7E; break;
+            case 0x13AF: mapChar = 0xAB7F; break;
+            case 0x13B0: mapChar = 0xAB80; break;
+            case 0x13B1: mapChar = 0xAB81; break;
+            case 0x13B2: mapChar = 0xAB82; break;
+            case 0x13B3: mapChar = 0xAB83; break;
+            case 0x13B4: mapChar = 0xAB84; break;
+            case 0x13B5: mapChar = 0xAB85; break;
+            case 0x13B6: mapChar = 0xAB86; break;
+            case 0x13B7: mapChar = 0xAB87; break;
+            case 0x13B8: mapChar = 0xAB88; break;
+            case 0x13B9: mapChar = 0xAB89; break;
+            case 0x13BA: mapChar = 0xAB8A; break;
+            case 0x13BB: mapChar = 0xAB8B; break;
+            case 0x13BC: mapChar = 0xAB8C; break;
+            case 0x13BD: mapChar = 0xAB8D; break;
+            case 0x13BE: mapChar = 0xAB8E; break;
+            case 0x13BF: mapChar = 0xAB8F; break;
+            case 0x13C0: mapChar = 0xAB90; break;
+            case 0x13C1: mapChar = 0xAB91; break;
+            case 0x13C2: mapChar = 0xAB92; break;
+            case 0x13C3: mapChar = 0xAB93; break;
+            case 0x13C4: mapChar = 0xAB94; break;
+            case 0x13C5: mapChar = 0xAB95; break;
+            case 0x13C6: mapChar = 0xAB96; break;
+            case 0x13C7: mapChar = 0xAB97; break;
+            case 0x13C8: mapChar = 0xAB98; break;
+            case 0x13C9: mapChar = 0xAB99; break;
+            case 0x13CA: mapChar = 0xAB9A; break;
+            case 0x13CB: mapChar = 0xAB9B; break;
+            case 0x13CC: mapChar = 0xAB9C; break;
+            case 0x13CD: mapChar = 0xAB9D; break;
+            case 0x13CE: mapChar = 0xAB9E; break;
+            case 0x13CF: mapChar = 0xAB9F; break;
+            case 0x13D0: mapChar = 0xABA0; break;
+            case 0x13D1: mapChar = 0xABA1; break;
+            case 0x13D2: mapChar = 0xABA2; break;
+            case 0x13D3: mapChar = 0xABA3; break;
+            case 0x13D4: mapChar = 0xABA4; break;
+            case 0x13D5: mapChar = 0xABA5; break;
+            case 0x13D6: mapChar = 0xABA6; break;
+            case 0x13D7: mapChar = 0xABA7; break;
+            case 0x13D8: mapChar = 0xABA8; break;
+            case 0x13D9: mapChar = 0xABA9; break;
+            case 0x13DA: mapChar = 0xABAA; break;
+            case 0x13DB: mapChar = 0xABAB; break;
+            case 0x13DC: mapChar = 0xABAC; break;
+            case 0x13DD: mapChar = 0xABAD; break;
+            case 0x13DE: mapChar = 0xABAE; break;
+            case 0x13DF: mapChar = 0xABAF; break;
+            case 0x13E0: mapChar = 0xABB0; break;
+            case 0x13E1: mapChar = 0xABB1; break;
+            case 0x13E2: mapChar = 0xABB2; break;
+            case 0x13E3: mapChar = 0xABB3; break;
+            case 0x13E4: mapChar = 0xABB4; break;
+            case 0x13E5: mapChar = 0xABB5; break;
+            case 0x13E6: mapChar = 0xABB6; break;
+            case 0x13E7: mapChar = 0xABB7; break;
+            case 0x13E8: mapChar = 0xABB8; break;
+            case 0x13E9: mapChar = 0xABB9; break;
+            case 0x13EA: mapChar = 0xABBA; break;
+            case 0x13EB: mapChar = 0xABBB; break;
+            case 0x13EC: mapChar = 0xABBC; break;
+            case 0x13ED: mapChar = 0xABBD; break;
+            case 0x13EE: mapChar = 0xABBE; break;
+            case 0x13EF: mapChar = 0xABBF; break;
+            case 0x1E9E: mapChar = 0x00DF; break;
+            case 0x1F88: mapChar = 0x1F80; break;
+            case 0x1F89: mapChar = 0x1F81; break;
+            case 0x1F8A: mapChar = 0x1F82; break;
+            case 0x1F8B: mapChar = 0x1F83; break;
+            case 0x1F8C: mapChar = 0x1F84; break;
+            case 0x1F8D: mapChar = 0x1F85; break;
+            case 0x1F8E: mapChar = 0x1F86; break;
+            case 0x1F8F: mapChar = 0x1F87; break;
+            case 0x1F98: mapChar = 0x1F90; break;
+            case 0x1F99: mapChar = 0x1F91; break;
+            case 0x1F9A: mapChar = 0x1F92; break;
+            case 0x1F9B: mapChar = 0x1F93; break;
+            case 0x1F9C: mapChar = 0x1F94; break;
+            case 0x1F9D: mapChar = 0x1F95; break;
+            case 0x1F9E: mapChar = 0x1F96; break;
+            case 0x1F9F: mapChar = 0x1F97; break;
+            case 0x1FA8: mapChar = 0x1FA0; break;
+            case 0x1FA9: mapChar = 0x1FA1; break;
+            case 0x1FAA: mapChar = 0x1FA2; break;
+            case 0x1FAB: mapChar = 0x1FA3; break;
+            case 0x1FAC: mapChar = 0x1FA4; break;
+            case 0x1FAD: mapChar = 0x1FA5; break;
+            case 0x1FAE: mapChar = 0x1FA6; break;
+            case 0x1FAF: mapChar = 0x1FA7; break;
+            case 0x1FBC: mapChar = 0x1FB3; break;
+            case 0x1FCC: mapChar = 0x1FC3; break;
+            case 0x1FFC: mapChar = 0x1FF3; break;
+            case 0x2126: mapChar = 0x03C9; break;
+            case 0x212A: mapChar = 0x006B; break;
+            case 0x212B: mapChar = 0x00E5; break;
+            case 0x2C62: mapChar = 0x026B; break;
+            case 0x2C63: mapChar = 0x1D7D; break;
+            case 0x2C64: mapChar = 0x027D; break;
+            case 0x2C6D: mapChar = 0x0251; break;
+            case 0x2C6E: mapChar = 0x0271; break;
+            case 0x2C6F: mapChar = 0x0250; break;
+            case 0x2C70: mapChar = 0x0252; break;
+            case 0x2C7E: mapChar = 0x023F; break;
+            case 0x2C7F: mapChar = 0x0240; break;
+            case 0xA77D: mapChar = 0x1D79; break;
+            case 0xA78D: mapChar = 0x0265; break;
+            case 0xA7AA: mapChar = 0x0266; break;
+            case 0xA7AB: mapChar = 0x025C; break;
+            case 0xA7AC: mapChar = 0x0261; break;
+            case 0xA7AD: mapChar = 0x026C; break;
+            case 0xA7B0: mapChar = 0x029E; break;
+            case 0xA7B1: mapChar = 0x0287; break;
+            case 0xA7B2: mapChar = 0x029D; break;
+            case 0xA7B3: mapChar = 0xAB53; break;
               // default mapChar is already set, so no
               // need to redo it here.
               // default       : mapChar = ch;
@@ -251,98 +329,176 @@
         if ((val & $$maskUpperCase) != 0) {
           if ((val & $$maskCaseOffset) == $$maskCaseOffset) {
             switch(ch) {
-              // map chars with overflow offsets
-            case 0x00B5 : mapChar = 0x039C; break;
-            case 0x017F : mapChar = 0x0053; break;
-            case 0x1FBE : mapChar = 0x0399; break;
-              // map char that have both a 1:1 and 1:M map
-            case 0x1F80 : mapChar = 0x1F88; break;
-            case 0x1F81 : mapChar = 0x1F89; break;
-            case 0x1F82 : mapChar = 0x1F8A; break;
-            case 0x1F83 : mapChar = 0x1F8B; break;
-            case 0x1F84 : mapChar = 0x1F8C; break;
-            case 0x1F85 : mapChar = 0x1F8D; break;
-            case 0x1F86 : mapChar = 0x1F8E; break;
-            case 0x1F87 : mapChar = 0x1F8F; break;
-            case 0x1F90 : mapChar = 0x1F98; break;
-            case 0x1F91 : mapChar = 0x1F99; break;
-            case 0x1F92 : mapChar = 0x1F9A; break;
-            case 0x1F93 : mapChar = 0x1F9B; break;
-            case 0x1F94 : mapChar = 0x1F9C; break;
-            case 0x1F95 : mapChar = 0x1F9D; break;
-            case 0x1F96 : mapChar = 0x1F9E; break;
-            case 0x1F97 : mapChar = 0x1F9F; break;
-            case 0x1FA0 : mapChar = 0x1FA8; break;
-            case 0x1FA1 : mapChar = 0x1FA9; break;
-            case 0x1FA2 : mapChar = 0x1FAA; break;
-            case 0x1FA3 : mapChar = 0x1FAB; break;
-            case 0x1FA4 : mapChar = 0x1FAC; break;
-            case 0x1FA5 : mapChar = 0x1FAD; break;
-            case 0x1FA6 : mapChar = 0x1FAE; break;
-            case 0x1FA7 : mapChar = 0x1FAF; break;
-            case 0x1FB3 : mapChar = 0x1FBC; break;
-            case 0x1FC3 : mapChar = 0x1FCC; break;
-            case 0x1FF3 : mapChar = 0x1FFC; break;
-
-            case 0x023F : mapChar = 0x2C7E; break;
-            case 0x0240 : mapChar = 0x2C7F; break;
-            case 0x0250 : mapChar = 0x2C6F; break;
-            case 0x0251 : mapChar = 0x2C6D; break;
-            case 0x0252 : mapChar = 0x2C70; break;
-            case 0x025C : mapChar = 0xA7AB; break;
-            case 0x0261 : mapChar = 0xA7AC; break;
-            case 0x0265 : mapChar = 0xA78D; break;
-            case 0x0266 : mapChar = 0xA7AA; break;
-            case 0x026B : mapChar = 0x2C62; break;
-            case 0x026C : mapChar = 0xA7AD; break;
-            case 0x0271 : mapChar = 0x2C6E; break;
-            case 0x0287 : mapChar = 0xA7B1; break;
-            case 0x029E : mapChar = 0xA7B0; break;
-            case 0x027D : mapChar = 0x2C64; break;
-            case 0x1D79 : mapChar = 0xA77D; break;
-            case 0x1D7D : mapChar = 0x2C63; break;
-            case 0x2C65 : mapChar = 0x023A; break;
-            case 0x2C66 : mapChar = 0x023E; break;
-            case 0x2D00 : mapChar = 0x10A0; break;
-            case 0x2D01 : mapChar = 0x10A1; break;
-            case 0x2D02 : mapChar = 0x10A2; break;
-            case 0x2D03 : mapChar = 0x10A3; break;
-            case 0x2D04 : mapChar = 0x10A4; break;
-            case 0x2D05 : mapChar = 0x10A5; break;
-            case 0x2D06 : mapChar = 0x10A6; break;
-            case 0x2D07 : mapChar = 0x10A7; break;
-            case 0x2D08 : mapChar = 0x10A8; break;
-            case 0x2D09 : mapChar = 0x10A9; break;
-            case 0x2D0A : mapChar = 0x10AA; break;
-            case 0x2D0B : mapChar = 0x10AB; break;
-            case 0x2D0C : mapChar = 0x10AC; break;
-            case 0x2D0D : mapChar = 0x10AD; break;
-            case 0x2D0E : mapChar = 0x10AE; break;
-            case 0x2D0F : mapChar = 0x10AF; break;
-            case 0x2D10 : mapChar = 0x10B0; break;
-            case 0x2D11 : mapChar = 0x10B1; break;
-            case 0x2D12 : mapChar = 0x10B2; break;
-            case 0x2D13 : mapChar = 0x10B3; break;
-            case 0x2D14 : mapChar = 0x10B4; break;
-            case 0x2D15 : mapChar = 0x10B5; break;
-            case 0x2D16 : mapChar = 0x10B6; break;
-            case 0x2D17 : mapChar = 0x10B7; break;
-            case 0x2D18 : mapChar = 0x10B8; break;
-            case 0x2D19 : mapChar = 0x10B9; break;
-            case 0x2D1A : mapChar = 0x10BA; break;
-            case 0x2D1B : mapChar = 0x10BB; break;
-            case 0x2D1C : mapChar = 0x10BC; break;
-            case 0x2D1D : mapChar = 0x10BD; break;
-            case 0x2D1E : mapChar = 0x10BE; break;
-            case 0x2D1F : mapChar = 0x10BF; break;
-            case 0x2D20 : mapChar = 0x10C0; break;
-            case 0x2D21 : mapChar = 0x10C1; break;
-            case 0x2D22 : mapChar = 0x10C2; break;
-            case 0x2D23 : mapChar = 0x10C3; break;
-            case 0x2D24 : mapChar = 0x10C4; break;
-            case 0x2D25 : mapChar = 0x10C5; break;
-            case 0x2D27 : mapChar = 0x10C7; break;
-            case 0x2D2D : mapChar = 0x10CD; break;
+            case 0x017F: mapChar = 0x0053; break;
+            case 0x023F: mapChar = 0x2C7E; break;
+            case 0x0240: mapChar = 0x2C7F; break;
+            case 0x0250: mapChar = 0x2C6F; break;
+            case 0x0251: mapChar = 0x2C6D; break;
+            case 0x0252: mapChar = 0x2C70; break;
+            case 0x025C: mapChar = 0xA7AB; break;
+            case 0x0261: mapChar = 0xA7AC; break;
+            case 0x0265: mapChar = 0xA78D; break;
+            case 0x0266: mapChar = 0xA7AA; break;
+            case 0x026B: mapChar = 0x2C62; break;
+            case 0x026C: mapChar = 0xA7AD; break;
+            case 0x0271: mapChar = 0x2C6E; break;
+            case 0x027D: mapChar = 0x2C64; break;
+            case 0x0287: mapChar = 0xA7B1; break;
+            case 0x029D: mapChar = 0xA7B2; break;
+            case 0x029E: mapChar = 0xA7B0; break;
+            case 0x1D79: mapChar = 0xA77D; break;
+            case 0x1D7D: mapChar = 0x2C63; break;
+            case 0x1F80: mapChar = 0x1F88; break;
+            case 0x1F81: mapChar = 0x1F89; break;
+            case 0x1F82: mapChar = 0x1F8A; break;
+            case 0x1F83: mapChar = 0x1F8B; break;
+            case 0x1F84: mapChar = 0x1F8C; break;
+            case 0x1F85: mapChar = 0x1F8D; break;
+            case 0x1F86: mapChar = 0x1F8E; break;
+            case 0x1F87: mapChar = 0x1F8F; break;
+            case 0x1F90: mapChar = 0x1F98; break;
+            case 0x1F91: mapChar = 0x1F99; break;
+            case 0x1F92: mapChar = 0x1F9A; break;
+            case 0x1F93: mapChar = 0x1F9B; break;
+            case 0x1F94: mapChar = 0x1F9C; break;
+            case 0x1F95: mapChar = 0x1F9D; break;
+            case 0x1F96: mapChar = 0x1F9E; break;
+            case 0x1F97: mapChar = 0x1F9F; break;
+            case 0x1FA0: mapChar = 0x1FA8; break;
+            case 0x1FA1: mapChar = 0x1FA9; break;
+            case 0x1FA2: mapChar = 0x1FAA; break;
+            case 0x1FA3: mapChar = 0x1FAB; break;
+            case 0x1FA4: mapChar = 0x1FAC; break;
+            case 0x1FA5: mapChar = 0x1FAD; break;
+            case 0x1FA6: mapChar = 0x1FAE; break;
+            case 0x1FA7: mapChar = 0x1FAF; break;
+            case 0x1FB3: mapChar = 0x1FBC; break;
+            case 0x1FBE: mapChar = 0x0399; break;
+            case 0x1FC3: mapChar = 0x1FCC; break;
+            case 0x1FF3: mapChar = 0x1FFC; break;
+            case 0x2C65: mapChar = 0x023A; break;
+            case 0x2C66: mapChar = 0x023E; break;
+            case 0x2D00: mapChar = 0x10A0; break;
+            case 0x2D01: mapChar = 0x10A1; break;
+            case 0x2D02: mapChar = 0x10A2; break;
+            case 0x2D03: mapChar = 0x10A3; break;
+            case 0x2D04: mapChar = 0x10A4; break;
+            case 0x2D05: mapChar = 0x10A5; break;
+            case 0x2D06: mapChar = 0x10A6; break;
+            case 0x2D07: mapChar = 0x10A7; break;
+            case 0x2D08: mapChar = 0x10A8; break;
+            case 0x2D09: mapChar = 0x10A9; break;
+            case 0x2D0A: mapChar = 0x10AA; break;
+            case 0x2D0B: mapChar = 0x10AB; break;
+            case 0x2D0C: mapChar = 0x10AC; break;
+            case 0x2D0D: mapChar = 0x10AD; break;
+            case 0x2D0E: mapChar = 0x10AE; break;
+            case 0x2D0F: mapChar = 0x10AF; break;
+            case 0x2D10: mapChar = 0x10B0; break;
+            case 0x2D11: mapChar = 0x10B1; break;
+            case 0x2D12: mapChar = 0x10B2; break;
+            case 0x2D13: mapChar = 0x10B3; break;
+            case 0x2D14: mapChar = 0x10B4; break;
+            case 0x2D15: mapChar = 0x10B5; break;
+            case 0x2D16: mapChar = 0x10B6; break;
+            case 0x2D17: mapChar = 0x10B7; break;
+            case 0x2D18: mapChar = 0x10B8; break;
+            case 0x2D19: mapChar = 0x10B9; break;
+            case 0x2D1A: mapChar = 0x10BA; break;
+            case 0x2D1B: mapChar = 0x10BB; break;
+            case 0x2D1C: mapChar = 0x10BC; break;
+            case 0x2D1D: mapChar = 0x10BD; break;
+            case 0x2D1E: mapChar = 0x10BE; break;
+            case 0x2D1F: mapChar = 0x10BF; break;
+            case 0x2D20: mapChar = 0x10C0; break;
+            case 0x2D21: mapChar = 0x10C1; break;
+            case 0x2D22: mapChar = 0x10C2; break;
+            case 0x2D23: mapChar = 0x10C3; break;
+            case 0x2D24: mapChar = 0x10C4; break;
+            case 0x2D25: mapChar = 0x10C5; break;
+            case 0x2D27: mapChar = 0x10C7; break;
+            case 0x2D2D: mapChar = 0x10CD; break;
+            case 0xAB53: mapChar = 0xA7B3; break;
+            case 0xAB70: mapChar = 0x13A0; break;
+            case 0xAB71: mapChar = 0x13A1; break;
+            case 0xAB72: mapChar = 0x13A2; break;
+            case 0xAB73: mapChar = 0x13A3; break;
+            case 0xAB74: mapChar = 0x13A4; break;
+            case 0xAB75: mapChar = 0x13A5; break;
+            case 0xAB76: mapChar = 0x13A6; break;
+            case 0xAB77: mapChar = 0x13A7; break;
+            case 0xAB78: mapChar = 0x13A8; break;
+            case 0xAB79: mapChar = 0x13A9; break;
+            case 0xAB7A: mapChar = 0x13AA; break;
+            case 0xAB7B: mapChar = 0x13AB; break;
+            case 0xAB7C: mapChar = 0x13AC; break;
+            case 0xAB7D: mapChar = 0x13AD; break;
+            case 0xAB7E: mapChar = 0x13AE; break;
+            case 0xAB7F: mapChar = 0x13AF; break;
+            case 0xAB80: mapChar = 0x13B0; break;
+            case 0xAB81: mapChar = 0x13B1; break;
+            case 0xAB82: mapChar = 0x13B2; break;
+            case 0xAB83: mapChar = 0x13B3; break;
+            case 0xAB84: mapChar = 0x13B4; break;
+            case 0xAB85: mapChar = 0x13B5; break;
+            case 0xAB86: mapChar = 0x13B6; break;
+            case 0xAB87: mapChar = 0x13B7; break;
+            case 0xAB88: mapChar = 0x13B8; break;
+            case 0xAB89: mapChar = 0x13B9; break;
+            case 0xAB8A: mapChar = 0x13BA; break;
+            case 0xAB8B: mapChar = 0x13BB; break;
+            case 0xAB8C: mapChar = 0x13BC; break;
+            case 0xAB8D: mapChar = 0x13BD; break;
+            case 0xAB8E: mapChar = 0x13BE; break;
+            case 0xAB8F: mapChar = 0x13BF; break;
+            case 0xAB90: mapChar = 0x13C0; break;
+            case 0xAB91: mapChar = 0x13C1; break;
+            case 0xAB92: mapChar = 0x13C2; break;
+            case 0xAB93: mapChar = 0x13C3; break;
+            case 0xAB94: mapChar = 0x13C4; break;
+            case 0xAB95: mapChar = 0x13C5; break;
+            case 0xAB96: mapChar = 0x13C6; break;
+            case 0xAB97: mapChar = 0x13C7; break;
+            case 0xAB98: mapChar = 0x13C8; break;
+            case 0xAB99: mapChar = 0x13C9; break;
+            case 0xAB9A: mapChar = 0x13CA; break;
+            case 0xAB9B: mapChar = 0x13CB; break;
+            case 0xAB9C: mapChar = 0x13CC; break;
+            case 0xAB9D: mapChar = 0x13CD; break;
+            case 0xAB9E: mapChar = 0x13CE; break;
+            case 0xAB9F: mapChar = 0x13CF; break;
+            case 0xABA0: mapChar = 0x13D0; break;
+            case 0xABA1: mapChar = 0x13D1; break;
+            case 0xABA2: mapChar = 0x13D2; break;
+            case 0xABA3: mapChar = 0x13D3; break;
+            case 0xABA4: mapChar = 0x13D4; break;
+            case 0xABA5: mapChar = 0x13D5; break;
+            case 0xABA6: mapChar = 0x13D6; break;
+            case 0xABA7: mapChar = 0x13D7; break;
+            case 0xABA8: mapChar = 0x13D8; break;
+            case 0xABA9: mapChar = 0x13D9; break;
+            case 0xABAA: mapChar = 0x13DA; break;
+            case 0xABAB: mapChar = 0x13DB; break;
+            case 0xABAC: mapChar = 0x13DC; break;
+            case 0xABAD: mapChar = 0x13DD; break;
+            case 0xABAE: mapChar = 0x13DE; break;
+            case 0xABAF: mapChar = 0x13DF; break;
+            case 0xABB0: mapChar = 0x13E0; break;
+            case 0xABB1: mapChar = 0x13E1; break;
+            case 0xABB2: mapChar = 0x13E2; break;
+            case 0xABB3: mapChar = 0x13E3; break;
+            case 0xABB4: mapChar = 0x13E4; break;
+            case 0xABB5: mapChar = 0x13E5; break;
+            case 0xABB6: mapChar = 0x13E6; break;
+            case 0xABB7: mapChar = 0x13E7; break;
+            case 0xABB8: mapChar = 0x13E8; break;
+            case 0xABB9: mapChar = 0x13E9; break;
+            case 0xABBA: mapChar = 0x13EA; break;
+            case 0xABBB: mapChar = 0x13EB; break;
+            case 0xABBC: mapChar = 0x13EC; break;
+            case 0xABBD: mapChar = 0x13ED; break;
+            case 0xABBE: mapChar = 0x13EE; break;
+            case 0xABBF: mapChar = 0x13EF; break;
               // ch must have a 1:M case mapping, but we
               // can't handle it here. Return ch.
               // since mapChar is already set, no need
@@ -420,6 +576,8 @@
             switch (ch) {
                 case 0x0BF1: retval = 100; break;         // TAMIL NUMBER ONE HUNDRED
                 case 0x0BF2: retval = 1000; break;        // TAMIL NUMBER ONE THOUSAND
+                case 0x0D71: retval = 100; break;         // MALAYALAM NUMBER ONE HUNDRED
+                case 0x0D72: retval = 1000; break;        // MALAYALAM NUMBER ONE THOUSAND
                 case 0x1375: retval = 40; break;          // ETHIOPIC NUMBER FORTY
                 case 0x1376: retval = 50; break;          // ETHIOPIC NUMBER FIFTY
                 case 0x1377: retval = 60; break;          // ETHIOPIC NUMBER SIXTY
@@ -440,14 +598,15 @@
                 case 0x2180: retval = 1000; break;        // ROMAN NUMERAL ONE THOUSAND C D
                 case 0x2181: retval = 5000; break;        // ROMAN NUMERAL FIVE THOUSAND
                 case 0x2182: retval = 10000; break;       // ROMAN NUMERAL TEN THOUSAND
-
-                case 0x324B: retval = 40; break;
-                case 0x324C: retval = 50; break;
-                case 0x324D: retval = 60; break;
-                case 0x324E: retval = 70; break;
-                case 0x324F: retval = 80; break;
-                case 0x325C: retval = 32; break;
-
+                case 0x2186: retval = 50; break;          // ROMAN NUMERAL FIFTY EARLY FORM
+                case 0x2187: retval = 50000; break;       // ROMAN NUMERAL FIFTY THOUSAND
+                case 0x2188: retval = 100000; break;      // ROMAN NUMERAL ONE HUNDRED THOUSAND
+                case 0x324B: retval = 40; break;          // CIRCLED NUMBER FORTY ON BLACK SQUARE
+                case 0x324C: retval = 50; break;          // CIRCLED NUMBER FIFTY ON BLACK SQUARE
+                case 0x324D: retval = 60; break;          // CIRCLED NUMBER SIXTY ON BLACK SQUARE
+                case 0x324E: retval = 70; break;          // CIRCLED NUMBER SEVENTY ON BLACK SQUARE
+                case 0x324F: retval = 80; break;          // CIRCLED NUMBER EIGHTY ON BLACK SQUARE
+                case 0x325C: retval = 32; break;          // CIRCLED NUMBER THIRTY TWO
                 case 0x325D: retval = 33; break;          // CIRCLED NUMBER THIRTY THREE
                 case 0x325E: retval = 34; break;          // CIRCLED NUMBER THIRTY FOUR
                 case 0x325F: retval = 35; break;          // CIRCLED NUMBER THIRTY FIVE
@@ -466,13 +625,6 @@
                 case 0x32BD: retval = 48; break;          // CIRCLED NUMBER FORTY EIGHT
                 case 0x32BE: retval = 49; break;          // CIRCLED NUMBER FORTY NINE
                 case 0x32BF: retval = 50; break;          // CIRCLED NUMBER FIFTY
-
-                case 0x0D71: retval = 100; break;         // MALAYALAM NUMBER ONE HUNDRED
-                case 0x0D72: retval = 1000; break;        // MALAYALAM NUMBER ONE THOUSAND
-                case 0x2186: retval = 50; break;          // ROMAN NUMERAL FIFTY EARLY FORM
-                case 0x2187: retval = 50000; break;       // ROMAN NUMERAL FIFTY THOUSAND
-                case 0x2188: retval = 100000; break;      // ROMAN NUMERAL ONE HUNDRED THOUSAND
-
                 default:       retval = -2; break;
             }
             break;
@@ -553,70 +705,149 @@
             }
             else {
                 switch(ch) {
-                    // map overflow characters
-                    case 0x00B5 : mapChar = 0x039C; break;
-                    case 0x017F : mapChar = 0x0053; break;
-                    case 0x1FBE : mapChar = 0x0399; break;
-
-                    case 0x023F : mapChar = 0x2C7E; break;
-                    case 0x0240 : mapChar = 0x2C7F; break;
-                    case 0x0250 : mapChar = 0x2C6F; break;
-                    case 0x0251 : mapChar = 0x2C6D; break;
-                    case 0x0252 : mapChar = 0x2C70; break;
-                    case 0x025C : mapChar = 0xA7AB; break;
-                    case 0x0261 : mapChar = 0xA7AC; break;
-                    case 0x0265 : mapChar = 0xA78D; break;
-                    case 0x0266 : mapChar = 0xA7AA; break;
-                    case 0x026B : mapChar = 0x2C62; break;
-                    case 0x026C : mapChar = 0xA7AD; break;
-                    case 0x0271 : mapChar = 0x2C6E; break;
-                    case 0x027D : mapChar = 0x2C64; break;
-                    case 0x0287 : mapChar = 0xA7B1; break;
-                    case 0x029E : mapChar = 0xA7B0; break;
-                    case 0x1D79 : mapChar = 0xA77D; break;
-                    case 0x1D7D : mapChar = 0x2C63; break;
-                    case 0x2C65 : mapChar = 0x023A; break;
-                    case 0x2C66 : mapChar = 0x023E; break;
-                    case 0x2D00 : mapChar = 0x10A0; break;
-                    case 0x2D01 : mapChar = 0x10A1; break;
-                    case 0x2D02 : mapChar = 0x10A2; break;
-                    case 0x2D03 : mapChar = 0x10A3; break;
-                    case 0x2D04 : mapChar = 0x10A4; break;
-                    case 0x2D05 : mapChar = 0x10A5; break;
-                    case 0x2D06 : mapChar = 0x10A6; break;
-                    case 0x2D07 : mapChar = 0x10A7; break;
-                    case 0x2D08 : mapChar = 0x10A8; break;
-                    case 0x2D09 : mapChar = 0x10A9; break;
-                    case 0x2D0A : mapChar = 0x10AA; break;
-                    case 0x2D0B : mapChar = 0x10AB; break;
-                    case 0x2D0C : mapChar = 0x10AC; break;
-                    case 0x2D0D : mapChar = 0x10AD; break;
-                    case 0x2D0E : mapChar = 0x10AE; break;
-                    case 0x2D0F : mapChar = 0x10AF; break;
-                    case 0x2D10 : mapChar = 0x10B0; break;
-                    case 0x2D11 : mapChar = 0x10B1; break;
-                    case 0x2D12 : mapChar = 0x10B2; break;
-                    case 0x2D13 : mapChar = 0x10B3; break;
-                    case 0x2D14 : mapChar = 0x10B4; break;
-                    case 0x2D15 : mapChar = 0x10B5; break;
-                    case 0x2D16 : mapChar = 0x10B6; break;
-                    case 0x2D17 : mapChar = 0x10B7; break;
-                    case 0x2D18 : mapChar = 0x10B8; break;
-                    case 0x2D19 : mapChar = 0x10B9; break;
-                    case 0x2D1A : mapChar = 0x10BA; break;
-                    case 0x2D1B : mapChar = 0x10BB; break;
-                    case 0x2D1C : mapChar = 0x10BC; break;
-                    case 0x2D1D : mapChar = 0x10BD; break;
-                    case 0x2D1E : mapChar = 0x10BE; break;
-                    case 0x2D1F : mapChar = 0x10BF; break;
-                    case 0x2D20 : mapChar = 0x10C0; break;
-                    case 0x2D21 : mapChar = 0x10C1; break;
-                    case 0x2D22 : mapChar = 0x10C2; break;
-                    case 0x2D23 : mapChar = 0x10C3; break;
-                    case 0x2D24 : mapChar = 0x10C4; break;
-                    case 0x2D25 : mapChar = 0x10C5; break;
-                    case 0x2D27 : mapChar = 0x10C7; break;
-                    case 0x2D2D : mapChar = 0x10CD; break;
+                    case 0x017F: mapChar = 0x0053; break;
+                    case 0x023F: mapChar = 0x2C7E; break;
+                    case 0x0240: mapChar = 0x2C7F; break;
+                    case 0x0250: mapChar = 0x2C6F; break;
+                    case 0x0251: mapChar = 0x2C6D; break;
+                    case 0x0252: mapChar = 0x2C70; break;
+                    case 0x025C: mapChar = 0xA7AB; break;
+                    case 0x0261: mapChar = 0xA7AC; break;
+                    case 0x0265: mapChar = 0xA78D; break;
+                    case 0x0266: mapChar = 0xA7AA; break;
+                    case 0x026B: mapChar = 0x2C62; break;
+                    case 0x026C: mapChar = 0xA7AD; break;
+                    case 0x0271: mapChar = 0x2C6E; break;
+                    case 0x027D: mapChar = 0x2C64; break;
+                    case 0x0287: mapChar = 0xA7B1; break;
+                    case 0x029D: mapChar = 0xA7B2; break;
+                    case 0x029E: mapChar = 0xA7B0; break;
+                    case 0x1D79: mapChar = 0xA77D; break;
+                    case 0x1D7D: mapChar = 0x2C63; break;
+                    case 0x1FBE: mapChar = 0x0399; break;
+                    case 0x2C65: mapChar = 0x023A; break;
+                    case 0x2C66: mapChar = 0x023E; break;
+                    case 0x2D00: mapChar = 0x10A0; break;
+                    case 0x2D01: mapChar = 0x10A1; break;
+                    case 0x2D02: mapChar = 0x10A2; break;
+                    case 0x2D03: mapChar = 0x10A3; break;
+                    case 0x2D04: mapChar = 0x10A4; break;
+                    case 0x2D05: mapChar = 0x10A5; break;
+                    case 0x2D06: mapChar = 0x10A6; break;
+                    case 0x2D07: mapChar = 0x10A7; break;
+                    case 0x2D08: mapChar = 0x10A8; break;
+                    case 0x2D09: mapChar = 0x10A9; break;
+                    case 0x2D0A: mapChar = 0x10AA; break;
+                    case 0x2D0B: mapChar = 0x10AB; break;
+                    case 0x2D0C: mapChar = 0x10AC; break;
+                    case 0x2D0D: mapChar = 0x10AD; break;
+                    case 0x2D0E: mapChar = 0x10AE; break;
+                    case 0x2D0F: mapChar = 0x10AF; break;
+                    case 0x2D10: mapChar = 0x10B0; break;
+                    case 0x2D11: mapChar = 0x10B1; break;
+                    case 0x2D12: mapChar = 0x10B2; break;
+                    case 0x2D13: mapChar = 0x10B3; break;
+                    case 0x2D14: mapChar = 0x10B4; break;
+                    case 0x2D15: mapChar = 0x10B5; break;
+                    case 0x2D16: mapChar = 0x10B6; break;
+                    case 0x2D17: mapChar = 0x10B7; break;
+                    case 0x2D18: mapChar = 0x10B8; break;
+                    case 0x2D19: mapChar = 0x10B9; break;
+                    case 0x2D1A: mapChar = 0x10BA; break;
+                    case 0x2D1B: mapChar = 0x10BB; break;
+                    case 0x2D1C: mapChar = 0x10BC; break;
+                    case 0x2D1D: mapChar = 0x10BD; break;
+                    case 0x2D1E: mapChar = 0x10BE; break;
+                    case 0x2D1F: mapChar = 0x10BF; break;
+                    case 0x2D20: mapChar = 0x10C0; break;
+                    case 0x2D21: mapChar = 0x10C1; break;
+                    case 0x2D22: mapChar = 0x10C2; break;
+                    case 0x2D23: mapChar = 0x10C3; break;
+                    case 0x2D24: mapChar = 0x10C4; break;
+                    case 0x2D25: mapChar = 0x10C5; break;
+                    case 0x2D27: mapChar = 0x10C7; break;
+                    case 0x2D2D: mapChar = 0x10CD; break;
+                    case 0xAB53: mapChar = 0xA7B3; break;
+                    case 0xAB70: mapChar = 0x13A0; break;
+                    case 0xAB71: mapChar = 0x13A1; break;
+                    case 0xAB72: mapChar = 0x13A2; break;
+                    case 0xAB73: mapChar = 0x13A3; break;
+                    case 0xAB74: mapChar = 0x13A4; break;
+                    case 0xAB75: mapChar = 0x13A5; break;
+                    case 0xAB76: mapChar = 0x13A6; break;
+                    case 0xAB77: mapChar = 0x13A7; break;
+                    case 0xAB78: mapChar = 0x13A8; break;
+                    case 0xAB79: mapChar = 0x13A9; break;
+                    case 0xAB7A: mapChar = 0x13AA; break;
+                    case 0xAB7B: mapChar = 0x13AB; break;
+                    case 0xAB7C: mapChar = 0x13AC; break;
+                    case 0xAB7D: mapChar = 0x13AD; break;
+                    case 0xAB7E: mapChar = 0x13AE; break;
+                    case 0xAB7F: mapChar = 0x13AF; break;
+                    case 0xAB80: mapChar = 0x13B0; break;
+                    case 0xAB81: mapChar = 0x13B1; break;
+                    case 0xAB82: mapChar = 0x13B2; break;
+                    case 0xAB83: mapChar = 0x13B3; break;
+                    case 0xAB84: mapChar = 0x13B4; break;
+                    case 0xAB85: mapChar = 0x13B5; break;
+                    case 0xAB86: mapChar = 0x13B6; break;
+                    case 0xAB87: mapChar = 0x13B7; break;
+                    case 0xAB88: mapChar = 0x13B8; break;
+                    case 0xAB89: mapChar = 0x13B9; break;
+                    case 0xAB8A: mapChar = 0x13BA; break;
+                    case 0xAB8B: mapChar = 0x13BB; break;
+                    case 0xAB8C: mapChar = 0x13BC; break;
+                    case 0xAB8D: mapChar = 0x13BD; break;
+                    case 0xAB8E: mapChar = 0x13BE; break;
+                    case 0xAB8F: mapChar = 0x13BF; break;
+                    case 0xAB90: mapChar = 0x13C0; break;
+                    case 0xAB91: mapChar = 0x13C1; break;
+                    case 0xAB92: mapChar = 0x13C2; break;
+                    case 0xAB93: mapChar = 0x13C3; break;
+                    case 0xAB94: mapChar = 0x13C4; break;
+                    case 0xAB95: mapChar = 0x13C5; break;
+                    case 0xAB96: mapChar = 0x13C6; break;
+                    case 0xAB97: mapChar = 0x13C7; break;
+                    case 0xAB98: mapChar = 0x13C8; break;
+                    case 0xAB99: mapChar = 0x13C9; break;
+                    case 0xAB9A: mapChar = 0x13CA; break;
+                    case 0xAB9B: mapChar = 0x13CB; break;
+                    case 0xAB9C: mapChar = 0x13CC; break;
+                    case 0xAB9D: mapChar = 0x13CD; break;
+                    case 0xAB9E: mapChar = 0x13CE; break;
+                    case 0xAB9F: mapChar = 0x13CF; break;
+                    case 0xABA0: mapChar = 0x13D0; break;
+                    case 0xABA1: mapChar = 0x13D1; break;
+                    case 0xABA2: mapChar = 0x13D2; break;
+                    case 0xABA3: mapChar = 0x13D3; break;
+                    case 0xABA4: mapChar = 0x13D4; break;
+                    case 0xABA5: mapChar = 0x13D5; break;
+                    case 0xABA6: mapChar = 0x13D6; break;
+                    case 0xABA7: mapChar = 0x13D7; break;
+                    case 0xABA8: mapChar = 0x13D8; break;
+                    case 0xABA9: mapChar = 0x13D9; break;
+                    case 0xABAA: mapChar = 0x13DA; break;
+                    case 0xABAB: mapChar = 0x13DB; break;
+                    case 0xABAC: mapChar = 0x13DC; break;
+                    case 0xABAD: mapChar = 0x13DD; break;
+                    case 0xABAE: mapChar = 0x13DE; break;
+                    case 0xABAF: mapChar = 0x13DF; break;
+                    case 0xABB0: mapChar = 0x13E0; break;
+                    case 0xABB1: mapChar = 0x13E1; break;
+                    case 0xABB2: mapChar = 0x13E2; break;
+                    case 0xABB3: mapChar = 0x13E3; break;
+                    case 0xABB4: mapChar = 0x13E4; break;
+                    case 0xABB5: mapChar = 0x13E5; break;
+                    case 0xABB6: mapChar = 0x13E6; break;
+                    case 0xABB7: mapChar = 0x13E7; break;
+                    case 0xABB8: mapChar = 0x13E8; break;
+                    case 0xABB9: mapChar = 0x13E9; break;
+                    case 0xABBA: mapChar = 0x13EA; break;
+                    case 0xABBB: mapChar = 0x13EB; break;
+                    case 0xABBC: mapChar = 0x13EC; break;
+                    case 0xABBD: mapChar = 0x13ED; break;
+                    case 0xABBE: mapChar = 0x13EE; break;
+                    case 0xABBF: mapChar = 0x13EF; break;
                     default       : mapChar = Character.ERROR; break;
                 }
             }
--- a/jdk/make/data/characterdata/CharacterData01.java.template	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/data/characterdata/CharacterData01.java.template	Tue Oct 27 01:45:03 2015 -0400
@@ -243,36 +243,35 @@
             case 0x10131: retval = 70000; break;   // AEGEAN NUMBER SEVENTY THOUSAND
             case 0x10132: retval = 80000; break;   // AEGEAN NUMBER EIGHTY THOUSAND
             case 0x10133: retval = 90000; break;   // AEGEAN NUMBER NINETY THOUSAND
-            case 0x10323: retval = 50; break;      // OLD ITALIC NUMERAL FIFTY
-            case 0x10144: retval = 50; break;      // ACROPHONIC ATTIC FIFTY
-            case 0x10145: retval = 500; break;     // ACROPHONIC ATTIC FIVE HUNDRED
-            case 0x10146: retval = 5000; break;    // ACROPHONIC ATTIC FIVE THOUSAND
-            case 0x10147: retval = 50000; break;   // ACROPHONIC ATTIC FIFTY THOUSAND
-            case 0x1014A: retval = 50; break;      // ACROPHONIC ATTIC FIFTY TALENTS
-            case 0x1014B: retval = 100; break;     // ACROPHONIC ATTIC ONE HUNDRED TALENTS
-            case 0x1014C: retval = 500; break;     // ACROPHONIC ATTIC FIVE HUNDRED TALENTS
-            case 0x1014D: retval = 1000; break;    // ACROPHONIC ATTIC ONE THOUSAND TALENTS
-            case 0x1014E: retval = 5000; break;    // ACROPHONIC ATTIC FIVE THOUSAND TALENTS
-            case 0x10151: retval = 50; break;      // ACROPHONIC ATTIC FIFTY STATERS
-            case 0x10152: retval = 100; break;     // ACROPHONIC ATTIC ONE HUNDRED STATERS
-            case 0x10153: retval = 500; break;     // ACROPHONIC ATTIC FIVE HUNDRED STATERS
-            case 0x10154: retval = 1000; break;    // ACROPHONIC ATTIC ONE THOUSAND STATERS
-            case 0x10155: retval = 10000; break;   // ACROPHONIC ATTIC TEN THOUSAND STATERS
-            case 0x10156: retval = 50000; break;   // ACROPHONIC ATTIC FIFTY THOUSAND STATERS
-            case 0x10166: retval = 50; break;      // ACROPHONIC TROEZENIAN FIFTY
-            case 0x10167: retval = 50; break;      // ACROPHONIC TROEZENIAN FIFTY ALTERNATE FORM
-            case 0x10168: retval = 50; break;      // ACROPHONIC HERMIONIAN FIFTY
-            case 0x10169: retval = 50; break;      // ACROPHONIC THESPIAN FIFTY
-            case 0x1016A: retval = 100; break;     // ACROPHONIC THESPIAN ONE HUNDRED
-            case 0x1016B: retval = 300; break;     // ACROPHONIC THESPIAN THREE HUNDRED
-            case 0x1016C: retval = 500; break;     // ACROPHONIC EPIDAUREAN FIVE HUNDRED
-            case 0x1016D: retval = 500; break;     // ACROPHONIC TROEZENIAN FIVE HUNDRED
-            case 0x1016E: retval = 500; break;     // ACROPHONIC THESPIAN FIVE HUNDRED
-            case 0x1016F: retval = 500; break;     // ACROPHONIC CARYSTIAN FIVE HUNDRED
-            case 0x10170: retval = 500; break;     // ACROPHONIC NAXIAN FIVE HUNDRED
-            case 0x10171: retval = 1000; break;    // ACROPHONIC THESPIAN ONE THOUSAND
-            case 0x10172: retval = 5000; break;    // ACROPHONIC THESPIAN FIVE THOUSAND
-            case 0x10174: retval = 50; break;      // ACROPHONIC STRATIAN FIFTY MNAS
+            case 0x10144: retval = 50; break;      // GREEK ACROPHONIC ATTIC FIFTY
+            case 0x10145: retval = 500; break;     // GREEK ACROPHONIC ATTIC FIVE HUNDRED
+            case 0x10146: retval = 5000; break;    // GREEK ACROPHONIC ATTIC FIVE THOUSAND
+            case 0x10147: retval = 50000; break;   // GREEK ACROPHONIC ATTIC FIFTY THOUSAND
+            case 0x1014A: retval = 50; break;      // GREEK ACROPHONIC ATTIC FIFTY TALENTS
+            case 0x1014B: retval = 100; break;     // GREEK ACROPHONIC ATTIC ONE HUNDRED TALENTS
+            case 0x1014C: retval = 500; break;     // GREEK ACROPHONIC ATTIC FIVE HUNDRED TALENTS
+            case 0x1014D: retval = 1000; break;    // GREEK ACROPHONIC ATTIC ONE THOUSAND TALENTS
+            case 0x1014E: retval = 5000; break;    // GREEK ACROPHONIC ATTIC FIVE THOUSAND TALENTS
+            case 0x10151: retval = 50; break;      // GREEK ACROPHONIC ATTIC FIFTY STATERS
+            case 0x10152: retval = 100; break;     // GREEK ACROPHONIC ATTIC ONE HUNDRED STATERS
+            case 0x10153: retval = 500; break;     // GREEK ACROPHONIC ATTIC FIVE HUNDRED STATERS
+            case 0x10154: retval = 1000; break;    // GREEK ACROPHONIC ATTIC ONE THOUSAND STATERS
+            case 0x10155: retval = 10000; break;   // GREEK ACROPHONIC ATTIC TEN THOUSAND STATERS
+            case 0x10156: retval = 50000; break;   // GREEK ACROPHONIC ATTIC FIFTY THOUSAND STATERS
+            case 0x10166: retval = 50; break;      // GREEK ACROPHONIC TROEZENIAN FIFTY
+            case 0x10167: retval = 50; break;      // GREEK ACROPHONIC TROEZENIAN FIFTY ALTERNATE FORM
+            case 0x10168: retval = 50; break;      // GREEK ACROPHONIC HERMIONIAN FIFTY
+            case 0x10169: retval = 50; break;      // GREEK ACROPHONIC THESPIAN FIFTY
+            case 0x1016A: retval = 100; break;     // GREEK ACROPHONIC THESPIAN ONE HUNDRED
+            case 0x1016B: retval = 300; break;     // GREEK ACROPHONIC THESPIAN THREE HUNDRED
+            case 0x1016C: retval = 500; break;     // GREEK ACROPHONIC EPIDAUREAN FIVE HUNDRED
+            case 0x1016D: retval = 500; break;     // GREEK ACROPHONIC TROEZENIAN FIVE HUNDRED
+            case 0x1016E: retval = 500; break;     // GREEK ACROPHONIC THESPIAN FIVE HUNDRED
+            case 0x1016F: retval = 500; break;     // GREEK ACROPHONIC CARYSTIAN FIVE HUNDRED
+            case 0x10170: retval = 500; break;     // GREEK ACROPHONIC NAXIAN FIVE HUNDRED
+            case 0x10171: retval = 1000; break;    // GREEK ACROPHONIC THESPIAN ONE THOUSAND
+            case 0x10172: retval = 5000; break;    // GREEK ACROPHONIC THESPIAN FIVE THOUSAND
+            case 0x10174: retval = 50; break;      // GREEK ACROPHONIC STRATIAN FIFTY MNAS
             case 0x102ED: retval = 40; break;      // COPTIC EPACT NUMBER FORTY
             case 0x102EE: retval = 50; break;      // COPTIC EPACT NUMBER FIFTY
             case 0x102EF: retval = 60; break;      // COPTIC EPACT NUMBER SIXTY
@@ -288,6 +287,7 @@
             case 0x102F9: retval = 700; break;     // COPTIC EPACT NUMBER SEVEN HUNDRED
             case 0x102FA: retval = 800; break;     // COPTIC EPACT NUMBER EIGHT HUNDRED
             case 0x102FB: retval = 900; break;     // COPTIC EPACT NUMBER NINE HUNDRED
+            case 0x10323: retval = 50; break;      // OLD ITALIC NUMERAL FIFTY
             case 0x10341: retval = 90; break;      // GOTHIC LETTER NINETY
             case 0x1034A: retval = 900; break;     // GOTHIC LETTER NINE HUNDRED
             case 0x103D5: retval = 100; break;     // OLD PERSIAN NUMBER HUNDRED
@@ -295,7 +295,48 @@
             case 0x1085E: retval = 1000; break;    // IMPERIAL ARAMAIC NUMBER ONE THOUSAND
             case 0x1085F: retval = 10000; break;   // IMPERIAL ARAMAIC NUMBER TEN THOUSAND
             case 0x108AF: retval = 100; break;     // NABATAEAN NUMBER ONE HUNDRED
+            case 0x108FF: retval = 100; break;     // HATRAN NUMBER ONE HUNDRED
             case 0x10919: retval = 100; break;     // PHOENICIAN NUMBER ONE HUNDRED
+            case 0x109CC: retval = 40; break;      // MEROITIC CURSIVE NUMBER FORTY
+            case 0x109CD: retval = 50; break;      // MEROITIC CURSIVE NUMBER FIFTY
+            case 0x109CE: retval = 60; break;      // MEROITIC CURSIVE NUMBER SIXTY
+            case 0x109CF: retval = 70; break;      // MEROITIC CURSIVE NUMBER SEVENTY
+            case 0x109D2: retval = 100; break;     // MEROITIC CURSIVE NUMBER ONE HUNDRED
+            case 0x109D3: retval = 200; break;     // MEROITIC CURSIVE NUMBER TWO HUNDRED
+            case 0x109D4: retval = 300; break;     // MEROITIC CURSIVE NUMBER THREE HUNDRED
+            case 0x109D5: retval = 400; break;     // MEROITIC CURSIVE NUMBER FOUR HUNDRED
+            case 0x109D6: retval = 500; break;     // MEROITIC CURSIVE NUMBER FIVE HUNDRED
+            case 0x109D7: retval = 600; break;     // MEROITIC CURSIVE NUMBER SIX HUNDRED
+            case 0x109D8: retval = 700; break;     // MEROITIC CURSIVE NUMBER SEVEN HUNDRED
+            case 0x109D9: retval = 800; break;     // MEROITIC CURSIVE NUMBER EIGHT HUNDRED
+            case 0x109DA: retval = 900; break;     // MEROITIC CURSIVE NUMBER NINE HUNDRED
+            case 0x109DB: retval = 1000; break;    // MEROITIC CURSIVE NUMBER ONE THOUSAND
+            case 0x109DC: retval = 2000; break;    // MEROITIC CURSIVE NUMBER TWO THOUSAND
+            case 0x109DD: retval = 3000; break;    // MEROITIC CURSIVE NUMBER THREE THOUSAND
+            case 0x109DE: retval = 4000; break;    // MEROITIC CURSIVE NUMBER FOUR THOUSAND
+            case 0x109DF: retval = 5000; break;    // MEROITIC CURSIVE NUMBER FIVE THOUSAND
+            case 0x109E0: retval = 6000; break;    // MEROITIC CURSIVE NUMBER SIX THOUSAND
+            case 0x109E1: retval = 7000; break;    // MEROITIC CURSIVE NUMBER SEVEN THOUSAND
+            case 0x109E2: retval = 8000; break;    // MEROITIC CURSIVE NUMBER EIGHT THOUSAND
+            case 0x109E3: retval = 9000; break;    // MEROITIC CURSIVE NUMBER NINE THOUSAND
+            case 0x109E4: retval = 10000; break;   // MEROITIC CURSIVE NUMBER TEN THOUSAND
+            case 0x109E5: retval = 20000; break;   // MEROITIC CURSIVE NUMBER TWENTY THOUSAND
+            case 0x109E6: retval = 30000; break;   // MEROITIC CURSIVE NUMBER THIRTY THOUSAND
+            case 0x109E7: retval = 40000; break;   // MEROITIC CURSIVE NUMBER FORTY THOUSAND
+            case 0x109E8: retval = 50000; break;   // MEROITIC CURSIVE NUMBER FIFTY THOUSAND
+            case 0x109E9: retval = 60000; break;   // MEROITIC CURSIVE NUMBER SIXTY THOUSAND
+            case 0x109EA: retval = 70000; break;   // MEROITIC CURSIVE NUMBER SEVENTY THOUSAND
+            case 0x109EB: retval = 80000; break;   // MEROITIC CURSIVE NUMBER EIGHTY THOUSAND
+            case 0x109EC: retval = 90000; break;   // MEROITIC CURSIVE NUMBER NINETY THOUSAND
+            case 0x109ED: retval = 100000; break;  // MEROITIC CURSIVE NUMBER ONE HUNDRED THOUSAND
+            case 0x109EE: retval = 200000; break;  // MEROITIC CURSIVE NUMBER TWO HUNDRED THOUSAND
+            case 0x109EF: retval = 300000; break;  // MEROITIC CURSIVE NUMBER THREE HUNDRED THOUSAND
+            case 0x109F0: retval = 400000; break;  // MEROITIC CURSIVE NUMBER FOUR HUNDRED THOUSAND
+            case 0x109F1: retval = 500000; break;  // MEROITIC CURSIVE NUMBER FIVE HUNDRED THOUSAND
+            case 0x109F2: retval = 600000; break;  // MEROITIC CURSIVE NUMBER SIX HUNDRED THOUSAND
+            case 0x109F3: retval = 700000; break;  // MEROITIC CURSIVE NUMBER SEVEN HUNDRED THOUSAND
+            case 0x109F4: retval = 800000; break;  // MEROITIC CURSIVE NUMBER EIGHT HUNDRED THOUSAND
+            case 0x109F5: retval = 900000; break;  // MEROITIC CURSIVE NUMBER NINE HUNDRED THOUSAND
             case 0x10A46: retval = 100; break;     // KHAROSHTHI NUMBER ONE HUNDRED
             case 0x10A47: retval = 1000; break;    // KHAROSHTHI NUMBER ONE THOUSAND
             case 0x10A7E: retval = 50; break;      // OLD SOUTH ARABIAN NUMBER FIFTY
@@ -305,6 +346,9 @@
             case 0x10B7E: retval = 100; break;     // INSCRIPTIONAL PAHLAVI NUMBER ONE HUNDRED
             case 0x10B7F: retval = 1000; break;    // INSCRIPTIONAL PAHLAVI NUMBER ONE THOUSAND
             case 0x10BAF: retval = 100; break;     // PSALTER PAHLAVI NUMBER ONE HUNDRED
+            case 0x10CFD: retval = 50; break;      // OLD HUNGARIAN NUMBER FIFTY
+            case 0x10CFE: retval = 100; break;     // OLD HUNGARIAN NUMBER ONE HUNDRED
+            case 0x10CFF: retval = 1000; break;    // OLD HUNGARIAN NUMBER ONE THOUSAND
             case 0x10E6C: retval = 40; break;      // RUMI NUMBER FORTY
             case 0x10E6D: retval = 50; break;      // RUMI NUMBER FIFTY
             case 0x10E6E: retval = 60; break;      // RUMI NUMBER SIXTY
--- a/jdk/make/data/unicodedata/PropList.txt	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/data/unicodedata/PropList.txt	Tue Oct 27 01:45:03 2015 -0400
@@ -1,8 +1,8 @@
-# PropList-7.0.0.txt
-# Date: 2014-02-19, 15:51:26 GMT [MD]
+# PropList-8.0.0.txt
+# Date: 2015-05-16, 17:50:38 GMT [MD]
 #
 # Unicode Character Database
-# Copyright (c) 1991-2014 Unicode, Inc.
+# Copyright (c) 1991-2015 Unicode, Inc.
 # For terms of use, see http://www.unicode.org/terms_of_use.html
 # For documentation, see http://www.unicode.org/reports/tr44/
 
@@ -189,18 +189,22 @@
 11141..11143  ; Terminal_Punctuation # Po   [3] CHAKMA DANDA..CHAKMA QUESTION MARK
 111C5..111C6  ; Terminal_Punctuation # Po   [2] SHARADA DANDA..SHARADA DOUBLE DANDA
 111CD         ; Terminal_Punctuation # Po       SHARADA SUTRA MARK
+111DE..111DF  ; Terminal_Punctuation # Po   [2] SHARADA SECTION MARK-1..SHARADA SECTION MARK-2
 11238..1123C  ; Terminal_Punctuation # Po   [5] KHOJKI DANDA..KHOJKI DOUBLE SECTION MARK
+112A9         ; Terminal_Punctuation # Po       MULTANI SECTION MARK
 115C2..115C5  ; Terminal_Punctuation # Po   [4] SIDDHAM DANDA..SIDDHAM SEPARATOR BAR
-115C9         ; Terminal_Punctuation # Po       SIDDHAM END OF TEXT MARK
+115C9..115D7  ; Terminal_Punctuation # Po  [15] SIDDHAM END OF TEXT MARK..SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES
 11641..11642  ; Terminal_Punctuation # Po   [2] MODI DANDA..MODI DOUBLE DANDA
+1173C..1173E  ; Terminal_Punctuation # Po   [3] AHOM SIGN SMALL SECTION..AHOM SIGN RULAI
 12470..12474  ; Terminal_Punctuation # Po   [5] CUNEIFORM PUNCTUATION SIGN OLD ASSYRIAN WORD DIVIDER..CUNEIFORM PUNCTUATION SIGN DIAGONAL QUADCOLON
 16A6E..16A6F  ; Terminal_Punctuation # Po   [2] MRO DANDA..MRO DOUBLE DANDA
 16AF5         ; Terminal_Punctuation # Po       BASSA VAH FULL STOP
 16B37..16B39  ; Terminal_Punctuation # Po   [3] PAHAWH HMONG SIGN VOS THOM..PAHAWH HMONG SIGN CIM CHEEM
 16B44         ; Terminal_Punctuation # Po       PAHAWH HMONG SIGN XAUS
 1BC9F         ; Terminal_Punctuation # Po       DUPLOYAN PUNCTUATION CHINOOK FULL STOP
+1DA87..1DA8A  ; Terminal_Punctuation # Po   [4] SIGNWRITING COMMA..SIGNWRITING COLON
 
-# Total code points: 214
+# Total code points: 238
 
 # ================================================
 
@@ -425,7 +429,7 @@
 081B..0823    ; Other_Alphabetic # Mn   [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A
 0825..0827    ; Other_Alphabetic # Mn   [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U
 0829..082C    ; Other_Alphabetic # Mn   [4] SAMARITAN VOWEL SIGN LONG I..SAMARITAN VOWEL SIGN SUKUN
-08E4..08E9    ; Other_Alphabetic # Mn   [6] ARABIC CURLY FATHA..ARABIC CURLY KASRATAN
+08E3..08E9    ; Other_Alphabetic # Mn   [7] ARABIC TURNED DAMMA BELOW..ARABIC CURLY KASRATAN
 08F0..0902    ; Other_Alphabetic # Mn  [19] ARABIC OPEN FATHATAN..DEVANAGARI SIGN ANUSVARA
 0903          ; Other_Alphabetic # Mc       DEVANAGARI SIGN VISARGA
 093A          ; Other_Alphabetic # Mn       DEVANAGARI VOWEL SIGN OE
@@ -560,8 +564,6 @@
 1930..1931    ; Other_Alphabetic # Mc   [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA
 1932          ; Other_Alphabetic # Mn       LIMBU SMALL LETTER ANUSVARA
 1933..1938    ; Other_Alphabetic # Mc   [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA
-19B0..19C0    ; Other_Alphabetic # Mc  [17] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE VOWEL SIGN IY
-19C8..19C9    ; Other_Alphabetic # Mc   [2] NEW TAI LUE TONE MARK-1..NEW TAI LUE TONE MARK-2
 1A17..1A18    ; Other_Alphabetic # Mn   [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U
 1A19..1A1A    ; Other_Alphabetic # Mc   [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O
 1A1B          ; Other_Alphabetic # Mn       BUGINESE VOWEL SIGN AE
@@ -605,7 +607,7 @@
 24B6..24E9    ; Other_Alphabetic # So  [52] CIRCLED LATIN CAPITAL LETTER A..CIRCLED LATIN SMALL LETTER Z
 2DE0..2DFF    ; Other_Alphabetic # Mn  [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS
 A674..A67B    ; Other_Alphabetic # Mn   [8] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC LETTER OMEGA
-A69F          ; Other_Alphabetic # Mn       COMBINING CYRILLIC LETTER IOTIFIED E
+A69E..A69F    ; Other_Alphabetic # Mn   [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E
 A823..A824    ; Other_Alphabetic # Mc   [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I
 A825..A826    ; Other_Alphabetic # Mn   [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E
 A827          ; Other_Alphabetic # Mc       SYLOTI NAGRI VOWEL SIGN OO
@@ -672,7 +674,7 @@
 112DF         ; Other_Alphabetic # Mn       KHUDAWADI SIGN ANUSVARA
 112E0..112E2  ; Other_Alphabetic # Mc   [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II
 112E3..112E8  ; Other_Alphabetic # Mn   [6] KHUDAWADI VOWEL SIGN U..KHUDAWADI VOWEL SIGN AU
-11301         ; Other_Alphabetic # Mn       GRANTHA SIGN CANDRABINDU
+11300..11301  ; Other_Alphabetic # Mn   [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU
 11302..11303  ; Other_Alphabetic # Mc   [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA
 1133E..1133F  ; Other_Alphabetic # Mc   [2] GRANTHA VOWEL SIGN AA..GRANTHA VOWEL SIGN I
 11340         ; Other_Alphabetic # Mn       GRANTHA VOWEL SIGN II
@@ -693,6 +695,7 @@
 115B8..115BB  ; Other_Alphabetic # Mc   [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU
 115BC..115BD  ; Other_Alphabetic # Mn   [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA
 115BE         ; Other_Alphabetic # Mc       SIDDHAM SIGN VISARGA
+115DC..115DD  ; Other_Alphabetic # Mn   [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU
 11630..11632  ; Other_Alphabetic # Mc   [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II
 11633..1163A  ; Other_Alphabetic # Mn   [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI
 1163B..1163C  ; Other_Alphabetic # Mc   [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU
@@ -704,6 +707,11 @@
 116AD         ; Other_Alphabetic # Mn       TAKRI VOWEL SIGN AA
 116AE..116AF  ; Other_Alphabetic # Mc   [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II
 116B0..116B5  ; Other_Alphabetic # Mn   [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU
+1171D..1171F  ; Other_Alphabetic # Mn   [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA
+11720..11721  ; Other_Alphabetic # Mc   [2] AHOM VOWEL SIGN A..AHOM VOWEL SIGN AA
+11722..11725  ; Other_Alphabetic # Mn   [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU
+11726         ; Other_Alphabetic # Mc       AHOM VOWEL SIGN E
+11727..1172A  ; Other_Alphabetic # Mn   [4] AHOM VOWEL SIGN AW..AHOM VOWEL SIGN AM
 16B30..16B36  ; Other_Alphabetic # Mn   [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM
 16F51..16F7E  ; Other_Alphabetic # Mc  [46] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN NG
 1BC9E         ; Other_Alphabetic # Mn       DUPLOYAN DOUBLE MARK
@@ -720,15 +728,16 @@
 3021..3029    ; Ideographic # Nl   [9] HANGZHOU NUMERAL ONE..HANGZHOU NUMERAL NINE
 3038..303A    ; Ideographic # Nl   [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY
 3400..4DB5    ; Ideographic # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5
-4E00..9FCC    ; Ideographic # Lo [20941] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FCC
+4E00..9FD5    ; Ideographic # Lo [20950] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FD5
 F900..FA6D    ; Ideographic # Lo [366] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA6D
 FA70..FAD9    ; Ideographic # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
 20000..2A6D6  ; Ideographic # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6
 2A700..2B734  ; Ideographic # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734
 2B740..2B81D  ; Ideographic # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D
+2B820..2CEA1  ; Ideographic # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1
 2F800..2FA1D  ; Ideographic # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
 
-# Total code points: 75633
+# Total code points: 81404
 
 # ================================================
 
@@ -773,7 +782,7 @@
 07EB..07F3    ; Diacritic # Mn   [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE
 07F4..07F5    ; Diacritic # Lm   [2] NKO HIGH TONE APOSTROPHE..NKO LOW TONE APOSTROPHE
 0818..0819    ; Diacritic # Mn   [2] SAMARITAN MARK OCCLUSION..SAMARITAN MARK DAGESH
-08E4..08FE    ; Diacritic # Mn  [27] ARABIC CURLY FATHA..ARABIC DAMMA WITH DOT
+08E3..08FE    ; Diacritic # Mn  [28] ARABIC TURNED DAMMA BELOW..ARABIC DAMMA WITH DOT
 093C          ; Diacritic # Mn       DEVANAGARI SIGN NUKTA
 094D          ; Diacritic # Mn       DEVANAGARI SIGN VIRAMA
 0951..0954    ; Diacritic # Mn   [4] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI ACUTE ACCENT
@@ -877,7 +886,7 @@
 ABEC          ; Diacritic # Mc       MEETEI MAYEK LUM IYEK
 ABED          ; Diacritic # Mn       MEETEI MAYEK APUN IYEK
 FB1E          ; Diacritic # Mn       HEBREW POINT JUDEO-SPANISH VARIKA
-FE20..FE2D    ; Diacritic # Mn  [14] COMBINING LIGATURE LEFT HALF..COMBINING CONJOINING MACRON BELOW
+FE20..FE2F    ; Diacritic # Mn  [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF
 FF3E          ; Diacritic # Sk       FULLWIDTH CIRCUMFLEX ACCENT
 FF40          ; Diacritic # Sk       FULLWIDTH GRAVE ACCENT
 FF70          ; Diacritic # Lm       HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
@@ -889,6 +898,7 @@
 11133..11134  ; Diacritic # Mn   [2] CHAKMA VIRAMA..CHAKMA MAAYYAA
 11173         ; Diacritic # Mn       MAHAJANI SIGN NUKTA
 111C0         ; Diacritic # Mc       SHARADA SIGN VIRAMA
+111CA..111CC  ; Diacritic # Mn   [3] SHARADA SIGN NUKTA..SHARADA EXTRA SHORT VOWEL MARK
 11235         ; Diacritic # Mc       KHOJKI SIGN VIRAMA
 11236         ; Diacritic # Mn       KHOJKI SIGN NUKTA
 112E9..112EA  ; Diacritic # Mn   [2] KHUDAWADI SIGN NUKTA..KHUDAWADI SIGN VIRAMA
@@ -901,6 +911,7 @@
 1163F         ; Diacritic # Mn       MODI SIGN VIRAMA
 116B6         ; Diacritic # Mc       TAKRI SIGN VIRAMA
 116B7         ; Diacritic # Mn       TAKRI SIGN NUKTA
+1172B         ; Diacritic # Mn       AHOM SIGN KILLER
 16AF0..16AF4  ; Diacritic # Mn   [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE
 16F8F..16F92  ; Diacritic # Mn   [4] MIAO TONE RIGHT..MIAO TONE BELOW
 16F93..16F9F  ; Diacritic # Lm  [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8
@@ -911,7 +922,7 @@
 1D1AA..1D1AD  ; Diacritic # Mn   [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO
 1E8D0..1E8D6  ; Diacritic # Mn   [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS
 
-# Total code points: 766
+# Total code points: 773
 
 # ================================================
 
@@ -1053,7 +1064,7 @@
 # ================================================
 
 3400..4DB5    ; Unified_Ideograph # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5
-4E00..9FCC    ; Unified_Ideograph # Lo [20941] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FCC
+4E00..9FD5    ; Unified_Ideograph # Lo [20950] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FD5
 FA0E..FA0F    ; Unified_Ideograph # Lo   [2] CJK COMPATIBILITY IDEOGRAPH-FA0E..CJK COMPATIBILITY IDEOGRAPH-FA0F
 FA11          ; Unified_Ideograph # Lo       CJK COMPATIBILITY IDEOGRAPH-FA11
 FA13..FA14    ; Unified_Ideograph # Lo   [2] CJK COMPATIBILITY IDEOGRAPH-FA13..CJK COMPATIBILITY IDEOGRAPH-FA14
@@ -1064,8 +1075,9 @@
 20000..2A6D6  ; Unified_Ideograph # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6
 2A700..2B734  ; Unified_Ideograph # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734
 2B740..2B81D  ; Unified_Ideograph # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D
+2B820..2CEA1  ; Unified_Ideograph # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1
 
-# Total code points: 74617
+# Total code points: 80388
 
 # ================================================
 
@@ -1094,9 +1106,9 @@
 2329          ; Deprecated # Ps       LEFT-POINTING ANGLE BRACKET
 232A          ; Deprecated # Pe       RIGHT-POINTING ANGLE BRACKET
 E0001         ; Deprecated # Cf       LANGUAGE TAG
-E0020..E007F  ; Deprecated # Cf  [96] TAG SPACE..CANCEL TAG
+E007F         ; Deprecated # Cf       CANCEL TAG
 
-# Total code points: 111
+# Total code points: 16
 
 # ================================================
 
@@ -1138,11 +1150,13 @@
 
 0E40..0E44    ; Logical_Order_Exception # Lo   [5] THAI CHARACTER SARA E..THAI CHARACTER SARA AI MAIMALAI
 0EC0..0EC4    ; Logical_Order_Exception # Lo   [5] LAO VOWEL SIGN E..LAO VOWEL SIGN AI
+19B5..19B7    ; Logical_Order_Exception # Lo   [3] NEW TAI LUE VOWEL SIGN E..NEW TAI LUE VOWEL SIGN O
+19BA          ; Logical_Order_Exception # Lo       NEW TAI LUE VOWEL SIGN AY
 AAB5..AAB6    ; Logical_Order_Exception # Lo   [2] TAI VIET VOWEL E..TAI VIET VOWEL O
 AAB9          ; Logical_Order_Exception # Lo       TAI VIET VOWEL UEA
 AABB..AABC    ; Logical_Order_Exception # Lo   [2] TAI VIET VOWEL AUE..TAI VIET VOWEL AY
 
-# Total code points: 15
+# Total code points: 19
 
 # ================================================
 
@@ -1213,18 +1227,22 @@
 11141..11143  ; STerm # Po   [3] CHAKMA DANDA..CHAKMA QUESTION MARK
 111C5..111C6  ; STerm # Po   [2] SHARADA DANDA..SHARADA DOUBLE DANDA
 111CD         ; STerm # Po       SHARADA SUTRA MARK
+111DE..111DF  ; STerm # Po   [2] SHARADA SECTION MARK-1..SHARADA SECTION MARK-2
 11238..11239  ; STerm # Po   [2] KHOJKI DANDA..KHOJKI DOUBLE DANDA
 1123B..1123C  ; STerm # Po   [2] KHOJKI SECTION MARK..KHOJKI DOUBLE SECTION MARK
+112A9         ; STerm # Po       MULTANI SECTION MARK
 115C2..115C3  ; STerm # Po   [2] SIDDHAM DANDA..SIDDHAM DOUBLE DANDA
-115C9         ; STerm # Po       SIDDHAM END OF TEXT MARK
+115C9..115D7  ; STerm # Po  [15] SIDDHAM END OF TEXT MARK..SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES
 11641..11642  ; STerm # Po   [2] MODI DANDA..MODI DOUBLE DANDA
+1173C..1173E  ; STerm # Po   [3] AHOM SIGN SMALL SECTION..AHOM SIGN RULAI
 16A6E..16A6F  ; STerm # Po   [2] MRO DANDA..MRO DOUBLE DANDA
 16AF5         ; STerm # Po       BASSA VAH FULL STOP
 16B37..16B38  ; STerm # Po   [2] PAHAWH HMONG SIGN VOS THOM..PAHAWH HMONG SIGN VOS TSHAB CEEB
 16B44         ; STerm # Po       PAHAWH HMONG SIGN XAUS
 1BC9F         ; STerm # Po       DUPLOYAN PUNCTUATION CHINOOK FULL STOP
+1DA88         ; STerm # Po       SIGNWRITING FULL STOP
 
-# Total code points: 99
+# Total code points: 120
 
 # ================================================
 
@@ -1432,7 +1450,9 @@
 2BBD..2BC8    ; Pattern_Syntax # So  [12] BALLOT BOX WITH LIGHT X..BLACK MEDIUM RIGHT-POINTING TRIANGLE CENTRED
 2BC9          ; Pattern_Syntax # Cn       <reserved-2BC9>
 2BCA..2BD1    ; Pattern_Syntax # So   [8] TOP HALF BLACK CIRCLE..UNCERTAINTY SIGN
-2BD2..2BFF    ; Pattern_Syntax # Cn  [46] <reserved-2BD2>..<reserved-2BFF>
+2BD2..2BEB    ; Pattern_Syntax # Cn  [26] <reserved-2BD2>..<reserved-2BEB>
+2BEC..2BEF    ; Pattern_Syntax # So   [4] LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS..DOWNWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS
+2BF0..2BFF    ; Pattern_Syntax # Cn  [16] <reserved-2BF0>..<reserved-2BFF>
 2E00..2E01    ; Pattern_Syntax # Po   [2] RIGHT ANGLE SUBSTITUTION MARKER..RIGHT ANGLE DOTTED SUBSTITUTION MARKER
 2E02          ; Pattern_Syntax # Pi       LEFT SUBSTITUTION BRACKET
 2E03          ; Pattern_Syntax # Pf       RIGHT SUBSTITUTION BRACKET
--- a/jdk/make/data/unicodedata/Scripts.txt	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/data/unicodedata/Scripts.txt	Tue Oct 27 01:45:03 2015 -0400
@@ -1,10 +1,16 @@
-# Scripts-7.0.0.txt
-# Date: 2014-05-15, 00:11:35 GMT [MD]
+# Scripts-8.0.0.txt
+# Date: 2015-03-11, 22:29:42 GMT [MD]
 #
 # Unicode Character Database
-# Copyright (c) 1991-2014 Unicode, Inc.
+# Copyright (c) 1991-2015 Unicode, Inc.
 # For terms of use, see http://www.unicode.org/terms_of_use.html
 # For documentation, see http://www.unicode.org/reports/tr44/
+# For more information, see:
+#   UAX #24, Unicode Script Property: http://www.unicode.org/reports/tr24/
+#     Especially the sections:
+#       http://www.unicode.org/reports/tr24/#Assignment_Script_Values
+#       http://www.unicode.org/reports/tr24/#Assignment_ScriptX_Values
+#
 
 # ================================================
 
@@ -89,7 +95,6 @@
 061C          ; Common # Cf       ARABIC LETTER MARK
 061F          ; Common # Po       ARABIC QUESTION MARK
 0640          ; Common # Lm       ARABIC TATWEEL
-0660..0669    ; Common # Nd  [10] ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE
 06DD          ; Common # Cf       ARABIC END OF AYAH
 0964..0965    ; Common # Po   [2] DEVANAGARI DANDA..DEVANAGARI DOUBLE DANDA
 0E3F          ; Common # Sc       THAI CURRENCY SYMBOL BAHT
@@ -148,7 +153,7 @@
 208A..208C    ; Common # Sm   [3] SUBSCRIPT PLUS SIGN..SUBSCRIPT EQUALS SIGN
 208D          ; Common # Ps       SUBSCRIPT LEFT PARENTHESIS
 208E          ; Common # Pe       SUBSCRIPT RIGHT PARENTHESIS
-20A0..20BD    ; Common # Sc  [30] EURO-CURRENCY SIGN..RUBLE SIGN
+20A0..20BE    ; Common # Sc  [31] EURO-CURRENCY SIGN..LARI SIGN
 2100..2101    ; Common # So   [2] ACCOUNT OF..ADDRESSED TO THE SUBJECT
 2102          ; Common # L&       DOUBLE-STRUCK CAPITAL C
 2103..2106    ; Common # So   [4] DEGREE CELSIUS..CADA UNA
@@ -182,6 +187,7 @@
 214F          ; Common # So       SYMBOL FOR SAMARITAN SOURCE
 2150..215F    ; Common # No  [16] VULGAR FRACTION ONE SEVENTH..FRACTION NUMERATOR ONE
 2189          ; Common # No       VULGAR FRACTION ZERO THIRDS
+218A..218B    ; Common # So   [2] TURNED DIGIT TWO..TURNED DIGIT THREE
 2190..2194    ; Common # Sm   [5] LEFTWARDS ARROW..LEFT RIGHT ARROW
 2195..2199    ; Common # So   [5] UP DOWN ARROW..SOUTH WEST ARROW
 219A..219B    ; Common # Sm   [2] LEFTWARDS ARROW WITH STROKE..RIGHTWARDS ARROW WITH STROKE
@@ -304,6 +310,7 @@
 2B98..2BB9    ; Common # So  [34] THREE-D TOP-LIGHTED LEFTWARDS EQUILATERAL ARROWHEAD..UP ARROWHEAD IN A RECTANGLE BOX
 2BBD..2BC8    ; Common # So  [12] BALLOT BOX WITH LIGHT X..BLACK MEDIUM RIGHT-POINTING TRIANGLE CENTRED
 2BCA..2BD1    ; Common # So   [8] TOP HALF BLACK CIRCLE..UNCERTAINTY SIGN
+2BEC..2BEF    ; Common # So   [4] LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS..DOWNWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS
 2E00..2E01    ; Common # Po   [2] RIGHT ANGLE SUBSTITUTION MARKER..RIGHT ANGLE DOTTED SUBSTITUTION MARKER
 2E02          ; Common # Pi       LEFT SUBSTITUTION BRACKET
 2E03          ; Common # Pf       RIGHT SUBSTITUTION BRACKET
@@ -512,7 +519,7 @@
 1D173..1D17A  ; Common # Cf   [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE
 1D183..1D184  ; Common # So   [2] MUSICAL SYMBOL ARPEGGIATO UP..MUSICAL SYMBOL ARPEGGIATO DOWN
 1D18C..1D1A9  ; Common # So  [30] MUSICAL SYMBOL RINFORZANDO..MUSICAL SYMBOL DEGREE SLASH
-1D1AE..1D1DD  ; Common # So  [48] MUSICAL SYMBOL PEDAL MARK..MUSICAL SYMBOL PES SUBPUNCTIS
+1D1AE..1D1E8  ; Common # So  [59] MUSICAL SYMBOL PEDAL MARK..MUSICAL SYMBOL KIEVAN FLAT SIGN
 1D300..1D356  ; Common # So  [87] MONOGRAM FOR EARTH..TETRAGRAM FOR FOSTERING
 1D360..1D371  ; Common # No  [18] COUNTING ROD UNIT DIGIT ONE..COUNTING ROD TENS DIGIT NINE
 1D400..1D454  ; Common # L&  [85] MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL ITALIC SMALL G
@@ -571,16 +578,11 @@
 1F210..1F23A  ; Common # So  [43] SQUARED CJK UNIFIED IDEOGRAPH-624B..SQUARED CJK UNIFIED IDEOGRAPH-55B6
 1F240..1F248  ; Common # So   [9] TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-672C..TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6557
 1F250..1F251  ; Common # So   [2] CIRCLED IDEOGRAPH ADVANTAGE..CIRCLED IDEOGRAPH ACCEPT
-1F300..1F32C  ; Common # So  [45] CYCLONE..WIND BLOWING FACE
-1F330..1F37D  ; Common # So  [78] CHESTNUT..FORK AND KNIFE WITH PLATE
-1F380..1F3CE  ; Common # So  [79] RIBBON..RACING CAR
-1F3D4..1F3F7  ; Common # So  [36] SNOW CAPPED MOUNTAIN..LABEL
-1F400..1F4FE  ; Common # So [255] RAT..PORTABLE STEREO
-1F500..1F54A  ; Common # So  [75] TWISTED RIGHTWARDS ARROWS..DOVE OF PEACE
-1F550..1F579  ; Common # So  [42] CLOCK FACE ONE OCLOCK..JOYSTICK
+1F300..1F3FA  ; Common # So [251] CYCLONE..AMPHORA
+1F3FB..1F3FF  ; Common # Sk   [5] EMOJI MODIFIER FITZPATRICK TYPE-1-2..EMOJI MODIFIER FITZPATRICK TYPE-6
+1F400..1F579  ; Common # So [378] RAT..JOYSTICK
 1F57B..1F5A3  ; Common # So  [41] LEFT HAND TELEPHONE RECEIVER..BLACK DOWN POINTING BACKHAND INDEX
-1F5A5..1F642  ; Common # So [158] DESKTOP COMPUTER..SLIGHTLY SMILING FACE
-1F645..1F6CF  ; Common # So [139] FACE WITH NO GOOD GESTURE..BED
+1F5A5..1F6D0  ; Common # So [300] DESKTOP COMPUTER..PLACE OF WORSHIP
 1F6E0..1F6EC  ; Common # So  [13] HAMMER AND WRENCH..AIRPLANE ARRIVING
 1F6F0..1F6F3  ; Common # So   [4] SATELLITE..PASSENGER SHIP
 1F700..1F773  ; Common # So [116] ALCHEMICAL SYMBOL FOR QUINTESSENCE..ALCHEMICAL SYMBOL FOR HALF OUNCE
@@ -590,10 +592,13 @@
 1F850..1F859  ; Common # So  [10] LEFTWARDS SANS-SERIF ARROW..UP DOWN SANS-SERIF ARROW
 1F860..1F887  ; Common # So  [40] WIDE-HEADED LEFTWARDS LIGHT BARB ARROW..WIDE-HEADED SOUTH WEST VERY HEAVY BARB ARROW
 1F890..1F8AD  ; Common # So  [30] LEFTWARDS TRIANGLE ARROWHEAD..WHITE ARROW SHAFT WIDTH TWO THIRDS
+1F910..1F918  ; Common # So   [9] ZIPPER-MOUTH FACE..SIGN OF THE HORNS
+1F980..1F984  ; Common # So   [5] CRAB..UNICORN FACE
+1F9C0         ; Common # So       CHEESE WEDGE
 E0001         ; Common # Cf       LANGUAGE TAG
 E0020..E007F  ; Common # Cf  [96] TAG SPACE..CANCEL TAG
 
-# Total code points: 7129
+# Total code points: 7179
 
 # ================================================
 
@@ -635,20 +640,21 @@
 A770          ; Latin # Lm       MODIFIER LETTER US
 A771..A787    ; Latin # L&  [23] LATIN SMALL LETTER DUM..LATIN SMALL LETTER INSULAR T
 A78B..A78E    ; Latin # L&   [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT
+A78F          ; Latin # Lo       LATIN LETTER SINOLOGICAL DOT
 A790..A7AD    ; Latin # L&  [30] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN CAPITAL LETTER L WITH BELT
-A7B0..A7B1    ; Latin # L&   [2] LATIN CAPITAL LETTER TURNED K..LATIN CAPITAL LETTER TURNED T
+A7B0..A7B7    ; Latin # L&   [8] LATIN CAPITAL LETTER TURNED K..LATIN SMALL LETTER OMEGA
 A7F7          ; Latin # Lo       LATIN EPIGRAPHIC LETTER SIDEWAYS I
 A7F8..A7F9    ; Latin # Lm   [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE
 A7FA          ; Latin # L&       LATIN LETTER SMALL CAPITAL TURNED M
 A7FB..A7FF    ; Latin # Lo   [5] LATIN EPIGRAPHIC LETTER REVERSED F..LATIN EPIGRAPHIC LETTER ARCHAIC M
 AB30..AB5A    ; Latin # L&  [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG
 AB5C..AB5F    ; Latin # Lm   [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK
-AB64          ; Latin # L&       LATIN SMALL LETTER INVERTED ALPHA
+AB60..AB64    ; Latin # L&   [5] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER INVERTED ALPHA
 FB00..FB06    ; Latin # L&   [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST
 FF21..FF3A    ; Latin # L&  [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z
 FF41..FF5A    ; Latin # L&  [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z
 
-# Total code points: 1338
+# Total code points: 1349
 
 # ================================================
 
@@ -731,9 +737,10 @@
 A67F          ; Cyrillic # Lm       CYRILLIC PAYEROK
 A680..A69B    ; Cyrillic # L&  [28] CYRILLIC CAPITAL LETTER DWE..CYRILLIC SMALL LETTER CROSSED O
 A69C..A69D    ; Cyrillic # Lm   [2] MODIFIER LETTER CYRILLIC HARD SIGN..MODIFIER LETTER CYRILLIC SOFT SIGN
-A69F          ; Cyrillic # Mn       COMBINING CYRILLIC LETTER IOTIFIED E
-
-# Total code points: 431
+A69E..A69F    ; Cyrillic # Mn   [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E
+FE2E..FE2F    ; Cyrillic # Mn   [2] COMBINING CYRILLIC TITLO LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF
+
+# Total code points: 434
 
 # ================================================
 
@@ -788,6 +795,7 @@
 0620..063F    ; Arabic # Lo  [32] ARABIC LETTER KASHMIRI YEH..ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE
 0641..064A    ; Arabic # Lo  [10] ARABIC LETTER FEH..ARABIC LETTER YEH
 0656..065F    ; Arabic # Mn  [10] ARABIC SUBSCRIPT ALEF..ARABIC WAVY HAMZA BELOW
+0660..0669    ; Arabic # Nd  [10] ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE
 066A..066D    ; Arabic # Po   [4] ARABIC PERCENT SIGN..ARABIC FIVE POINTED STAR
 066E..066F    ; Arabic # Lo   [2] ARABIC LETTER DOTLESS BEH..ARABIC LETTER DOTLESS QAF
 0671..06D3    ; Arabic # Lo  [99] ARABIC LETTER ALEF WASLA..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE
@@ -806,8 +814,8 @@
 06FD..06FE    ; Arabic # So   [2] ARABIC SIGN SINDHI AMPERSAND..ARABIC SIGN SINDHI POSTPOSITION MEN
 06FF          ; Arabic # Lo       ARABIC LETTER HEH WITH INVERTED V
 0750..077F    ; Arabic # Lo  [48] ARABIC LETTER BEH WITH THREE DOTS HORIZONTALLY BELOW..ARABIC LETTER KAF WITH TWO DOTS ABOVE
-08A0..08B2    ; Arabic # Lo  [19] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER ZAIN WITH INVERTED V ABOVE
-08E4..08FF    ; Arabic # Mn  [28] ARABIC CURLY FATHA..ARABIC MARK SIDEWAYS NOON GHUNNA
+08A0..08B4    ; Arabic # Lo  [21] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER KAF WITH DOT BELOW
+08E3..08FF    ; Arabic # Mn  [29] ARABIC TURNED DAMMA BELOW..ARABIC MARK SIDEWAYS NOON GHUNNA
 FB50..FBB1    ; Arabic # Lo  [98] ARABIC LETTER ALEF WASLA ISOLATED FORM..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM
 FBB2..FBC1    ; Arabic # Sk  [16] ARABIC SYMBOL DOT ABOVE..ARABIC SYMBOL SMALL TAH BELOW
 FBD3..FD3D    ; Arabic # Lo [363] ARABIC LETTER NG ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM
@@ -854,7 +862,7 @@
 1EEAB..1EEBB  ; Arabic # Lo  [17] ARABIC MATHEMATICAL DOUBLE-STRUCK LAM..ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN
 1EEF0..1EEF1  ; Arabic # Sm   [2] ARABIC MATHEMATICAL OPERATOR MEEM WITH HAH WITH TATWEEL..ARABIC MATHEMATICAL OPERATOR HAH WITH DAL
 
-# Total code points: 1244
+# Total code points: 1257
 
 # ================================================
 
@@ -902,8 +910,10 @@
 A8F2..A8F7    ; Devanagari # Lo   [6] DEVANAGARI SIGN SPACING CANDRABINDU..DEVANAGARI SIGN CANDRABINDU AVAGRAHA
 A8F8..A8FA    ; Devanagari # Po   [3] DEVANAGARI SIGN PUSHPIKA..DEVANAGARI CARET
 A8FB          ; Devanagari # Lo       DEVANAGARI HEADSTROKE
-
-# Total code points: 152
+A8FC          ; Devanagari # Po       DEVANAGARI SIGN SIDDHAM
+A8FD          ; Devanagari # Lo       DEVANAGARI JAIN OM
+
+# Total code points: 154
 
 # ================================================
 
@@ -987,8 +997,9 @@
 0AE6..0AEF    ; Gujarati # Nd  [10] GUJARATI DIGIT ZERO..GUJARATI DIGIT NINE
 0AF0          ; Gujarati # Po       GUJARATI ABBREVIATION SIGN
 0AF1          ; Gujarati # Sc       GUJARATI RUPEE SIGN
-
-# Total code points: 84
+0AF9          ; Gujarati # Lo       GUJARATI LETTER ZHA
+
+# Total code points: 85
 
 # ================================================
 
@@ -1064,14 +1075,14 @@
 0C46..0C48    ; Telugu # Mn   [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI
 0C4A..0C4D    ; Telugu # Mn   [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA
 0C55..0C56    ; Telugu # Mn   [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK
-0C58..0C59    ; Telugu # Lo   [2] TELUGU LETTER TSA..TELUGU LETTER DZA
+0C58..0C5A    ; Telugu # Lo   [3] TELUGU LETTER TSA..TELUGU LETTER RRRA
 0C60..0C61    ; Telugu # Lo   [2] TELUGU LETTER VOCALIC RR..TELUGU LETTER VOCALIC LL
 0C62..0C63    ; Telugu # Mn   [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL
 0C66..0C6F    ; Telugu # Nd  [10] TELUGU DIGIT ZERO..TELUGU DIGIT NINE
 0C78..0C7E    ; Telugu # No   [7] TELUGU FRACTION DIGIT ZERO FOR ODD POWERS OF FOUR..TELUGU FRACTION DIGIT THREE FOR EVEN POWERS OF FOUR
 0C7F          ; Telugu # So       TELUGU SIGN TUUMU
 
-# Total code points: 95
+# Total code points: 96
 
 # ================================================
 
@@ -1115,14 +1126,14 @@
 0D4D          ; Malayalam # Mn       MALAYALAM SIGN VIRAMA
 0D4E          ; Malayalam # Lo       MALAYALAM LETTER DOT REPH
 0D57          ; Malayalam # Mc       MALAYALAM AU LENGTH MARK
-0D60..0D61    ; Malayalam # Lo   [2] MALAYALAM LETTER VOCALIC RR..MALAYALAM LETTER VOCALIC LL
+0D5F..0D61    ; Malayalam # Lo   [3] MALAYALAM LETTER ARCHAIC II..MALAYALAM LETTER VOCALIC LL
 0D62..0D63    ; Malayalam # Mn   [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL
 0D66..0D6F    ; Malayalam # Nd  [10] MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE
 0D70..0D75    ; Malayalam # No   [6] MALAYALAM NUMBER TEN..MALAYALAM FRACTION THREE QUARTERS
 0D79          ; Malayalam # So       MALAYALAM DATE MARK
 0D7A..0D7F    ; Malayalam # Lo   [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K
 
-# Total code points: 99
+# Total code points: 100
 
 # ================================================
 
@@ -1358,9 +1369,11 @@
 
 # ================================================
 
-13A0..13F4    ; Cherokee # Lo  [85] CHEROKEE LETTER A..CHEROKEE LETTER YV
-
-# Total code points: 85
+13A0..13F5    ; Cherokee # L&  [86] CHEROKEE LETTER A..CHEROKEE LETTER MV
+13F8..13FD    ; Cherokee # L&   [6] CHEROKEE SMALL LETTER YE..CHEROKEE SMALL LETTER MV
+AB70..ABBF    ; Cherokee # L&  [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA
+
+# Total code points: 172
 
 # ================================================
 
@@ -1472,15 +1485,16 @@
 3038..303A    ; Han # Nl   [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY
 303B          ; Han # Lm       VERTICAL IDEOGRAPHIC ITERATION MARK
 3400..4DB5    ; Han # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5
-4E00..9FCC    ; Han # Lo [20941] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FCC
+4E00..9FD5    ; Han # Lo [20950] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FD5
 F900..FA6D    ; Han # Lo [366] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA6D
 FA70..FAD9    ; Han # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
 20000..2A6D6  ; Han # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6
 2A700..2B734  ; Han # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734
 2B740..2B81D  ; Han # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D
+2B820..2CEA1  ; Han # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1
 2F800..2FA1D  ; Han # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
 
-# Total code points: 75963
+# Total code points: 81734
 
 # ================================================
 
@@ -1680,9 +1694,7 @@
 # ================================================
 
 1980..19AB    ; New_Tai_Lue # Lo  [44] NEW TAI LUE LETTER HIGH QA..NEW TAI LUE LETTER LOW SUA
-19B0..19C0    ; New_Tai_Lue # Mc  [17] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE VOWEL SIGN IY
-19C1..19C7    ; New_Tai_Lue # Lo   [7] NEW TAI LUE LETTER FINAL V..NEW TAI LUE LETTER FINAL B
-19C8..19C9    ; New_Tai_Lue # Mc   [2] NEW TAI LUE TONE MARK-1..NEW TAI LUE TONE MARK-2
+19B0..19C9    ; New_Tai_Lue # Lo  [26] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE TONE MARK-2
 19D0..19D9    ; New_Tai_Lue # Nd  [10] NEW TAI LUE DIGIT ZERO..NEW TAI LUE DIGIT NINE
 19DA          ; New_Tai_Lue # No       NEW TAI LUE THAM DIGIT ONE
 19DE..19DF    ; New_Tai_Lue # So   [2] NEW TAI LUE SIGN LAE..NEW TAI LUE SIGN LAEV
@@ -1770,11 +1782,12 @@
 
 # ================================================
 
-12000..12398  ; Cuneiform # Lo [921] CUNEIFORM SIGN A..CUNEIFORM SIGN UM TIMES ME
+12000..12399  ; Cuneiform # Lo [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U
 12400..1246E  ; Cuneiform # Nl [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM
 12470..12474  ; Cuneiform # Po   [5] CUNEIFORM PUNCTUATION SIGN OLD ASSYRIAN WORD DIVIDER..CUNEIFORM PUNCTUATION SIGN DIAGONAL QUADCOLON
-
-# Total code points: 1037
+12480..12543  ; Cuneiform # Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU
+
+# Total code points: 1234
 
 # ================================================
 
@@ -2151,9 +2164,12 @@
 # ================================================
 
 109A0..109B7  ; Meroitic_Cursive # Lo  [24] MEROITIC CURSIVE LETTER A..MEROITIC CURSIVE LETTER DA
+109BC..109BD  ; Meroitic_Cursive # No   [2] MEROITIC CURSIVE FRACTION ELEVEN TWELFTHS..MEROITIC CURSIVE FRACTION ONE HALF
 109BE..109BF  ; Meroitic_Cursive # Lo   [2] MEROITIC CURSIVE LOGOGRAM RMT..MEROITIC CURSIVE LOGOGRAM IMN
-
-# Total code points: 26
+109C0..109CF  ; Meroitic_Cursive # No  [16] MEROITIC CURSIVE NUMBER ONE..MEROITIC CURSIVE NUMBER SEVENTY
+109D2..109FF  ; Meroitic_Cursive # No  [46] MEROITIC CURSIVE NUMBER ONE HUNDRED..MEROITIC CURSIVE FRACTION TEN TWELFTHS
+
+# Total code points: 90
 
 # ================================================
 
@@ -2180,12 +2196,16 @@
 111B6..111BE  ; Sharada # Mn   [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O
 111BF..111C0  ; Sharada # Mc   [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA
 111C1..111C4  ; Sharada # Lo   [4] SHARADA SIGN AVAGRAHA..SHARADA OM
-111C5..111C8  ; Sharada # Po   [4] SHARADA DANDA..SHARADA SEPARATOR
+111C5..111C9  ; Sharada # Po   [5] SHARADA DANDA..SHARADA SANDHI MARK
+111CA..111CC  ; Sharada # Mn   [3] SHARADA SIGN NUKTA..SHARADA EXTRA SHORT VOWEL MARK
 111CD         ; Sharada # Po       SHARADA SUTRA MARK
 111D0..111D9  ; Sharada # Nd  [10] SHARADA DIGIT ZERO..SHARADA DIGIT NINE
 111DA         ; Sharada # Lo       SHARADA EKAM
-
-# Total code points: 85
+111DB         ; Sharada # Po       SHARADA SIGN SIDDHAM
+111DC         ; Sharada # Lo       SHARADA HEADSTROKE
+111DD..111DF  ; Sharada # Po   [3] SHARADA CONTINUATION SIGN..SHARADA SECTION MARK-2
+
+# Total code points: 94
 
 # ================================================
 
@@ -2243,7 +2263,7 @@
 
 # ================================================
 
-11301         ; Grantha # Mn       GRANTHA SIGN CANDRABINDU
+11300..11301  ; Grantha # Mn   [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU
 11302..11303  ; Grantha # Mc   [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA
 11305..1130C  ; Grantha # Lo   [8] GRANTHA LETTER A..GRANTHA LETTER VOCALIC L
 1130F..11310  ; Grantha # Lo   [2] GRANTHA LETTER EE..GRANTHA LETTER AI
@@ -2258,13 +2278,14 @@
 11341..11344  ; Grantha # Mc   [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR
 11347..11348  ; Grantha # Mc   [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI
 1134B..1134D  ; Grantha # Mc   [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA
+11350         ; Grantha # Lo       GRANTHA OM
 11357         ; Grantha # Mc       GRANTHA AU LENGTH MARK
 1135D..11361  ; Grantha # Lo   [5] GRANTHA SIGN PLUTA..GRANTHA LETTER VOCALIC LL
 11362..11363  ; Grantha # Mc   [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL
 11366..1136C  ; Grantha # Mn   [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX
 11370..11374  ; Grantha # Mn   [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA
 
-# Total code points: 83
+# Total code points: 85
 
 # ================================================
 
@@ -2407,9 +2428,11 @@
 115BC..115BD  ; Siddham # Mn   [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA
 115BE         ; Siddham # Mc       SIDDHAM SIGN VISARGA
 115BF..115C0  ; Siddham # Mn   [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA
-115C1..115C9  ; Siddham # Po   [9] SIDDHAM SIGN SIDDHAM..SIDDHAM END OF TEXT MARK
-
-# Total code points: 72
+115C1..115D7  ; Siddham # Po  [23] SIDDHAM SIGN SIDDHAM..SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES
+115D8..115DB  ; Siddham # Lo   [4] SIDDHAM LETTER THREE-CIRCLE ALTERNATE I..SIDDHAM LETTER ALTERNATE U
+115DC..115DD  ; Siddham # Mn   [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU
+
+# Total code points: 92
 
 # ================================================
 
@@ -2448,4 +2471,69 @@
 
 # Total code points: 84
 
+# ================================================
+
+11700..11719  ; Ahom # Lo  [26] AHOM LETTER KA..AHOM LETTER JHA
+1171D..1171F  ; Ahom # Mn   [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA
+11720..11721  ; Ahom # Mc   [2] AHOM VOWEL SIGN A..AHOM VOWEL SIGN AA
+11722..11725  ; Ahom # Mn   [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU
+11726         ; Ahom # Mc       AHOM VOWEL SIGN E
+11727..1172B  ; Ahom # Mn   [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER
+11730..11739  ; Ahom # Nd  [10] AHOM DIGIT ZERO..AHOM DIGIT NINE
+1173A..1173B  ; Ahom # No   [2] AHOM NUMBER TEN..AHOM NUMBER TWENTY
+1173C..1173E  ; Ahom # Po   [3] AHOM SIGN SMALL SECTION..AHOM SIGN RULAI
+1173F         ; Ahom # So       AHOM SYMBOL VI
+
+# Total code points: 57
+
+# ================================================
+
+14400..14646  ; Anatolian_Hieroglyphs # Lo [583] ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A530
+
+# Total code points: 583
+
+# ================================================
+
+108E0..108F2  ; Hatran # Lo  [19] HATRAN LETTER ALEPH..HATRAN LETTER QOPH
+108F4..108F5  ; Hatran # Lo   [2] HATRAN LETTER SHIN..HATRAN LETTER TAW
+108FB..108FF  ; Hatran # No   [5] HATRAN NUMBER ONE..HATRAN NUMBER ONE HUNDRED
+
+# Total code points: 26
+
+# ================================================
+
+11280..11286  ; Multani # Lo   [7] MULTANI LETTER A..MULTANI LETTER GA
+11288         ; Multani # Lo       MULTANI LETTER GHA
+1128A..1128D  ; Multani # Lo   [4] MULTANI LETTER CA..MULTANI LETTER JJA
+1128F..1129D  ; Multani # Lo  [15] MULTANI LETTER NYA..MULTANI LETTER BA
+1129F..112A8  ; Multani # Lo  [10] MULTANI LETTER BHA..MULTANI LETTER RHA
+112A9         ; Multani # Po       MULTANI SECTION MARK
+
+# Total code points: 38
+
+# ================================================
+
+10C80..10CB2  ; Old_Hungarian # L&  [51] OLD HUNGARIAN CAPITAL LETTER A..OLD HUNGARIAN CAPITAL LETTER US
+10CC0..10CF2  ; Old_Hungarian # L&  [51] OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US
+10CFA..10CFF  ; Old_Hungarian # No   [6] OLD HUNGARIAN NUMBER ONE..OLD HUNGARIAN NUMBER ONE THOUSAND
+
+# Total code points: 108
+
+# ================================================
+
+1D800..1D9FF  ; SignWriting # So [512] SIGNWRITING HAND-FIST INDEX..SIGNWRITING HEAD
+1DA00..1DA36  ; SignWriting # Mn  [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN
+1DA37..1DA3A  ; SignWriting # So   [4] SIGNWRITING AIR BLOW SMALL ROTATIONS..SIGNWRITING BREATH EXHALE
+1DA3B..1DA6C  ; SignWriting # Mn  [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT
+1DA6D..1DA74  ; SignWriting # So   [8] SIGNWRITING SHOULDER HIP SPINE..SIGNWRITING TORSO-FLOORPLANE TWISTING
+1DA75         ; SignWriting # Mn       SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS
+1DA76..1DA83  ; SignWriting # So  [14] SIGNWRITING LIMB COMBINATION..SIGNWRITING LOCATION DEPTH
+1DA84         ; SignWriting # Mn       SIGNWRITING LOCATION HEAD NECK
+1DA85..1DA86  ; SignWriting # So   [2] SIGNWRITING LOCATION TORSO..SIGNWRITING LOCATION LIMBS DIGITS
+1DA87..1DA8B  ; SignWriting # Po   [5] SIGNWRITING COMMA..SIGNWRITING PARENTHESIS
+1DA9B..1DA9F  ; SignWriting # Mn   [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6
+1DAA1..1DAAF  ; SignWriting # Mn  [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16
+
+# Total code points: 672
+
 # EOF
--- a/jdk/make/data/unicodedata/SpecialCasing.txt	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/data/unicodedata/SpecialCasing.txt	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
-# SpecialCasing-7.0.0.txt
-# Date: 2014-03-18, 07:18:02 GMT [MD]
+# SpecialCasing-8.0.0.txt
+# Date: 2014-12-16, 23:08:04 GMT [MD]
 #
 # Unicode Character Database
 # Copyright (c) 1991-2014 Unicode, Inc.
--- a/jdk/make/data/unicodedata/UnicodeData.txt	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/data/unicodedata/UnicodeData.txt	Tue Oct 27 01:45:03 2015 -0400
@@ -667,7 +667,7 @@
 029A;LATIN SMALL LETTER CLOSED OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER CLOSED EPSILON;;;;
 029B;LATIN LETTER SMALL CAPITAL G WITH HOOK;Ll;0;L;;;;;N;LATIN LETTER SMALL CAPITAL G HOOK;;;;
 029C;LATIN LETTER SMALL CAPITAL H;Ll;0;L;;;;;N;;;;;
-029D;LATIN SMALL LETTER J WITH CROSSED-TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER CROSSED-TAIL J;;;;
+029D;LATIN SMALL LETTER J WITH CROSSED-TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER CROSSED-TAIL J;;A7B2;;A7B2
 029E;LATIN SMALL LETTER TURNED K;Ll;0;L;;;;;N;;;A7B0;;A7B0
 029F;LATIN LETTER SMALL CAPITAL L;Ll;0;L;;;;;N;;;;;
 02A0;LATIN SMALL LETTER Q WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER Q HOOK;;;;
@@ -2091,6 +2091,9 @@
 08B0;ARABIC LETTER GAF WITH INVERTED STROKE;Lo;0;AL;;;;;N;;;;;
 08B1;ARABIC LETTER STRAIGHT WAW;Lo;0;AL;;;;;N;;;;;
 08B2;ARABIC LETTER ZAIN WITH INVERTED V ABOVE;Lo;0;AL;;;;;N;;;;;
+08B3;ARABIC LETTER AIN WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;;;;;
+08B4;ARABIC LETTER KAF WITH DOT BELOW;Lo;0;AL;;;;;N;;;;;
+08E3;ARABIC TURNED DAMMA BELOW;Mn;220;NSM;;;;;N;;;;;
 08E4;ARABIC CURLY FATHA;Mn;230;NSM;;;;;N;;;;;
 08E5;ARABIC CURLY DAMMA;Mn;230;NSM;;;;;N;;;;;
 08E6;ARABIC CURLY KASRA;Mn;220;NSM;;;;;N;;;;;
@@ -2503,6 +2506,7 @@
 0AEF;GUJARATI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
 0AF0;GUJARATI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;;
 0AF1;GUJARATI RUPEE SIGN;Sc;0;ET;;;;;N;;;;;
+0AF9;GUJARATI LETTER ZHA;Lo;0;L;;;;;N;;;;;
 0B01;ORIYA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;;
 0B02;ORIYA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;;
 0B03;ORIYA SIGN VISARGA;Mc;0;L;;;;;N;;;;;
@@ -2738,6 +2742,7 @@
 0C56;TELUGU AI LENGTH MARK;Mn;91;NSM;;;;;N;;;;;
 0C58;TELUGU LETTER TSA;Lo;0;L;;;;;N;;;;;
 0C59;TELUGU LETTER DZA;Lo;0;L;;;;;N;;;;;
+0C5A;TELUGU LETTER RRRA;Lo;0;L;;;;;N;;;;;
 0C60;TELUGU LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;;
 0C61;TELUGU LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;;
 0C62;TELUGU VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;;
@@ -2919,6 +2924,7 @@
 0D4D;MALAYALAM SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;;
 0D4E;MALAYALAM LETTER DOT REPH;Lo;0;L;;;;;N;;;;;
 0D57;MALAYALAM AU LENGTH MARK;Mc;0;L;;;;;N;;;;;
+0D5F;MALAYALAM LETTER ARCHAIC II;Lo;0;L;;;;;N;;;;;
 0D60;MALAYALAM LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;;
 0D61;MALAYALAM LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;;
 0D62;MALAYALAM VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;;
@@ -4289,91 +4295,98 @@
 1397;ETHIOPIC TONAL MARK HIDET;So;0;ON;;;;;N;;;;;
 1398;ETHIOPIC TONAL MARK DERET-HIDET;So;0;ON;;;;;N;;;;;
 1399;ETHIOPIC TONAL MARK KURT;So;0;ON;;;;;N;;;;;
-13A0;CHEROKEE LETTER A;Lo;0;L;;;;;N;;;;;
-13A1;CHEROKEE LETTER E;Lo;0;L;;;;;N;;;;;
-13A2;CHEROKEE LETTER I;Lo;0;L;;;;;N;;;;;
-13A3;CHEROKEE LETTER O;Lo;0;L;;;;;N;;;;;
-13A4;CHEROKEE LETTER U;Lo;0;L;;;;;N;;;;;
-13A5;CHEROKEE LETTER V;Lo;0;L;;;;;N;;;;;
-13A6;CHEROKEE LETTER GA;Lo;0;L;;;;;N;;;;;
-13A7;CHEROKEE LETTER KA;Lo;0;L;;;;;N;;;;;
-13A8;CHEROKEE LETTER GE;Lo;0;L;;;;;N;;;;;
-13A9;CHEROKEE LETTER GI;Lo;0;L;;;;;N;;;;;
-13AA;CHEROKEE LETTER GO;Lo;0;L;;;;;N;;;;;
-13AB;CHEROKEE LETTER GU;Lo;0;L;;;;;N;;;;;
-13AC;CHEROKEE LETTER GV;Lo;0;L;;;;;N;;;;;
-13AD;CHEROKEE LETTER HA;Lo;0;L;;;;;N;;;;;
-13AE;CHEROKEE LETTER HE;Lo;0;L;;;;;N;;;;;
-13AF;CHEROKEE LETTER HI;Lo;0;L;;;;;N;;;;;
-13B0;CHEROKEE LETTER HO;Lo;0;L;;;;;N;;;;;
-13B1;CHEROKEE LETTER HU;Lo;0;L;;;;;N;;;;;
-13B2;CHEROKEE LETTER HV;Lo;0;L;;;;;N;;;;;
-13B3;CHEROKEE LETTER LA;Lo;0;L;;;;;N;;;;;
-13B4;CHEROKEE LETTER LE;Lo;0;L;;;;;N;;;;;
-13B5;CHEROKEE LETTER LI;Lo;0;L;;;;;N;;;;;
-13B6;CHEROKEE LETTER LO;Lo;0;L;;;;;N;;;;;
-13B7;CHEROKEE LETTER LU;Lo;0;L;;;;;N;;;;;
-13B8;CHEROKEE LETTER LV;Lo;0;L;;;;;N;;;;;
-13B9;CHEROKEE LETTER MA;Lo;0;L;;;;;N;;;;;
-13BA;CHEROKEE LETTER ME;Lo;0;L;;;;;N;;;;;
-13BB;CHEROKEE LETTER MI;Lo;0;L;;;;;N;;;;;
-13BC;CHEROKEE LETTER MO;Lo;0;L;;;;;N;;;;;
-13BD;CHEROKEE LETTER MU;Lo;0;L;;;;;N;;;;;
-13BE;CHEROKEE LETTER NA;Lo;0;L;;;;;N;;;;;
-13BF;CHEROKEE LETTER HNA;Lo;0;L;;;;;N;;;;;
-13C0;CHEROKEE LETTER NAH;Lo;0;L;;;;;N;;;;;
-13C1;CHEROKEE LETTER NE;Lo;0;L;;;;;N;;;;;
-13C2;CHEROKEE LETTER NI;Lo;0;L;;;;;N;;;;;
-13C3;CHEROKEE LETTER NO;Lo;0;L;;;;;N;;;;;
-13C4;CHEROKEE LETTER NU;Lo;0;L;;;;;N;;;;;
-13C5;CHEROKEE LETTER NV;Lo;0;L;;;;;N;;;;;
-13C6;CHEROKEE LETTER QUA;Lo;0;L;;;;;N;;;;;
-13C7;CHEROKEE LETTER QUE;Lo;0;L;;;;;N;;;;;
-13C8;CHEROKEE LETTER QUI;Lo;0;L;;;;;N;;;;;
-13C9;CHEROKEE LETTER QUO;Lo;0;L;;;;;N;;;;;
-13CA;CHEROKEE LETTER QUU;Lo;0;L;;;;;N;;;;;
-13CB;CHEROKEE LETTER QUV;Lo;0;L;;;;;N;;;;;
-13CC;CHEROKEE LETTER SA;Lo;0;L;;;;;N;;;;;
-13CD;CHEROKEE LETTER S;Lo;0;L;;;;;N;;;;;
-13CE;CHEROKEE LETTER SE;Lo;0;L;;;;;N;;;;;
-13CF;CHEROKEE LETTER SI;Lo;0;L;;;;;N;;;;;
-13D0;CHEROKEE LETTER SO;Lo;0;L;;;;;N;;;;;
-13D1;CHEROKEE LETTER SU;Lo;0;L;;;;;N;;;;;
-13D2;CHEROKEE LETTER SV;Lo;0;L;;;;;N;;;;;
-13D3;CHEROKEE LETTER DA;Lo;0;L;;;;;N;;;;;
-13D4;CHEROKEE LETTER TA;Lo;0;L;;;;;N;;;;;
-13D5;CHEROKEE LETTER DE;Lo;0;L;;;;;N;;;;;
-13D6;CHEROKEE LETTER TE;Lo;0;L;;;;;N;;;;;
-13D7;CHEROKEE LETTER DI;Lo;0;L;;;;;N;;;;;
-13D8;CHEROKEE LETTER TI;Lo;0;L;;;;;N;;;;;
-13D9;CHEROKEE LETTER DO;Lo;0;L;;;;;N;;;;;
-13DA;CHEROKEE LETTER DU;Lo;0;L;;;;;N;;;;;
-13DB;CHEROKEE LETTER DV;Lo;0;L;;;;;N;;;;;
-13DC;CHEROKEE LETTER DLA;Lo;0;L;;;;;N;;;;;
-13DD;CHEROKEE LETTER TLA;Lo;0;L;;;;;N;;;;;
-13DE;CHEROKEE LETTER TLE;Lo;0;L;;;;;N;;;;;
-13DF;CHEROKEE LETTER TLI;Lo;0;L;;;;;N;;;;;
-13E0;CHEROKEE LETTER TLO;Lo;0;L;;;;;N;;;;;
-13E1;CHEROKEE LETTER TLU;Lo;0;L;;;;;N;;;;;
-13E2;CHEROKEE LETTER TLV;Lo;0;L;;;;;N;;;;;
-13E3;CHEROKEE LETTER TSA;Lo;0;L;;;;;N;;;;;
-13E4;CHEROKEE LETTER TSE;Lo;0;L;;;;;N;;;;;
-13E5;CHEROKEE LETTER TSI;Lo;0;L;;;;;N;;;;;
-13E6;CHEROKEE LETTER TSO;Lo;0;L;;;;;N;;;;;
-13E7;CHEROKEE LETTER TSU;Lo;0;L;;;;;N;;;;;
-13E8;CHEROKEE LETTER TSV;Lo;0;L;;;;;N;;;;;
-13E9;CHEROKEE LETTER WA;Lo;0;L;;;;;N;;;;;
-13EA;CHEROKEE LETTER WE;Lo;0;L;;;;;N;;;;;
-13EB;CHEROKEE LETTER WI;Lo;0;L;;;;;N;;;;;
-13EC;CHEROKEE LETTER WO;Lo;0;L;;;;;N;;;;;
-13ED;CHEROKEE LETTER WU;Lo;0;L;;;;;N;;;;;
-13EE;CHEROKEE LETTER WV;Lo;0;L;;;;;N;;;;;
-13EF;CHEROKEE LETTER YA;Lo;0;L;;;;;N;;;;;
-13F0;CHEROKEE LETTER YE;Lo;0;L;;;;;N;;;;;
-13F1;CHEROKEE LETTER YI;Lo;0;L;;;;;N;;;;;
-13F2;CHEROKEE LETTER YO;Lo;0;L;;;;;N;;;;;
-13F3;CHEROKEE LETTER YU;Lo;0;L;;;;;N;;;;;
-13F4;CHEROKEE LETTER YV;Lo;0;L;;;;;N;;;;;
+13A0;CHEROKEE LETTER A;Lu;0;L;;;;;N;;;;AB70;
+13A1;CHEROKEE LETTER E;Lu;0;L;;;;;N;;;;AB71;
+13A2;CHEROKEE LETTER I;Lu;0;L;;;;;N;;;;AB72;
+13A3;CHEROKEE LETTER O;Lu;0;L;;;;;N;;;;AB73;
+13A4;CHEROKEE LETTER U;Lu;0;L;;;;;N;;;;AB74;
+13A5;CHEROKEE LETTER V;Lu;0;L;;;;;N;;;;AB75;
+13A6;CHEROKEE LETTER GA;Lu;0;L;;;;;N;;;;AB76;
+13A7;CHEROKEE LETTER KA;Lu;0;L;;;;;N;;;;AB77;
+13A8;CHEROKEE LETTER GE;Lu;0;L;;;;;N;;;;AB78;
+13A9;CHEROKEE LETTER GI;Lu;0;L;;;;;N;;;;AB79;
+13AA;CHEROKEE LETTER GO;Lu;0;L;;;;;N;;;;AB7A;
+13AB;CHEROKEE LETTER GU;Lu;0;L;;;;;N;;;;AB7B;
+13AC;CHEROKEE LETTER GV;Lu;0;L;;;;;N;;;;AB7C;
+13AD;CHEROKEE LETTER HA;Lu;0;L;;;;;N;;;;AB7D;
+13AE;CHEROKEE LETTER HE;Lu;0;L;;;;;N;;;;AB7E;
+13AF;CHEROKEE LETTER HI;Lu;0;L;;;;;N;;;;AB7F;
+13B0;CHEROKEE LETTER HO;Lu;0;L;;;;;N;;;;AB80;
+13B1;CHEROKEE LETTER HU;Lu;0;L;;;;;N;;;;AB81;
+13B2;CHEROKEE LETTER HV;Lu;0;L;;;;;N;;;;AB82;
+13B3;CHEROKEE LETTER LA;Lu;0;L;;;;;N;;;;AB83;
+13B4;CHEROKEE LETTER LE;Lu;0;L;;;;;N;;;;AB84;
+13B5;CHEROKEE LETTER LI;Lu;0;L;;;;;N;;;;AB85;
+13B6;CHEROKEE LETTER LO;Lu;0;L;;;;;N;;;;AB86;
+13B7;CHEROKEE LETTER LU;Lu;0;L;;;;;N;;;;AB87;
+13B8;CHEROKEE LETTER LV;Lu;0;L;;;;;N;;;;AB88;
+13B9;CHEROKEE LETTER MA;Lu;0;L;;;;;N;;;;AB89;
+13BA;CHEROKEE LETTER ME;Lu;0;L;;;;;N;;;;AB8A;
+13BB;CHEROKEE LETTER MI;Lu;0;L;;;;;N;;;;AB8B;
+13BC;CHEROKEE LETTER MO;Lu;0;L;;;;;N;;;;AB8C;
+13BD;CHEROKEE LETTER MU;Lu;0;L;;;;;N;;;;AB8D;
+13BE;CHEROKEE LETTER NA;Lu;0;L;;;;;N;;;;AB8E;
+13BF;CHEROKEE LETTER HNA;Lu;0;L;;;;;N;;;;AB8F;
+13C0;CHEROKEE LETTER NAH;Lu;0;L;;;;;N;;;;AB90;
+13C1;CHEROKEE LETTER NE;Lu;0;L;;;;;N;;;;AB91;
+13C2;CHEROKEE LETTER NI;Lu;0;L;;;;;N;;;;AB92;
+13C3;CHEROKEE LETTER NO;Lu;0;L;;;;;N;;;;AB93;
+13C4;CHEROKEE LETTER NU;Lu;0;L;;;;;N;;;;AB94;
+13C5;CHEROKEE LETTER NV;Lu;0;L;;;;;N;;;;AB95;
+13C6;CHEROKEE LETTER QUA;Lu;0;L;;;;;N;;;;AB96;
+13C7;CHEROKEE LETTER QUE;Lu;0;L;;;;;N;;;;AB97;
+13C8;CHEROKEE LETTER QUI;Lu;0;L;;;;;N;;;;AB98;
+13C9;CHEROKEE LETTER QUO;Lu;0;L;;;;;N;;;;AB99;
+13CA;CHEROKEE LETTER QUU;Lu;0;L;;;;;N;;;;AB9A;
+13CB;CHEROKEE LETTER QUV;Lu;0;L;;;;;N;;;;AB9B;
+13CC;CHEROKEE LETTER SA;Lu;0;L;;;;;N;;;;AB9C;
+13CD;CHEROKEE LETTER S;Lu;0;L;;;;;N;;;;AB9D;
+13CE;CHEROKEE LETTER SE;Lu;0;L;;;;;N;;;;AB9E;
+13CF;CHEROKEE LETTER SI;Lu;0;L;;;;;N;;;;AB9F;
+13D0;CHEROKEE LETTER SO;Lu;0;L;;;;;N;;;;ABA0;
+13D1;CHEROKEE LETTER SU;Lu;0;L;;;;;N;;;;ABA1;
+13D2;CHEROKEE LETTER SV;Lu;0;L;;;;;N;;;;ABA2;
+13D3;CHEROKEE LETTER DA;Lu;0;L;;;;;N;;;;ABA3;
+13D4;CHEROKEE LETTER TA;Lu;0;L;;;;;N;;;;ABA4;
+13D5;CHEROKEE LETTER DE;Lu;0;L;;;;;N;;;;ABA5;
+13D6;CHEROKEE LETTER TE;Lu;0;L;;;;;N;;;;ABA6;
+13D7;CHEROKEE LETTER DI;Lu;0;L;;;;;N;;;;ABA7;
+13D8;CHEROKEE LETTER TI;Lu;0;L;;;;;N;;;;ABA8;
+13D9;CHEROKEE LETTER DO;Lu;0;L;;;;;N;;;;ABA9;
+13DA;CHEROKEE LETTER DU;Lu;0;L;;;;;N;;;;ABAA;
+13DB;CHEROKEE LETTER DV;Lu;0;L;;;;;N;;;;ABAB;
+13DC;CHEROKEE LETTER DLA;Lu;0;L;;;;;N;;;;ABAC;
+13DD;CHEROKEE LETTER TLA;Lu;0;L;;;;;N;;;;ABAD;
+13DE;CHEROKEE LETTER TLE;Lu;0;L;;;;;N;;;;ABAE;
+13DF;CHEROKEE LETTER TLI;Lu;0;L;;;;;N;;;;ABAF;
+13E0;CHEROKEE LETTER TLO;Lu;0;L;;;;;N;;;;ABB0;
+13E1;CHEROKEE LETTER TLU;Lu;0;L;;;;;N;;;;ABB1;
+13E2;CHEROKEE LETTER TLV;Lu;0;L;;;;;N;;;;ABB2;
+13E3;CHEROKEE LETTER TSA;Lu;0;L;;;;;N;;;;ABB3;
+13E4;CHEROKEE LETTER TSE;Lu;0;L;;;;;N;;;;ABB4;
+13E5;CHEROKEE LETTER TSI;Lu;0;L;;;;;N;;;;ABB5;
+13E6;CHEROKEE LETTER TSO;Lu;0;L;;;;;N;;;;ABB6;
+13E7;CHEROKEE LETTER TSU;Lu;0;L;;;;;N;;;;ABB7;
+13E8;CHEROKEE LETTER TSV;Lu;0;L;;;;;N;;;;ABB8;
+13E9;CHEROKEE LETTER WA;Lu;0;L;;;;;N;;;;ABB9;
+13EA;CHEROKEE LETTER WE;Lu;0;L;;;;;N;;;;ABBA;
+13EB;CHEROKEE LETTER WI;Lu;0;L;;;;;N;;;;ABBB;
+13EC;CHEROKEE LETTER WO;Lu;0;L;;;;;N;;;;ABBC;
+13ED;CHEROKEE LETTER WU;Lu;0;L;;;;;N;;;;ABBD;
+13EE;CHEROKEE LETTER WV;Lu;0;L;;;;;N;;;;ABBE;
+13EF;CHEROKEE LETTER YA;Lu;0;L;;;;;N;;;;ABBF;
+13F0;CHEROKEE LETTER YE;Lu;0;L;;;;;N;;;;13F8;
+13F1;CHEROKEE LETTER YI;Lu;0;L;;;;;N;;;;13F9;
+13F2;CHEROKEE LETTER YO;Lu;0;L;;;;;N;;;;13FA;
+13F3;CHEROKEE LETTER YU;Lu;0;L;;;;;N;;;;13FB;
+13F4;CHEROKEE LETTER YV;Lu;0;L;;;;;N;;;;13FC;
+13F5;CHEROKEE LETTER MV;Lu;0;L;;;;;N;;;;13FD;
+13F8;CHEROKEE SMALL LETTER YE;Ll;0;L;;;;;N;;;13F0;;13F0
+13F9;CHEROKEE SMALL LETTER YI;Ll;0;L;;;;;N;;;13F1;;13F1
+13FA;CHEROKEE SMALL LETTER YO;Ll;0;L;;;;;N;;;13F2;;13F2
+13FB;CHEROKEE SMALL LETTER YU;Ll;0;L;;;;;N;;;13F3;;13F3
+13FC;CHEROKEE SMALL LETTER YV;Ll;0;L;;;;;N;;;13F4;;13F4
+13FD;CHEROKEE SMALL LETTER MV;Ll;0;L;;;;;N;;;13F5;;13F5
 1400;CANADIAN SYLLABICS HYPHEN;Pd;0;ON;;;;;N;;;;;
 1401;CANADIAN SYLLABICS E;Lo;0;L;;;;;N;;;;;
 1402;CANADIAN SYLLABICS AAI;Lo;0;L;;;;;N;;;;;
@@ -5700,23 +5713,23 @@
 19A9;NEW TAI LUE LETTER LOW XVA;Lo;0;L;;;;;N;;;;;
 19AA;NEW TAI LUE LETTER HIGH SUA;Lo;0;L;;;;;N;;;;;
 19AB;NEW TAI LUE LETTER LOW SUA;Lo;0;L;;;;;N;;;;;
-19B0;NEW TAI LUE VOWEL SIGN VOWEL SHORTENER;Mc;0;L;;;;;N;;;;;
-19B1;NEW TAI LUE VOWEL SIGN AA;Mc;0;L;;;;;N;;;;;
-19B2;NEW TAI LUE VOWEL SIGN II;Mc;0;L;;;;;N;;;;;
-19B3;NEW TAI LUE VOWEL SIGN U;Mc;0;L;;;;;N;;;;;
-19B4;NEW TAI LUE VOWEL SIGN UU;Mc;0;L;;;;;N;;;;;
-19B5;NEW TAI LUE VOWEL SIGN E;Mc;0;L;;;;;N;;;;;
-19B6;NEW TAI LUE VOWEL SIGN AE;Mc;0;L;;;;;N;;;;;
-19B7;NEW TAI LUE VOWEL SIGN O;Mc;0;L;;;;;N;;;;;
-19B8;NEW TAI LUE VOWEL SIGN OA;Mc;0;L;;;;;N;;;;;
-19B9;NEW TAI LUE VOWEL SIGN UE;Mc;0;L;;;;;N;;;;;
-19BA;NEW TAI LUE VOWEL SIGN AY;Mc;0;L;;;;;N;;;;;
-19BB;NEW TAI LUE VOWEL SIGN AAY;Mc;0;L;;;;;N;;;;;
-19BC;NEW TAI LUE VOWEL SIGN UY;Mc;0;L;;;;;N;;;;;
-19BD;NEW TAI LUE VOWEL SIGN OY;Mc;0;L;;;;;N;;;;;
-19BE;NEW TAI LUE VOWEL SIGN OAY;Mc;0;L;;;;;N;;;;;
-19BF;NEW TAI LUE VOWEL SIGN UEY;Mc;0;L;;;;;N;;;;;
-19C0;NEW TAI LUE VOWEL SIGN IY;Mc;0;L;;;;;N;;;;;
+19B0;NEW TAI LUE VOWEL SIGN VOWEL SHORTENER;Lo;0;L;;;;;N;;;;;
+19B1;NEW TAI LUE VOWEL SIGN AA;Lo;0;L;;;;;N;;;;;
+19B2;NEW TAI LUE VOWEL SIGN II;Lo;0;L;;;;;N;;;;;
+19B3;NEW TAI LUE VOWEL SIGN U;Lo;0;L;;;;;N;;;;;
+19B4;NEW TAI LUE VOWEL SIGN UU;Lo;0;L;;;;;N;;;;;
+19B5;NEW TAI LUE VOWEL SIGN E;Lo;0;L;;;;;N;;;;;
+19B6;NEW TAI LUE VOWEL SIGN AE;Lo;0;L;;;;;N;;;;;
+19B7;NEW TAI LUE VOWEL SIGN O;Lo;0;L;;;;;N;;;;;
+19B8;NEW TAI LUE VOWEL SIGN OA;Lo;0;L;;;;;N;;;;;
+19B9;NEW TAI LUE VOWEL SIGN UE;Lo;0;L;;;;;N;;;;;
+19BA;NEW TAI LUE VOWEL SIGN AY;Lo;0;L;;;;;N;;;;;
+19BB;NEW TAI LUE VOWEL SIGN AAY;Lo;0;L;;;;;N;;;;;
+19BC;NEW TAI LUE VOWEL SIGN UY;Lo;0;L;;;;;N;;;;;
+19BD;NEW TAI LUE VOWEL SIGN OY;Lo;0;L;;;;;N;;;;;
+19BE;NEW TAI LUE VOWEL SIGN OAY;Lo;0;L;;;;;N;;;;;
+19BF;NEW TAI LUE VOWEL SIGN UEY;Lo;0;L;;;;;N;;;;;
+19C0;NEW TAI LUE VOWEL SIGN IY;Lo;0;L;;;;;N;;;;;
 19C1;NEW TAI LUE LETTER FINAL V;Lo;0;L;;;;;N;;;;;
 19C2;NEW TAI LUE LETTER FINAL NG;Lo;0;L;;;;;N;;;;;
 19C3;NEW TAI LUE LETTER FINAL N;Lo;0;L;;;;;N;;;;;
@@ -5724,8 +5737,8 @@
 19C5;NEW TAI LUE LETTER FINAL K;Lo;0;L;;;;;N;;;;;
 19C6;NEW TAI LUE LETTER FINAL D;Lo;0;L;;;;;N;;;;;
 19C7;NEW TAI LUE LETTER FINAL B;Lo;0;L;;;;;N;;;;;
-19C8;NEW TAI LUE TONE MARK-1;Mc;0;L;;;;;N;;;;;
-19C9;NEW TAI LUE TONE MARK-2;Mc;0;L;;;;;N;;;;;
+19C8;NEW TAI LUE TONE MARK-1;Lo;0;L;;;;;N;;;;;
+19C9;NEW TAI LUE TONE MARK-2;Lo;0;L;;;;;N;;;;;
 19D0;NEW TAI LUE DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
 19D1;NEW TAI LUE DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
 19D2;NEW TAI LUE DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
@@ -7277,6 +7290,7 @@
 20BB;NORDIC MARK SIGN;Sc;0;ET;;;;;N;;;;;
 20BC;MANAT SIGN;Sc;0;ET;;;;;N;;;;;
 20BD;RUBLE SIGN;Sc;0;ET;;;;;N;;;;;
+20BE;LARI SIGN;Sc;0;ET;;;;;N;;;;;
 20D0;COMBINING LEFT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING LEFT HARPOON ABOVE;;;;
 20D1;COMBINING RIGHT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING RIGHT HARPOON ABOVE;;;;
 20D2;COMBINING LONG VERTICAL LINE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING LONG VERTICAL BAR OVERLAY;;;;
@@ -7448,6 +7462,8 @@
 2187;ROMAN NUMERAL FIFTY THOUSAND;Nl;0;L;;;;50000;N;;;;;
 2188;ROMAN NUMERAL ONE HUNDRED THOUSAND;Nl;0;L;;;;100000;N;;;;;
 2189;VULGAR FRACTION ZERO THIRDS;No;0;ON;<fraction> 0030 2044 0033;;;0;N;;;;;
+218A;TURNED DIGIT TWO;So;0;ON;;;;;N;;;;;
+218B;TURNED DIGIT THREE;So;0;ON;;;;;N;;;;;
 2190;LEFTWARDS ARROW;Sm;0;ON;;;;;N;LEFT ARROW;;;;
 2191;UPWARDS ARROW;Sm;0;ON;;;;;N;UP ARROW;;;;
 2192;RIGHTWARDS ARROW;Sm;0;ON;;;;;N;RIGHT ARROW;;;;
@@ -10015,6 +10031,10 @@
 2BCF;ROTATED WHITE FOUR POINTED CUSP;So;0;ON;;;;;N;;;;;
 2BD0;SQUARE POSITION INDICATOR;So;0;ON;;;;;N;;;;;
 2BD1;UNCERTAINTY SIGN;So;0;ON;;;;;N;;;;;
+2BEC;LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;;
+2BED;UPWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;;
+2BEE;RIGHTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;;
+2BEF;DOWNWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;;
 2C00;GLAGOLITIC CAPITAL LETTER AZU;Lu;0;L;;;;;N;;;;2C30;
 2C01;GLAGOLITIC CAPITAL LETTER BUKY;Lu;0;L;;;;;N;;;;2C31;
 2C02;GLAGOLITIC CAPITAL LETTER VEDE;Lu;0;L;;;;;N;;;;2C32;
@@ -11942,7 +11962,7 @@
 4DFE;HEXAGRAM FOR AFTER COMPLETION;So;0;ON;;;;;N;;;;;
 4DFF;HEXAGRAM FOR BEFORE COMPLETION;So;0;ON;;;;;N;;;;;
 4E00;<CJK Ideograph, First>;Lo;0;L;;;;;N;;;;;
-9FCC;<CJK Ideograph, Last>;Lo;0;L;;;;;N;;;;;
+9FD5;<CJK Ideograph, Last>;Lo;0;L;;;;;N;;;;;
 A000;YI SYLLABLE IT;Lo;0;L;;;;;N;;;;;
 A001;YI SYLLABLE IX;Lo;0;L;;;;;N;;;;;
 A002;YI SYLLABLE I;Lo;0;L;;;;;N;;;;;
@@ -13605,6 +13625,7 @@
 A69B;CYRILLIC SMALL LETTER CROSSED O;Ll;0;L;;;;;N;;;A69A;;A69A
 A69C;MODIFIER LETTER CYRILLIC HARD SIGN;Lm;0;L;<super> 044A;;;;N;;;;;
 A69D;MODIFIER LETTER CYRILLIC SOFT SIGN;Lm;0;L;<super> 044C;;;;N;;;;;
+A69E;COMBINING CYRILLIC LETTER EF;Mn;230;NSM;;;;;N;;;;;
 A69F;COMBINING CYRILLIC LETTER IOTIFIED E;Mn;230;NSM;;;;;N;;;;;
 A6A0;BAMUM LETTER A;Lo;0;L;;;;;N;;;;;
 A6A1;BAMUM LETTER KA;Lo;0;L;;;;;N;;;;;
@@ -13837,6 +13858,7 @@
 A78C;LATIN SMALL LETTER SALTILLO;Ll;0;L;;;;;N;;;A78B;;A78B
 A78D;LATIN CAPITAL LETTER TURNED H;Lu;0;L;;;;;N;;;;0265;
 A78E;LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT;Ll;0;L;;;;;N;;;;;
+A78F;LATIN LETTER SINOLOGICAL DOT;Lo;0;L;;;;;N;;;;;
 A790;LATIN CAPITAL LETTER N WITH DESCENDER;Lu;0;L;;;;;N;;;;A791;
 A791;LATIN SMALL LETTER N WITH DESCENDER;Ll;0;L;;;;;N;;;A790;;A790
 A792;LATIN CAPITAL LETTER C WITH BAR;Lu;0;L;;;;;N;;;;A793;
@@ -13869,6 +13891,12 @@
 A7AD;LATIN CAPITAL LETTER L WITH BELT;Lu;0;L;;;;;N;;;;026C;
 A7B0;LATIN CAPITAL LETTER TURNED K;Lu;0;L;;;;;N;;;;029E;
 A7B1;LATIN CAPITAL LETTER TURNED T;Lu;0;L;;;;;N;;;;0287;
+A7B2;LATIN CAPITAL LETTER J WITH CROSSED-TAIL;Lu;0;L;;;;;N;;;;029D;
+A7B3;LATIN CAPITAL LETTER CHI;Lu;0;L;;;;;N;;;;AB53;
+A7B4;LATIN CAPITAL LETTER BETA;Lu;0;L;;;;;N;;;;A7B5;
+A7B5;LATIN SMALL LETTER BETA;Ll;0;L;;;;;N;;;A7B4;;A7B4
+A7B6;LATIN CAPITAL LETTER OMEGA;Lu;0;L;;;;;N;;;;A7B7;
+A7B7;LATIN SMALL LETTER OMEGA;Ll;0;L;;;;;N;;;A7B6;;A7B6
 A7F7;LATIN EPIGRAPHIC LETTER SIDEWAYS I;Lo;0;L;;;;;N;;;;;
 A7F8;MODIFIER LETTER CAPITAL H WITH STROKE;Lm;0;L;<super> 0126;;;;N;;;;;
 A7F9;MODIFIER LETTER SMALL LIGATURE OE;Lm;0;L;<super> 0153;;;;N;;;;;
@@ -14097,6 +14125,8 @@
 A8F9;DEVANAGARI GAP FILLER;Po;0;L;;;;;N;;;;;
 A8FA;DEVANAGARI CARET;Po;0;L;;;;;N;;;;;
 A8FB;DEVANAGARI HEADSTROKE;Lo;0;L;;;;;N;;;;;
+A8FC;DEVANAGARI SIGN SIDDHAM;Po;0;L;;;;;N;;;;;
+A8FD;DEVANAGARI JAIN OM;Lo;0;L;;;;;N;;;;;
 A900;KAYAH LI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
 A901;KAYAH LI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
 A902;KAYAH LI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
@@ -14610,7 +14640,7 @@
 AB50;LATIN SMALL LETTER UI;Ll;0;L;;;;;N;;;;;
 AB51;LATIN SMALL LETTER TURNED UI;Ll;0;L;;;;;N;;;;;
 AB52;LATIN SMALL LETTER U WITH LEFT HOOK;Ll;0;L;;;;;N;;;;;
-AB53;LATIN SMALL LETTER CHI;Ll;0;L;;;;;N;;;;;
+AB53;LATIN SMALL LETTER CHI;Ll;0;L;;;;;N;;;A7B3;;A7B3
 AB54;LATIN SMALL LETTER CHI WITH LOW RIGHT RING;Ll;0;L;;;;;N;;;;;
 AB55;LATIN SMALL LETTER CHI WITH LOW LEFT SERIF;Ll;0;L;;;;;N;;;;;
 AB56;LATIN SMALL LETTER X WITH LOW RIGHT RING;Ll;0;L;;;;;N;;;;;
@@ -14623,8 +14653,92 @@
 AB5D;MODIFIER LETTER SMALL L WITH INVERTED LAZY S;Lm;0;L;<super> AB37;;;;N;;;;;
 AB5E;MODIFIER LETTER SMALL L WITH MIDDLE TILDE;Lm;0;L;<super> 026B;;;;N;;;;;
 AB5F;MODIFIER LETTER SMALL U WITH LEFT HOOK;Lm;0;L;<super> AB52;;;;N;;;;;
+AB60;LATIN SMALL LETTER SAKHA YAT;Ll;0;L;;;;;N;;;;;
+AB61;LATIN SMALL LETTER IOTIFIED E;Ll;0;L;;;;;N;;;;;
+AB62;LATIN SMALL LETTER OPEN OE;Ll;0;L;;;;;N;;;;;
+AB63;LATIN SMALL LETTER UO;Ll;0;L;;;;;N;;;;;
 AB64;LATIN SMALL LETTER INVERTED ALPHA;Ll;0;L;;;;;N;;;;;
 AB65;GREEK LETTER SMALL CAPITAL OMEGA;Ll;0;L;;;;;N;;;;;
+AB70;CHEROKEE SMALL LETTER A;Ll;0;L;;;;;N;;;13A0;;13A0
+AB71;CHEROKEE SMALL LETTER E;Ll;0;L;;;;;N;;;13A1;;13A1
+AB72;CHEROKEE SMALL LETTER I;Ll;0;L;;;;;N;;;13A2;;13A2
+AB73;CHEROKEE SMALL LETTER O;Ll;0;L;;;;;N;;;13A3;;13A3
+AB74;CHEROKEE SMALL LETTER U;Ll;0;L;;;;;N;;;13A4;;13A4
+AB75;CHEROKEE SMALL LETTER V;Ll;0;L;;;;;N;;;13A5;;13A5
+AB76;CHEROKEE SMALL LETTER GA;Ll;0;L;;;;;N;;;13A6;;13A6
+AB77;CHEROKEE SMALL LETTER KA;Ll;0;L;;;;;N;;;13A7;;13A7
+AB78;CHEROKEE SMALL LETTER GE;Ll;0;L;;;;;N;;;13A8;;13A8
+AB79;CHEROKEE SMALL LETTER GI;Ll;0;L;;;;;N;;;13A9;;13A9
+AB7A;CHEROKEE SMALL LETTER GO;Ll;0;L;;;;;N;;;13AA;;13AA
+AB7B;CHEROKEE SMALL LETTER GU;Ll;0;L;;;;;N;;;13AB;;13AB
+AB7C;CHEROKEE SMALL LETTER GV;Ll;0;L;;;;;N;;;13AC;;13AC
+AB7D;CHEROKEE SMALL LETTER HA;Ll;0;L;;;;;N;;;13AD;;13AD
+AB7E;CHEROKEE SMALL LETTER HE;Ll;0;L;;;;;N;;;13AE;;13AE
+AB7F;CHEROKEE SMALL LETTER HI;Ll;0;L;;;;;N;;;13AF;;13AF
+AB80;CHEROKEE SMALL LETTER HO;Ll;0;L;;;;;N;;;13B0;;13B0
+AB81;CHEROKEE SMALL LETTER HU;Ll;0;L;;;;;N;;;13B1;;13B1
+AB82;CHEROKEE SMALL LETTER HV;Ll;0;L;;;;;N;;;13B2;;13B2
+AB83;CHEROKEE SMALL LETTER LA;Ll;0;L;;;;;N;;;13B3;;13B3
+AB84;CHEROKEE SMALL LETTER LE;Ll;0;L;;;;;N;;;13B4;;13B4
+AB85;CHEROKEE SMALL LETTER LI;Ll;0;L;;;;;N;;;13B5;;13B5
+AB86;CHEROKEE SMALL LETTER LO;Ll;0;L;;;;;N;;;13B6;;13B6
+AB87;CHEROKEE SMALL LETTER LU;Ll;0;L;;;;;N;;;13B7;;13B7
+AB88;CHEROKEE SMALL LETTER LV;Ll;0;L;;;;;N;;;13B8;;13B8
+AB89;CHEROKEE SMALL LETTER MA;Ll;0;L;;;;;N;;;13B9;;13B9
+AB8A;CHEROKEE SMALL LETTER ME;Ll;0;L;;;;;N;;;13BA;;13BA
+AB8B;CHEROKEE SMALL LETTER MI;Ll;0;L;;;;;N;;;13BB;;13BB
+AB8C;CHEROKEE SMALL LETTER MO;Ll;0;L;;;;;N;;;13BC;;13BC
+AB8D;CHEROKEE SMALL LETTER MU;Ll;0;L;;;;;N;;;13BD;;13BD
+AB8E;CHEROKEE SMALL LETTER NA;Ll;0;L;;;;;N;;;13BE;;13BE
+AB8F;CHEROKEE SMALL LETTER HNA;Ll;0;L;;;;;N;;;13BF;;13BF
+AB90;CHEROKEE SMALL LETTER NAH;Ll;0;L;;;;;N;;;13C0;;13C0
+AB91;CHEROKEE SMALL LETTER NE;Ll;0;L;;;;;N;;;13C1;;13C1
+AB92;CHEROKEE SMALL LETTER NI;Ll;0;L;;;;;N;;;13C2;;13C2
+AB93;CHEROKEE SMALL LETTER NO;Ll;0;L;;;;;N;;;13C3;;13C3
+AB94;CHEROKEE SMALL LETTER NU;Ll;0;L;;;;;N;;;13C4;;13C4
+AB95;CHEROKEE SMALL LETTER NV;Ll;0;L;;;;;N;;;13C5;;13C5
+AB96;CHEROKEE SMALL LETTER QUA;Ll;0;L;;;;;N;;;13C6;;13C6
+AB97;CHEROKEE SMALL LETTER QUE;Ll;0;L;;;;;N;;;13C7;;13C7
+AB98;CHEROKEE SMALL LETTER QUI;Ll;0;L;;;;;N;;;13C8;;13C8
+AB99;CHEROKEE SMALL LETTER QUO;Ll;0;L;;;;;N;;;13C9;;13C9
+AB9A;CHEROKEE SMALL LETTER QUU;Ll;0;L;;;;;N;;;13CA;;13CA
+AB9B;CHEROKEE SMALL LETTER QUV;Ll;0;L;;;;;N;;;13CB;;13CB
+AB9C;CHEROKEE SMALL LETTER SA;Ll;0;L;;;;;N;;;13CC;;13CC
+AB9D;CHEROKEE SMALL LETTER S;Ll;0;L;;;;;N;;;13CD;;13CD
+AB9E;CHEROKEE SMALL LETTER SE;Ll;0;L;;;;;N;;;13CE;;13CE
+AB9F;CHEROKEE SMALL LETTER SI;Ll;0;L;;;;;N;;;13CF;;13CF
+ABA0;CHEROKEE SMALL LETTER SO;Ll;0;L;;;;;N;;;13D0;;13D0
+ABA1;CHEROKEE SMALL LETTER SU;Ll;0;L;;;;;N;;;13D1;;13D1
+ABA2;CHEROKEE SMALL LETTER SV;Ll;0;L;;;;;N;;;13D2;;13D2
+ABA3;CHEROKEE SMALL LETTER DA;Ll;0;L;;;;;N;;;13D3;;13D3
+ABA4;CHEROKEE SMALL LETTER TA;Ll;0;L;;;;;N;;;13D4;;13D4
+ABA5;CHEROKEE SMALL LETTER DE;Ll;0;L;;;;;N;;;13D5;;13D5
+ABA6;CHEROKEE SMALL LETTER TE;Ll;0;L;;;;;N;;;13D6;;13D6
+ABA7;CHEROKEE SMALL LETTER DI;Ll;0;L;;;;;N;;;13D7;;13D7
+ABA8;CHEROKEE SMALL LETTER TI;Ll;0;L;;;;;N;;;13D8;;13D8
+ABA9;CHEROKEE SMALL LETTER DO;Ll;0;L;;;;;N;;;13D9;;13D9
+ABAA;CHEROKEE SMALL LETTER DU;Ll;0;L;;;;;N;;;13DA;;13DA
+ABAB;CHEROKEE SMALL LETTER DV;Ll;0;L;;;;;N;;;13DB;;13DB
+ABAC;CHEROKEE SMALL LETTER DLA;Ll;0;L;;;;;N;;;13DC;;13DC
+ABAD;CHEROKEE SMALL LETTER TLA;Ll;0;L;;;;;N;;;13DD;;13DD
+ABAE;CHEROKEE SMALL LETTER TLE;Ll;0;L;;;;;N;;;13DE;;13DE
+ABAF;CHEROKEE SMALL LETTER TLI;Ll;0;L;;;;;N;;;13DF;;13DF
+ABB0;CHEROKEE SMALL LETTER TLO;Ll;0;L;;;;;N;;;13E0;;13E0
+ABB1;CHEROKEE SMALL LETTER TLU;Ll;0;L;;;;;N;;;13E1;;13E1
+ABB2;CHEROKEE SMALL LETTER TLV;Ll;0;L;;;;;N;;;13E2;;13E2
+ABB3;CHEROKEE SMALL LETTER TSA;Ll;0;L;;;;;N;;;13E3;;13E3
+ABB4;CHEROKEE SMALL LETTER TSE;Ll;0;L;;;;;N;;;13E4;;13E4
+ABB5;CHEROKEE SMALL LETTER TSI;Ll;0;L;;;;;N;;;13E5;;13E5
+ABB6;CHEROKEE SMALL LETTER TSO;Ll;0;L;;;;;N;;;13E6;;13E6
+ABB7;CHEROKEE SMALL LETTER TSU;Ll;0;L;;;;;N;;;13E7;;13E7
+ABB8;CHEROKEE SMALL LETTER TSV;Ll;0;L;;;;;N;;;13E8;;13E8
+ABB9;CHEROKEE SMALL LETTER WA;Ll;0;L;;;;;N;;;13E9;;13E9
+ABBA;CHEROKEE SMALL LETTER WE;Ll;0;L;;;;;N;;;13EA;;13EA
+ABBB;CHEROKEE SMALL LETTER WI;Ll;0;L;;;;;N;;;13EB;;13EB
+ABBC;CHEROKEE SMALL LETTER WO;Ll;0;L;;;;;N;;;13EC;;13EC
+ABBD;CHEROKEE SMALL LETTER WU;Ll;0;L;;;;;N;;;13ED;;13ED
+ABBE;CHEROKEE SMALL LETTER WV;Ll;0;L;;;;;N;;;13EE;;13EE
+ABBF;CHEROKEE SMALL LETTER YA;Ll;0;L;;;;;N;;;13EF;;13EF
 ABC0;MEETEI MAYEK LETTER KOK;Lo;0;L;;;;;N;;;;;
 ABC1;MEETEI MAYEK LETTER SAM;Lo;0;L;;;;;N;;;;;
 ABC2;MEETEI MAYEK LETTER LAI;Lo;0;L;;;;;N;;;;;
@@ -15944,6 +16058,8 @@
 FE2B;COMBINING MACRON LEFT HALF BELOW;Mn;220;NSM;;;;;N;;;;;
 FE2C;COMBINING MACRON RIGHT HALF BELOW;Mn;220;NSM;;;;;N;;;;;
 FE2D;COMBINING CONJOINING MACRON BELOW;Mn;220;NSM;;;;;N;;;;;
+FE2E;COMBINING CYRILLIC TITLO LEFT HALF;Mn;230;NSM;;;;;N;;;;;
+FE2F;COMBINING CYRILLIC TITLO RIGHT HALF;Mn;230;NSM;;;;;N;;;;;
 FE30;PRESENTATION FORM FOR VERTICAL TWO DOT LEADER;Po;0;ON;<vertical> 2025;;;;N;GLYPH FOR VERTICAL TWO DOT LEADER;;;;
 FE31;PRESENTATION FORM FOR VERTICAL EM DASH;Pd;0;ON;<vertical> 2014;;;;N;GLYPH FOR VERTICAL EM DASH;;;;
 FE32;PRESENTATION FORM FOR VERTICAL EN DASH;Pd;0;ON;<vertical> 2013;;;;N;GLYPH FOR VERTICAL EN DASH;;;;
@@ -17830,6 +17946,32 @@
 108AD;NABATAEAN NUMBER TEN;No;0;R;;;;10;N;;;;;
 108AE;NABATAEAN NUMBER TWENTY;No;0;R;;;;20;N;;;;;
 108AF;NABATAEAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;;
+108E0;HATRAN LETTER ALEPH;Lo;0;R;;;;;N;;;;;
+108E1;HATRAN LETTER BETH;Lo;0;R;;;;;N;;;;;
+108E2;HATRAN LETTER GIMEL;Lo;0;R;;;;;N;;;;;
+108E3;HATRAN LETTER DALETH-RESH;Lo;0;R;;;;;N;;;;;
+108E4;HATRAN LETTER HE;Lo;0;R;;;;;N;;;;;
+108E5;HATRAN LETTER WAW;Lo;0;R;;;;;N;;;;;
+108E6;HATRAN LETTER ZAYN;Lo;0;R;;;;;N;;;;;
+108E7;HATRAN LETTER HETH;Lo;0;R;;;;;N;;;;;
+108E8;HATRAN LETTER TETH;Lo;0;R;;;;;N;;;;;
+108E9;HATRAN LETTER YODH;Lo;0;R;;;;;N;;;;;
+108EA;HATRAN LETTER KAPH;Lo;0;R;;;;;N;;;;;
+108EB;HATRAN LETTER LAMEDH;Lo;0;R;;;;;N;;;;;
+108EC;HATRAN LETTER MEM;Lo;0;R;;;;;N;;;;;
+108ED;HATRAN LETTER NUN;Lo;0;R;;;;;N;;;;;
+108EE;HATRAN LETTER SAMEKH;Lo;0;R;;;;;N;;;;;
+108EF;HATRAN LETTER AYN;Lo;0;R;;;;;N;;;;;
+108F0;HATRAN LETTER PE;Lo;0;R;;;;;N;;;;;
+108F1;HATRAN LETTER SADHE;Lo;0;R;;;;;N;;;;;
+108F2;HATRAN LETTER QOPH;Lo;0;R;;;;;N;;;;;
+108F4;HATRAN LETTER SHIN;Lo;0;R;;;;;N;;;;;
+108F5;HATRAN LETTER TAW;Lo;0;R;;;;;N;;;;;
+108FB;HATRAN NUMBER ONE;No;0;R;;;;1;N;;;;;
+108FC;HATRAN NUMBER FIVE;No;0;R;;;;5;N;;;;;
+108FD;HATRAN NUMBER TEN;No;0;R;;;;10;N;;;;;
+108FE;HATRAN NUMBER TWENTY;No;0;R;;;;20;N;;;;;
+108FF;HATRAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;;
 10900;PHOENICIAN LETTER ALF;Lo;0;R;;;;;N;;;;;
 10901;PHOENICIAN LETTER BET;Lo;0;R;;;;;N;;;;;
 10902;PHOENICIAN LETTER GAML;Lo;0;R;;;;;N;;;;;
@@ -17942,8 +18084,72 @@
 109B5;MEROITIC CURSIVE LETTER TE;Lo;0;R;;;;;N;;;;;
 109B6;MEROITIC CURSIVE LETTER TO;Lo;0;R;;;;;N;;;;;
 109B7;MEROITIC CURSIVE LETTER DA;Lo;0;R;;;;;N;;;;;
+109BC;MEROITIC CURSIVE FRACTION ELEVEN TWELFTHS;No;0;R;;;;11/12;N;;;;;
+109BD;MEROITIC CURSIVE FRACTION ONE HALF;No;0;R;;;;1/2;N;;;;;
 109BE;MEROITIC CURSIVE LOGOGRAM RMT;Lo;0;R;;;;;N;;;;;
 109BF;MEROITIC CURSIVE LOGOGRAM IMN;Lo;0;R;;;;;N;;;;;
+109C0;MEROITIC CURSIVE NUMBER ONE;No;0;R;;;;1;N;;;;;
+109C1;MEROITIC CURSIVE NUMBER TWO;No;0;R;;;;2;N;;;;;
+109C2;MEROITIC CURSIVE NUMBER THREE;No;0;R;;;;3;N;;;;;
+109C3;MEROITIC CURSIVE NUMBER FOUR;No;0;R;;;;4;N;;;;;
+109C4;MEROITIC CURSIVE NUMBER FIVE;No;0;R;;;;5;N;;;;;
+109C5;MEROITIC CURSIVE NUMBER SIX;No;0;R;;;;6;N;;;;;
+109C6;MEROITIC CURSIVE NUMBER SEVEN;No;0;R;;;;7;N;;;;;
+109C7;MEROITIC CURSIVE NUMBER EIGHT;No;0;R;;;;8;N;;;;;
+109C8;MEROITIC CURSIVE NUMBER NINE;No;0;R;;;;9;N;;;;;
+109C9;MEROITIC CURSIVE NUMBER TEN;No;0;R;;;;10;N;;;;;
+109CA;MEROITIC CURSIVE NUMBER TWENTY;No;0;R;;;;20;N;;;;;
+109CB;MEROITIC CURSIVE NUMBER THIRTY;No;0;R;;;;30;N;;;;;
+109CC;MEROITIC CURSIVE NUMBER FORTY;No;0;R;;;;40;N;;;;;
+109CD;MEROITIC CURSIVE NUMBER FIFTY;No;0;R;;;;50;N;;;;;
+109CE;MEROITIC CURSIVE NUMBER SIXTY;No;0;R;;;;60;N;;;;;
+109CF;MEROITIC CURSIVE NUMBER SEVENTY;No;0;R;;;;70;N;;;;;
+109D2;MEROITIC CURSIVE NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;;
+109D3;MEROITIC CURSIVE NUMBER TWO HUNDRED;No;0;R;;;;200;N;;;;;
+109D4;MEROITIC CURSIVE NUMBER THREE HUNDRED;No;0;R;;;;300;N;;;;;
+109D5;MEROITIC CURSIVE NUMBER FOUR HUNDRED;No;0;R;;;;400;N;;;;;
+109D6;MEROITIC CURSIVE NUMBER FIVE HUNDRED;No;0;R;;;;500;N;;;;;
+109D7;MEROITIC CURSIVE NUMBER SIX HUNDRED;No;0;R;;;;600;N;;;;;
+109D8;MEROITIC CURSIVE NUMBER SEVEN HUNDRED;No;0;R;;;;700;N;;;;;
+109D9;MEROITIC CURSIVE NUMBER EIGHT HUNDRED;No;0;R;;;;800;N;;;;;
+109DA;MEROITIC CURSIVE NUMBER NINE HUNDRED;No;0;R;;;;900;N;;;;;
+109DB;MEROITIC CURSIVE NUMBER ONE THOUSAND;No;0;R;;;;1000;N;;;;;
+109DC;MEROITIC CURSIVE NUMBER TWO THOUSAND;No;0;R;;;;2000;N;;;;;
+109DD;MEROITIC CURSIVE NUMBER THREE THOUSAND;No;0;R;;;;3000;N;;;;;
+109DE;MEROITIC CURSIVE NUMBER FOUR THOUSAND;No;0;R;;;;4000;N;;;;;
+109DF;MEROITIC CURSIVE NUMBER FIVE THOUSAND;No;0;R;;;;5000;N;;;;;
+109E0;MEROITIC CURSIVE NUMBER SIX THOUSAND;No;0;R;;;;6000;N;;;;;
+109E1;MEROITIC CURSIVE NUMBER SEVEN THOUSAND;No;0;R;;;;7000;N;;;;;
+109E2;MEROITIC CURSIVE NUMBER EIGHT THOUSAND;No;0;R;;;;8000;N;;;;;
+109E3;MEROITIC CURSIVE NUMBER NINE THOUSAND;No;0;R;;;;9000;N;;;;;
+109E4;MEROITIC CURSIVE NUMBER TEN THOUSAND;No;0;R;;;;10000;N;;;;;
+109E5;MEROITIC CURSIVE NUMBER TWENTY THOUSAND;No;0;R;;;;20000;N;;;;;
+109E6;MEROITIC CURSIVE NUMBER THIRTY THOUSAND;No;0;R;;;;30000;N;;;;;
+109E7;MEROITIC CURSIVE NUMBER FORTY THOUSAND;No;0;R;;;;40000;N;;;;;
+109E8;MEROITIC CURSIVE NUMBER FIFTY THOUSAND;No;0;R;;;;50000;N;;;;;
+109E9;MEROITIC CURSIVE NUMBER SIXTY THOUSAND;No;0;R;;;;60000;N;;;;;
+109EA;MEROITIC CURSIVE NUMBER SEVENTY THOUSAND;No;0;R;;;;70000;N;;;;;
+109EB;MEROITIC CURSIVE NUMBER EIGHTY THOUSAND;No;0;R;;;;80000;N;;;;;
+109EC;MEROITIC CURSIVE NUMBER NINETY THOUSAND;No;0;R;;;;90000;N;;;;;
+109ED;MEROITIC CURSIVE NUMBER ONE HUNDRED THOUSAND;No;0;R;;;;100000;N;;;;;
+109EE;MEROITIC CURSIVE NUMBER TWO HUNDRED THOUSAND;No;0;R;;;;200000;N;;;;;
+109EF;MEROITIC CURSIVE NUMBER THREE HUNDRED THOUSAND;No;0;R;;;;300000;N;;;;;
+109F0;MEROITIC CURSIVE NUMBER FOUR HUNDRED THOUSAND;No;0;R;;;;400000;N;;;;;
+109F1;MEROITIC CURSIVE NUMBER FIVE HUNDRED THOUSAND;No;0;R;;;;500000;N;;;;;
+109F2;MEROITIC CURSIVE NUMBER SIX HUNDRED THOUSAND;No;0;R;;;;600000;N;;;;;
+109F3;MEROITIC CURSIVE NUMBER SEVEN HUNDRED THOUSAND;No;0;R;;;;700000;N;;;;;
+109F4;MEROITIC CURSIVE NUMBER EIGHT HUNDRED THOUSAND;No;0;R;;;;800000;N;;;;;
+109F5;MEROITIC CURSIVE NUMBER NINE HUNDRED THOUSAND;No;0;R;;;;900000;N;;;;;
+109F6;MEROITIC CURSIVE FRACTION ONE TWELFTH;No;0;R;;;;1/12;N;;;;;
+109F7;MEROITIC CURSIVE FRACTION TWO TWELFTHS;No;0;R;;;;2/12;N;;;;;
+109F8;MEROITIC CURSIVE FRACTION THREE TWELFTHS;No;0;R;;;;3/12;N;;;;;
+109F9;MEROITIC CURSIVE FRACTION FOUR TWELFTHS;No;0;R;;;;4/12;N;;;;;
+109FA;MEROITIC CURSIVE FRACTION FIVE TWELFTHS;No;0;R;;;;5/12;N;;;;;
+109FB;MEROITIC CURSIVE FRACTION SIX TWELFTHS;No;0;R;;;;6/12;N;;;;;
+109FC;MEROITIC CURSIVE FRACTION SEVEN TWELFTHS;No;0;R;;;;7/12;N;;;;;
+109FD;MEROITIC CURSIVE FRACTION EIGHT TWELFTHS;No;0;R;;;;8/12;N;;;;;
+109FE;MEROITIC CURSIVE FRACTION NINE TWELFTHS;No;0;R;;;;9/12;N;;;;;
+109FF;MEROITIC CURSIVE FRACTION TEN TWELFTHS;No;0;R;;;;10/12;N;;;;;
 10A00;KHAROSHTHI LETTER A;Lo;0;R;;;;;N;;;;;
 10A01;KHAROSHTHI VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;;
 10A02;KHAROSHTHI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;;
@@ -18344,6 +18550,114 @@
 10C46;OLD TURKIC LETTER YENISEI AET;Lo;0;R;;;;;N;;;;;
 10C47;OLD TURKIC LETTER ORKHON OT;Lo;0;R;;;;;N;;;;;
 10C48;OLD TURKIC LETTER ORKHON BASH;Lo;0;R;;;;;N;;;;;
+10C80;OLD HUNGARIAN CAPITAL LETTER A;Lu;0;R;;;;;N;;;;10CC0;
+10C81;OLD HUNGARIAN CAPITAL LETTER AA;Lu;0;R;;;;;N;;;;10CC1;
+10C82;OLD HUNGARIAN CAPITAL LETTER EB;Lu;0;R;;;;;N;;;;10CC2;
+10C83;OLD HUNGARIAN CAPITAL LETTER AMB;Lu;0;R;;;;;N;;;;10CC3;
+10C84;OLD HUNGARIAN CAPITAL LETTER EC;Lu;0;R;;;;;N;;;;10CC4;
+10C85;OLD HUNGARIAN CAPITAL LETTER ENC;Lu;0;R;;;;;N;;;;10CC5;
+10C86;OLD HUNGARIAN CAPITAL LETTER ECS;Lu;0;R;;;;;N;;;;10CC6;
+10C87;OLD HUNGARIAN CAPITAL LETTER ED;Lu;0;R;;;;;N;;;;10CC7;
+10C88;OLD HUNGARIAN CAPITAL LETTER AND;Lu;0;R;;;;;N;;;;10CC8;
+10C89;OLD HUNGARIAN CAPITAL LETTER E;Lu;0;R;;;;;N;;;;10CC9;
+10C8A;OLD HUNGARIAN CAPITAL LETTER CLOSE E;Lu;0;R;;;;;N;;;;10CCA;
+10C8B;OLD HUNGARIAN CAPITAL LETTER EE;Lu;0;R;;;;;N;;;;10CCB;
+10C8C;OLD HUNGARIAN CAPITAL LETTER EF;Lu;0;R;;;;;N;;;;10CCC;
+10C8D;OLD HUNGARIAN CAPITAL LETTER EG;Lu;0;R;;;;;N;;;;10CCD;
+10C8E;OLD HUNGARIAN CAPITAL LETTER EGY;Lu;0;R;;;;;N;;;;10CCE;
+10C8F;OLD HUNGARIAN CAPITAL LETTER EH;Lu;0;R;;;;;N;;;;10CCF;
+10C90;OLD HUNGARIAN CAPITAL LETTER I;Lu;0;R;;;;;N;;;;10CD0;
+10C91;OLD HUNGARIAN CAPITAL LETTER II;Lu;0;R;;;;;N;;;;10CD1;
+10C92;OLD HUNGARIAN CAPITAL LETTER EJ;Lu;0;R;;;;;N;;;;10CD2;
+10C93;OLD HUNGARIAN CAPITAL LETTER EK;Lu;0;R;;;;;N;;;;10CD3;
+10C94;OLD HUNGARIAN CAPITAL LETTER AK;Lu;0;R;;;;;N;;;;10CD4;
+10C95;OLD HUNGARIAN CAPITAL LETTER UNK;Lu;0;R;;;;;N;;;;10CD5;
+10C96;OLD HUNGARIAN CAPITAL LETTER EL;Lu;0;R;;;;;N;;;;10CD6;
+10C97;OLD HUNGARIAN CAPITAL LETTER ELY;Lu;0;R;;;;;N;;;;10CD7;
+10C98;OLD HUNGARIAN CAPITAL LETTER EM;Lu;0;R;;;;;N;;;;10CD8;
+10C99;OLD HUNGARIAN CAPITAL LETTER EN;Lu;0;R;;;;;N;;;;10CD9;
+10C9A;OLD HUNGARIAN CAPITAL LETTER ENY;Lu;0;R;;;;;N;;;;10CDA;
+10C9B;OLD HUNGARIAN CAPITAL LETTER O;Lu;0;R;;;;;N;;;;10CDB;
+10C9C;OLD HUNGARIAN CAPITAL LETTER OO;Lu;0;R;;;;;N;;;;10CDC;
+10C9D;OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG OE;Lu;0;R;;;;;N;;;;10CDD;
+10C9E;OLD HUNGARIAN CAPITAL LETTER RUDIMENTA OE;Lu;0;R;;;;;N;;;;10CDE;
+10C9F;OLD HUNGARIAN CAPITAL LETTER OEE;Lu;0;R;;;;;N;;;;10CDF;
+10CA0;OLD HUNGARIAN CAPITAL LETTER EP;Lu;0;R;;;;;N;;;;10CE0;
+10CA1;OLD HUNGARIAN CAPITAL LETTER EMP;Lu;0;R;;;;;N;;;;10CE1;
+10CA2;OLD HUNGARIAN CAPITAL LETTER ER;Lu;0;R;;;;;N;;;;10CE2;
+10CA3;OLD HUNGARIAN CAPITAL LETTER SHORT ER;Lu;0;R;;;;;N;;;;10CE3;
+10CA4;OLD HUNGARIAN CAPITAL LETTER ES;Lu;0;R;;;;;N;;;;10CE4;
+10CA5;OLD HUNGARIAN CAPITAL LETTER ESZ;Lu;0;R;;;;;N;;;;10CE5;
+10CA6;OLD HUNGARIAN CAPITAL LETTER ET;Lu;0;R;;;;;N;;;;10CE6;
+10CA7;OLD HUNGARIAN CAPITAL LETTER ENT;Lu;0;R;;;;;N;;;;10CE7;
+10CA8;OLD HUNGARIAN CAPITAL LETTER ETY;Lu;0;R;;;;;N;;;;10CE8;
+10CA9;OLD HUNGARIAN CAPITAL LETTER ECH;Lu;0;R;;;;;N;;;;10CE9;
+10CAA;OLD HUNGARIAN CAPITAL LETTER U;Lu;0;R;;;;;N;;;;10CEA;
+10CAB;OLD HUNGARIAN CAPITAL LETTER UU;Lu;0;R;;;;;N;;;;10CEB;
+10CAC;OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG UE;Lu;0;R;;;;;N;;;;10CEC;
+10CAD;OLD HUNGARIAN CAPITAL LETTER RUDIMENTA UE;Lu;0;R;;;;;N;;;;10CED;
+10CAE;OLD HUNGARIAN CAPITAL LETTER EV;Lu;0;R;;;;;N;;;;10CEE;
+10CAF;OLD HUNGARIAN CAPITAL LETTER EZ;Lu;0;R;;;;;N;;;;10CEF;
+10CB0;OLD HUNGARIAN CAPITAL LETTER EZS;Lu;0;R;;;;;N;;;;10CF0;
+10CB1;OLD HUNGARIAN CAPITAL LETTER ENT-SHAPED SIGN;Lu;0;R;;;;;N;;;;10CF1;
+10CB2;OLD HUNGARIAN CAPITAL LETTER US;Lu;0;R;;;;;N;;;;10CF2;
+10CC0;OLD HUNGARIAN SMALL LETTER A;Ll;0;R;;;;;N;;;10C80;;10C80
+10CC1;OLD HUNGARIAN SMALL LETTER AA;Ll;0;R;;;;;N;;;10C81;;10C81
+10CC2;OLD HUNGARIAN SMALL LETTER EB;Ll;0;R;;;;;N;;;10C82;;10C82
+10CC3;OLD HUNGARIAN SMALL LETTER AMB;Ll;0;R;;;;;N;;;10C83;;10C83
+10CC4;OLD HUNGARIAN SMALL LETTER EC;Ll;0;R;;;;;N;;;10C84;;10C84
+10CC5;OLD HUNGARIAN SMALL LETTER ENC;Ll;0;R;;;;;N;;;10C85;;10C85
+10CC6;OLD HUNGARIAN SMALL LETTER ECS;Ll;0;R;;;;;N;;;10C86;;10C86
+10CC7;OLD HUNGARIAN SMALL LETTER ED;Ll;0;R;;;;;N;;;10C87;;10C87
+10CC8;OLD HUNGARIAN SMALL LETTER AND;Ll;0;R;;;;;N;;;10C88;;10C88
+10CC9;OLD HUNGARIAN SMALL LETTER E;Ll;0;R;;;;;N;;;10C89;;10C89
+10CCA;OLD HUNGARIAN SMALL LETTER CLOSE E;Ll;0;R;;;;;N;;;10C8A;;10C8A
+10CCB;OLD HUNGARIAN SMALL LETTER EE;Ll;0;R;;;;;N;;;10C8B;;10C8B
+10CCC;OLD HUNGARIAN SMALL LETTER EF;Ll;0;R;;;;;N;;;10C8C;;10C8C
+10CCD;OLD HUNGARIAN SMALL LETTER EG;Ll;0;R;;;;;N;;;10C8D;;10C8D
+10CCE;OLD HUNGARIAN SMALL LETTER EGY;Ll;0;R;;;;;N;;;10C8E;;10C8E
+10CCF;OLD HUNGARIAN SMALL LETTER EH;Ll;0;R;;;;;N;;;10C8F;;10C8F
+10CD0;OLD HUNGARIAN SMALL LETTER I;Ll;0;R;;;;;N;;;10C90;;10C90
+10CD1;OLD HUNGARIAN SMALL LETTER II;Ll;0;R;;;;;N;;;10C91;;10C91
+10CD2;OLD HUNGARIAN SMALL LETTER EJ;Ll;0;R;;;;;N;;;10C92;;10C92
+10CD3;OLD HUNGARIAN SMALL LETTER EK;Ll;0;R;;;;;N;;;10C93;;10C93
+10CD4;OLD HUNGARIAN SMALL LETTER AK;Ll;0;R;;;;;N;;;10C94;;10C94
+10CD5;OLD HUNGARIAN SMALL LETTER UNK;Ll;0;R;;;;;N;;;10C95;;10C95
+10CD6;OLD HUNGARIAN SMALL LETTER EL;Ll;0;R;;;;;N;;;10C96;;10C96
+10CD7;OLD HUNGARIAN SMALL LETTER ELY;Ll;0;R;;;;;N;;;10C97;;10C97
+10CD8;OLD HUNGARIAN SMALL LETTER EM;Ll;0;R;;;;;N;;;10C98;;10C98
+10CD9;OLD HUNGARIAN SMALL LETTER EN;Ll;0;R;;;;;N;;;10C99;;10C99
+10CDA;OLD HUNGARIAN SMALL LETTER ENY;Ll;0;R;;;;;N;;;10C9A;;10C9A
+10CDB;OLD HUNGARIAN SMALL LETTER O;Ll;0;R;;;;;N;;;10C9B;;10C9B
+10CDC;OLD HUNGARIAN SMALL LETTER OO;Ll;0;R;;;;;N;;;10C9C;;10C9C
+10CDD;OLD HUNGARIAN SMALL LETTER NIKOLSBURG OE;Ll;0;R;;;;;N;;;10C9D;;10C9D
+10CDE;OLD HUNGARIAN SMALL LETTER RUDIMENTA OE;Ll;0;R;;;;;N;;;10C9E;;10C9E
+10CDF;OLD HUNGARIAN SMALL LETTER OEE;Ll;0;R;;;;;N;;;10C9F;;10C9F
+10CE0;OLD HUNGARIAN SMALL LETTER EP;Ll;0;R;;;;;N;;;10CA0;;10CA0
+10CE1;OLD HUNGARIAN SMALL LETTER EMP;Ll;0;R;;;;;N;;;10CA1;;10CA1
+10CE2;OLD HUNGARIAN SMALL LETTER ER;Ll;0;R;;;;;N;;;10CA2;;10CA2
+10CE3;OLD HUNGARIAN SMALL LETTER SHORT ER;Ll;0;R;;;;;N;;;10CA3;;10CA3
+10CE4;OLD HUNGARIAN SMALL LETTER ES;Ll;0;R;;;;;N;;;10CA4;;10CA4
+10CE5;OLD HUNGARIAN SMALL LETTER ESZ;Ll;0;R;;;;;N;;;10CA5;;10CA5
+10CE6;OLD HUNGARIAN SMALL LETTER ET;Ll;0;R;;;;;N;;;10CA6;;10CA6
+10CE7;OLD HUNGARIAN SMALL LETTER ENT;Ll;0;R;;;;;N;;;10CA7;;10CA7
+10CE8;OLD HUNGARIAN SMALL LETTER ETY;Ll;0;R;;;;;N;;;10CA8;;10CA8
+10CE9;OLD HUNGARIAN SMALL LETTER ECH;Ll;0;R;;;;;N;;;10CA9;;10CA9
+10CEA;OLD HUNGARIAN SMALL LETTER U;Ll;0;R;;;;;N;;;10CAA;;10CAA
+10CEB;OLD HUNGARIAN SMALL LETTER UU;Ll;0;R;;;;;N;;;10CAB;;10CAB
+10CEC;OLD HUNGARIAN SMALL LETTER NIKOLSBURG UE;Ll;0;R;;;;;N;;;10CAC;;10CAC
+10CED;OLD HUNGARIAN SMALL LETTER RUDIMENTA UE;Ll;0;R;;;;;N;;;10CAD;;10CAD
+10CEE;OLD HUNGARIAN SMALL LETTER EV;Ll;0;R;;;;;N;;;10CAE;;10CAE
+10CEF;OLD HUNGARIAN SMALL LETTER EZ;Ll;0;R;;;;;N;;;10CAF;;10CAF
+10CF0;OLD HUNGARIAN SMALL LETTER EZS;Ll;0;R;;;;;N;;;10CB0;;10CB0
+10CF1;OLD HUNGARIAN SMALL LETTER ENT-SHAPED SIGN;Ll;0;R;;;;;N;;;10CB1;;10CB1
+10CF2;OLD HUNGARIAN SMALL LETTER US;Ll;0;R;;;;;N;;;10CB2;;10CB2
+10CFA;OLD HUNGARIAN NUMBER ONE;No;0;R;;;;1;N;;;;;
+10CFB;OLD HUNGARIAN NUMBER FIVE;No;0;R;;;;5;N;;;;;
+10CFC;OLD HUNGARIAN NUMBER TEN;No;0;R;;;;10;N;;;;;
+10CFD;OLD HUNGARIAN NUMBER FIFTY;No;0;R;;;;50;N;;;;;
+10CFE;OLD HUNGARIAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;;
+10CFF;OLD HUNGARIAN NUMBER ONE THOUSAND;No;0;R;;;;1000;N;;;;;
 10E60;RUMI DIGIT ONE;No;0;AN;;;1;1;N;;;;;
 10E61;RUMI DIGIT TWO;No;0;AN;;;2;2;N;;;;;
 10E62;RUMI DIGIT THREE;No;0;AN;;;3;3;N;;;;;
@@ -18764,6 +19078,10 @@
 111C6;SHARADA DOUBLE DANDA;Po;0;L;;;;;N;;;;;
 111C7;SHARADA ABBREVIATION SIGN;Po;0;L;;;;;N;;;;;
 111C8;SHARADA SEPARATOR;Po;0;L;;;;;N;;;;;
+111C9;SHARADA SANDHI MARK;Po;0;L;;;;;N;;;;;
+111CA;SHARADA SIGN NUKTA;Mn;7;NSM;;;;;N;;;;;
+111CB;SHARADA VOWEL MODIFIER MARK;Mn;0;NSM;;;;;N;;;;;
+111CC;SHARADA EXTRA SHORT VOWEL MARK;Mn;0;NSM;;;;;N;;;;;
 111CD;SHARADA SUTRA MARK;Po;0;L;;;;;N;;;;;
 111D0;SHARADA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
 111D1;SHARADA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
@@ -18776,6 +19094,11 @@
 111D8;SHARADA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
 111D9;SHARADA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
 111DA;SHARADA EKAM;Lo;0;L;;;;;N;;;;;
+111DB;SHARADA SIGN SIDDHAM;Po;0;L;;;;;N;;;;;
+111DC;SHARADA HEADSTROKE;Lo;0;L;;;;;N;;;;;
+111DD;SHARADA CONTINUATION SIGN;Po;0;L;;;;;N;;;;;
+111DE;SHARADA SECTION MARK-1;Po;0;L;;;;;N;;;;;
+111DF;SHARADA SECTION MARK-2;Po;0;L;;;;;N;;;;;
 111E1;SINHALA ARCHAIC DIGIT ONE;No;0;L;;;;1;N;;;;;
 111E2;SINHALA ARCHAIC DIGIT TWO;No;0;L;;;;2;N;;;;;
 111E3;SINHALA ARCHAIC DIGIT THREE;No;0;L;;;;3;N;;;;;
@@ -18857,6 +19180,44 @@
 1123B;KHOJKI SECTION MARK;Po;0;L;;;;;N;;;;;
 1123C;KHOJKI DOUBLE SECTION MARK;Po;0;L;;;;;N;;;;;
 1123D;KHOJKI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;;
+11280;MULTANI LETTER A;Lo;0;L;;;;;N;;;;;
+11281;MULTANI LETTER I;Lo;0;L;;;;;N;;;;;
+11282;MULTANI LETTER U;Lo;0;L;;;;;N;;;;;
+11283;MULTANI LETTER E;Lo;0;L;;;;;N;;;;;
+11284;MULTANI LETTER KA;Lo;0;L;;;;;N;;;;;
+11285;MULTANI LETTER KHA;Lo;0;L;;;;;N;;;;;
+11286;MULTANI LETTER GA;Lo;0;L;;;;;N;;;;;
+11288;MULTANI LETTER GHA;Lo;0;L;;;;;N;;;;;
+1128A;MULTANI LETTER CA;Lo;0;L;;;;;N;;;;;
+1128B;MULTANI LETTER CHA;Lo;0;L;;;;;N;;;;;
+1128C;MULTANI LETTER JA;Lo;0;L;;;;;N;;;;;
+1128D;MULTANI LETTER JJA;Lo;0;L;;;;;N;;;;;
+1128F;MULTANI LETTER NYA;Lo;0;L;;;;;N;;;;;
+11290;MULTANI LETTER TTA;Lo;0;L;;;;;N;;;;;
+11291;MULTANI LETTER TTHA;Lo;0;L;;;;;N;;;;;
+11292;MULTANI LETTER DDA;Lo;0;L;;;;;N;;;;;
+11293;MULTANI LETTER DDDA;Lo;0;L;;;;;N;;;;;
+11294;MULTANI LETTER DDHA;Lo;0;L;;;;;N;;;;;
+11295;MULTANI LETTER NNA;Lo;0;L;;;;;N;;;;;
+11296;MULTANI LETTER TA;Lo;0;L;;;;;N;;;;;
+11297;MULTANI LETTER THA;Lo;0;L;;;;;N;;;;;
+11298;MULTANI LETTER DA;Lo;0;L;;;;;N;;;;;
+11299;MULTANI LETTER DHA;Lo;0;L;;;;;N;;;;;
+1129A;MULTANI LETTER NA;Lo;0;L;;;;;N;;;;;
+1129B;MULTANI LETTER PA;Lo;0;L;;;;;N;;;;;
+1129C;MULTANI LETTER PHA;Lo;0;L;;;;;N;;;;;
+1129D;MULTANI LETTER BA;Lo;0;L;;;;;N;;;;;
+1129F;MULTANI LETTER BHA;Lo;0;L;;;;;N;;;;;
+112A0;MULTANI LETTER MA;Lo;0;L;;;;;N;;;;;
+112A1;MULTANI LETTER YA;Lo;0;L;;;;;N;;;;;
+112A2;MULTANI LETTER RA;Lo;0;L;;;;;N;;;;;
+112A3;MULTANI LETTER LA;Lo;0;L;;;;;N;;;;;
+112A4;MULTANI LETTER VA;Lo;0;L;;;;;N;;;;;
+112A5;MULTANI LETTER SA;Lo;0;L;;;;;N;;;;;
+112A6;MULTANI LETTER HA;Lo;0;L;;;;;N;;;;;
+112A7;MULTANI LETTER RRA;Lo;0;L;;;;;N;;;;;
+112A8;MULTANI LETTER RHA;Lo;0;L;;;;;N;;;;;
+112A9;MULTANI SECTION MARK;Po;0;L;;;;;N;;;;;
 112B0;KHUDAWADI LETTER A;Lo;0;L;;;;;N;;;;;
 112B1;KHUDAWADI LETTER AA;Lo;0;L;;;;;N;;;;;
 112B2;KHUDAWADI LETTER I;Lo;0;L;;;;;N;;;;;
@@ -18926,6 +19287,7 @@
 112F7;KHUDAWADI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
 112F8;KHUDAWADI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
 112F9;KHUDAWADI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+11300;GRANTHA SIGN COMBINING ANUSVARA ABOVE;Mn;0;NSM;;;;;N;;;;;
 11301;GRANTHA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;;
 11302;GRANTHA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;;
 11303;GRANTHA SIGN VISARGA;Mc;0;L;;;;;N;;;;;
@@ -18989,6 +19351,7 @@
 1134B;GRANTHA VOWEL SIGN OO;Mc;0;L;11347 1133E;;;;N;;;;;
 1134C;GRANTHA VOWEL SIGN AU;Mc;0;L;11347 11357;;;;N;;;;;
 1134D;GRANTHA SIGN VIRAMA;Mc;9;L;;;;;N;;;;;
+11350;GRANTHA OM;Lo;0;L;;;;;N;;;;;
 11357;GRANTHA AU LENGTH MARK;Mc;0;L;;;;;N;;;;;
 1135D;GRANTHA SIGN PLUTA;Lo;0;L;;;;;N;;;;;
 1135E;GRANTHA LETTER VEDIC ANUSVARA;Lo;0;L;;;;;N;;;;;
@@ -19163,6 +19526,26 @@
 115C7;SIDDHAM REPETITION MARK-2;Po;0;L;;;;;N;;;;;
 115C8;SIDDHAM REPETITION MARK-3;Po;0;L;;;;;N;;;;;
 115C9;SIDDHAM END OF TEXT MARK;Po;0;L;;;;;N;;;;;
+115CA;SIDDHAM SECTION MARK WITH TRIDENT AND U-SHAPED ORNAMENTS;Po;0;L;;;;;N;;;;;
+115CB;SIDDHAM SECTION MARK WITH TRIDENT AND DOTTED CRESCENTS;Po;0;L;;;;;N;;;;;
+115CC;SIDDHAM SECTION MARK WITH RAYS AND DOTTED CRESCENTS;Po;0;L;;;;;N;;;;;
+115CD;SIDDHAM SECTION MARK WITH RAYS AND DOTTED DOUBLE CRESCENTS;Po;0;L;;;;;N;;;;;
+115CE;SIDDHAM SECTION MARK WITH RAYS AND DOTTED TRIPLE CRESCENTS;Po;0;L;;;;;N;;;;;
+115CF;SIDDHAM SECTION MARK DOUBLE RING;Po;0;L;;;;;N;;;;;
+115D0;SIDDHAM SECTION MARK DOUBLE RING WITH RAYS;Po;0;L;;;;;N;;;;;
+115D1;SIDDHAM SECTION MARK WITH DOUBLE CRESCENTS;Po;0;L;;;;;N;;;;;
+115D2;SIDDHAM SECTION MARK WITH TRIPLE CRESCENTS;Po;0;L;;;;;N;;;;;
+115D3;SIDDHAM SECTION MARK WITH QUADRUPLE CRESCENTS;Po;0;L;;;;;N;;;;;
+115D4;SIDDHAM SECTION MARK WITH SEPTUPLE CRESCENTS;Po;0;L;;;;;N;;;;;
+115D5;SIDDHAM SECTION MARK WITH CIRCLES AND RAYS;Po;0;L;;;;;N;;;;;
+115D6;SIDDHAM SECTION MARK WITH CIRCLES AND TWO ENCLOSURES;Po;0;L;;;;;N;;;;;
+115D7;SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES;Po;0;L;;;;;N;;;;;
+115D8;SIDDHAM LETTER THREE-CIRCLE ALTERNATE I;Lo;0;L;;;;;N;;;;;
+115D9;SIDDHAM LETTER TWO-CIRCLE ALTERNATE I;Lo;0;L;;;;;N;;;;;
+115DA;SIDDHAM LETTER TWO-CIRCLE ALTERNATE II;Lo;0;L;;;;;N;;;;;
+115DB;SIDDHAM LETTER ALTERNATE U;Lo;0;L;;;;;N;;;;;
+115DC;SIDDHAM VOWEL SIGN ALTERNATE U;Mn;0;NSM;;;;;N;;;;;
+115DD;SIDDHAM VOWEL SIGN ALTERNATE UU;Mn;0;NSM;;;;;N;;;;;
 11600;MODI LETTER A;Lo;0;L;;;;;N;;;;;
 11601;MODI LETTER AA;Lo;0;L;;;;;N;;;;;
 11602;MODI LETTER I;Lo;0;L;;;;;N;;;;;
@@ -19308,6 +19691,63 @@
 116C7;TAKRI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
 116C8;TAKRI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
 116C9;TAKRI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+11700;AHOM LETTER KA;Lo;0;L;;;;;N;;;;;
+11701;AHOM LETTER KHA;Lo;0;L;;;;;N;;;;;
+11702;AHOM LETTER NGA;Lo;0;L;;;;;N;;;;;
+11703;AHOM LETTER NA;Lo;0;L;;;;;N;;;;;
+11704;AHOM LETTER TA;Lo;0;L;;;;;N;;;;;
+11705;AHOM LETTER ALTERNATE TA;Lo;0;L;;;;;N;;;;;
+11706;AHOM LETTER PA;Lo;0;L;;;;;N;;;;;
+11707;AHOM LETTER PHA;Lo;0;L;;;;;N;;;;;
+11708;AHOM LETTER BA;Lo;0;L;;;;;N;;;;;
+11709;AHOM LETTER MA;Lo;0;L;;;;;N;;;;;
+1170A;AHOM LETTER JA;Lo;0;L;;;;;N;;;;;
+1170B;AHOM LETTER CHA;Lo;0;L;;;;;N;;;;;
+1170C;AHOM LETTER THA;Lo;0;L;;;;;N;;;;;
+1170D;AHOM LETTER RA;Lo;0;L;;;;;N;;;;;
+1170E;AHOM LETTER LA;Lo;0;L;;;;;N;;;;;
+1170F;AHOM LETTER SA;Lo;0;L;;;;;N;;;;;
+11710;AHOM LETTER NYA;Lo;0;L;;;;;N;;;;;
+11711;AHOM LETTER HA;Lo;0;L;;;;;N;;;;;
+11712;AHOM LETTER A;Lo;0;L;;;;;N;;;;;
+11713;AHOM LETTER DA;Lo;0;L;;;;;N;;;;;
+11714;AHOM LETTER DHA;Lo;0;L;;;;;N;;;;;
+11715;AHOM LETTER GA;Lo;0;L;;;;;N;;;;;
+11716;AHOM LETTER ALTERNATE GA;Lo;0;L;;;;;N;;;;;
+11717;AHOM LETTER GHA;Lo;0;L;;;;;N;;;;;
+11718;AHOM LETTER BHA;Lo;0;L;;;;;N;;;;;
+11719;AHOM LETTER JHA;Lo;0;L;;;;;N;;;;;
+1171D;AHOM CONSONANT SIGN MEDIAL LA;Mn;0;NSM;;;;;N;;;;;
+1171E;AHOM CONSONANT SIGN MEDIAL RA;Mn;0;NSM;;;;;N;;;;;
+1171F;AHOM CONSONANT SIGN MEDIAL LIGATING RA;Mn;0;NSM;;;;;N;;;;;
+11720;AHOM VOWEL SIGN A;Mc;0;L;;;;;N;;;;;
+11721;AHOM VOWEL SIGN AA;Mc;0;L;;;;;N;;;;;
+11722;AHOM VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;;
+11723;AHOM VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;;
+11724;AHOM VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;;
+11725;AHOM VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;;
+11726;AHOM VOWEL SIGN E;Mc;0;L;;;;;N;;;;;
+11727;AHOM VOWEL SIGN AW;Mn;0;NSM;;;;;N;;;;;
+11728;AHOM VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;;
+11729;AHOM VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;;
+1172A;AHOM VOWEL SIGN AM;Mn;0;NSM;;;;;N;;;;;
+1172B;AHOM SIGN KILLER;Mn;9;NSM;;;;;N;;;;;
+11730;AHOM DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
+11731;AHOM DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+11732;AHOM DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+11733;AHOM DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+11734;AHOM DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+11735;AHOM DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+11736;AHOM DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+11737;AHOM DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+11738;AHOM DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+11739;AHOM DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+1173A;AHOM NUMBER TEN;No;0;L;;;;10;N;;;;;
+1173B;AHOM NUMBER TWENTY;No;0;L;;;;20;N;;;;;
+1173C;AHOM SIGN SMALL SECTION;Po;0;L;;;;;N;;;;;
+1173D;AHOM SIGN SECTION;Po;0;L;;;;;N;;;;;
+1173E;AHOM SIGN RULAI;Po;0;L;;;;;N;;;;;
+1173F;AHOM SYMBOL VI;So;0;L;;;;;N;;;;;
 118A0;WARANG CITI CAPITAL LETTER NGAA;Lu;0;L;;;;;N;;;;118C0;
 118A1;WARANG CITI CAPITAL LETTER A;Lu;0;L;;;;;N;;;;118C1;
 118A2;WARANG CITI CAPITAL LETTER WI;Lu;0;L;;;;;N;;;;118C2;
@@ -20370,6 +20810,7 @@
 12396;CUNEIFORM SIGN SAG TIMES IGI GUNU;Lo;0;L;;;;;N;;;;;
 12397;CUNEIFORM SIGN TI2;Lo;0;L;;;;;N;;;;;
 12398;CUNEIFORM SIGN UM TIMES ME;Lo;0;L;;;;;N;;;;;
+12399;CUNEIFORM SIGN U U;Lo;0;L;;;;;N;;;;;
 12400;CUNEIFORM NUMERIC SIGN TWO ASH;Nl;0;L;;;;2;N;;;;;
 12401;CUNEIFORM NUMERIC SIGN THREE ASH;Nl;0;L;;;;3;N;;;;;
 12402;CUNEIFORM NUMERIC SIGN FOUR ASH;Nl;0;L;;;;4;N;;;;;
@@ -20486,6 +20927,202 @@
 12472;CUNEIFORM PUNCTUATION SIGN DIAGONAL COLON;Po;0;L;;;;;N;;;;;
 12473;CUNEIFORM PUNCTUATION SIGN DIAGONAL TRICOLON;Po;0;L;;;;;N;;;;;
 12474;CUNEIFORM PUNCTUATION SIGN DIAGONAL QUADCOLON;Po;0;L;;;;;N;;;;;
+12480;CUNEIFORM SIGN AB TIMES NUN TENU;Lo;0;L;;;;;N;;;;;
+12481;CUNEIFORM SIGN AB TIMES SHU2;Lo;0;L;;;;;N;;;;;
+12482;CUNEIFORM SIGN AD TIMES ESH2;Lo;0;L;;;;;N;;;;;
+12483;CUNEIFORM SIGN BAD TIMES DISH TENU;Lo;0;L;;;;;N;;;;;
+12484;CUNEIFORM SIGN BAHAR2 TIMES AB2;Lo;0;L;;;;;N;;;;;
+12485;CUNEIFORM SIGN BAHAR2 TIMES NI;Lo;0;L;;;;;N;;;;;
+12486;CUNEIFORM SIGN BAHAR2 TIMES ZA;Lo;0;L;;;;;N;;;;;
+12487;CUNEIFORM SIGN BU OVER BU TIMES NA2;Lo;0;L;;;;;N;;;;;
+12488;CUNEIFORM SIGN DA TIMES TAK4;Lo;0;L;;;;;N;;;;;
+12489;CUNEIFORM SIGN DAG TIMES KUR;Lo;0;L;;;;;N;;;;;
+1248A;CUNEIFORM SIGN DIM TIMES IGI;Lo;0;L;;;;;N;;;;;
+1248B;CUNEIFORM SIGN DIM TIMES U U U;Lo;0;L;;;;;N;;;;;
+1248C;CUNEIFORM SIGN DIM2 TIMES UD;Lo;0;L;;;;;N;;;;;
+1248D;CUNEIFORM SIGN DUG TIMES ANSHE;Lo;0;L;;;;;N;;;;;
+1248E;CUNEIFORM SIGN DUG TIMES ASH;Lo;0;L;;;;;N;;;;;
+1248F;CUNEIFORM SIGN DUG TIMES ASH AT LEFT;Lo;0;L;;;;;N;;;;;
+12490;CUNEIFORM SIGN DUG TIMES DIN;Lo;0;L;;;;;N;;;;;
+12491;CUNEIFORM SIGN DUG TIMES DUN;Lo;0;L;;;;;N;;;;;
+12492;CUNEIFORM SIGN DUG TIMES ERIN2;Lo;0;L;;;;;N;;;;;
+12493;CUNEIFORM SIGN DUG TIMES GA;Lo;0;L;;;;;N;;;;;
+12494;CUNEIFORM SIGN DUG TIMES GI;Lo;0;L;;;;;N;;;;;
+12495;CUNEIFORM SIGN DUG TIMES GIR2 GUNU;Lo;0;L;;;;;N;;;;;
+12496;CUNEIFORM SIGN DUG TIMES GISH;Lo;0;L;;;;;N;;;;;
+12497;CUNEIFORM SIGN DUG TIMES HA;Lo;0;L;;;;;N;;;;;
+12498;CUNEIFORM SIGN DUG TIMES HI;Lo;0;L;;;;;N;;;;;
+12499;CUNEIFORM SIGN DUG TIMES IGI GUNU;Lo;0;L;;;;;N;;;;;
+1249A;CUNEIFORM SIGN DUG TIMES KASKAL;Lo;0;L;;;;;N;;;;;
+1249B;CUNEIFORM SIGN DUG TIMES KUR;Lo;0;L;;;;;N;;;;;
+1249C;CUNEIFORM SIGN DUG TIMES KUSHU2;Lo;0;L;;;;;N;;;;;
+1249D;CUNEIFORM SIGN DUG TIMES KUSHU2 PLUS KASKAL;Lo;0;L;;;;;N;;;;;
+1249E;CUNEIFORM SIGN DUG TIMES LAK-020;Lo;0;L;;;;;N;;;;;
+1249F;CUNEIFORM SIGN DUG TIMES LAM;Lo;0;L;;;;;N;;;;;
+124A0;CUNEIFORM SIGN DUG TIMES LAM TIMES KUR;Lo;0;L;;;;;N;;;;;
+124A1;CUNEIFORM SIGN DUG TIMES LUH PLUS GISH;Lo;0;L;;;;;N;;;;;
+124A2;CUNEIFORM SIGN DUG TIMES MASH;Lo;0;L;;;;;N;;;;;
+124A3;CUNEIFORM SIGN DUG TIMES MES;Lo;0;L;;;;;N;;;;;
+124A4;CUNEIFORM SIGN DUG TIMES MI;Lo;0;L;;;;;N;;;;;
+124A5;CUNEIFORM SIGN DUG TIMES NI;Lo;0;L;;;;;N;;;;;
+124A6;CUNEIFORM SIGN DUG TIMES PI;Lo;0;L;;;;;N;;;;;
+124A7;CUNEIFORM SIGN DUG TIMES SHE;Lo;0;L;;;;;N;;;;;
+124A8;CUNEIFORM SIGN DUG TIMES SI GUNU;Lo;0;L;;;;;N;;;;;
+124A9;CUNEIFORM SIGN E2 TIMES KUR;Lo;0;L;;;;;N;;;;;
+124AA;CUNEIFORM SIGN E2 TIMES PAP;Lo;0;L;;;;;N;;;;;
+124AB;CUNEIFORM SIGN ERIN2 X;Lo;0;L;;;;;N;;;;;
+124AC;CUNEIFORM SIGN ESH2 CROSSING ESH2;Lo;0;L;;;;;N;;;;;
+124AD;CUNEIFORM SIGN EZEN SHESHIG TIMES ASH;Lo;0;L;;;;;N;;;;;
+124AE;CUNEIFORM SIGN EZEN SHESHIG TIMES HI;Lo;0;L;;;;;N;;;;;
+124AF;CUNEIFORM SIGN EZEN SHESHIG TIMES IGI GUNU;Lo;0;L;;;;;N;;;;;
+124B0;CUNEIFORM SIGN EZEN SHESHIG TIMES LA;Lo;0;L;;;;;N;;;;;
+124B1;CUNEIFORM SIGN EZEN SHESHIG TIMES LAL;Lo;0;L;;;;;N;;;;;
+124B2;CUNEIFORM SIGN EZEN SHESHIG TIMES ME;Lo;0;L;;;;;N;;;;;
+124B3;CUNEIFORM SIGN EZEN SHESHIG TIMES MES;Lo;0;L;;;;;N;;;;;
+124B4;CUNEIFORM SIGN EZEN SHESHIG TIMES SU;Lo;0;L;;;;;N;;;;;
+124B5;CUNEIFORM SIGN EZEN TIMES SU;Lo;0;L;;;;;N;;;;;
+124B6;CUNEIFORM SIGN GA2 TIMES BAHAR2;Lo;0;L;;;;;N;;;;;
+124B7;CUNEIFORM SIGN GA2 TIMES DIM GUNU;Lo;0;L;;;;;N;;;;;
+124B8;CUNEIFORM SIGN GA2 TIMES DUG TIMES IGI GUNU;Lo;0;L;;;;;N;;;;;
+124B9;CUNEIFORM SIGN GA2 TIMES DUG TIMES KASKAL;Lo;0;L;;;;;N;;;;;
+124BA;CUNEIFORM SIGN GA2 TIMES EREN;Lo;0;L;;;;;N;;;;;
+124BB;CUNEIFORM SIGN GA2 TIMES GA;Lo;0;L;;;;;N;;;;;
+124BC;CUNEIFORM SIGN GA2 TIMES GAR PLUS DI;Lo;0;L;;;;;N;;;;;
+124BD;CUNEIFORM SIGN GA2 TIMES GAR PLUS NE;Lo;0;L;;;;;N;;;;;
+124BE;CUNEIFORM SIGN GA2 TIMES HA PLUS A;Lo;0;L;;;;;N;;;;;
+124BF;CUNEIFORM SIGN GA2 TIMES KUSHU2 PLUS KASKAL;Lo;0;L;;;;;N;;;;;
+124C0;CUNEIFORM SIGN GA2 TIMES LAM;Lo;0;L;;;;;N;;;;;
+124C1;CUNEIFORM SIGN GA2 TIMES LAM TIMES KUR;Lo;0;L;;;;;N;;;;;
+124C2;CUNEIFORM SIGN GA2 TIMES LUH;Lo;0;L;;;;;N;;;;;
+124C3;CUNEIFORM SIGN GA2 TIMES MUSH;Lo;0;L;;;;;N;;;;;
+124C4;CUNEIFORM SIGN GA2 TIMES NE;Lo;0;L;;;;;N;;;;;
+124C5;CUNEIFORM SIGN GA2 TIMES NE PLUS E2;Lo;0;L;;;;;N;;;;;
+124C6;CUNEIFORM SIGN GA2 TIMES NE PLUS GI;Lo;0;L;;;;;N;;;;;
+124C7;CUNEIFORM SIGN GA2 TIMES SHIM;Lo;0;L;;;;;N;;;;;
+124C8;CUNEIFORM SIGN GA2 TIMES ZIZ2;Lo;0;L;;;;;N;;;;;
+124C9;CUNEIFORM SIGN GABA ROTATED NINETY DEGREES;Lo;0;L;;;;;N;;;;;
+124CA;CUNEIFORM SIGN GESHTIN TIMES U;Lo;0;L;;;;;N;;;;;
+124CB;CUNEIFORM SIGN GISH TIMES GISH CROSSING GISH;Lo;0;L;;;;;N;;;;;
+124CC;CUNEIFORM SIGN GU2 TIMES IGI GUNU;Lo;0;L;;;;;N;;;;;
+124CD;CUNEIFORM SIGN GUD PLUS GISH TIMES TAK4;Lo;0;L;;;;;N;;;;;
+124CE;CUNEIFORM SIGN HA TENU GUNU;Lo;0;L;;;;;N;;;;;
+124CF;CUNEIFORM SIGN HI TIMES ASH OVER HI TIMES ASH;Lo;0;L;;;;;N;;;;;
+124D0;CUNEIFORM SIGN KA TIMES BU;Lo;0;L;;;;;N;;;;;
+124D1;CUNEIFORM SIGN KA TIMES KA;Lo;0;L;;;;;N;;;;;
+124D2;CUNEIFORM SIGN KA TIMES U U U;Lo;0;L;;;;;N;;;;;
+124D3;CUNEIFORM SIGN KA TIMES UR;Lo;0;L;;;;;N;;;;;
+124D4;CUNEIFORM SIGN LAGAB TIMES ZU OVER ZU;Lo;0;L;;;;;N;;;;;
+124D5;CUNEIFORM SIGN LAK-003;Lo;0;L;;;;;N;;;;;
+124D6;CUNEIFORM SIGN LAK-021;Lo;0;L;;;;;N;;;;;
+124D7;CUNEIFORM SIGN LAK-025;Lo;0;L;;;;;N;;;;;
+124D8;CUNEIFORM SIGN LAK-030;Lo;0;L;;;;;N;;;;;
+124D9;CUNEIFORM SIGN LAK-050;Lo;0;L;;;;;N;;;;;
+124DA;CUNEIFORM SIGN LAK-051;Lo;0;L;;;;;N;;;;;
+124DB;CUNEIFORM SIGN LAK-062;Lo;0;L;;;;;N;;;;;
+124DC;CUNEIFORM SIGN LAK-079 OVER LAK-079 GUNU;Lo;0;L;;;;;N;;;;;
+124DD;CUNEIFORM SIGN LAK-080;Lo;0;L;;;;;N;;;;;
+124DE;CUNEIFORM SIGN LAK-081 OVER LAK-081;Lo;0;L;;;;;N;;;;;
+124DF;CUNEIFORM SIGN LAK-092;Lo;0;L;;;;;N;;;;;
+124E0;CUNEIFORM SIGN LAK-130;Lo;0;L;;;;;N;;;;;
+124E1;CUNEIFORM SIGN LAK-142;Lo;0;L;;;;;N;;;;;
+124E2;CUNEIFORM SIGN LAK-210;Lo;0;L;;;;;N;;;;;
+124E3;CUNEIFORM SIGN LAK-219;Lo;0;L;;;;;N;;;;;
+124E4;CUNEIFORM SIGN LAK-220;Lo;0;L;;;;;N;;;;;
+124E5;CUNEIFORM SIGN LAK-225;Lo;0;L;;;;;N;;;;;
+124E6;CUNEIFORM SIGN LAK-228;Lo;0;L;;;;;N;;;;;
+124E7;CUNEIFORM SIGN LAK-238;Lo;0;L;;;;;N;;;;;
+124E8;CUNEIFORM SIGN LAK-265;Lo;0;L;;;;;N;;;;;
+124E9;CUNEIFORM SIGN LAK-266;Lo;0;L;;;;;N;;;;;
+124EA;CUNEIFORM SIGN LAK-343;Lo;0;L;;;;;N;;;;;
+124EB;CUNEIFORM SIGN LAK-347;Lo;0;L;;;;;N;;;;;
+124EC;CUNEIFORM SIGN LAK-348;Lo;0;L;;;;;N;;;;;
+124ED;CUNEIFORM SIGN LAK-383;Lo;0;L;;;;;N;;;;;
+124EE;CUNEIFORM SIGN LAK-384;Lo;0;L;;;;;N;;;;;
+124EF;CUNEIFORM SIGN LAK-390;Lo;0;L;;;;;N;;;;;
+124F0;CUNEIFORM SIGN LAK-441;Lo;0;L;;;;;N;;;;;
+124F1;CUNEIFORM SIGN LAK-449;Lo;0;L;;;;;N;;;;;
+124F2;CUNEIFORM SIGN LAK-449 TIMES GU;Lo;0;L;;;;;N;;;;;
+124F3;CUNEIFORM SIGN LAK-449 TIMES IGI;Lo;0;L;;;;;N;;;;;
+124F4;CUNEIFORM SIGN LAK-449 TIMES PAP PLUS LU3;Lo;0;L;;;;;N;;;;;
+124F5;CUNEIFORM SIGN LAK-449 TIMES PAP PLUS PAP PLUS LU3;Lo;0;L;;;;;N;;;;;
+124F6;CUNEIFORM SIGN LAK-449 TIMES U2 PLUS BA;Lo;0;L;;;;;N;;;;;
+124F7;CUNEIFORM SIGN LAK-450;Lo;0;L;;;;;N;;;;;
+124F8;CUNEIFORM SIGN LAK-457;Lo;0;L;;;;;N;;;;;
+124F9;CUNEIFORM SIGN LAK-470;Lo;0;L;;;;;N;;;;;
+124FA;CUNEIFORM SIGN LAK-483;Lo;0;L;;;;;N;;;;;
+124FB;CUNEIFORM SIGN LAK-490;Lo;0;L;;;;;N;;;;;
+124FC;CUNEIFORM SIGN LAK-492;Lo;0;L;;;;;N;;;;;
+124FD;CUNEIFORM SIGN LAK-493;Lo;0;L;;;;;N;;;;;
+124FE;CUNEIFORM SIGN LAK-495;Lo;0;L;;;;;N;;;;;
+124FF;CUNEIFORM SIGN LAK-550;Lo;0;L;;;;;N;;;;;
+12500;CUNEIFORM SIGN LAK-608;Lo;0;L;;;;;N;;;;;
+12501;CUNEIFORM SIGN LAK-617;Lo;0;L;;;;;N;;;;;
+12502;CUNEIFORM SIGN LAK-617 TIMES ASH;Lo;0;L;;;;;N;;;;;
+12503;CUNEIFORM SIGN LAK-617 TIMES BAD;Lo;0;L;;;;;N;;;;;
+12504;CUNEIFORM SIGN LAK-617 TIMES DUN3 GUNU GUNU;Lo;0;L;;;;;N;;;;;
+12505;CUNEIFORM SIGN LAK-617 TIMES KU3;Lo;0;L;;;;;N;;;;;
+12506;CUNEIFORM SIGN LAK-617 TIMES LA;Lo;0;L;;;;;N;;;;;
+12507;CUNEIFORM SIGN LAK-617 TIMES TAR;Lo;0;L;;;;;N;;;;;
+12508;CUNEIFORM SIGN LAK-617 TIMES TE;Lo;0;L;;;;;N;;;;;
+12509;CUNEIFORM SIGN LAK-617 TIMES U2;Lo;0;L;;;;;N;;;;;
+1250A;CUNEIFORM SIGN LAK-617 TIMES UD;Lo;0;L;;;;;N;;;;;
+1250B;CUNEIFORM SIGN LAK-617 TIMES URUDA;Lo;0;L;;;;;N;;;;;
+1250C;CUNEIFORM SIGN LAK-636;Lo;0;L;;;;;N;;;;;
+1250D;CUNEIFORM SIGN LAK-648;Lo;0;L;;;;;N;;;;;
+1250E;CUNEIFORM SIGN LAK-648 TIMES DUB;Lo;0;L;;;;;N;;;;;
+1250F;CUNEIFORM SIGN LAK-648 TIMES GA;Lo;0;L;;;;;N;;;;;
+12510;CUNEIFORM SIGN LAK-648 TIMES IGI;Lo;0;L;;;;;N;;;;;
+12511;CUNEIFORM SIGN LAK-648 TIMES IGI GUNU;Lo;0;L;;;;;N;;;;;
+12512;CUNEIFORM SIGN LAK-648 TIMES NI;Lo;0;L;;;;;N;;;;;
+12513;CUNEIFORM SIGN LAK-648 TIMES PAP PLUS PAP PLUS LU3;Lo;0;L;;;;;N;;;;;
+12514;CUNEIFORM SIGN LAK-648 TIMES SHESH PLUS KI;Lo;0;L;;;;;N;;;;;
+12515;CUNEIFORM SIGN LAK-648 TIMES UD;Lo;0;L;;;;;N;;;;;
+12516;CUNEIFORM SIGN LAK-648 TIMES URUDA;Lo;0;L;;;;;N;;;;;
+12517;CUNEIFORM SIGN LAK-724;Lo;0;L;;;;;N;;;;;
+12518;CUNEIFORM SIGN LAK-749;Lo;0;L;;;;;N;;;;;
+12519;CUNEIFORM SIGN LU2 GUNU TIMES ASH;Lo;0;L;;;;;N;;;;;
+1251A;CUNEIFORM SIGN LU2 TIMES DISH;Lo;0;L;;;;;N;;;;;
+1251B;CUNEIFORM SIGN LU2 TIMES HAL;Lo;0;L;;;;;N;;;;;
+1251C;CUNEIFORM SIGN LU2 TIMES PAP;Lo;0;L;;;;;N;;;;;
+1251D;CUNEIFORM SIGN LU2 TIMES PAP PLUS PAP PLUS LU3;Lo;0;L;;;;;N;;;;;
+1251E;CUNEIFORM SIGN LU2 TIMES TAK4;Lo;0;L;;;;;N;;;;;
+1251F;CUNEIFORM SIGN MI PLUS ZA7;Lo;0;L;;;;;N;;;;;
+12520;CUNEIFORM SIGN MUSH OVER MUSH TIMES GA;Lo;0;L;;;;;N;;;;;
+12521;CUNEIFORM SIGN MUSH OVER MUSH TIMES KAK;Lo;0;L;;;;;N;;;;;
+12522;CUNEIFORM SIGN NINDA2 TIMES DIM GUNU;Lo;0;L;;;;;N;;;;;
+12523;CUNEIFORM SIGN NINDA2 TIMES GISH;Lo;0;L;;;;;N;;;;;
+12524;CUNEIFORM SIGN NINDA2 TIMES GUL;Lo;0;L;;;;;N;;;;;
+12525;CUNEIFORM SIGN NINDA2 TIMES HI;Lo;0;L;;;;;N;;;;;
+12526;CUNEIFORM SIGN NINDA2 TIMES KESH2;Lo;0;L;;;;;N;;;;;
+12527;CUNEIFORM SIGN NINDA2 TIMES LAK-050;Lo;0;L;;;;;N;;;;;
+12528;CUNEIFORM SIGN NINDA2 TIMES MASH;Lo;0;L;;;;;N;;;;;
+12529;CUNEIFORM SIGN NINDA2 TIMES PAP PLUS PAP;Lo;0;L;;;;;N;;;;;
+1252A;CUNEIFORM SIGN NINDA2 TIMES U;Lo;0;L;;;;;N;;;;;
+1252B;CUNEIFORM SIGN NINDA2 TIMES U PLUS U;Lo;0;L;;;;;N;;;;;
+1252C;CUNEIFORM SIGN NINDA2 TIMES URUDA;Lo;0;L;;;;;N;;;;;
+1252D;CUNEIFORM SIGN SAG GUNU TIMES HA;Lo;0;L;;;;;N;;;;;
+1252E;CUNEIFORM SIGN SAG TIMES EN;Lo;0;L;;;;;N;;;;;
+1252F;CUNEIFORM SIGN SAG TIMES SHE AT LEFT;Lo;0;L;;;;;N;;;;;
+12530;CUNEIFORM SIGN SAG TIMES TAK4;Lo;0;L;;;;;N;;;;;
+12531;CUNEIFORM SIGN SHA6 TENU;Lo;0;L;;;;;N;;;;;
+12532;CUNEIFORM SIGN SHE OVER SHE;Lo;0;L;;;;;N;;;;;
+12533;CUNEIFORM SIGN SHE PLUS HUB2;Lo;0;L;;;;;N;;;;;
+12534;CUNEIFORM SIGN SHE PLUS NAM2;Lo;0;L;;;;;N;;;;;
+12535;CUNEIFORM SIGN SHE PLUS SAR;Lo;0;L;;;;;N;;;;;
+12536;CUNEIFORM SIGN SHU2 PLUS DUG TIMES NI;Lo;0;L;;;;;N;;;;;
+12537;CUNEIFORM SIGN SHU2 PLUS E2 TIMES AN;Lo;0;L;;;;;N;;;;;
+12538;CUNEIFORM SIGN SI TIMES TAK4;Lo;0;L;;;;;N;;;;;
+12539;CUNEIFORM SIGN TAK4 PLUS SAG;Lo;0;L;;;;;N;;;;;
+1253A;CUNEIFORM SIGN TUM TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;;
+1253B;CUNEIFORM SIGN TUM TIMES THREE DISH;Lo;0;L;;;;;N;;;;;
+1253C;CUNEIFORM SIGN UR2 INVERTED;Lo;0;L;;;;;N;;;;;
+1253D;CUNEIFORM SIGN UR2 TIMES UD;Lo;0;L;;;;;N;;;;;
+1253E;CUNEIFORM SIGN URU TIMES DARA3;Lo;0;L;;;;;N;;;;;
+1253F;CUNEIFORM SIGN URU TIMES LAK-668;Lo;0;L;;;;;N;;;;;
+12540;CUNEIFORM SIGN URU TIMES LU3;Lo;0;L;;;;;N;;;;;
+12541;CUNEIFORM SIGN ZA7;Lo;0;L;;;;;N;;;;;
+12542;CUNEIFORM SIGN ZU OVER ZU PLUS SAR;Lo;0;L;;;;;N;;;;;
+12543;CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU;Lo;0;L;;;;;N;;;;;
 13000;EGYPTIAN HIEROGLYPH A001;Lo;0;L;;;;;N;;;;;
 13001;EGYPTIAN HIEROGLYPH A002;Lo;0;L;;;;;N;;;;;
 13002;EGYPTIAN HIEROGLYPH A003;Lo;0;L;;;;;N;;;;;
@@ -21557,6 +22194,589 @@
 1342C;EGYPTIAN HIEROGLYPH AA030;Lo;0;L;;;;;N;;;;;
 1342D;EGYPTIAN HIEROGLYPH AA031;Lo;0;L;;;;;N;;;;;
 1342E;EGYPTIAN HIEROGLYPH AA032;Lo;0;L;;;;;N;;;;;
+14400;ANATOLIAN HIEROGLYPH A001;Lo;0;L;;;;;N;;;;;
+14401;ANATOLIAN HIEROGLYPH A002;Lo;0;L;;;;;N;;;;;
+14402;ANATOLIAN HIEROGLYPH A003;Lo;0;L;;;;;N;;;;;
+14403;ANATOLIAN HIEROGLYPH A004;Lo;0;L;;;;;N;;;;;
+14404;ANATOLIAN HIEROGLYPH A005;Lo;0;L;;;;;N;;;;;
+14405;ANATOLIAN HIEROGLYPH A006;Lo;0;L;;;;;N;;;;;
+14406;ANATOLIAN HIEROGLYPH A007;Lo;0;L;;;;;N;;;;;
+14407;ANATOLIAN HIEROGLYPH A008;Lo;0;L;;;;;N;;;;;
+14408;ANATOLIAN HIEROGLYPH A009;Lo;0;L;;;;;N;;;;;
+14409;ANATOLIAN HIEROGLYPH A010;Lo;0;L;;;;;N;;;;;
+1440A;ANATOLIAN HIEROGLYPH A010A;Lo;0;L;;;;;N;;;;;
+1440B;ANATOLIAN HIEROGLYPH A011;Lo;0;L;;;;;N;;;;;
+1440C;ANATOLIAN HIEROGLYPH A012;Lo;0;L;;;;;N;;;;;
+1440D;ANATOLIAN HIEROGLYPH A013;Lo;0;L;;;;;N;;;;;
+1440E;ANATOLIAN HIEROGLYPH A014;Lo;0;L;;;;;N;;;;;
+1440F;ANATOLIAN HIEROGLYPH A015;Lo;0;L;;;;;N;;;;;
+14410;ANATOLIAN HIEROGLYPH A016;Lo;0;L;;;;;N;;;;;
+14411;ANATOLIAN HIEROGLYPH A017;Lo;0;L;;;;;N;;;;;
+14412;ANATOLIAN HIEROGLYPH A018;Lo;0;L;;;;;N;;;;;
+14413;ANATOLIAN HIEROGLYPH A019;Lo;0;L;;;;;N;;;;;
+14414;ANATOLIAN HIEROGLYPH A020;Lo;0;L;;;;;N;;;;;
+14415;ANATOLIAN HIEROGLYPH A021;Lo;0;L;;;;;N;;;;;
+14416;ANATOLIAN HIEROGLYPH A022;Lo;0;L;;;;;N;;;;;
+14417;ANATOLIAN HIEROGLYPH A023;Lo;0;L;;;;;N;;;;;
+14418;ANATOLIAN HIEROGLYPH A024;Lo;0;L;;;;;N;;;;;
+14419;ANATOLIAN HIEROGLYPH A025;Lo;0;L;;;;;N;;;;;
+1441A;ANATOLIAN HIEROGLYPH A026;Lo;0;L;;;;;N;;;;;
+1441B;ANATOLIAN HIEROGLYPH A026A;Lo;0;L;;;;;N;;;;;
+1441C;ANATOLIAN HIEROGLYPH A027;Lo;0;L;;;;;N;;;;;
+1441D;ANATOLIAN HIEROGLYPH A028;Lo;0;L;;;;;N;;;;;
+1441E;ANATOLIAN HIEROGLYPH A029;Lo;0;L;;;;;N;;;;;
+1441F;ANATOLIAN HIEROGLYPH A030;Lo;0;L;;;;;N;;;;;
+14420;ANATOLIAN HIEROGLYPH A031;Lo;0;L;;;;;N;;;;;
+14421;ANATOLIAN HIEROGLYPH A032;Lo;0;L;;;;;N;;;;;
+14422;ANATOLIAN HIEROGLYPH A033;Lo;0;L;;;;;N;;;;;
+14423;ANATOLIAN HIEROGLYPH A034;Lo;0;L;;;;;N;;;;;
+14424;ANATOLIAN HIEROGLYPH A035;Lo;0;L;;;;;N;;;;;
+14425;ANATOLIAN HIEROGLYPH A036;Lo;0;L;;;;;N;;;;;
+14426;ANATOLIAN HIEROGLYPH A037;Lo;0;L;;;;;N;;;;;
+14427;ANATOLIAN HIEROGLYPH A038;Lo;0;L;;;;;N;;;;;
+14428;ANATOLIAN HIEROGLYPH A039;Lo;0;L;;;;;N;;;;;
+14429;ANATOLIAN HIEROGLYPH A039A;Lo;0;L;;;;;N;;;;;
+1442A;ANATOLIAN HIEROGLYPH A040;Lo;0;L;;;;;N;;;;;
+1442B;ANATOLIAN HIEROGLYPH A041;Lo;0;L;;;;;N;;;;;
+1442C;ANATOLIAN HIEROGLYPH A041A;Lo;0;L;;;;;N;;;;;
+1442D;ANATOLIAN HIEROGLYPH A042;Lo;0;L;;;;;N;;;;;
+1442E;ANATOLIAN HIEROGLYPH A043;Lo;0;L;;;;;N;;;;;
+1442F;ANATOLIAN HIEROGLYPH A044;Lo;0;L;;;;;N;;;;;
+14430;ANATOLIAN HIEROGLYPH A045;Lo;0;L;;;;;N;;;;;
+14431;ANATOLIAN HIEROGLYPH A045A;Lo;0;L;;;;;N;;;;;
+14432;ANATOLIAN HIEROGLYPH A046;Lo;0;L;;;;;N;;;;;
+14433;ANATOLIAN HIEROGLYPH A046A;Lo;0;L;;;;;N;;;;;
+14434;ANATOLIAN HIEROGLYPH A046B;Lo;0;L;;;;;N;;;;;
+14435;ANATOLIAN HIEROGLYPH A047;Lo;0;L;;;;;N;;;;;
+14436;ANATOLIAN HIEROGLYPH A048;Lo;0;L;;;;;N;;;;;
+14437;ANATOLIAN HIEROGLYPH A049;Lo;0;L;;;;;N;;;;;
+14438;ANATOLIAN HIEROGLYPH A050;Lo;0;L;;;;;N;;;;;
+14439;ANATOLIAN HIEROGLYPH A051;Lo;0;L;;;;;N;;;;;
+1443A;ANATOLIAN HIEROGLYPH A052;Lo;0;L;;;;;N;;;;;
+1443B;ANATOLIAN HIEROGLYPH A053;Lo;0;L;;;;;N;;;;;
+1443C;ANATOLIAN HIEROGLYPH A054;Lo;0;L;;;;;N;;;;;
+1443D;ANATOLIAN HIEROGLYPH A055;Lo;0;L;;;;;N;;;;;
+1443E;ANATOLIAN HIEROGLYPH A056;Lo;0;L;;;;;N;;;;;
+1443F;ANATOLIAN HIEROGLYPH A057;Lo;0;L;;;;;N;;;;;
+14440;ANATOLIAN HIEROGLYPH A058;Lo;0;L;;;;;N;;;;;
+14441;ANATOLIAN HIEROGLYPH A059;Lo;0;L;;;;;N;;;;;
+14442;ANATOLIAN HIEROGLYPH A060;Lo;0;L;;;;;N;;;;;
+14443;ANATOLIAN HIEROGLYPH A061;Lo;0;L;;;;;N;;;;;
+14444;ANATOLIAN HIEROGLYPH A062;Lo;0;L;;;;;N;;;;;
+14445;ANATOLIAN HIEROGLYPH A063;Lo;0;L;;;;;N;;;;;
+14446;ANATOLIAN HIEROGLYPH A064;Lo;0;L;;;;;N;;;;;
+14447;ANATOLIAN HIEROGLYPH A065;Lo;0;L;;;;;N;;;;;
+14448;ANATOLIAN HIEROGLYPH A066;Lo;0;L;;;;;N;;;;;
+14449;ANATOLIAN HIEROGLYPH A066A;Lo;0;L;;;;;N;;;;;
+1444A;ANATOLIAN HIEROGLYPH A066B;Lo;0;L;;;;;N;;;;;
+1444B;ANATOLIAN HIEROGLYPH A066C;Lo;0;L;;;;;N;;;;;
+1444C;ANATOLIAN HIEROGLYPH A067;Lo;0;L;;;;;N;;;;;
+1444D;ANATOLIAN HIEROGLYPH A068;Lo;0;L;;;;;N;;;;;
+1444E;ANATOLIAN HIEROGLYPH A069;Lo;0;L;;;;;N;;;;;
+1444F;ANATOLIAN HIEROGLYPH A070;Lo;0;L;;;;;N;;;;;
+14450;ANATOLIAN HIEROGLYPH A071;Lo;0;L;;;;;N;;;;;
+14451;ANATOLIAN HIEROGLYPH A072;Lo;0;L;;;;;N;;;;;
+14452;ANATOLIAN HIEROGLYPH A073;Lo;0;L;;;;;N;;;;;
+14453;ANATOLIAN HIEROGLYPH A074;Lo;0;L;;;;;N;;;;;
+14454;ANATOLIAN HIEROGLYPH A075;Lo;0;L;;;;;N;;;;;
+14455;ANATOLIAN HIEROGLYPH A076;Lo;0;L;;;;;N;;;;;
+14456;ANATOLIAN HIEROGLYPH A077;Lo;0;L;;;;;N;;;;;
+14457;ANATOLIAN HIEROGLYPH A078;Lo;0;L;;;;;N;;;;;
+14458;ANATOLIAN HIEROGLYPH A079;Lo;0;L;;;;;N;;;;;
+14459;ANATOLIAN HIEROGLYPH A080;Lo;0;L;;;;;N;;;;;
+1445A;ANATOLIAN HIEROGLYPH A081;Lo;0;L;;;;;N;;;;;
+1445B;ANATOLIAN HIEROGLYPH A082;Lo;0;L;;;;;N;;;;;
+1445C;ANATOLIAN HIEROGLYPH A083;Lo;0;L;;;;;N;;;;;
+1445D;ANATOLIAN HIEROGLYPH A084;Lo;0;L;;;;;N;;;;;
+1445E;ANATOLIAN HIEROGLYPH A085;Lo;0;L;;;;;N;;;;;
+1445F;ANATOLIAN HIEROGLYPH A086;Lo;0;L;;;;;N;;;;;
+14460;ANATOLIAN HIEROGLYPH A087;Lo;0;L;;;;;N;;;;;
+14461;ANATOLIAN HIEROGLYPH A088;Lo;0;L;;;;;N;;;;;
+14462;ANATOLIAN HIEROGLYPH A089;Lo;0;L;;;;;N;;;;;
+14463;ANATOLIAN HIEROGLYPH A090;Lo;0;L;;;;;N;;;;;
+14464;ANATOLIAN HIEROGLYPH A091;Lo;0;L;;;;;N;;;;;
+14465;ANATOLIAN HIEROGLYPH A092;Lo;0;L;;;;;N;;;;;
+14466;ANATOLIAN HIEROGLYPH A093;Lo;0;L;;;;;N;;;;;
+14467;ANATOLIAN HIEROGLYPH A094;Lo;0;L;;;;;N;;;;;
+14468;ANATOLIAN HIEROGLYPH A095;Lo;0;L;;;;;N;;;;;
+14469;ANATOLIAN HIEROGLYPH A096;Lo;0;L;;;;;N;;;;;
+1446A;ANATOLIAN HIEROGLYPH A097;Lo;0;L;;;;;N;;;;;
+1446B;ANATOLIAN HIEROGLYPH A097A;Lo;0;L;;;;;N;;;;;
+1446C;ANATOLIAN HIEROGLYPH A098;Lo;0;L;;;;;N;;;;;
+1446D;ANATOLIAN HIEROGLYPH A098A;Lo;0;L;;;;;N;;;;;
+1446E;ANATOLIAN HIEROGLYPH A099;Lo;0;L;;;;;N;;;;;
+1446F;ANATOLIAN HIEROGLYPH A100;Lo;0;L;;;;;N;;;;;
+14470;ANATOLIAN HIEROGLYPH A100A;Lo;0;L;;;;;N;;;;;
+14471;ANATOLIAN HIEROGLYPH A101;Lo;0;L;;;;;N;;;;;
+14472;ANATOLIAN HIEROGLYPH A101A;Lo;0;L;;;;;N;;;;;
+14473;ANATOLIAN HIEROGLYPH A102;Lo;0;L;;;;;N;;;;;
+14474;ANATOLIAN HIEROGLYPH A102A;Lo;0;L;;;;;N;;;;;
+14475;ANATOLIAN HIEROGLYPH A103;Lo;0;L;;;;;N;;;;;
+14476;ANATOLIAN HIEROGLYPH A104;Lo;0;L;;;;;N;;;;;
+14477;ANATOLIAN HIEROGLYPH A104A;Lo;0;L;;;;;N;;;;;
+14478;ANATOLIAN HIEROGLYPH A104B;Lo;0;L;;;;;N;;;;;
+14479;ANATOLIAN HIEROGLYPH A104C;Lo;0;L;;;;;N;;;;;
+1447A;ANATOLIAN HIEROGLYPH A105;Lo;0;L;;;;;N;;;;;
+1447B;ANATOLIAN HIEROGLYPH A105A;Lo;0;L;;;;;N;;;;;
+1447C;ANATOLIAN HIEROGLYPH A105B;Lo;0;L;;;;;N;;;;;
+1447D;ANATOLIAN HIEROGLYPH A106;Lo;0;L;;;;;N;;;;;
+1447E;ANATOLIAN HIEROGLYPH A107;Lo;0;L;;;;;N;;;;;
+1447F;ANATOLIAN HIEROGLYPH A107A;Lo;0;L;;;;;N;;;;;
+14480;ANATOLIAN HIEROGLYPH A107B;Lo;0;L;;;;;N;;;;;
+14481;ANATOLIAN HIEROGLYPH A107C;Lo;0;L;;;;;N;;;;;
+14482;ANATOLIAN HIEROGLYPH A108;Lo;0;L;;;;;N;;;;;
+14483;ANATOLIAN HIEROGLYPH A109;Lo;0;L;;;;;N;;;;;
+14484;ANATOLIAN HIEROGLYPH A110;Lo;0;L;;;;;N;;;;;
+14485;ANATOLIAN HIEROGLYPH A110A;Lo;0;L;;;;;N;;;;;
+14486;ANATOLIAN HIEROGLYPH A110B;Lo;0;L;;;;;N;;;;;
+14487;ANATOLIAN HIEROGLYPH A111;Lo;0;L;;;;;N;;;;;
+14488;ANATOLIAN HIEROGLYPH A112;Lo;0;L;;;;;N;;;;;
+14489;ANATOLIAN HIEROGLYPH A113;Lo;0;L;;;;;N;;;;;
+1448A;ANATOLIAN HIEROGLYPH A114;Lo;0;L;;;;;N;;;;;
+1448B;ANATOLIAN HIEROGLYPH A115;Lo;0;L;;;;;N;;;;;
+1448C;ANATOLIAN HIEROGLYPH A115A;Lo;0;L;;;;;N;;;;;
+1448D;ANATOLIAN HIEROGLYPH A116;Lo;0;L;;;;;N;;;;;
+1448E;ANATOLIAN HIEROGLYPH A117;Lo;0;L;;;;;N;;;;;
+1448F;ANATOLIAN HIEROGLYPH A118;Lo;0;L;;;;;N;;;;;
+14490;ANATOLIAN HIEROGLYPH A119;Lo;0;L;;;;;N;;;;;
+14491;ANATOLIAN HIEROGLYPH A120;Lo;0;L;;;;;N;;;;;
+14492;ANATOLIAN HIEROGLYPH A121;Lo;0;L;;;;;N;;;;;
+14493;ANATOLIAN HIEROGLYPH A122;Lo;0;L;;;;;N;;;;;
+14494;ANATOLIAN HIEROGLYPH A123;Lo;0;L;;;;;N;;;;;
+14495;ANATOLIAN HIEROGLYPH A124;Lo;0;L;;;;;N;;;;;
+14496;ANATOLIAN HIEROGLYPH A125;Lo;0;L;;;;;N;;;;;
+14497;ANATOLIAN HIEROGLYPH A125A;Lo;0;L;;;;;N;;;;;
+14498;ANATOLIAN HIEROGLYPH A126;Lo;0;L;;;;;N;;;;;
+14499;ANATOLIAN HIEROGLYPH A127;Lo;0;L;;;;;N;;;;;
+1449A;ANATOLIAN HIEROGLYPH A128;Lo;0;L;;;;;N;;;;;
+1449B;ANATOLIAN HIEROGLYPH A129;Lo;0;L;;;;;N;;;;;
+1449C;ANATOLIAN HIEROGLYPH A130;Lo;0;L;;;;;N;;;;;
+1449D;ANATOLIAN HIEROGLYPH A131;Lo;0;L;;;;;N;;;;;
+1449E;ANATOLIAN HIEROGLYPH A132;Lo;0;L;;;;;N;;;;;
+1449F;ANATOLIAN HIEROGLYPH A133;Lo;0;L;;;;;N;;;;;
+144A0;ANATOLIAN HIEROGLYPH A134;Lo;0;L;;;;;N;;;;;
+144A1;ANATOLIAN HIEROGLYPH A135;Lo;0;L;;;;;N;;;;;
+144A2;ANATOLIAN HIEROGLYPH A135A;Lo;0;L;;;;;N;;;;;
+144A3;ANATOLIAN HIEROGLYPH A136;Lo;0;L;;;;;N;;;;;
+144A4;ANATOLIAN HIEROGLYPH A137;Lo;0;L;;;;;N;;;;;
+144A5;ANATOLIAN HIEROGLYPH A138;Lo;0;L;;;;;N;;;;;
+144A6;ANATOLIAN HIEROGLYPH A139;Lo;0;L;;;;;N;;;;;
+144A7;ANATOLIAN HIEROGLYPH A140;Lo;0;L;;;;;N;;;;;
+144A8;ANATOLIAN HIEROGLYPH A141;Lo;0;L;;;;;N;;;;;
+144A9;ANATOLIAN HIEROGLYPH A142;Lo;0;L;;;;;N;;;;;
+144AA;ANATOLIAN HIEROGLYPH A143;Lo;0;L;;;;;N;;;;;
+144AB;ANATOLIAN HIEROGLYPH A144;Lo;0;L;;;;;N;;;;;
+144AC;ANATOLIAN HIEROGLYPH A145;Lo;0;L;;;;;N;;;;;
+144AD;ANATOLIAN HIEROGLYPH A146;Lo;0;L;;;;;N;;;;;
+144AE;ANATOLIAN HIEROGLYPH A147;Lo;0;L;;;;;N;;;;;
+144AF;ANATOLIAN HIEROGLYPH A148;Lo;0;L;;;;;N;;;;;
+144B0;ANATOLIAN HIEROGLYPH A149;Lo;0;L;;;;;N;;;;;
+144B1;ANATOLIAN HIEROGLYPH A150;Lo;0;L;;;;;N;;;;;
+144B2;ANATOLIAN HIEROGLYPH A151;Lo;0;L;;;;;N;;;;;
+144B3;ANATOLIAN HIEROGLYPH A152;Lo;0;L;;;;;N;;;;;
+144B4;ANATOLIAN HIEROGLYPH A153;Lo;0;L;;;;;N;;;;;
+144B5;ANATOLIAN HIEROGLYPH A154;Lo;0;L;;;;;N;;;;;
+144B6;ANATOLIAN HIEROGLYPH A155;Lo;0;L;;;;;N;;;;;
+144B7;ANATOLIAN HIEROGLYPH A156;Lo;0;L;;;;;N;;;;;
+144B8;ANATOLIAN HIEROGLYPH A157;Lo;0;L;;;;;N;;;;;
+144B9;ANATOLIAN HIEROGLYPH A158;Lo;0;L;;;;;N;;;;;
+144BA;ANATOLIAN HIEROGLYPH A159;Lo;0;L;;;;;N;;;;;
+144BB;ANATOLIAN HIEROGLYPH A160;Lo;0;L;;;;;N;;;;;
+144BC;ANATOLIAN HIEROGLYPH A161;Lo;0;L;;;;;N;;;;;
+144BD;ANATOLIAN HIEROGLYPH A162;Lo;0;L;;;;;N;;;;;
+144BE;ANATOLIAN HIEROGLYPH A163;Lo;0;L;;;;;N;;;;;
+144BF;ANATOLIAN HIEROGLYPH A164;Lo;0;L;;;;;N;;;;;
+144C0;ANATOLIAN HIEROGLYPH A165;Lo;0;L;;;;;N;;;;;
+144C1;ANATOLIAN HIEROGLYPH A166;Lo;0;L;;;;;N;;;;;
+144C2;ANATOLIAN HIEROGLYPH A167;Lo;0;L;;;;;N;;;;;
+144C3;ANATOLIAN HIEROGLYPH A168;Lo;0;L;;;;;N;;;;;
+144C4;ANATOLIAN HIEROGLYPH A169;Lo;0;L;;;;;N;;;;;
+144C5;ANATOLIAN HIEROGLYPH A170;Lo;0;L;;;;;N;;;;;
+144C6;ANATOLIAN HIEROGLYPH A171;Lo;0;L;;;;;N;;;;;
+144C7;ANATOLIAN HIEROGLYPH A172;Lo;0;L;;;;;N;;;;;
+144C8;ANATOLIAN HIEROGLYPH A173;Lo;0;L;;;;;N;;;;;
+144C9;ANATOLIAN HIEROGLYPH A174;Lo;0;L;;;;;N;;;;;
+144CA;ANATOLIAN HIEROGLYPH A175;Lo;0;L;;;;;N;;;;;
+144CB;ANATOLIAN HIEROGLYPH A176;Lo;0;L;;;;;N;;;;;
+144CC;ANATOLIAN HIEROGLYPH A177;Lo;0;L;;;;;N;;;;;
+144CD;ANATOLIAN HIEROGLYPH A178;Lo;0;L;;;;;N;;;;;
+144CE;ANATOLIAN HIEROGLYPH A179;Lo;0;L;;;;;N;;;;;
+144CF;ANATOLIAN HIEROGLYPH A180;Lo;0;L;;;;;N;;;;;
+144D0;ANATOLIAN HIEROGLYPH A181;Lo;0;L;;;;;N;;;;;
+144D1;ANATOLIAN HIEROGLYPH A182;Lo;0;L;;;;;N;;;;;
+144D2;ANATOLIAN HIEROGLYPH A183;Lo;0;L;;;;;N;;;;;
+144D3;ANATOLIAN HIEROGLYPH A184;Lo;0;L;;;;;N;;;;;
+144D4;ANATOLIAN HIEROGLYPH A185;Lo;0;L;;;;;N;;;;;
+144D5;ANATOLIAN HIEROGLYPH A186;Lo;0;L;;;;;N;;;;;
+144D6;ANATOLIAN HIEROGLYPH A187;Lo;0;L;;;;;N;;;;;
+144D7;ANATOLIAN HIEROGLYPH A188;Lo;0;L;;;;;N;;;;;
+144D8;ANATOLIAN HIEROGLYPH A189;Lo;0;L;;;;;N;;;;;
+144D9;ANATOLIAN HIEROGLYPH A190;Lo;0;L;;;;;N;;;;;
+144DA;ANATOLIAN HIEROGLYPH A191;Lo;0;L;;;;;N;;;;;
+144DB;ANATOLIAN HIEROGLYPH A192;Lo;0;L;;;;;N;;;;;
+144DC;ANATOLIAN HIEROGLYPH A193;Lo;0;L;;;;;N;;;;;
+144DD;ANATOLIAN HIEROGLYPH A194;Lo;0;L;;;;;N;;;;;
+144DE;ANATOLIAN HIEROGLYPH A195;Lo;0;L;;;;;N;;;;;
+144DF;ANATOLIAN HIEROGLYPH A196;Lo;0;L;;;;;N;;;;;
+144E0;ANATOLIAN HIEROGLYPH A197;Lo;0;L;;;;;N;;;;;
+144E1;ANATOLIAN HIEROGLYPH A198;Lo;0;L;;;;;N;;;;;
+144E2;ANATOLIAN HIEROGLYPH A199;Lo;0;L;;;;;N;;;;;
+144E3;ANATOLIAN HIEROGLYPH A200;Lo;0;L;;;;;N;;;;;
+144E4;ANATOLIAN HIEROGLYPH A201;Lo;0;L;;;;;N;;;;;
+144E5;ANATOLIAN HIEROGLYPH A202;Lo;0;L;;;;;N;;;;;
+144E6;ANATOLIAN HIEROGLYPH A202A;Lo;0;L;;;;;N;;;;;
+144E7;ANATOLIAN HIEROGLYPH A202B;Lo;0;L;;;;;N;;;;;
+144E8;ANATOLIAN HIEROGLYPH A203;Lo;0;L;;;;;N;;;;;
+144E9;ANATOLIAN HIEROGLYPH A204;Lo;0;L;;;;;N;;;;;
+144EA;ANATOLIAN HIEROGLYPH A205;Lo;0;L;;;;;N;;;;;
+144EB;ANATOLIAN HIEROGLYPH A206;Lo;0;L;;;;;N;;;;;
+144EC;ANATOLIAN HIEROGLYPH A207;Lo;0;L;;;;;N;;;;;
+144ED;ANATOLIAN HIEROGLYPH A207A;Lo;0;L;;;;;N;;;;;
+144EE;ANATOLIAN HIEROGLYPH A208;Lo;0;L;;;;;N;;;;;
+144EF;ANATOLIAN HIEROGLYPH A209;Lo;0;L;;;;;N;;;;;
+144F0;ANATOLIAN HIEROGLYPH A209A;Lo;0;L;;;;;N;;;;;
+144F1;ANATOLIAN HIEROGLYPH A210;Lo;0;L;;;;;N;;;;;
+144F2;ANATOLIAN HIEROGLYPH A211;Lo;0;L;;;;;N;;;;;
+144F3;ANATOLIAN HIEROGLYPH A212;Lo;0;L;;;;;N;;;;;
+144F4;ANATOLIAN HIEROGLYPH A213;Lo;0;L;;;;;N;;;;;
+144F5;ANATOLIAN HIEROGLYPH A214;Lo;0;L;;;;;N;;;;;
+144F6;ANATOLIAN HIEROGLYPH A215;Lo;0;L;;;;;N;;;;;
+144F7;ANATOLIAN HIEROGLYPH A215A;Lo;0;L;;;;;N;;;;;
+144F8;ANATOLIAN HIEROGLYPH A216;Lo;0;L;;;;;N;;;;;
+144F9;ANATOLIAN HIEROGLYPH A216A;Lo;0;L;;;;;N;;;;;
+144FA;ANATOLIAN HIEROGLYPH A217;Lo;0;L;;;;;N;;;;;
+144FB;ANATOLIAN HIEROGLYPH A218;Lo;0;L;;;;;N;;;;;
+144FC;ANATOLIAN HIEROGLYPH A219;Lo;0;L;;;;;N;;;;;
+144FD;ANATOLIAN HIEROGLYPH A220;Lo;0;L;;;;;N;;;;;
+144FE;ANATOLIAN HIEROGLYPH A221;Lo;0;L;;;;;N;;;;;
+144FF;ANATOLIAN HIEROGLYPH A222;Lo;0;L;;;;;N;;;;;
+14500;ANATOLIAN HIEROGLYPH A223;Lo;0;L;;;;;N;;;;;
+14501;ANATOLIAN HIEROGLYPH A224;Lo;0;L;;;;;N;;;;;
+14502;ANATOLIAN HIEROGLYPH A225;Lo;0;L;;;;;N;;;;;
+14503;ANATOLIAN HIEROGLYPH A226;Lo;0;L;;;;;N;;;;;
+14504;ANATOLIAN HIEROGLYPH A227;Lo;0;L;;;;;N;;;;;
+14505;ANATOLIAN HIEROGLYPH A227A;Lo;0;L;;;;;N;;;;;
+14506;ANATOLIAN HIEROGLYPH A228;Lo;0;L;;;;;N;;;;;
+14507;ANATOLIAN HIEROGLYPH A229;Lo;0;L;;;;;N;;;;;
+14508;ANATOLIAN HIEROGLYPH A230;Lo;0;L;;;;;N;;;;;
+14509;ANATOLIAN HIEROGLYPH A231;Lo;0;L;;;;;N;;;;;
+1450A;ANATOLIAN HIEROGLYPH A232;Lo;0;L;;;;;N;;;;;
+1450B;ANATOLIAN HIEROGLYPH A233;Lo;0;L;;;;;N;;;;;
+1450C;ANATOLIAN HIEROGLYPH A234;Lo;0;L;;;;;N;;;;;
+1450D;ANATOLIAN HIEROGLYPH A235;Lo;0;L;;;;;N;;;;;
+1450E;ANATOLIAN HIEROGLYPH A236;Lo;0;L;;;;;N;;;;;
+1450F;ANATOLIAN HIEROGLYPH A237;Lo;0;L;;;;;N;;;;;
+14510;ANATOLIAN HIEROGLYPH A238;Lo;0;L;;;;;N;;;;;
+14511;ANATOLIAN HIEROGLYPH A239;Lo;0;L;;;;;N;;;;;
+14512;ANATOLIAN HIEROGLYPH A240;Lo;0;L;;;;;N;;;;;
+14513;ANATOLIAN HIEROGLYPH A241;Lo;0;L;;;;;N;;;;;
+14514;ANATOLIAN HIEROGLYPH A242;Lo;0;L;;;;;N;;;;;
+14515;ANATOLIAN HIEROGLYPH A243;Lo;0;L;;;;;N;;;;;
+14516;ANATOLIAN HIEROGLYPH A244;Lo;0;L;;;;;N;;;;;
+14517;ANATOLIAN HIEROGLYPH A245;Lo;0;L;;;;;N;;;;;
+14518;ANATOLIAN HIEROGLYPH A246;Lo;0;L;;;;;N;;;;;
+14519;ANATOLIAN HIEROGLYPH A247;Lo;0;L;;;;;N;;;;;
+1451A;ANATOLIAN HIEROGLYPH A248;Lo;0;L;;;;;N;;;;;
+1451B;ANATOLIAN HIEROGLYPH A249;Lo;0;L;;;;;N;;;;;
+1451C;ANATOLIAN HIEROGLYPH A250;Lo;0;L;;;;;N;;;;;
+1451D;ANATOLIAN HIEROGLYPH A251;Lo;0;L;;;;;N;;;;;
+1451E;ANATOLIAN HIEROGLYPH A252;Lo;0;L;;;;;N;;;;;
+1451F;ANATOLIAN HIEROGLYPH A253;Lo;0;L;;;;;N;;;;;
+14520;ANATOLIAN HIEROGLYPH A254;Lo;0;L;;;;;N;;;;;
+14521;ANATOLIAN HIEROGLYPH A255;Lo;0;L;;;;;N;;;;;
+14522;ANATOLIAN HIEROGLYPH A256;Lo;0;L;;;;;N;;;;;
+14523;ANATOLIAN HIEROGLYPH A257;Lo;0;L;;;;;N;;;;;
+14524;ANATOLIAN HIEROGLYPH A258;Lo;0;L;;;;;N;;;;;
+14525;ANATOLIAN HIEROGLYPH A259;Lo;0;L;;;;;N;;;;;
+14526;ANATOLIAN HIEROGLYPH A260;Lo;0;L;;;;;N;;;;;
+14527;ANATOLIAN HIEROGLYPH A261;Lo;0;L;;;;;N;;;;;
+14528;ANATOLIAN HIEROGLYPH A262;Lo;0;L;;;;;N;;;;;
+14529;ANATOLIAN HIEROGLYPH A263;Lo;0;L;;;;;N;;;;;
+1452A;ANATOLIAN HIEROGLYPH A264;Lo;0;L;;;;;N;;;;;
+1452B;ANATOLIAN HIEROGLYPH A265;Lo;0;L;;;;;N;;;;;
+1452C;ANATOLIAN HIEROGLYPH A266;Lo;0;L;;;;;N;;;;;
+1452D;ANATOLIAN HIEROGLYPH A267;Lo;0;L;;;;;N;;;;;
+1452E;ANATOLIAN HIEROGLYPH A267A;Lo;0;L;;;;;N;;;;;
+1452F;ANATOLIAN HIEROGLYPH A268;Lo;0;L;;;;;N;;;;;
+14530;ANATOLIAN HIEROGLYPH A269;Lo;0;L;;;;;N;;;;;
+14531;ANATOLIAN HIEROGLYPH A270;Lo;0;L;;;;;N;;;;;
+14532;ANATOLIAN HIEROGLYPH A271;Lo;0;L;;;;;N;;;;;
+14533;ANATOLIAN HIEROGLYPH A272;Lo;0;L;;;;;N;;;;;
+14534;ANATOLIAN HIEROGLYPH A273;Lo;0;L;;;;;N;;;;;
+14535;ANATOLIAN HIEROGLYPH A274;Lo;0;L;;;;;N;;;;;
+14536;ANATOLIAN HIEROGLYPH A275;Lo;0;L;;;;;N;;;;;
+14537;ANATOLIAN HIEROGLYPH A276;Lo;0;L;;;;;N;;;;;
+14538;ANATOLIAN HIEROGLYPH A277;Lo;0;L;;;;;N;;;;;
+14539;ANATOLIAN HIEROGLYPH A278;Lo;0;L;;;;;N;;;;;
+1453A;ANATOLIAN HIEROGLYPH A279;Lo;0;L;;;;;N;;;;;
+1453B;ANATOLIAN HIEROGLYPH A280;Lo;0;L;;;;;N;;;;;
+1453C;ANATOLIAN HIEROGLYPH A281;Lo;0;L;;;;;N;;;;;
+1453D;ANATOLIAN HIEROGLYPH A282;Lo;0;L;;;;;N;;;;;
+1453E;ANATOLIAN HIEROGLYPH A283;Lo;0;L;;;;;N;;;;;
+1453F;ANATOLIAN HIEROGLYPH A284;Lo;0;L;;;;;N;;;;;
+14540;ANATOLIAN HIEROGLYPH A285;Lo;0;L;;;;;N;;;;;
+14541;ANATOLIAN HIEROGLYPH A286;Lo;0;L;;;;;N;;;;;
+14542;ANATOLIAN HIEROGLYPH A287;Lo;0;L;;;;;N;;;;;
+14543;ANATOLIAN HIEROGLYPH A288;Lo;0;L;;;;;N;;;;;
+14544;ANATOLIAN HIEROGLYPH A289;Lo;0;L;;;;;N;;;;;
+14545;ANATOLIAN HIEROGLYPH A289A;Lo;0;L;;;;;N;;;;;
+14546;ANATOLIAN HIEROGLYPH A290;Lo;0;L;;;;;N;;;;;
+14547;ANATOLIAN HIEROGLYPH A291;Lo;0;L;;;;;N;;;;;
+14548;ANATOLIAN HIEROGLYPH A292;Lo;0;L;;;;;N;;;;;
+14549;ANATOLIAN HIEROGLYPH A293;Lo;0;L;;;;;N;;;;;
+1454A;ANATOLIAN HIEROGLYPH A294;Lo;0;L;;;;;N;;;;;
+1454B;ANATOLIAN HIEROGLYPH A294A;Lo;0;L;;;;;N;;;;;
+1454C;ANATOLIAN HIEROGLYPH A295;Lo;0;L;;;;;N;;;;;
+1454D;ANATOLIAN HIEROGLYPH A296;Lo;0;L;;;;;N;;;;;
+1454E;ANATOLIAN HIEROGLYPH A297;Lo;0;L;;;;;N;;;;;
+1454F;ANATOLIAN HIEROGLYPH A298;Lo;0;L;;;;;N;;;;;
+14550;ANATOLIAN HIEROGLYPH A299;Lo;0;L;;;;;N;;;;;
+14551;ANATOLIAN HIEROGLYPH A299A;Lo;0;L;;;;;N;;;;;
+14552;ANATOLIAN HIEROGLYPH A300;Lo;0;L;;;;;N;;;;;
+14553;ANATOLIAN HIEROGLYPH A301;Lo;0;L;;;;;N;;;;;
+14554;ANATOLIAN HIEROGLYPH A302;Lo;0;L;;;;;N;;;;;
+14555;ANATOLIAN HIEROGLYPH A303;Lo;0;L;;;;;N;;;;;
+14556;ANATOLIAN HIEROGLYPH A304;Lo;0;L;;;;;N;;;;;
+14557;ANATOLIAN HIEROGLYPH A305;Lo;0;L;;;;;N;;;;;
+14558;ANATOLIAN HIEROGLYPH A306;Lo;0;L;;;;;N;;;;;
+14559;ANATOLIAN HIEROGLYPH A307;Lo;0;L;;;;;N;;;;;
+1455A;ANATOLIAN HIEROGLYPH A308;Lo;0;L;;;;;N;;;;;
+1455B;ANATOLIAN HIEROGLYPH A309;Lo;0;L;;;;;N;;;;;
+1455C;ANATOLIAN HIEROGLYPH A309A;Lo;0;L;;;;;N;;;;;
+1455D;ANATOLIAN HIEROGLYPH A310;Lo;0;L;;;;;N;;;;;
+1455E;ANATOLIAN HIEROGLYPH A311;Lo;0;L;;;;;N;;;;;
+1455F;ANATOLIAN HIEROGLYPH A312;Lo;0;L;;;;;N;;;;;
+14560;ANATOLIAN HIEROGLYPH A313;Lo;0;L;;;;;N;;;;;
+14561;ANATOLIAN HIEROGLYPH A314;Lo;0;L;;;;;N;;;;;
+14562;ANATOLIAN HIEROGLYPH A315;Lo;0;L;;;;;N;;;;;
+14563;ANATOLIAN HIEROGLYPH A316;Lo;0;L;;;;;N;;;;;
+14564;ANATOLIAN HIEROGLYPH A317;Lo;0;L;;;;;N;;;;;
+14565;ANATOLIAN HIEROGLYPH A318;Lo;0;L;;;;;N;;;;;
+14566;ANATOLIAN HIEROGLYPH A319;Lo;0;L;;;;;N;;;;;
+14567;ANATOLIAN HIEROGLYPH A320;Lo;0;L;;;;;N;;;;;
+14568;ANATOLIAN HIEROGLYPH A321;Lo;0;L;;;;;N;;;;;
+14569;ANATOLIAN HIEROGLYPH A322;Lo;0;L;;;;;N;;;;;
+1456A;ANATOLIAN HIEROGLYPH A323;Lo;0;L;;;;;N;;;;;
+1456B;ANATOLIAN HIEROGLYPH A324;Lo;0;L;;;;;N;;;;;
+1456C;ANATOLIAN HIEROGLYPH A325;Lo;0;L;;;;;N;;;;;
+1456D;ANATOLIAN HIEROGLYPH A326;Lo;0;L;;;;;N;;;;;
+1456E;ANATOLIAN HIEROGLYPH A327;Lo;0;L;;;;;N;;;;;
+1456F;ANATOLIAN HIEROGLYPH A328;Lo;0;L;;;;;N;;;;;
+14570;ANATOLIAN HIEROGLYPH A329;Lo;0;L;;;;;N;;;;;
+14571;ANATOLIAN HIEROGLYPH A329A;Lo;0;L;;;;;N;;;;;
+14572;ANATOLIAN HIEROGLYPH A330;Lo;0;L;;;;;N;;;;;
+14573;ANATOLIAN HIEROGLYPH A331;Lo;0;L;;;;;N;;;;;
+14574;ANATOLIAN HIEROGLYPH A332A;Lo;0;L;;;;;N;;;;;
+14575;ANATOLIAN HIEROGLYPH A332B;Lo;0;L;;;;;N;;;;;
+14576;ANATOLIAN HIEROGLYPH A332C;Lo;0;L;;;;;N;;;;;
+14577;ANATOLIAN HIEROGLYPH A333;Lo;0;L;;;;;N;;;;;
+14578;ANATOLIAN HIEROGLYPH A334;Lo;0;L;;;;;N;;;;;
+14579;ANATOLIAN HIEROGLYPH A335;Lo;0;L;;;;;N;;;;;
+1457A;ANATOLIAN HIEROGLYPH A336;Lo;0;L;;;;;N;;;;;
+1457B;ANATOLIAN HIEROGLYPH A336A;Lo;0;L;;;;;N;;;;;
+1457C;ANATOLIAN HIEROGLYPH A336B;Lo;0;L;;;;;N;;;;;
+1457D;ANATOLIAN HIEROGLYPH A336C;Lo;0;L;;;;;N;;;;;
+1457E;ANATOLIAN HIEROGLYPH A337;Lo;0;L;;;;;N;;;;;
+1457F;ANATOLIAN HIEROGLYPH A338;Lo;0;L;;;;;N;;;;;
+14580;ANATOLIAN HIEROGLYPH A339;Lo;0;L;;;;;N;;;;;
+14581;ANATOLIAN HIEROGLYPH A340;Lo;0;L;;;;;N;;;;;
+14582;ANATOLIAN HIEROGLYPH A341;Lo;0;L;;;;;N;;;;;
+14583;ANATOLIAN HIEROGLYPH A342;Lo;0;L;;;;;N;;;;;
+14584;ANATOLIAN HIEROGLYPH A343;Lo;0;L;;;;;N;;;;;
+14585;ANATOLIAN HIEROGLYPH A344;Lo;0;L;;;;;N;;;;;
+14586;ANATOLIAN HIEROGLYPH A345;Lo;0;L;;;;;N;;;;;
+14587;ANATOLIAN HIEROGLYPH A346;Lo;0;L;;;;;N;;;;;
+14588;ANATOLIAN HIEROGLYPH A347;Lo;0;L;;;;;N;;;;;
+14589;ANATOLIAN HIEROGLYPH A348;Lo;0;L;;;;;N;;;;;
+1458A;ANATOLIAN HIEROGLYPH A349;Lo;0;L;;;;;N;;;;;
+1458B;ANATOLIAN HIEROGLYPH A350;Lo;0;L;;;;;N;;;;;
+1458C;ANATOLIAN HIEROGLYPH A351;Lo;0;L;;;;;N;;;;;
+1458D;ANATOLIAN HIEROGLYPH A352;Lo;0;L;;;;;N;;;;;
+1458E;ANATOLIAN HIEROGLYPH A353;Lo;0;L;;;;;N;;;;;
+1458F;ANATOLIAN HIEROGLYPH A354;Lo;0;L;;;;;N;;;;;
+14590;ANATOLIAN HIEROGLYPH A355;Lo;0;L;;;;;N;;;;;
+14591;ANATOLIAN HIEROGLYPH A356;Lo;0;L;;;;;N;;;;;
+14592;ANATOLIAN HIEROGLYPH A357;Lo;0;L;;;;;N;;;;;
+14593;ANATOLIAN HIEROGLYPH A358;Lo;0;L;;;;;N;;;;;
+14594;ANATOLIAN HIEROGLYPH A359;Lo;0;L;;;;;N;;;;;
+14595;ANATOLIAN HIEROGLYPH A359A;Lo;0;L;;;;;N;;;;;
+14596;ANATOLIAN HIEROGLYPH A360;Lo;0;L;;;;;N;;;;;
+14597;ANATOLIAN HIEROGLYPH A361;Lo;0;L;;;;;N;;;;;
+14598;ANATOLIAN HIEROGLYPH A362;Lo;0;L;;;;;N;;;;;
+14599;ANATOLIAN HIEROGLYPH A363;Lo;0;L;;;;;N;;;;;
+1459A;ANATOLIAN HIEROGLYPH A364;Lo;0;L;;;;;N;;;;;
+1459B;ANATOLIAN HIEROGLYPH A364A;Lo;0;L;;;;;N;;;;;
+1459C;ANATOLIAN HIEROGLYPH A365;Lo;0;L;;;;;N;;;;;
+1459D;ANATOLIAN HIEROGLYPH A366;Lo;0;L;;;;;N;;;;;
+1459E;ANATOLIAN HIEROGLYPH A367;Lo;0;L;;;;;N;;;;;
+1459F;ANATOLIAN HIEROGLYPH A368;Lo;0;L;;;;;N;;;;;
+145A0;ANATOLIAN HIEROGLYPH A368A;Lo;0;L;;;;;N;;;;;
+145A1;ANATOLIAN HIEROGLYPH A369;Lo;0;L;;;;;N;;;;;
+145A2;ANATOLIAN HIEROGLYPH A370;Lo;0;L;;;;;N;;;;;
+145A3;ANATOLIAN HIEROGLYPH A371;Lo;0;L;;;;;N;;;;;
+145A4;ANATOLIAN HIEROGLYPH A371A;Lo;0;L;;;;;N;;;;;
+145A5;ANATOLIAN HIEROGLYPH A372;Lo;0;L;;;;;N;;;;;
+145A6;ANATOLIAN HIEROGLYPH A373;Lo;0;L;;;;;N;;;;;
+145A7;ANATOLIAN HIEROGLYPH A374;Lo;0;L;;;;;N;;;;;
+145A8;ANATOLIAN HIEROGLYPH A375;Lo;0;L;;;;;N;;;;;
+145A9;ANATOLIAN HIEROGLYPH A376;Lo;0;L;;;;;N;;;;;
+145AA;ANATOLIAN HIEROGLYPH A377;Lo;0;L;;;;;N;;;;;
+145AB;ANATOLIAN HIEROGLYPH A378;Lo;0;L;;;;;N;;;;;
+145AC;ANATOLIAN HIEROGLYPH A379;Lo;0;L;;;;;N;;;;;
+145AD;ANATOLIAN HIEROGLYPH A380;Lo;0;L;;;;;N;;;;;
+145AE;ANATOLIAN HIEROGLYPH A381;Lo;0;L;;;;;N;;;;;
+145AF;ANATOLIAN HIEROGLYPH A381A;Lo;0;L;;;;;N;;;;;
+145B0;ANATOLIAN HIEROGLYPH A382;Lo;0;L;;;;;N;;;;;
+145B1;ANATOLIAN HIEROGLYPH A383 RA OR RI;Lo;0;L;;;;;N;;;;;
+145B2;ANATOLIAN HIEROGLYPH A383A;Lo;0;L;;;;;N;;;;;
+145B3;ANATOLIAN HIEROGLYPH A384;Lo;0;L;;;;;N;;;;;
+145B4;ANATOLIAN HIEROGLYPH A385;Lo;0;L;;;;;N;;;;;
+145B5;ANATOLIAN HIEROGLYPH A386;Lo;0;L;;;;;N;;;;;
+145B6;ANATOLIAN HIEROGLYPH A386A;Lo;0;L;;;;;N;;;;;
+145B7;ANATOLIAN HIEROGLYPH A387;Lo;0;L;;;;;N;;;;;
+145B8;ANATOLIAN HIEROGLYPH A388;Lo;0;L;;;;;N;;;;;
+145B9;ANATOLIAN HIEROGLYPH A389;Lo;0;L;;;;;N;;;;;
+145BA;ANATOLIAN HIEROGLYPH A390;Lo;0;L;;;;;N;;;;;
+145BB;ANATOLIAN HIEROGLYPH A391;Lo;0;L;;;;;N;;;;;
+145BC;ANATOLIAN HIEROGLYPH A392;Lo;0;L;;;;;N;;;;;
+145BD;ANATOLIAN HIEROGLYPH A393 EIGHT;Lo;0;L;;;;;N;;;;;
+145BE;ANATOLIAN HIEROGLYPH A394;Lo;0;L;;;;;N;;;;;
+145BF;ANATOLIAN HIEROGLYPH A395;Lo;0;L;;;;;N;;;;;
+145C0;ANATOLIAN HIEROGLYPH A396;Lo;0;L;;;;;N;;;;;
+145C1;ANATOLIAN HIEROGLYPH A397;Lo;0;L;;;;;N;;;;;
+145C2;ANATOLIAN HIEROGLYPH A398;Lo;0;L;;;;;N;;;;;
+145C3;ANATOLIAN HIEROGLYPH A399;Lo;0;L;;;;;N;;;;;
+145C4;ANATOLIAN HIEROGLYPH A400;Lo;0;L;;;;;N;;;;;
+145C5;ANATOLIAN HIEROGLYPH A401;Lo;0;L;;;;;N;;;;;
+145C6;ANATOLIAN HIEROGLYPH A402;Lo;0;L;;;;;N;;;;;
+145C7;ANATOLIAN HIEROGLYPH A403;Lo;0;L;;;;;N;;;;;
+145C8;ANATOLIAN HIEROGLYPH A404;Lo;0;L;;;;;N;;;;;
+145C9;ANATOLIAN HIEROGLYPH A405;Lo;0;L;;;;;N;;;;;
+145CA;ANATOLIAN HIEROGLYPH A406;Lo;0;L;;;;;N;;;;;
+145CB;ANATOLIAN HIEROGLYPH A407;Lo;0;L;;;;;N;;;;;
+145CC;ANATOLIAN HIEROGLYPH A408;Lo;0;L;;;;;N;;;;;
+145CD;ANATOLIAN HIEROGLYPH A409;Lo;0;L;;;;;N;;;;;
+145CE;ANATOLIAN HIEROGLYPH A410 BEGIN LOGOGRAM MARK;Lo;0;L;;;;;N;;;;;
+145CF;ANATOLIAN HIEROGLYPH A410A END LOGOGRAM MARK;Lo;0;L;;;;;N;;;;;
+145D0;ANATOLIAN HIEROGLYPH A411;Lo;0;L;;;;;N;;;;;
+145D1;ANATOLIAN HIEROGLYPH A412;Lo;0;L;;;;;N;;;;;
+145D2;ANATOLIAN HIEROGLYPH A413;Lo;0;L;;;;;N;;;;;
+145D3;ANATOLIAN HIEROGLYPH A414;Lo;0;L;;;;;N;;;;;
+145D4;ANATOLIAN HIEROGLYPH A415;Lo;0;L;;;;;N;;;;;
+145D5;ANATOLIAN HIEROGLYPH A416;Lo;0;L;;;;;N;;;;;
+145D6;ANATOLIAN HIEROGLYPH A417;Lo;0;L;;;;;N;;;;;
+145D7;ANATOLIAN HIEROGLYPH A418;Lo;0;L;;;;;N;;;;;
+145D8;ANATOLIAN HIEROGLYPH A419;Lo;0;L;;;;;N;;;;;
+145D9;ANATOLIAN HIEROGLYPH A420;Lo;0;L;;;;;N;;;;;
+145DA;ANATOLIAN HIEROGLYPH A421;Lo;0;L;;;;;N;;;;;
+145DB;ANATOLIAN HIEROGLYPH A422;Lo;0;L;;;;;N;;;;;
+145DC;ANATOLIAN HIEROGLYPH A423;Lo;0;L;;;;;N;;;;;
+145DD;ANATOLIAN HIEROGLYPH A424;Lo;0;L;;;;;N;;;;;
+145DE;ANATOLIAN HIEROGLYPH A425;Lo;0;L;;;;;N;;;;;
+145DF;ANATOLIAN HIEROGLYPH A426;Lo;0;L;;;;;N;;;;;
+145E0;ANATOLIAN HIEROGLYPH A427;Lo;0;L;;;;;N;;;;;
+145E1;ANATOLIAN HIEROGLYPH A428;Lo;0;L;;;;;N;;;;;
+145E2;ANATOLIAN HIEROGLYPH A429;Lo;0;L;;;;;N;;;;;
+145E3;ANATOLIAN HIEROGLYPH A430;Lo;0;L;;;;;N;;;;;
+145E4;ANATOLIAN HIEROGLYPH A431;Lo;0;L;;;;;N;;;;;
+145E5;ANATOLIAN HIEROGLYPH A432;Lo;0;L;;;;;N;;;;;
+145E6;ANATOLIAN HIEROGLYPH A433;Lo;0;L;;;;;N;;;;;
+145E7;ANATOLIAN HIEROGLYPH A434;Lo;0;L;;;;;N;;;;;
+145E8;ANATOLIAN HIEROGLYPH A435;Lo;0;L;;;;;N;;;;;
+145E9;ANATOLIAN HIEROGLYPH A436;Lo;0;L;;;;;N;;;;;
+145EA;ANATOLIAN HIEROGLYPH A437;Lo;0;L;;;;;N;;;;;
+145EB;ANATOLIAN HIEROGLYPH A438;Lo;0;L;;;;;N;;;;;
+145EC;ANATOLIAN HIEROGLYPH A439;Lo;0;L;;;;;N;;;;;
+145ED;ANATOLIAN HIEROGLYPH A440;Lo;0;L;;;;;N;;;;;
+145EE;ANATOLIAN HIEROGLYPH A441;Lo;0;L;;;;;N;;;;;
+145EF;ANATOLIAN HIEROGLYPH A442;Lo;0;L;;;;;N;;;;;
+145F0;ANATOLIAN HIEROGLYPH A443;Lo;0;L;;;;;N;;;;;
+145F1;ANATOLIAN HIEROGLYPH A444;Lo;0;L;;;;;N;;;;;
+145F2;ANATOLIAN HIEROGLYPH A445;Lo;0;L;;;;;N;;;;;
+145F3;ANATOLIAN HIEROGLYPH A446;Lo;0;L;;;;;N;;;;;
+145F4;ANATOLIAN HIEROGLYPH A447;Lo;0;L;;;;;N;;;;;
+145F5;ANATOLIAN HIEROGLYPH A448;Lo;0;L;;;;;N;;;;;
+145F6;ANATOLIAN HIEROGLYPH A449;Lo;0;L;;;;;N;;;;;
+145F7;ANATOLIAN HIEROGLYPH A450;Lo;0;L;;;;;N;;;;;
+145F8;ANATOLIAN HIEROGLYPH A450A;Lo;0;L;;;;;N;;;;;
+145F9;ANATOLIAN HIEROGLYPH A451;Lo;0;L;;;;;N;;;;;
+145FA;ANATOLIAN HIEROGLYPH A452;Lo;0;L;;;;;N;;;;;
+145FB;ANATOLIAN HIEROGLYPH A453;Lo;0;L;;;;;N;;;;;
+145FC;ANATOLIAN HIEROGLYPH A454;Lo;0;L;;;;;N;;;;;
+145FD;ANATOLIAN HIEROGLYPH A455;Lo;0;L;;;;;N;;;;;
+145FE;ANATOLIAN HIEROGLYPH A456;Lo;0;L;;;;;N;;;;;
+145FF;ANATOLIAN HIEROGLYPH A457;Lo;0;L;;;;;N;;;;;
+14600;ANATOLIAN HIEROGLYPH A457A;Lo;0;L;;;;;N;;;;;
+14601;ANATOLIAN HIEROGLYPH A458;Lo;0;L;;;;;N;;;;;
+14602;ANATOLIAN HIEROGLYPH A459;Lo;0;L;;;;;N;;;;;
+14603;ANATOLIAN HIEROGLYPH A460;Lo;0;L;;;;;N;;;;;
+14604;ANATOLIAN HIEROGLYPH A461;Lo;0;L;;;;;N;;;;;
+14605;ANATOLIAN HIEROGLYPH A462;Lo;0;L;;;;;N;;;;;
+14606;ANATOLIAN HIEROGLYPH A463;Lo;0;L;;;;;N;;;;;
+14607;ANATOLIAN HIEROGLYPH A464;Lo;0;L;;;;;N;;;;;
+14608;ANATOLIAN HIEROGLYPH A465;Lo;0;L;;;;;N;;;;;
+14609;ANATOLIAN HIEROGLYPH A466;Lo;0;L;;;;;N;;;;;
+1460A;ANATOLIAN HIEROGLYPH A467;Lo;0;L;;;;;N;;;;;
+1460B;ANATOLIAN HIEROGLYPH A468;Lo;0;L;;;;;N;;;;;
+1460C;ANATOLIAN HIEROGLYPH A469;Lo;0;L;;;;;N;;;;;
+1460D;ANATOLIAN HIEROGLYPH A470;Lo;0;L;;;;;N;;;;;
+1460E;ANATOLIAN HIEROGLYPH A471;Lo;0;L;;;;;N;;;;;
+1460F;ANATOLIAN HIEROGLYPH A472;Lo;0;L;;;;;N;;;;;
+14610;ANATOLIAN HIEROGLYPH A473;Lo;0;L;;;;;N;;;;;
+14611;ANATOLIAN HIEROGLYPH A474;Lo;0;L;;;;;N;;;;;
+14612;ANATOLIAN HIEROGLYPH A475;Lo;0;L;;;;;N;;;;;
+14613;ANATOLIAN HIEROGLYPH A476;Lo;0;L;;;;;N;;;;;
+14614;ANATOLIAN HIEROGLYPH A477;Lo;0;L;;;;;N;;;;;
+14615;ANATOLIAN HIEROGLYPH A478;Lo;0;L;;;;;N;;;;;
+14616;ANATOLIAN HIEROGLYPH A479;Lo;0;L;;;;;N;;;;;
+14617;ANATOLIAN HIEROGLYPH A480;Lo;0;L;;;;;N;;;;;
+14618;ANATOLIAN HIEROGLYPH A481;Lo;0;L;;;;;N;;;;;
+14619;ANATOLIAN HIEROGLYPH A482;Lo;0;L;;;;;N;;;;;
+1461A;ANATOLIAN HIEROGLYPH A483;Lo;0;L;;;;;N;;;;;
+1461B;ANATOLIAN HIEROGLYPH A484;Lo;0;L;;;;;N;;;;;
+1461C;ANATOLIAN HIEROGLYPH A485;Lo;0;L;;;;;N;;;;;
+1461D;ANATOLIAN HIEROGLYPH A486;Lo;0;L;;;;;N;;;;;
+1461E;ANATOLIAN HIEROGLYPH A487;Lo;0;L;;;;;N;;;;;
+1461F;ANATOLIAN HIEROGLYPH A488;Lo;0;L;;;;;N;;;;;
+14620;ANATOLIAN HIEROGLYPH A489;Lo;0;L;;;;;N;;;;;
+14621;ANATOLIAN HIEROGLYPH A490;Lo;0;L;;;;;N;;;;;
+14622;ANATOLIAN HIEROGLYPH A491;Lo;0;L;;;;;N;;;;;
+14623;ANATOLIAN HIEROGLYPH A492;Lo;0;L;;;;;N;;;;;
+14624;ANATOLIAN HIEROGLYPH A493;Lo;0;L;;;;;N;;;;;
+14625;ANATOLIAN HIEROGLYPH A494;Lo;0;L;;;;;N;;;;;
+14626;ANATOLIAN HIEROGLYPH A495;Lo;0;L;;;;;N;;;;;
+14627;ANATOLIAN HIEROGLYPH A496;Lo;0;L;;;;;N;;;;;
+14628;ANATOLIAN HIEROGLYPH A497;Lo;0;L;;;;;N;;;;;
+14629;ANATOLIAN HIEROGLYPH A501;Lo;0;L;;;;;N;;;;;
+1462A;ANATOLIAN HIEROGLYPH A502;Lo;0;L;;;;;N;;;;;
+1462B;ANATOLIAN HIEROGLYPH A503;Lo;0;L;;;;;N;;;;;
+1462C;ANATOLIAN HIEROGLYPH A504;Lo;0;L;;;;;N;;;;;
+1462D;ANATOLIAN HIEROGLYPH A505;Lo;0;L;;;;;N;;;;;
+1462E;ANATOLIAN HIEROGLYPH A506;Lo;0;L;;;;;N;;;;;
+1462F;ANATOLIAN HIEROGLYPH A507;Lo;0;L;;;;;N;;;;;
+14630;ANATOLIAN HIEROGLYPH A508;Lo;0;L;;;;;N;;;;;
+14631;ANATOLIAN HIEROGLYPH A509;Lo;0;L;;;;;N;;;;;
+14632;ANATOLIAN HIEROGLYPH A510;Lo;0;L;;;;;N;;;;;
+14633;ANATOLIAN HIEROGLYPH A511;Lo;0;L;;;;;N;;;;;
+14634;ANATOLIAN HIEROGLYPH A512;Lo;0;L;;;;;N;;;;;
+14635;ANATOLIAN HIEROGLYPH A513;Lo;0;L;;;;;N;;;;;
+14636;ANATOLIAN HIEROGLYPH A514;Lo;0;L;;;;;N;;;;;
+14637;ANATOLIAN HIEROGLYPH A515;Lo;0;L;;;;;N;;;;;
+14638;ANATOLIAN HIEROGLYPH A516;Lo;0;L;;;;;N;;;;;
+14639;ANATOLIAN HIEROGLYPH A517;Lo;0;L;;;;;N;;;;;
+1463A;ANATOLIAN HIEROGLYPH A518;Lo;0;L;;;;;N;;;;;
+1463B;ANATOLIAN HIEROGLYPH A519;Lo;0;L;;;;;N;;;;;
+1463C;ANATOLIAN HIEROGLYPH A520;Lo;0;L;;;;;N;;;;;
+1463D;ANATOLIAN HIEROGLYPH A521;Lo;0;L;;;;;N;;;;;
+1463E;ANATOLIAN HIEROGLYPH A522;Lo;0;L;;;;;N;;;;;
+1463F;ANATOLIAN HIEROGLYPH A523;Lo;0;L;;;;;N;;;;;
+14640;ANATOLIAN HIEROGLYPH A524;Lo;0;L;;;;;N;;;;;
+14641;ANATOLIAN HIEROGLYPH A525;Lo;0;L;;;;;N;;;;;
+14642;ANATOLIAN HIEROGLYPH A526;Lo;0;L;;;;;N;;;;;
+14643;ANATOLIAN HIEROGLYPH A527;Lo;0;L;;;;;N;;;;;
+14644;ANATOLIAN HIEROGLYPH A528;Lo;0;L;;;;;N;;;;;
+14645;ANATOLIAN HIEROGLYPH A529;Lo;0;L;;;;;N;;;;;
+14646;ANATOLIAN HIEROGLYPH A530;Lo;0;L;;;;;N;;;;;
 16800;BAMUM LETTER PHASE-A NGKUE MFON;Lo;0;L;;;;;N;;;;;
 16801;BAMUM LETTER PHASE-A GBIEE FON;Lo;0;L;;;;;N;;;;;
 16802;BAMUM LETTER PHASE-A PON MFON PIPAEMGBIEE;Lo;0;L;;;;;N;;;;;
@@ -23080,6 +24300,17 @@
 1D1DB;MUSICAL SYMBOL SCANDICUS FLEXUS;So;0;L;;;;;N;;;;;
 1D1DC;MUSICAL SYMBOL TORCULUS RESUPINUS;So;0;L;;;;;N;;;;;
 1D1DD;MUSICAL SYMBOL PES SUBPUNCTIS;So;0;L;;;;;N;;;;;
+1D1DE;MUSICAL SYMBOL KIEVAN C CLEF;So;0;L;;;;;N;;;;;
+1D1DF;MUSICAL SYMBOL KIEVAN END OF PIECE;So;0;L;;;;;N;;;;;
+1D1E0;MUSICAL SYMBOL KIEVAN FINAL NOTE;So;0;L;;;;;N;;;;;
+1D1E1;MUSICAL SYMBOL KIEVAN RECITATIVE MARK;So;0;L;;;;;N;;;;;
+1D1E2;MUSICAL SYMBOL KIEVAN WHOLE NOTE;So;0;L;;;;;N;;;;;
+1D1E3;MUSICAL SYMBOL KIEVAN HALF NOTE;So;0;L;;;;;N;;;;;
+1D1E4;MUSICAL SYMBOL KIEVAN QUARTER NOTE STEM DOWN;So;0;L;;;;;N;;;;;
+1D1E5;MUSICAL SYMBOL KIEVAN QUARTER NOTE STEM UP;So;0;L;;;;;N;;;;;
+1D1E6;MUSICAL SYMBOL KIEVAN EIGHTH NOTE STEM DOWN;So;0;L;;;;;N;;;;;
+1D1E7;MUSICAL SYMBOL KIEVAN EIGHTH NOTE STEM UP;So;0;L;;;;;N;;;;;
+1D1E8;MUSICAL SYMBOL KIEVAN FLAT SIGN;So;0;L;;;;;N;;;;;
 1D200;GREEK VOCAL NOTATION SYMBOL-1;So;0;ON;;;;;N;;;;;
 1D201;GREEK VOCAL NOTATION SYMBOL-2;So;0;ON;;;;;N;;;;;
 1D202;GREEK VOCAL NOTATION SYMBOL-3;So;0;ON;;;;;N;;;;;
@@ -24251,6 +25482,678 @@
 1D7FD;MATHEMATICAL MONOSPACE DIGIT SEVEN;Nd;0;EN;<font> 0037;7;7;7;N;;;;;
 1D7FE;MATHEMATICAL MONOSPACE DIGIT EIGHT;Nd;0;EN;<font> 0038;8;8;8;N;;;;;
 1D7FF;MATHEMATICAL MONOSPACE DIGIT NINE;Nd;0;EN;<font> 0039;9;9;9;N;;;;;
+1D800;SIGNWRITING HAND-FIST INDEX;So;0;L;;;;;N;;;;;
+1D801;SIGNWRITING HAND-CIRCLE INDEX;So;0;L;;;;;N;;;;;
+1D802;SIGNWRITING HAND-CUP INDEX;So;0;L;;;;;N;;;;;
+1D803;SIGNWRITING HAND-OVAL INDEX;So;0;L;;;;;N;;;;;
+1D804;SIGNWRITING HAND-HINGE INDEX;So;0;L;;;;;N;;;;;
+1D805;SIGNWRITING HAND-ANGLE INDEX;So;0;L;;;;;N;;;;;
+1D806;SIGNWRITING HAND-FIST INDEX BENT;So;0;L;;;;;N;;;;;
+1D807;SIGNWRITING HAND-CIRCLE INDEX BENT;So;0;L;;;;;N;;;;;
+1D808;SIGNWRITING HAND-FIST THUMB UNDER INDEX BENT;So;0;L;;;;;N;;;;;
+1D809;SIGNWRITING HAND-FIST INDEX RAISED KNUCKLE;So;0;L;;;;;N;;;;;
+1D80A;SIGNWRITING HAND-FIST INDEX CUPPED;So;0;L;;;;;N;;;;;
+1D80B;SIGNWRITING HAND-FIST INDEX HINGED;So;0;L;;;;;N;;;;;
+1D80C;SIGNWRITING HAND-FIST INDEX HINGED LOW;So;0;L;;;;;N;;;;;
+1D80D;SIGNWRITING HAND-CIRCLE INDEX HINGE;So;0;L;;;;;N;;;;;
+1D80E;SIGNWRITING HAND-FIST INDEX MIDDLE;So;0;L;;;;;N;;;;;
+1D80F;SIGNWRITING HAND-CIRCLE INDEX MIDDLE;So;0;L;;;;;N;;;;;
+1D810;SIGNWRITING HAND-FIST INDEX MIDDLE BENT;So;0;L;;;;;N;;;;;
+1D811;SIGNWRITING HAND-FIST INDEX MIDDLE RAISED KNUCKLES;So;0;L;;;;;N;;;;;
+1D812;SIGNWRITING HAND-FIST INDEX MIDDLE HINGED;So;0;L;;;;;N;;;;;
+1D813;SIGNWRITING HAND-FIST INDEX UP MIDDLE HINGED;So;0;L;;;;;N;;;;;
+1D814;SIGNWRITING HAND-FIST INDEX HINGED MIDDLE UP;So;0;L;;;;;N;;;;;
+1D815;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED;So;0;L;;;;;N;;;;;
+1D816;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED INDEX BENT;So;0;L;;;;;N;;;;;
+1D817;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED MIDDLE BENT;So;0;L;;;;;N;;;;;
+1D818;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED CUPPED;So;0;L;;;;;N;;;;;
+1D819;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED HINGED;So;0;L;;;;;N;;;;;
+1D81A;SIGNWRITING HAND-FIST INDEX MIDDLE CROSSED;So;0;L;;;;;N;;;;;
+1D81B;SIGNWRITING HAND-CIRCLE INDEX MIDDLE CROSSED;So;0;L;;;;;N;;;;;
+1D81C;SIGNWRITING HAND-FIST MIDDLE BENT OVER INDEX;So;0;L;;;;;N;;;;;
+1D81D;SIGNWRITING HAND-FIST INDEX BENT OVER MIDDLE;So;0;L;;;;;N;;;;;
+1D81E;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB;So;0;L;;;;;N;;;;;
+1D81F;SIGNWRITING HAND-CIRCLE INDEX MIDDLE THUMB;So;0;L;;;;;N;;;;;
+1D820;SIGNWRITING HAND-FIST INDEX MIDDLE STRAIGHT THUMB BENT;So;0;L;;;;;N;;;;;
+1D821;SIGNWRITING HAND-FIST INDEX MIDDLE BENT THUMB STRAIGHT;So;0;L;;;;;N;;;;;
+1D822;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB BENT;So;0;L;;;;;N;;;;;
+1D823;SIGNWRITING HAND-FIST INDEX MIDDLE HINGED SPREAD THUMB SIDE;So;0;L;;;;;N;;;;;
+1D824;SIGNWRITING HAND-FIST INDEX UP MIDDLE HINGED THUMB SIDE;So;0;L;;;;;N;;;;;
+1D825;SIGNWRITING HAND-FIST INDEX UP MIDDLE HINGED THUMB CONJOINED;So;0;L;;;;;N;;;;;
+1D826;SIGNWRITING HAND-FIST INDEX HINGED MIDDLE UP THUMB SIDE;So;0;L;;;;;N;;;;;
+1D827;SIGNWRITING HAND-FIST INDEX MIDDLE UP SPREAD THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D828;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB CUPPED;So;0;L;;;;;N;;;;;
+1D829;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB CIRCLED;So;0;L;;;;;N;;;;;
+1D82A;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB HOOKED;So;0;L;;;;;N;;;;;
+1D82B;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB HINGED;So;0;L;;;;;N;;;;;
+1D82C;SIGNWRITING HAND-FIST THUMB BETWEEN INDEX MIDDLE STRAIGHT;So;0;L;;;;;N;;;;;
+1D82D;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB SIDE;So;0;L;;;;;N;;;;;
+1D82E;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB SIDE CONJOINED;So;0;L;;;;;N;;;;;
+1D82F;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB SIDE BENT;So;0;L;;;;;N;;;;;
+1D830;SIGNWRITING HAND-FIST MIDDLE THUMB HOOKED INDEX UP;So;0;L;;;;;N;;;;;
+1D831;SIGNWRITING HAND-FIST INDEX THUMB HOOKED MIDDLE UP;So;0;L;;;;;N;;;;;
+1D832;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED HINGED THUMB SIDE;So;0;L;;;;;N;;;;;
+1D833;SIGNWRITING HAND-FIST INDEX MIDDLE CROSSED THUMB SIDE;So;0;L;;;;;N;;;;;
+1D834;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D835;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED CUPPED THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D836;SIGNWRITING HAND-FIST MIDDLE THUMB CUPPED INDEX UP;So;0;L;;;;;N;;;;;
+1D837;SIGNWRITING HAND-FIST INDEX THUMB CUPPED MIDDLE UP;So;0;L;;;;;N;;;;;
+1D838;SIGNWRITING HAND-FIST MIDDLE THUMB CIRCLED INDEX UP;So;0;L;;;;;N;;;;;
+1D839;SIGNWRITING HAND-FIST MIDDLE THUMB CIRCLED INDEX HINGED;So;0;L;;;;;N;;;;;
+1D83A;SIGNWRITING HAND-FIST INDEX THUMB ANGLED OUT MIDDLE UP;So;0;L;;;;;N;;;;;
+1D83B;SIGNWRITING HAND-FIST INDEX THUMB ANGLED IN MIDDLE UP;So;0;L;;;;;N;;;;;
+1D83C;SIGNWRITING HAND-FIST INDEX THUMB CIRCLED MIDDLE UP;So;0;L;;;;;N;;;;;
+1D83D;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB CONJOINED HINGED;So;0;L;;;;;N;;;;;
+1D83E;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB ANGLED OUT;So;0;L;;;;;N;;;;;
+1D83F;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB ANGLED;So;0;L;;;;;N;;;;;
+1D840;SIGNWRITING HAND-FIST MIDDLE THUMB ANGLED OUT INDEX UP;So;0;L;;;;;N;;;;;
+1D841;SIGNWRITING HAND-FIST MIDDLE THUMB ANGLED OUT INDEX CROSSED;So;0;L;;;;;N;;;;;
+1D842;SIGNWRITING HAND-FIST MIDDLE THUMB ANGLED INDEX UP;So;0;L;;;;;N;;;;;
+1D843;SIGNWRITING HAND-FIST INDEX THUMB HOOKED MIDDLE HINGED;So;0;L;;;;;N;;;;;
+1D844;SIGNWRITING HAND-FLAT FOUR FINGERS;So;0;L;;;;;N;;;;;
+1D845;SIGNWRITING HAND-FLAT FOUR FINGERS BENT;So;0;L;;;;;N;;;;;
+1D846;SIGNWRITING HAND-FLAT FOUR FINGERS HINGED;So;0;L;;;;;N;;;;;
+1D847;SIGNWRITING HAND-FLAT FOUR FINGERS CONJOINED;So;0;L;;;;;N;;;;;
+1D848;SIGNWRITING HAND-FLAT FOUR FINGERS CONJOINED SPLIT;So;0;L;;;;;N;;;;;
+1D849;SIGNWRITING HAND-CLAW FOUR FINGERS CONJOINED;So;0;L;;;;;N;;;;;
+1D84A;SIGNWRITING HAND-FIST FOUR FINGERS CONJOINED BENT;So;0;L;;;;;N;;;;;
+1D84B;SIGNWRITING HAND-HINGE FOUR FINGERS CONJOINED;So;0;L;;;;;N;;;;;
+1D84C;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD;So;0;L;;;;;N;;;;;
+1D84D;SIGNWRITING HAND-FLAT HEEL FIVE FINGERS SPREAD;So;0;L;;;;;N;;;;;
+1D84E;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD FOUR BENT;So;0;L;;;;;N;;;;;
+1D84F;SIGNWRITING HAND-FLAT HEEL FIVE FINGERS SPREAD FOUR BENT;So;0;L;;;;;N;;;;;
+1D850;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD BENT;So;0;L;;;;;N;;;;;
+1D851;SIGNWRITING HAND-FLAT HEEL FIVE FINGERS SPREAD BENT;So;0;L;;;;;N;;;;;
+1D852;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D853;SIGNWRITING HAND-CUP FIVE FINGERS SPREAD;So;0;L;;;;;N;;;;;
+1D854;SIGNWRITING HAND-CUP FIVE FINGERS SPREAD OPEN;So;0;L;;;;;N;;;;;
+1D855;SIGNWRITING HAND-HINGE FIVE FINGERS SPREAD OPEN;So;0;L;;;;;N;;;;;
+1D856;SIGNWRITING HAND-OVAL FIVE FINGERS SPREAD;So;0;L;;;;;N;;;;;
+1D857;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD HINGED;So;0;L;;;;;N;;;;;
+1D858;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD HINGED THUMB SIDE;So;0;L;;;;;N;;;;;
+1D859;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD HINGED NO THUMB;So;0;L;;;;;N;;;;;
+1D85A;SIGNWRITING HAND-FLAT;So;0;L;;;;;N;;;;;
+1D85B;SIGNWRITING HAND-FLAT BETWEEN PALM FACINGS;So;0;L;;;;;N;;;;;
+1D85C;SIGNWRITING HAND-FLAT HEEL;So;0;L;;;;;N;;;;;
+1D85D;SIGNWRITING HAND-FLAT THUMB SIDE;So;0;L;;;;;N;;;;;
+1D85E;SIGNWRITING HAND-FLAT HEEL THUMB SIDE;So;0;L;;;;;N;;;;;
+1D85F;SIGNWRITING HAND-FLAT THUMB BENT;So;0;L;;;;;N;;;;;
+1D860;SIGNWRITING HAND-FLAT THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D861;SIGNWRITING HAND-FLAT SPLIT INDEX THUMB SIDE;So;0;L;;;;;N;;;;;
+1D862;SIGNWRITING HAND-FLAT SPLIT CENTRE;So;0;L;;;;;N;;;;;
+1D863;SIGNWRITING HAND-FLAT SPLIT CENTRE THUMB SIDE;So;0;L;;;;;N;;;;;
+1D864;SIGNWRITING HAND-FLAT SPLIT CENTRE THUMB SIDE BENT;So;0;L;;;;;N;;;;;
+1D865;SIGNWRITING HAND-FLAT SPLIT LITTLE;So;0;L;;;;;N;;;;;
+1D866;SIGNWRITING HAND-CLAW;So;0;L;;;;;N;;;;;
+1D867;SIGNWRITING HAND-CLAW THUMB SIDE;So;0;L;;;;;N;;;;;
+1D868;SIGNWRITING HAND-CLAW NO THUMB;So;0;L;;;;;N;;;;;
+1D869;SIGNWRITING HAND-CLAW THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D86A;SIGNWRITING HAND-HOOK CURLICUE;So;0;L;;;;;N;;;;;
+1D86B;SIGNWRITING HAND-HOOK;So;0;L;;;;;N;;;;;
+1D86C;SIGNWRITING HAND-CUP OPEN;So;0;L;;;;;N;;;;;
+1D86D;SIGNWRITING HAND-CUP;So;0;L;;;;;N;;;;;
+1D86E;SIGNWRITING HAND-CUP OPEN THUMB SIDE;So;0;L;;;;;N;;;;;
+1D86F;SIGNWRITING HAND-CUP THUMB SIDE;So;0;L;;;;;N;;;;;
+1D870;SIGNWRITING HAND-CUP OPEN NO THUMB;So;0;L;;;;;N;;;;;
+1D871;SIGNWRITING HAND-CUP NO THUMB;So;0;L;;;;;N;;;;;
+1D872;SIGNWRITING HAND-CUP OPEN THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D873;SIGNWRITING HAND-CUP THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D874;SIGNWRITING HAND-CURLICUE OPEN;So;0;L;;;;;N;;;;;
+1D875;SIGNWRITING HAND-CURLICUE;So;0;L;;;;;N;;;;;
+1D876;SIGNWRITING HAND-CIRCLE;So;0;L;;;;;N;;;;;
+1D877;SIGNWRITING HAND-OVAL;So;0;L;;;;;N;;;;;
+1D878;SIGNWRITING HAND-OVAL THUMB SIDE;So;0;L;;;;;N;;;;;
+1D879;SIGNWRITING HAND-OVAL NO THUMB;So;0;L;;;;;N;;;;;
+1D87A;SIGNWRITING HAND-OVAL THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D87B;SIGNWRITING HAND-HINGE OPEN;So;0;L;;;;;N;;;;;
+1D87C;SIGNWRITING HAND-HINGE OPEN THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D87D;SIGNWRITING HAND-HINGE;So;0;L;;;;;N;;;;;
+1D87E;SIGNWRITING HAND-HINGE SMALL;So;0;L;;;;;N;;;;;
+1D87F;SIGNWRITING HAND-HINGE OPEN THUMB SIDE;So;0;L;;;;;N;;;;;
+1D880;SIGNWRITING HAND-HINGE THUMB SIDE;So;0;L;;;;;N;;;;;
+1D881;SIGNWRITING HAND-HINGE OPEN NO THUMB;So;0;L;;;;;N;;;;;
+1D882;SIGNWRITING HAND-HINGE NO THUMB;So;0;L;;;;;N;;;;;
+1D883;SIGNWRITING HAND-HINGE THUMB SIDE TOUCHING INDEX;So;0;L;;;;;N;;;;;
+1D884;SIGNWRITING HAND-HINGE THUMB BETWEEN MIDDLE RING;So;0;L;;;;;N;;;;;
+1D885;SIGNWRITING HAND-ANGLE;So;0;L;;;;;N;;;;;
+1D886;SIGNWRITING HAND-FIST INDEX MIDDLE RING;So;0;L;;;;;N;;;;;
+1D887;SIGNWRITING HAND-CIRCLE INDEX MIDDLE RING;So;0;L;;;;;N;;;;;
+1D888;SIGNWRITING HAND-HINGE INDEX MIDDLE RING;So;0;L;;;;;N;;;;;
+1D889;SIGNWRITING HAND-ANGLE INDEX MIDDLE RING;So;0;L;;;;;N;;;;;
+1D88A;SIGNWRITING HAND-HINGE LITTLE;So;0;L;;;;;N;;;;;
+1D88B;SIGNWRITING HAND-FIST INDEX MIDDLE RING BENT;So;0;L;;;;;N;;;;;
+1D88C;SIGNWRITING HAND-FIST INDEX MIDDLE RING CONJOINED;So;0;L;;;;;N;;;;;
+1D88D;SIGNWRITING HAND-HINGE INDEX MIDDLE RING CONJOINED;So;0;L;;;;;N;;;;;
+1D88E;SIGNWRITING HAND-FIST LITTLE DOWN;So;0;L;;;;;N;;;;;
+1D88F;SIGNWRITING HAND-FIST LITTLE DOWN RIPPLE STRAIGHT;So;0;L;;;;;N;;;;;
+1D890;SIGNWRITING HAND-FIST LITTLE DOWN RIPPLE CURVED;So;0;L;;;;;N;;;;;
+1D891;SIGNWRITING HAND-FIST LITTLE DOWN OTHERS CIRCLED;So;0;L;;;;;N;;;;;
+1D892;SIGNWRITING HAND-FIST LITTLE UP;So;0;L;;;;;N;;;;;
+1D893;SIGNWRITING HAND-FIST THUMB UNDER LITTLE UP;So;0;L;;;;;N;;;;;
+1D894;SIGNWRITING HAND-CIRCLE LITTLE UP;So;0;L;;;;;N;;;;;
+1D895;SIGNWRITING HAND-OVAL LITTLE UP;So;0;L;;;;;N;;;;;
+1D896;SIGNWRITING HAND-ANGLE LITTLE UP;So;0;L;;;;;N;;;;;
+1D897;SIGNWRITING HAND-FIST LITTLE RAISED KNUCKLE;So;0;L;;;;;N;;;;;
+1D898;SIGNWRITING HAND-FIST LITTLE BENT;So;0;L;;;;;N;;;;;
+1D899;SIGNWRITING HAND-FIST LITTLE TOUCHES THUMB;So;0;L;;;;;N;;;;;
+1D89A;SIGNWRITING HAND-FIST LITTLE THUMB;So;0;L;;;;;N;;;;;
+1D89B;SIGNWRITING HAND-HINGE LITTLE THUMB;So;0;L;;;;;N;;;;;
+1D89C;SIGNWRITING HAND-FIST LITTLE INDEX THUMB;So;0;L;;;;;N;;;;;
+1D89D;SIGNWRITING HAND-HINGE LITTLE INDEX THUMB;So;0;L;;;;;N;;;;;
+1D89E;SIGNWRITING HAND-ANGLE LITTLE INDEX THUMB INDEX THUMB OUT;So;0;L;;;;;N;;;;;
+1D89F;SIGNWRITING HAND-ANGLE LITTLE INDEX THUMB INDEX THUMB;So;0;L;;;;;N;;;;;
+1D8A0;SIGNWRITING HAND-FIST LITTLE INDEX;So;0;L;;;;;N;;;;;
+1D8A1;SIGNWRITING HAND-CIRCLE LITTLE INDEX;So;0;L;;;;;N;;;;;
+1D8A2;SIGNWRITING HAND-HINGE LITTLE INDEX;So;0;L;;;;;N;;;;;
+1D8A3;SIGNWRITING HAND-ANGLE LITTLE INDEX;So;0;L;;;;;N;;;;;
+1D8A4;SIGNWRITING HAND-FIST INDEX MIDDLE LITTLE;So;0;L;;;;;N;;;;;
+1D8A5;SIGNWRITING HAND-CIRCLE INDEX MIDDLE LITTLE;So;0;L;;;;;N;;;;;
+1D8A6;SIGNWRITING HAND-HINGE INDEX MIDDLE LITTLE;So;0;L;;;;;N;;;;;
+1D8A7;SIGNWRITING HAND-HINGE RING;So;0;L;;;;;N;;;;;
+1D8A8;SIGNWRITING HAND-ANGLE INDEX MIDDLE LITTLE;So;0;L;;;;;N;;;;;
+1D8A9;SIGNWRITING HAND-FIST INDEX MIDDLE CROSS LITTLE;So;0;L;;;;;N;;;;;
+1D8AA;SIGNWRITING HAND-CIRCLE INDEX MIDDLE CROSS LITTLE;So;0;L;;;;;N;;;;;
+1D8AB;SIGNWRITING HAND-FIST RING DOWN;So;0;L;;;;;N;;;;;
+1D8AC;SIGNWRITING HAND-HINGE RING DOWN INDEX THUMB HOOK MIDDLE;So;0;L;;;;;N;;;;;
+1D8AD;SIGNWRITING HAND-ANGLE RING DOWN MIDDLE THUMB INDEX CROSS;So;0;L;;;;;N;;;;;
+1D8AE;SIGNWRITING HAND-FIST RING UP;So;0;L;;;;;N;;;;;
+1D8AF;SIGNWRITING HAND-FIST RING RAISED KNUCKLE;So;0;L;;;;;N;;;;;
+1D8B0;SIGNWRITING HAND-FIST RING LITTLE;So;0;L;;;;;N;;;;;
+1D8B1;SIGNWRITING HAND-CIRCLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8B2;SIGNWRITING HAND-OVAL RING LITTLE;So;0;L;;;;;N;;;;;
+1D8B3;SIGNWRITING HAND-ANGLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8B4;SIGNWRITING HAND-FIST RING MIDDLE;So;0;L;;;;;N;;;;;
+1D8B5;SIGNWRITING HAND-FIST RING MIDDLE CONJOINED;So;0;L;;;;;N;;;;;
+1D8B6;SIGNWRITING HAND-FIST RING MIDDLE RAISED KNUCKLES;So;0;L;;;;;N;;;;;
+1D8B7;SIGNWRITING HAND-FIST RING INDEX;So;0;L;;;;;N;;;;;
+1D8B8;SIGNWRITING HAND-FIST RING THUMB;So;0;L;;;;;N;;;;;
+1D8B9;SIGNWRITING HAND-HOOK RING THUMB;So;0;L;;;;;N;;;;;
+1D8BA;SIGNWRITING HAND-FIST INDEX RING LITTLE;So;0;L;;;;;N;;;;;
+1D8BB;SIGNWRITING HAND-CIRCLE INDEX RING LITTLE;So;0;L;;;;;N;;;;;
+1D8BC;SIGNWRITING HAND-CURLICUE INDEX RING LITTLE ON;So;0;L;;;;;N;;;;;
+1D8BD;SIGNWRITING HAND-HOOK INDEX RING LITTLE OUT;So;0;L;;;;;N;;;;;
+1D8BE;SIGNWRITING HAND-HOOK INDEX RING LITTLE IN;So;0;L;;;;;N;;;;;
+1D8BF;SIGNWRITING HAND-HOOK INDEX RING LITTLE UNDER;So;0;L;;;;;N;;;;;
+1D8C0;SIGNWRITING HAND-CUP INDEX RING LITTLE;So;0;L;;;;;N;;;;;
+1D8C1;SIGNWRITING HAND-HINGE INDEX RING LITTLE;So;0;L;;;;;N;;;;;
+1D8C2;SIGNWRITING HAND-ANGLE INDEX RING LITTLE OUT;So;0;L;;;;;N;;;;;
+1D8C3;SIGNWRITING HAND-ANGLE INDEX RING LITTLE;So;0;L;;;;;N;;;;;
+1D8C4;SIGNWRITING HAND-FIST MIDDLE DOWN;So;0;L;;;;;N;;;;;
+1D8C5;SIGNWRITING HAND-HINGE MIDDLE;So;0;L;;;;;N;;;;;
+1D8C6;SIGNWRITING HAND-FIST MIDDLE UP;So;0;L;;;;;N;;;;;
+1D8C7;SIGNWRITING HAND-CIRCLE MIDDLE UP;So;0;L;;;;;N;;;;;
+1D8C8;SIGNWRITING HAND-FIST MIDDLE RAISED KNUCKLE;So;0;L;;;;;N;;;;;
+1D8C9;SIGNWRITING HAND-FIST MIDDLE UP THUMB SIDE;So;0;L;;;;;N;;;;;
+1D8CA;SIGNWRITING HAND-HOOK MIDDLE THUMB;So;0;L;;;;;N;;;;;
+1D8CB;SIGNWRITING HAND-FIST MIDDLE THUMB LITTLE;So;0;L;;;;;N;;;;;
+1D8CC;SIGNWRITING HAND-FIST MIDDLE LITTLE;So;0;L;;;;;N;;;;;
+1D8CD;SIGNWRITING HAND-FIST MIDDLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8CE;SIGNWRITING HAND-CIRCLE MIDDLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8CF;SIGNWRITING HAND-CURLICUE MIDDLE RING LITTLE ON;So;0;L;;;;;N;;;;;
+1D8D0;SIGNWRITING HAND-CUP MIDDLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8D1;SIGNWRITING HAND-HINGE MIDDLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8D2;SIGNWRITING HAND-ANGLE MIDDLE RING LITTLE OUT;So;0;L;;;;;N;;;;;
+1D8D3;SIGNWRITING HAND-ANGLE MIDDLE RING LITTLE IN;So;0;L;;;;;N;;;;;
+1D8D4;SIGNWRITING HAND-ANGLE MIDDLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8D5;SIGNWRITING HAND-CIRCLE MIDDLE RING LITTLE BENT;So;0;L;;;;;N;;;;;
+1D8D6;SIGNWRITING HAND-CLAW MIDDLE RING LITTLE CONJOINED;So;0;L;;;;;N;;;;;
+1D8D7;SIGNWRITING HAND-CLAW MIDDLE RING LITTLE CONJOINED SIDE;So;0;L;;;;;N;;;;;
+1D8D8;SIGNWRITING HAND-HOOK MIDDLE RING LITTLE CONJOINED OUT;So;0;L;;;;;N;;;;;
+1D8D9;SIGNWRITING HAND-HOOK MIDDLE RING LITTLE CONJOINED IN;So;0;L;;;;;N;;;;;
+1D8DA;SIGNWRITING HAND-HOOK MIDDLE RING LITTLE CONJOINED;So;0;L;;;;;N;;;;;
+1D8DB;SIGNWRITING HAND-HINGE INDEX HINGED;So;0;L;;;;;N;;;;;
+1D8DC;SIGNWRITING HAND-FIST INDEX THUMB SIDE;So;0;L;;;;;N;;;;;
+1D8DD;SIGNWRITING HAND-HINGE INDEX THUMB SIDE;So;0;L;;;;;N;;;;;
+1D8DE;SIGNWRITING HAND-FIST INDEX THUMB SIDE THUMB DIAGONAL;So;0;L;;;;;N;;;;;
+1D8DF;SIGNWRITING HAND-FIST INDEX THUMB SIDE THUMB CONJOINED;So;0;L;;;;;N;;;;;
+1D8E0;SIGNWRITING HAND-FIST INDEX THUMB SIDE THUMB BENT;So;0;L;;;;;N;;;;;
+1D8E1;SIGNWRITING HAND-FIST INDEX THUMB SIDE INDEX BENT;So;0;L;;;;;N;;;;;
+1D8E2;SIGNWRITING HAND-FIST INDEX THUMB SIDE BOTH BENT;So;0;L;;;;;N;;;;;
+1D8E3;SIGNWRITING HAND-FIST INDEX THUMB SIDE INDEX HINGE;So;0;L;;;;;N;;;;;
+1D8E4;SIGNWRITING HAND-FIST INDEX THUMB FORWARD INDEX STRAIGHT;So;0;L;;;;;N;;;;;
+1D8E5;SIGNWRITING HAND-FIST INDEX THUMB FORWARD INDEX BENT;So;0;L;;;;;N;;;;;
+1D8E6;SIGNWRITING HAND-FIST INDEX THUMB HOOK;So;0;L;;;;;N;;;;;
+1D8E7;SIGNWRITING HAND-FIST INDEX THUMB CURLICUE;So;0;L;;;;;N;;;;;
+1D8E8;SIGNWRITING HAND-FIST INDEX THUMB CURVE THUMB INSIDE;So;0;L;;;;;N;;;;;
+1D8E9;SIGNWRITING HAND-CLAW INDEX THUMB CURVE THUMB INSIDE;So;0;L;;;;;N;;;;;
+1D8EA;SIGNWRITING HAND-FIST INDEX THUMB CURVE THUMB UNDER;So;0;L;;;;;N;;;;;
+1D8EB;SIGNWRITING HAND-FIST INDEX THUMB CIRCLE;So;0;L;;;;;N;;;;;
+1D8EC;SIGNWRITING HAND-CUP INDEX THUMB;So;0;L;;;;;N;;;;;
+1D8ED;SIGNWRITING HAND-CUP INDEX THUMB OPEN;So;0;L;;;;;N;;;;;
+1D8EE;SIGNWRITING HAND-HINGE INDEX THUMB OPEN;So;0;L;;;;;N;;;;;
+1D8EF;SIGNWRITING HAND-HINGE INDEX THUMB LARGE;So;0;L;;;;;N;;;;;
+1D8F0;SIGNWRITING HAND-HINGE INDEX THUMB;So;0;L;;;;;N;;;;;
+1D8F1;SIGNWRITING HAND-HINGE INDEX THUMB SMALL;So;0;L;;;;;N;;;;;
+1D8F2;SIGNWRITING HAND-ANGLE INDEX THUMB OUT;So;0;L;;;;;N;;;;;
+1D8F3;SIGNWRITING HAND-ANGLE INDEX THUMB IN;So;0;L;;;;;N;;;;;
+1D8F4;SIGNWRITING HAND-ANGLE INDEX THUMB;So;0;L;;;;;N;;;;;
+1D8F5;SIGNWRITING HAND-FIST THUMB;So;0;L;;;;;N;;;;;
+1D8F6;SIGNWRITING HAND-FIST THUMB HEEL;So;0;L;;;;;N;;;;;
+1D8F7;SIGNWRITING HAND-FIST THUMB SIDE DIAGONAL;So;0;L;;;;;N;;;;;
+1D8F8;SIGNWRITING HAND-FIST THUMB SIDE CONJOINED;So;0;L;;;;;N;;;;;
+1D8F9;SIGNWRITING HAND-FIST THUMB SIDE BENT;So;0;L;;;;;N;;;;;
+1D8FA;SIGNWRITING HAND-FIST THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D8FB;SIGNWRITING HAND-FIST THUMB BETWEEN INDEX MIDDLE;So;0;L;;;;;N;;;;;
+1D8FC;SIGNWRITING HAND-FIST THUMB BETWEEN MIDDLE RING;So;0;L;;;;;N;;;;;
+1D8FD;SIGNWRITING HAND-FIST THUMB BETWEEN RING LITTLE;So;0;L;;;;;N;;;;;
+1D8FE;SIGNWRITING HAND-FIST THUMB UNDER TWO FINGERS;So;0;L;;;;;N;;;;;
+1D8FF;SIGNWRITING HAND-FIST THUMB OVER TWO FINGERS;So;0;L;;;;;N;;;;;
+1D900;SIGNWRITING HAND-FIST THUMB UNDER THREE FINGERS;So;0;L;;;;;N;;;;;
+1D901;SIGNWRITING HAND-FIST THUMB UNDER FOUR FINGERS;So;0;L;;;;;N;;;;;
+1D902;SIGNWRITING HAND-FIST THUMB OVER FOUR RAISED KNUCKLES;So;0;L;;;;;N;;;;;
+1D903;SIGNWRITING HAND-FIST;So;0;L;;;;;N;;;;;
+1D904;SIGNWRITING HAND-FIST HEEL;So;0;L;;;;;N;;;;;
+1D905;SIGNWRITING TOUCH SINGLE;So;0;L;;;;;N;;;;;
+1D906;SIGNWRITING TOUCH MULTIPLE;So;0;L;;;;;N;;;;;
+1D907;SIGNWRITING TOUCH BETWEEN;So;0;L;;;;;N;;;;;
+1D908;SIGNWRITING GRASP SINGLE;So;0;L;;;;;N;;;;;
+1D909;SIGNWRITING GRASP MULTIPLE;So;0;L;;;;;N;;;;;
+1D90A;SIGNWRITING GRASP BETWEEN;So;0;L;;;;;N;;;;;
+1D90B;SIGNWRITING STRIKE SINGLE;So;0;L;;;;;N;;;;;
+1D90C;SIGNWRITING STRIKE MULTIPLE;So;0;L;;;;;N;;;;;
+1D90D;SIGNWRITING STRIKE BETWEEN;So;0;L;;;;;N;;;;;
+1D90E;SIGNWRITING BRUSH SINGLE;So;0;L;;;;;N;;;;;
+1D90F;SIGNWRITING BRUSH MULTIPLE;So;0;L;;;;;N;;;;;
+1D910;SIGNWRITING BRUSH BETWEEN;So;0;L;;;;;N;;;;;
+1D911;SIGNWRITING RUB SINGLE;So;0;L;;;;;N;;;;;
+1D912;SIGNWRITING RUB MULTIPLE;So;0;L;;;;;N;;;;;
+1D913;SIGNWRITING RUB BETWEEN;So;0;L;;;;;N;;;;;
+1D914;SIGNWRITING SURFACE SYMBOLS;So;0;L;;;;;N;;;;;
+1D915;SIGNWRITING SURFACE BETWEEN;So;0;L;;;;;N;;;;;
+1D916;SIGNWRITING SQUEEZE LARGE SINGLE;So;0;L;;;;;N;;;;;
+1D917;SIGNWRITING SQUEEZE SMALL SINGLE;So;0;L;;;;;N;;;;;
+1D918;SIGNWRITING SQUEEZE LARGE MULTIPLE;So;0;L;;;;;N;;;;;
+1D919;SIGNWRITING SQUEEZE SMALL MULTIPLE;So;0;L;;;;;N;;;;;
+1D91A;SIGNWRITING SQUEEZE SEQUENTIAL;So;0;L;;;;;N;;;;;
+1D91B;SIGNWRITING FLICK LARGE SINGLE;So;0;L;;;;;N;;;;;
+1D91C;SIGNWRITING FLICK SMALL SINGLE;So;0;L;;;;;N;;;;;
+1D91D;SIGNWRITING FLICK LARGE MULTIPLE;So;0;L;;;;;N;;;;;
+1D91E;SIGNWRITING FLICK SMALL MULTIPLE;So;0;L;;;;;N;;;;;
+1D91F;SIGNWRITING FLICK SEQUENTIAL;So;0;L;;;;;N;;;;;
+1D920;SIGNWRITING SQUEEZE FLICK ALTERNATING;So;0;L;;;;;N;;;;;
+1D921;SIGNWRITING MOVEMENT-HINGE UP DOWN LARGE;So;0;L;;;;;N;;;;;
+1D922;SIGNWRITING MOVEMENT-HINGE UP DOWN SMALL;So;0;L;;;;;N;;;;;
+1D923;SIGNWRITING MOVEMENT-HINGE UP SEQUENTIAL;So;0;L;;;;;N;;;;;
+1D924;SIGNWRITING MOVEMENT-HINGE DOWN SEQUENTIAL;So;0;L;;;;;N;;;;;
+1D925;SIGNWRITING MOVEMENT-HINGE UP DOWN ALTERNATING LARGE;So;0;L;;;;;N;;;;;
+1D926;SIGNWRITING MOVEMENT-HINGE UP DOWN ALTERNATING SMALL;So;0;L;;;;;N;;;;;
+1D927;SIGNWRITING MOVEMENT-HINGE SIDE TO SIDE SCISSORS;So;0;L;;;;;N;;;;;
+1D928;SIGNWRITING MOVEMENT-WALLPLANE FINGER CONTACT;So;0;L;;;;;N;;;;;
+1D929;SIGNWRITING MOVEMENT-FLOORPLANE FINGER CONTACT;So;0;L;;;;;N;;;;;
+1D92A;SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT SMALL;So;0;L;;;;;N;;;;;
+1D92B;SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT MEDIUM;So;0;L;;;;;N;;;;;
+1D92C;SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT LARGE;So;0;L;;;;;N;;;;;
+1D92D;SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT LARGEST;So;0;L;;;;;N;;;;;
+1D92E;SIGNWRITING MOVEMENT-WALLPLANE SINGLE WRIST FLEX;So;0;L;;;;;N;;;;;
+1D92F;SIGNWRITING MOVEMENT-WALLPLANE DOUBLE STRAIGHT;So;0;L;;;;;N;;;;;
+1D930;SIGNWRITING MOVEMENT-WALLPLANE DOUBLE WRIST FLEX;So;0;L;;;;;N;;;;;
+1D931;SIGNWRITING MOVEMENT-WALLPLANE DOUBLE ALTERNATING;So;0;L;;;;;N;;;;;
+1D932;SIGNWRITING MOVEMENT-WALLPLANE DOUBLE ALTERNATING WRIST FLEX;So;0;L;;;;;N;;;;;
+1D933;SIGNWRITING MOVEMENT-WALLPLANE CROSS;So;0;L;;;;;N;;;;;
+1D934;SIGNWRITING MOVEMENT-WALLPLANE TRIPLE STRAIGHT MOVEMENT;So;0;L;;;;;N;;;;;
+1D935;SIGNWRITING MOVEMENT-WALLPLANE TRIPLE WRIST FLEX;So;0;L;;;;;N;;;;;
+1D936;SIGNWRITING MOVEMENT-WALLPLANE TRIPLE ALTERNATING;So;0;L;;;;;N;;;;;
+1D937;SIGNWRITING MOVEMENT-WALLPLANE TRIPLE ALTERNATING WRIST FLEX;So;0;L;;;;;N;;;;;
+1D938;SIGNWRITING MOVEMENT-WALLPLANE BEND SMALL;So;0;L;;;;;N;;;;;
+1D939;SIGNWRITING MOVEMENT-WALLPLANE BEND MEDIUM;So;0;L;;;;;N;;;;;
+1D93A;SIGNWRITING MOVEMENT-WALLPLANE BEND LARGE;So;0;L;;;;;N;;;;;
+1D93B;SIGNWRITING MOVEMENT-WALLPLANE CORNER SMALL;So;0;L;;;;;N;;;;;
+1D93C;SIGNWRITING MOVEMENT-WALLPLANE CORNER MEDIUM;So;0;L;;;;;N;;;;;
+1D93D;SIGNWRITING MOVEMENT-WALLPLANE CORNER LARGE;So;0;L;;;;;N;;;;;
+1D93E;SIGNWRITING MOVEMENT-WALLPLANE CORNER ROTATION;So;0;L;;;;;N;;;;;
+1D93F;SIGNWRITING MOVEMENT-WALLPLANE CHECK SMALL;So;0;L;;;;;N;;;;;
+1D940;SIGNWRITING MOVEMENT-WALLPLANE CHECK MEDIUM;So;0;L;;;;;N;;;;;
+1D941;SIGNWRITING MOVEMENT-WALLPLANE CHECK LARGE;So;0;L;;;;;N;;;;;
+1D942;SIGNWRITING MOVEMENT-WALLPLANE BOX SMALL;So;0;L;;;;;N;;;;;
+1D943;SIGNWRITING MOVEMENT-WALLPLANE BOX MEDIUM;So;0;L;;;;;N;;;;;
+1D944;SIGNWRITING MOVEMENT-WALLPLANE BOX LARGE;So;0;L;;;;;N;;;;;
+1D945;SIGNWRITING MOVEMENT-WALLPLANE ZIGZAG SMALL;So;0;L;;;;;N;;;;;
+1D946;SIGNWRITING MOVEMENT-WALLPLANE ZIGZAG MEDIUM;So;0;L;;;;;N;;;;;
+1D947;SIGNWRITING MOVEMENT-WALLPLANE ZIGZAG LARGE;So;0;L;;;;;N;;;;;
+1D948;SIGNWRITING MOVEMENT-WALLPLANE PEAKS SMALL;So;0;L;;;;;N;;;;;
+1D949;SIGNWRITING MOVEMENT-WALLPLANE PEAKS MEDIUM;So;0;L;;;;;N;;;;;
+1D94A;SIGNWRITING MOVEMENT-WALLPLANE PEAKS LARGE;So;0;L;;;;;N;;;;;
+1D94B;SIGNWRITING TRAVEL-WALLPLANE ROTATION-WALLPLANE SINGLE;So;0;L;;;;;N;;;;;
+1D94C;SIGNWRITING TRAVEL-WALLPLANE ROTATION-WALLPLANE DOUBLE;So;0;L;;;;;N;;;;;
+1D94D;SIGNWRITING TRAVEL-WALLPLANE ROTATION-WALLPLANE ALTERNATING;So;0;L;;;;;N;;;;;
+1D94E;SIGNWRITING TRAVEL-WALLPLANE ROTATION-FLOORPLANE SINGLE;So;0;L;;;;;N;;;;;
+1D94F;SIGNWRITING TRAVEL-WALLPLANE ROTATION-FLOORPLANE DOUBLE;So;0;L;;;;;N;;;;;
+1D950;SIGNWRITING TRAVEL-WALLPLANE ROTATION-FLOORPLANE ALTERNATING;So;0;L;;;;;N;;;;;
+1D951;SIGNWRITING TRAVEL-WALLPLANE SHAKING;So;0;L;;;;;N;;;;;
+1D952;SIGNWRITING TRAVEL-WALLPLANE ARM SPIRAL SINGLE;So;0;L;;;;;N;;;;;
+1D953;SIGNWRITING TRAVEL-WALLPLANE ARM SPIRAL DOUBLE;So;0;L;;;;;N;;;;;
+1D954;SIGNWRITING TRAVEL-WALLPLANE ARM SPIRAL TRIPLE;So;0;L;;;;;N;;;;;
+1D955;SIGNWRITING MOVEMENT-DIAGONAL AWAY SMALL;So;0;L;;;;;N;;;;;
+1D956;SIGNWRITING MOVEMENT-DIAGONAL AWAY MEDIUM;So;0;L;;;;;N;;;;;
+1D957;SIGNWRITING MOVEMENT-DIAGONAL AWAY LARGE;So;0;L;;;;;N;;;;;
+1D958;SIGNWRITING MOVEMENT-DIAGONAL AWAY LARGEST;So;0;L;;;;;N;;;;;
+1D959;SIGNWRITING MOVEMENT-DIAGONAL TOWARDS SMALL;So;0;L;;;;;N;;;;;
+1D95A;SIGNWRITING MOVEMENT-DIAGONAL TOWARDS MEDIUM;So;0;L;;;;;N;;;;;
+1D95B;SIGNWRITING MOVEMENT-DIAGONAL TOWARDS LARGE;So;0;L;;;;;N;;;;;
+1D95C;SIGNWRITING MOVEMENT-DIAGONAL TOWARDS LARGEST;So;0;L;;;;;N;;;;;
+1D95D;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY SMALL;So;0;L;;;;;N;;;;;
+1D95E;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY MEDIUM;So;0;L;;;;;N;;;;;
+1D95F;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY LARGE;So;0;L;;;;;N;;;;;
+1D960;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY LARGEST;So;0;L;;;;;N;;;;;
+1D961;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS SMALL;So;0;L;;;;;N;;;;;
+1D962;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS MEDIUM;So;0;L;;;;;N;;;;;
+1D963;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS LARGE;So;0;L;;;;;N;;;;;
+1D964;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS LARGEST;So;0;L;;;;;N;;;;;
+1D965;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT SMALL;So;0;L;;;;;N;;;;;
+1D966;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT MEDIUM;So;0;L;;;;;N;;;;;
+1D967;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT LARGE;So;0;L;;;;;N;;;;;
+1D968;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT LARGEST;So;0;L;;;;;N;;;;;
+1D969;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE WRIST FLEX;So;0;L;;;;;N;;;;;
+1D96A;SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE STRAIGHT;So;0;L;;;;;N;;;;;
+1D96B;SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE WRIST FLEX;So;0;L;;;;;N;;;;;
+1D96C;SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE ALTERNATING;So;0;L;;;;;N;;;;;
+1D96D;SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE ALTERNATING WRIST FLEX;So;0;L;;;;;N;;;;;
+1D96E;SIGNWRITING MOVEMENT-FLOORPLANE CROSS;So;0;L;;;;;N;;;;;
+1D96F;SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE STRAIGHT MOVEMENT;So;0;L;;;;;N;;;;;
+1D970;SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE WRIST FLEX;So;0;L;;;;;N;;;;;
+1D971;SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE ALTERNATING MOVEMENT;So;0;L;;;;;N;;;;;
+1D972;SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE ALTERNATING WRIST FLEX;So;0;L;;;;;N;;;;;
+1D973;SIGNWRITING MOVEMENT-FLOORPLANE BEND;So;0;L;;;;;N;;;;;
+1D974;SIGNWRITING MOVEMENT-FLOORPLANE CORNER SMALL;So;0;L;;;;;N;;;;;
+1D975;SIGNWRITING MOVEMENT-FLOORPLANE CORNER MEDIUM;So;0;L;;;;;N;;;;;
+1D976;SIGNWRITING MOVEMENT-FLOORPLANE CORNER LARGE;So;0;L;;;;;N;;;;;
+1D977;SIGNWRITING MOVEMENT-FLOORPLANE CHECK;So;0;L;;;;;N;;;;;
+1D978;SIGNWRITING MOVEMENT-FLOORPLANE BOX SMALL;So;0;L;;;;;N;;;;;
+1D979;SIGNWRITING MOVEMENT-FLOORPLANE BOX MEDIUM;So;0;L;;;;;N;;;;;
+1D97A;SIGNWRITING MOVEMENT-FLOORPLANE BOX LARGE;So;0;L;;;;;N;;;;;
+1D97B;SIGNWRITING MOVEMENT-FLOORPLANE ZIGZAG SMALL;So;0;L;;;;;N;;;;;
+1D97C;SIGNWRITING MOVEMENT-FLOORPLANE ZIGZAG MEDIUM;So;0;L;;;;;N;;;;;
+1D97D;SIGNWRITING MOVEMENT-FLOORPLANE ZIGZAG LARGE;So;0;L;;;;;N;;;;;
+1D97E;SIGNWRITING MOVEMENT-FLOORPLANE PEAKS SMALL;So;0;L;;;;;N;;;;;
+1D97F;SIGNWRITING MOVEMENT-FLOORPLANE PEAKS MEDIUM;So;0;L;;;;;N;;;;;
+1D980;SIGNWRITING MOVEMENT-FLOORPLANE PEAKS LARGE;So;0;L;;;;;N;;;;;
+1D981;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-FLOORPLANE SINGLE;So;0;L;;;;;N;;;;;
+1D982;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-FLOORPLANE DOUBLE;So;0;L;;;;;N;;;;;
+1D983;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-FLOORPLANE ALTERNATING;So;0;L;;;;;N;;;;;
+1D984;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE SINGLE;So;0;L;;;;;N;;;;;
+1D985;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE DOUBLE;So;0;L;;;;;N;;;;;
+1D986;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE ALTERNATING;So;0;L;;;;;N;;;;;
+1D987;SIGNWRITING TRAVEL-FLOORPLANE SHAKING;So;0;L;;;;;N;;;;;
+1D988;SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER SMALL;So;0;L;;;;;N;;;;;
+1D989;SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER MEDIUM;So;0;L;;;;;N;;;;;
+1D98A;SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER LARGE;So;0;L;;;;;N;;;;;
+1D98B;SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER LARGEST;So;0;L;;;;;N;;;;;
+1D98C;SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE SMALL;So;0;L;;;;;N;;;;;
+1D98D;SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE MEDIUM;So;0;L;;;;;N;;;;;
+1D98E;SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE LARGE;So;0;L;;;;;N;;;;;
+1D98F;SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE LARGEST;So;0;L;;;;;N;;;;;
+1D990;SIGNWRITING MOVEMENT-WALLPLANE CURVE THREE-QUARTER CIRCLE SMALL;So;0;L;;;;;N;;;;;
+1D991;SIGNWRITING MOVEMENT-WALLPLANE CURVE THREE-QUARTER CIRCLE MEDIUM;So;0;L;;;;;N;;;;;
+1D992;SIGNWRITING MOVEMENT-WALLPLANE HUMP SMALL;So;0;L;;;;;N;;;;;
+1D993;SIGNWRITING MOVEMENT-WALLPLANE HUMP MEDIUM;So;0;L;;;;;N;;;;;
+1D994;SIGNWRITING MOVEMENT-WALLPLANE HUMP LARGE;So;0;L;;;;;N;;;;;
+1D995;SIGNWRITING MOVEMENT-WALLPLANE LOOP SMALL;So;0;L;;;;;N;;;;;
+1D996;SIGNWRITING MOVEMENT-WALLPLANE LOOP MEDIUM;So;0;L;;;;;N;;;;;
+1D997;SIGNWRITING MOVEMENT-WALLPLANE LOOP LARGE;So;0;L;;;;;N;;;;;
+1D998;SIGNWRITING MOVEMENT-WALLPLANE LOOP SMALL DOUBLE;So;0;L;;;;;N;;;;;
+1D999;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE DOUBLE SMALL;So;0;L;;;;;N;;;;;
+1D99A;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE DOUBLE MEDIUM;So;0;L;;;;;N;;;;;
+1D99B;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE DOUBLE LARGE;So;0;L;;;;;N;;;;;
+1D99C;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE TRIPLE SMALL;So;0;L;;;;;N;;;;;
+1D99D;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE TRIPLE MEDIUM;So;0;L;;;;;N;;;;;
+1D99E;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE TRIPLE LARGE;So;0;L;;;;;N;;;;;
+1D99F;SIGNWRITING MOVEMENT-WALLPLANE CURVE THEN STRAIGHT;So;0;L;;;;;N;;;;;
+1D9A0;SIGNWRITING MOVEMENT-WALLPLANE CURVED CROSS SMALL;So;0;L;;;;;N;;;;;
+1D9A1;SIGNWRITING MOVEMENT-WALLPLANE CURVED CROSS MEDIUM;So;0;L;;;;;N;;;;;
+1D9A2;SIGNWRITING ROTATION-WALLPLANE SINGLE;So;0;L;;;;;N;;;;;
+1D9A3;SIGNWRITING ROTATION-WALLPLANE DOUBLE;So;0;L;;;;;N;;;;;
+1D9A4;SIGNWRITING ROTATION-WALLPLANE ALTERNATE;So;0;L;;;;;N;;;;;
+1D9A5;SIGNWRITING MOVEMENT-WALLPLANE SHAKING;So;0;L;;;;;N;;;;;
+1D9A6;SIGNWRITING MOVEMENT-WALLPLANE CURVE HITTING FRONT WALL;So;0;L;;;;;N;;;;;
+1D9A7;SIGNWRITING MOVEMENT-WALLPLANE HUMP HITTING FRONT WALL;So;0;L;;;;;N;;;;;
+1D9A8;SIGNWRITING MOVEMENT-WALLPLANE LOOP HITTING FRONT WALL;So;0;L;;;;;N;;;;;
+1D9A9;SIGNWRITING MOVEMENT-WALLPLANE WAVE HITTING FRONT WALL;So;0;L;;;;;N;;;;;
+1D9AA;SIGNWRITING ROTATION-WALLPLANE SINGLE HITTING FRONT WALL;So;0;L;;;;;N;;;;;
+1D9AB;SIGNWRITING ROTATION-WALLPLANE DOUBLE HITTING FRONT WALL;So;0;L;;;;;N;;;;;
+1D9AC;SIGNWRITING ROTATION-WALLPLANE ALTERNATING HITTING FRONT WALL;So;0;L;;;;;N;;;;;
+1D9AD;SIGNWRITING MOVEMENT-WALLPLANE CURVE HITTING CHEST;So;0;L;;;;;N;;;;;
+1D9AE;SIGNWRITING MOVEMENT-WALLPLANE HUMP HITTING CHEST;So;0;L;;;;;N;;;;;
+1D9AF;SIGNWRITING MOVEMENT-WALLPLANE LOOP HITTING CHEST;So;0;L;;;;;N;;;;;
+1D9B0;SIGNWRITING MOVEMENT-WALLPLANE WAVE HITTING CHEST;So;0;L;;;;;N;;;;;
+1D9B1;SIGNWRITING ROTATION-WALLPLANE SINGLE HITTING CHEST;So;0;L;;;;;N;;;;;
+1D9B2;SIGNWRITING ROTATION-WALLPLANE DOUBLE HITTING CHEST;So;0;L;;;;;N;;;;;
+1D9B3;SIGNWRITING ROTATION-WALLPLANE ALTERNATING HITTING CHEST;So;0;L;;;;;N;;;;;
+1D9B4;SIGNWRITING MOVEMENT-WALLPLANE WAVE DIAGONAL PATH SMALL;So;0;L;;;;;N;;;;;
+1D9B5;SIGNWRITING MOVEMENT-WALLPLANE WAVE DIAGONAL PATH MEDIUM;So;0;L;;;;;N;;;;;
+1D9B6;SIGNWRITING MOVEMENT-WALLPLANE WAVE DIAGONAL PATH LARGE;So;0;L;;;;;N;;;;;
+1D9B7;SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING CEILING SMALL;So;0;L;;;;;N;;;;;
+1D9B8;SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING CEILING LARGE;So;0;L;;;;;N;;;;;
+1D9B9;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING SMALL DOUBLE;So;0;L;;;;;N;;;;;
+1D9BA;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING LARGE DOUBLE;So;0;L;;;;;N;;;;;
+1D9BB;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING SMALL TRIPLE;So;0;L;;;;;N;;;;;
+1D9BC;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING LARGE TRIPLE;So;0;L;;;;;N;;;;;
+1D9BD;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING SMALL SINGLE;So;0;L;;;;;N;;;;;
+1D9BE;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING LARGE SINGLE;So;0;L;;;;;N;;;;;
+1D9BF;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING SMALL DOUBLE;So;0;L;;;;;N;;;;;
+1D9C0;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING LARGE DOUBLE;So;0;L;;;;;N;;;;;
+1D9C1;SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING CEILING SMALL;So;0;L;;;;;N;;;;;
+1D9C2;SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING CEILING LARGE;So;0;L;;;;;N;;;;;
+1D9C3;SIGNWRITING ROTATION-FLOORPLANE SINGLE HITTING CEILING;So;0;L;;;;;N;;;;;
+1D9C4;SIGNWRITING ROTATION-FLOORPLANE DOUBLE HITTING CEILING;So;0;L;;;;;N;;;;;
+1D9C5;SIGNWRITING ROTATION-FLOORPLANE ALTERNATING HITTING CEILING;So;0;L;;;;;N;;;;;
+1D9C6;SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING FLOOR SMALL;So;0;L;;;;;N;;;;;
+1D9C7;SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING FLOOR LARGE;So;0;L;;;;;N;;;;;
+1D9C8;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR SMALL DOUBLE;So;0;L;;;;;N;;;;;
+1D9C9;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR LARGE DOUBLE;So;0;L;;;;;N;;;;;
+1D9CA;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR TRIPLE SMALL TRIPLE;So;0;L;;;;;N;;;;;
+1D9CB;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR TRIPLE LARGE TRIPLE;So;0;L;;;;;N;;;;;
+1D9CC;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR SMALL SINGLE;So;0;L;;;;;N;;;;;
+1D9CD;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR LARGE SINGLE;So;0;L;;;;;N;;;;;
+1D9CE;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR SMALL DOUBLE;So;0;L;;;;;N;;;;;
+1D9CF;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR LARGE DOUBLE;So;0;L;;;;;N;;;;;
+1D9D0;SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING FLOOR SMALL;So;0;L;;;;;N;;;;;
+1D9D1;SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING FLOOR LARGE;So;0;L;;;;;N;;;;;
+1D9D2;SIGNWRITING ROTATION-FLOORPLANE SINGLE HITTING FLOOR;So;0;L;;;;;N;;;;;
+1D9D3;SIGNWRITING ROTATION-FLOORPLANE DOUBLE HITTING FLOOR;So;0;L;;;;;N;;;;;
+1D9D4;SIGNWRITING ROTATION-FLOORPLANE ALTERNATING HITTING FLOOR;So;0;L;;;;;N;;;;;
+1D9D5;SIGNWRITING MOVEMENT-FLOORPLANE CURVE SMALL;So;0;L;;;;;N;;;;;
+1D9D6;SIGNWRITING MOVEMENT-FLOORPLANE CURVE MEDIUM;So;0;L;;;;;N;;;;;
+1D9D7;SIGNWRITING MOVEMENT-FLOORPLANE CURVE LARGE;So;0;L;;;;;N;;;;;
+1D9D8;SIGNWRITING MOVEMENT-FLOORPLANE CURVE LARGEST;So;0;L;;;;;N;;;;;
+1D9D9;SIGNWRITING MOVEMENT-FLOORPLANE CURVE COMBINED;So;0;L;;;;;N;;;;;
+1D9DA;SIGNWRITING MOVEMENT-FLOORPLANE HUMP SMALL;So;0;L;;;;;N;;;;;
+1D9DB;SIGNWRITING MOVEMENT-FLOORPLANE LOOP SMALL;So;0;L;;;;;N;;;;;
+1D9DC;SIGNWRITING MOVEMENT-FLOORPLANE WAVE SNAKE;So;0;L;;;;;N;;;;;
+1D9DD;SIGNWRITING MOVEMENT-FLOORPLANE WAVE SMALL;So;0;L;;;;;N;;;;;
+1D9DE;SIGNWRITING MOVEMENT-FLOORPLANE WAVE LARGE;So;0;L;;;;;N;;;;;
+1D9DF;SIGNWRITING ROTATION-FLOORPLANE SINGLE;So;0;L;;;;;N;;;;;
+1D9E0;SIGNWRITING ROTATION-FLOORPLANE DOUBLE;So;0;L;;;;;N;;;;;
+1D9E1;SIGNWRITING ROTATION-FLOORPLANE ALTERNATING;So;0;L;;;;;N;;;;;
+1D9E2;SIGNWRITING MOVEMENT-FLOORPLANE SHAKING PARALLEL;So;0;L;;;;;N;;;;;
+1D9E3;SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE SMALL SINGLE;So;0;L;;;;;N;;;;;
+1D9E4;SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE MEDIUM SINGLE;So;0;L;;;;;N;;;;;
+1D9E5;SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE SMALL DOUBLE;So;0;L;;;;;N;;;;;
+1D9E6;SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE MEDIUM DOUBLE;So;0;L;;;;;N;;;;;
+1D9E7;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL SMALL SINGLE;So;0;L;;;;;N;;;;;
+1D9E8;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL MEDIUM SINGLE;So;0;L;;;;;N;;;;;
+1D9E9;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL LARGE SINGLE;So;0;L;;;;;N;;;;;
+1D9EA;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL SMALL DOUBLE;So;0;L;;;;;N;;;;;
+1D9EB;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL MEDIUM DOUBLE;So;0;L;;;;;N;;;;;
+1D9EC;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL LARGE DOUBLE;So;0;L;;;;;N;;;;;
+1D9ED;SIGNWRITING MOVEMENT-WALLPLANE WRIST CIRCLE FRONT SINGLE;So;0;L;;;;;N;;;;;
+1D9EE;SIGNWRITING MOVEMENT-WALLPLANE WRIST CIRCLE FRONT DOUBLE;So;0;L;;;;;N;;;;;
+1D9EF;SIGNWRITING MOVEMENT-FLOORPLANE WRIST CIRCLE HITTING WALL SINGLE;So;0;L;;;;;N;;;;;
+1D9F0;SIGNWRITING MOVEMENT-FLOORPLANE WRIST CIRCLE HITTING WALL DOUBLE;So;0;L;;;;;N;;;;;
+1D9F1;SIGNWRITING MOVEMENT-WALLPLANE FINGER CIRCLES SINGLE;So;0;L;;;;;N;;;;;
+1D9F2;SIGNWRITING MOVEMENT-WALLPLANE FINGER CIRCLES DOUBLE;So;0;L;;;;;N;;;;;
+1D9F3;SIGNWRITING MOVEMENT-FLOORPLANE FINGER CIRCLES HITTING WALL SINGLE;So;0;L;;;;;N;;;;;
+1D9F4;SIGNWRITING MOVEMENT-FLOORPLANE FINGER CIRCLES HITTING WALL DOUBLE;So;0;L;;;;;N;;;;;
+1D9F5;SIGNWRITING DYNAMIC ARROWHEAD SMALL;So;0;L;;;;;N;;;;;
+1D9F6;SIGNWRITING DYNAMIC ARROWHEAD LARGE;So;0;L;;;;;N;;;;;
+1D9F7;SIGNWRITING DYNAMIC FAST;So;0;L;;;;;N;;;;;
+1D9F8;SIGNWRITING DYNAMIC SLOW;So;0;L;;;;;N;;;;;
+1D9F9;SIGNWRITING DYNAMIC TENSE;So;0;L;;;;;N;;;;;
+1D9FA;SIGNWRITING DYNAMIC RELAXED;So;0;L;;;;;N;;;;;
+1D9FB;SIGNWRITING DYNAMIC SIMULTANEOUS;So;0;L;;;;;N;;;;;
+1D9FC;SIGNWRITING DYNAMIC SIMULTANEOUS ALTERNATING;So;0;L;;;;;N;;;;;
+1D9FD;SIGNWRITING DYNAMIC EVERY OTHER TIME;So;0;L;;;;;N;;;;;
+1D9FE;SIGNWRITING DYNAMIC GRADUAL;So;0;L;;;;;N;;;;;
+1D9FF;SIGNWRITING HEAD;So;0;L;;;;;N;;;;;
+1DA00;SIGNWRITING HEAD RIM;Mn;0;NSM;;;;;N;;;;;
+1DA01;SIGNWRITING HEAD MOVEMENT-WALLPLANE STRAIGHT;Mn;0;NSM;;;;;N;;;;;
+1DA02;SIGNWRITING HEAD MOVEMENT-WALLPLANE TILT;Mn;0;NSM;;;;;N;;;;;
+1DA03;SIGNWRITING HEAD MOVEMENT-FLOORPLANE STRAIGHT;Mn;0;NSM;;;;;N;;;;;
+1DA04;SIGNWRITING HEAD MOVEMENT-WALLPLANE CURVE;Mn;0;NSM;;;;;N;;;;;
+1DA05;SIGNWRITING HEAD MOVEMENT-FLOORPLANE CURVE;Mn;0;NSM;;;;;N;;;;;
+1DA06;SIGNWRITING HEAD MOVEMENT CIRCLE;Mn;0;NSM;;;;;N;;;;;
+1DA07;SIGNWRITING FACE DIRECTION POSITION NOSE FORWARD TILTING;Mn;0;NSM;;;;;N;;;;;
+1DA08;SIGNWRITING FACE DIRECTION POSITION NOSE UP OR DOWN;Mn;0;NSM;;;;;N;;;;;
+1DA09;SIGNWRITING FACE DIRECTION POSITION NOSE UP OR DOWN TILTING;Mn;0;NSM;;;;;N;;;;;
+1DA0A;SIGNWRITING EYEBROWS STRAIGHT UP;Mn;0;NSM;;;;;N;;;;;
+1DA0B;SIGNWRITING EYEBROWS STRAIGHT NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA0C;SIGNWRITING EYEBROWS STRAIGHT DOWN;Mn;0;NSM;;;;;N;;;;;
+1DA0D;SIGNWRITING DREAMY EYEBROWS NEUTRAL DOWN;Mn;0;NSM;;;;;N;;;;;
+1DA0E;SIGNWRITING DREAMY EYEBROWS DOWN NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA0F;SIGNWRITING DREAMY EYEBROWS UP NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA10;SIGNWRITING DREAMY EYEBROWS NEUTRAL UP;Mn;0;NSM;;;;;N;;;;;
+1DA11;SIGNWRITING FOREHEAD NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA12;SIGNWRITING FOREHEAD CONTACT;Mn;0;NSM;;;;;N;;;;;
+1DA13;SIGNWRITING FOREHEAD WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA14;SIGNWRITING EYES OPEN;Mn;0;NSM;;;;;N;;;;;
+1DA15;SIGNWRITING EYES SQUEEZED;Mn;0;NSM;;;;;N;;;;;
+1DA16;SIGNWRITING EYES CLOSED;Mn;0;NSM;;;;;N;;;;;
+1DA17;SIGNWRITING EYE BLINK SINGLE;Mn;0;NSM;;;;;N;;;;;
+1DA18;SIGNWRITING EYE BLINK MULTIPLE;Mn;0;NSM;;;;;N;;;;;
+1DA19;SIGNWRITING EYES HALF OPEN;Mn;0;NSM;;;;;N;;;;;
+1DA1A;SIGNWRITING EYES WIDE OPEN;Mn;0;NSM;;;;;N;;;;;
+1DA1B;SIGNWRITING EYES HALF CLOSED;Mn;0;NSM;;;;;N;;;;;
+1DA1C;SIGNWRITING EYES WIDENING MOVEMENT;Mn;0;NSM;;;;;N;;;;;
+1DA1D;SIGNWRITING EYE WINK;Mn;0;NSM;;;;;N;;;;;
+1DA1E;SIGNWRITING EYELASHES UP;Mn;0;NSM;;;;;N;;;;;
+1DA1F;SIGNWRITING EYELASHES DOWN;Mn;0;NSM;;;;;N;;;;;
+1DA20;SIGNWRITING EYELASHES FLUTTERING;Mn;0;NSM;;;;;N;;;;;
+1DA21;SIGNWRITING EYEGAZE-WALLPLANE STRAIGHT;Mn;0;NSM;;;;;N;;;;;
+1DA22;SIGNWRITING EYEGAZE-WALLPLANE STRAIGHT DOUBLE;Mn;0;NSM;;;;;N;;;;;
+1DA23;SIGNWRITING EYEGAZE-WALLPLANE STRAIGHT ALTERNATING;Mn;0;NSM;;;;;N;;;;;
+1DA24;SIGNWRITING EYEGAZE-FLOORPLANE STRAIGHT;Mn;0;NSM;;;;;N;;;;;
+1DA25;SIGNWRITING EYEGAZE-FLOORPLANE STRAIGHT DOUBLE;Mn;0;NSM;;;;;N;;;;;
+1DA26;SIGNWRITING EYEGAZE-FLOORPLANE STRAIGHT ALTERNATING;Mn;0;NSM;;;;;N;;;;;
+1DA27;SIGNWRITING EYEGAZE-WALLPLANE CURVED;Mn;0;NSM;;;;;N;;;;;
+1DA28;SIGNWRITING EYEGAZE-FLOORPLANE CURVED;Mn;0;NSM;;;;;N;;;;;
+1DA29;SIGNWRITING EYEGAZE-WALLPLANE CIRCLING;Mn;0;NSM;;;;;N;;;;;
+1DA2A;SIGNWRITING CHEEKS PUFFED;Mn;0;NSM;;;;;N;;;;;
+1DA2B;SIGNWRITING CHEEKS NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA2C;SIGNWRITING CHEEKS SUCKED;Mn;0;NSM;;;;;N;;;;;
+1DA2D;SIGNWRITING TENSE CHEEKS HIGH;Mn;0;NSM;;;;;N;;;;;
+1DA2E;SIGNWRITING TENSE CHEEKS MIDDLE;Mn;0;NSM;;;;;N;;;;;
+1DA2F;SIGNWRITING TENSE CHEEKS LOW;Mn;0;NSM;;;;;N;;;;;
+1DA30;SIGNWRITING EARS;Mn;0;NSM;;;;;N;;;;;
+1DA31;SIGNWRITING NOSE NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA32;SIGNWRITING NOSE CONTACT;Mn;0;NSM;;;;;N;;;;;
+1DA33;SIGNWRITING NOSE WRINKLES;Mn;0;NSM;;;;;N;;;;;
+1DA34;SIGNWRITING NOSE WIGGLES;Mn;0;NSM;;;;;N;;;;;
+1DA35;SIGNWRITING AIR BLOWING OUT;Mn;0;NSM;;;;;N;;;;;
+1DA36;SIGNWRITING AIR SUCKING IN;Mn;0;NSM;;;;;N;;;;;
+1DA37;SIGNWRITING AIR BLOW SMALL ROTATIONS;So;0;L;;;;;N;;;;;
+1DA38;SIGNWRITING AIR SUCK SMALL ROTATIONS;So;0;L;;;;;N;;;;;
+1DA39;SIGNWRITING BREATH INHALE;So;0;L;;;;;N;;;;;
+1DA3A;SIGNWRITING BREATH EXHALE;So;0;L;;;;;N;;;;;
+1DA3B;SIGNWRITING MOUTH CLOSED NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA3C;SIGNWRITING MOUTH CLOSED FORWARD;Mn;0;NSM;;;;;N;;;;;
+1DA3D;SIGNWRITING MOUTH CLOSED CONTACT;Mn;0;NSM;;;;;N;;;;;
+1DA3E;SIGNWRITING MOUTH SMILE;Mn;0;NSM;;;;;N;;;;;
+1DA3F;SIGNWRITING MOUTH SMILE WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA40;SIGNWRITING MOUTH SMILE OPEN;Mn;0;NSM;;;;;N;;;;;
+1DA41;SIGNWRITING MOUTH FROWN;Mn;0;NSM;;;;;N;;;;;
+1DA42;SIGNWRITING MOUTH FROWN WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA43;SIGNWRITING MOUTH FROWN OPEN;Mn;0;NSM;;;;;N;;;;;
+1DA44;SIGNWRITING MOUTH OPEN CIRCLE;Mn;0;NSM;;;;;N;;;;;
+1DA45;SIGNWRITING MOUTH OPEN FORWARD;Mn;0;NSM;;;;;N;;;;;
+1DA46;SIGNWRITING MOUTH OPEN WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA47;SIGNWRITING MOUTH OPEN OVAL;Mn;0;NSM;;;;;N;;;;;
+1DA48;SIGNWRITING MOUTH OPEN OVAL WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA49;SIGNWRITING MOUTH OPEN OVAL YAWN;Mn;0;NSM;;;;;N;;;;;
+1DA4A;SIGNWRITING MOUTH OPEN RECTANGLE;Mn;0;NSM;;;;;N;;;;;
+1DA4B;SIGNWRITING MOUTH OPEN RECTANGLE WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA4C;SIGNWRITING MOUTH OPEN RECTANGLE YAWN;Mn;0;NSM;;;;;N;;;;;
+1DA4D;SIGNWRITING MOUTH KISS;Mn;0;NSM;;;;;N;;;;;
+1DA4E;SIGNWRITING MOUTH KISS FORWARD;Mn;0;NSM;;;;;N;;;;;
+1DA4F;SIGNWRITING MOUTH KISS WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA50;SIGNWRITING MOUTH TENSE;Mn;0;NSM;;;;;N;;;;;
+1DA51;SIGNWRITING MOUTH TENSE FORWARD;Mn;0;NSM;;;;;N;;;;;
+1DA52;SIGNWRITING MOUTH TENSE SUCKED;Mn;0;NSM;;;;;N;;;;;
+1DA53;SIGNWRITING LIPS PRESSED TOGETHER;Mn;0;NSM;;;;;N;;;;;
+1DA54;SIGNWRITING LIP LOWER OVER UPPER;Mn;0;NSM;;;;;N;;;;;
+1DA55;SIGNWRITING LIP UPPER OVER LOWER;Mn;0;NSM;;;;;N;;;;;
+1DA56;SIGNWRITING MOUTH CORNERS;Mn;0;NSM;;;;;N;;;;;
+1DA57;SIGNWRITING MOUTH WRINKLES SINGLE;Mn;0;NSM;;;;;N;;;;;
+1DA58;SIGNWRITING MOUTH WRINKLES DOUBLE;Mn;0;NSM;;;;;N;;;;;
+1DA59;SIGNWRITING TONGUE STICKING OUT FAR;Mn;0;NSM;;;;;N;;;;;
+1DA5A;SIGNWRITING TONGUE LICKING LIPS;Mn;0;NSM;;;;;N;;;;;
+1DA5B;SIGNWRITING TONGUE TIP BETWEEN LIPS;Mn;0;NSM;;;;;N;;;;;
+1DA5C;SIGNWRITING TONGUE TIP TOUCHING INSIDE MOUTH;Mn;0;NSM;;;;;N;;;;;
+1DA5D;SIGNWRITING TONGUE INSIDE MOUTH RELAXED;Mn;0;NSM;;;;;N;;;;;
+1DA5E;SIGNWRITING TONGUE MOVES AGAINST CHEEK;Mn;0;NSM;;;;;N;;;;;
+1DA5F;SIGNWRITING TONGUE CENTRE STICKING OUT;Mn;0;NSM;;;;;N;;;;;
+1DA60;SIGNWRITING TONGUE CENTRE INSIDE MOUTH;Mn;0;NSM;;;;;N;;;;;
+1DA61;SIGNWRITING TEETH;Mn;0;NSM;;;;;N;;;;;
+1DA62;SIGNWRITING TEETH MOVEMENT;Mn;0;NSM;;;;;N;;;;;
+1DA63;SIGNWRITING TEETH ON TONGUE;Mn;0;NSM;;;;;N;;;;;
+1DA64;SIGNWRITING TEETH ON TONGUE MOVEMENT;Mn;0;NSM;;;;;N;;;;;
+1DA65;SIGNWRITING TEETH ON LIPS;Mn;0;NSM;;;;;N;;;;;
+1DA66;SIGNWRITING TEETH ON LIPS MOVEMENT;Mn;0;NSM;;;;;N;;;;;
+1DA67;SIGNWRITING TEETH BITE LIPS;Mn;0;NSM;;;;;N;;;;;
+1DA68;SIGNWRITING MOVEMENT-WALLPLANE JAW;Mn;0;NSM;;;;;N;;;;;
+1DA69;SIGNWRITING MOVEMENT-FLOORPLANE JAW;Mn;0;NSM;;;;;N;;;;;
+1DA6A;SIGNWRITING NECK;Mn;0;NSM;;;;;N;;;;;
+1DA6B;SIGNWRITING HAIR;Mn;0;NSM;;;;;N;;;;;
+1DA6C;SIGNWRITING EXCITEMENT;Mn;0;NSM;;;;;N;;;;;
+1DA6D;SIGNWRITING SHOULDER HIP SPINE;So;0;L;;;;;N;;;;;
+1DA6E;SIGNWRITING SHOULDER HIP POSITIONS;So;0;L;;;;;N;;;;;
+1DA6F;SIGNWRITING WALLPLANE SHOULDER HIP MOVE;So;0;L;;;;;N;;;;;
+1DA70;SIGNWRITING FLOORPLANE SHOULDER HIP MOVE;So;0;L;;;;;N;;;;;
+1DA71;SIGNWRITING SHOULDER TILTING FROM WAIST;So;0;L;;;;;N;;;;;
+1DA72;SIGNWRITING TORSO-WALLPLANE STRAIGHT STRETCH;So;0;L;;;;;N;;;;;
+1DA73;SIGNWRITING TORSO-WALLPLANE CURVED BEND;So;0;L;;;;;N;;;;;
+1DA74;SIGNWRITING TORSO-FLOORPLANE TWISTING;So;0;L;;;;;N;;;;;
+1DA75;SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS;Mn;0;NSM;;;;;N;;;;;
+1DA76;SIGNWRITING LIMB COMBINATION;So;0;L;;;;;N;;;;;
+1DA77;SIGNWRITING LIMB LENGTH-1;So;0;L;;;;;N;;;;;
+1DA78;SIGNWRITING LIMB LENGTH-2;So;0;L;;;;;N;;;;;
+1DA79;SIGNWRITING LIMB LENGTH-3;So;0;L;;;;;N;;;;;
+1DA7A;SIGNWRITING LIMB LENGTH-4;So;0;L;;;;;N;;;;;
+1DA7B;SIGNWRITING LIMB LENGTH-5;So;0;L;;;;;N;;;;;
+1DA7C;SIGNWRITING LIMB LENGTH-6;So;0;L;;;;;N;;;;;
+1DA7D;SIGNWRITING LIMB LENGTH-7;So;0;L;;;;;N;;;;;
+1DA7E;SIGNWRITING FINGER;So;0;L;;;;;N;;;;;
+1DA7F;SIGNWRITING LOCATION-WALLPLANE SPACE;So;0;L;;;;;N;;;;;
+1DA80;SIGNWRITING LOCATION-FLOORPLANE SPACE;So;0;L;;;;;N;;;;;
+1DA81;SIGNWRITING LOCATION HEIGHT;So;0;L;;;;;N;;;;;
+1DA82;SIGNWRITING LOCATION WIDTH;So;0;L;;;;;N;;;;;
+1DA83;SIGNWRITING LOCATION DEPTH;So;0;L;;;;;N;;;;;
+1DA84;SIGNWRITING LOCATION HEAD NECK;Mn;0;NSM;;;;;N;;;;;
+1DA85;SIGNWRITING LOCATION TORSO;So;0;L;;;;;N;;;;;
+1DA86;SIGNWRITING LOCATION LIMBS DIGITS;So;0;L;;;;;N;;;;;
+1DA87;SIGNWRITING COMMA;Po;0;L;;;;;N;;;;;
+1DA88;SIGNWRITING FULL STOP;Po;0;L;;;;;N;;;;;
+1DA89;SIGNWRITING SEMICOLON;Po;0;L;;;;;N;;;;;
+1DA8A;SIGNWRITING COLON;Po;0;L;;;;;N;;;;;
+1DA8B;SIGNWRITING PARENTHESIS;Po;0;L;;;;;N;;;;;
+1DA9B;SIGNWRITING FILL MODIFIER-2;Mn;0;NSM;;;;;N;;;;;
+1DA9C;SIGNWRITING FILL MODIFIER-3;Mn;0;NSM;;;;;N;;;;;
+1DA9D;SIGNWRITING FILL MODIFIER-4;Mn;0;NSM;;;;;N;;;;;
+1DA9E;SIGNWRITING FILL MODIFIER-5;Mn;0;NSM;;;;;N;;;;;
+1DA9F;SIGNWRITING FILL MODIFIER-6;Mn;0;NSM;;;;;N;;;;;
+1DAA1;SIGNWRITING ROTATION MODIFIER-2;Mn;0;NSM;;;;;N;;;;;
+1DAA2;SIGNWRITING ROTATION MODIFIER-3;Mn;0;NSM;;;;;N;;;;;
+1DAA3;SIGNWRITING ROTATION MODIFIER-4;Mn;0;NSM;;;;;N;;;;;
+1DAA4;SIGNWRITING ROTATION MODIFIER-5;Mn;0;NSM;;;;;N;;;;;
+1DAA5;SIGNWRITING ROTATION MODIFIER-6;Mn;0;NSM;;;;;N;;;;;
+1DAA6;SIGNWRITING ROTATION MODIFIER-7;Mn;0;NSM;;;;;N;;;;;
+1DAA7;SIGNWRITING ROTATION MODIFIER-8;Mn;0;NSM;;;;;N;;;;;
+1DAA8;SIGNWRITING ROTATION MODIFIER-9;Mn;0;NSM;;;;;N;;;;;
+1DAA9;SIGNWRITING ROTATION MODIFIER-10;Mn;0;NSM;;;;;N;;;;;
+1DAAA;SIGNWRITING ROTATION MODIFIER-11;Mn;0;NSM;;;;;N;;;;;
+1DAAB;SIGNWRITING ROTATION MODIFIER-12;Mn;0;NSM;;;;;N;;;;;
+1DAAC;SIGNWRITING ROTATION MODIFIER-13;Mn;0;NSM;;;;;N;;;;;
+1DAAD;SIGNWRITING ROTATION MODIFIER-14;Mn;0;NSM;;;;;N;;;;;
+1DAAE;SIGNWRITING ROTATION MODIFIER-15;Mn;0;NSM;;;;;N;;;;;
+1DAAF;SIGNWRITING ROTATION MODIFIER-16;Mn;0;NSM;;;;;N;;;;;
 1E800;MENDE KIKAKUI SYLLABLE M001 KI;Lo;0;R;;;;;N;;;;;
 1E801;MENDE KIKAKUI SYLLABLE M002 KA;Lo;0;R;;;;;N;;;;;
 1E802;MENDE KIKAKUI SYLLABLE M003 KU;Lo;0;R;;;;;N;;;;;
@@ -25108,6 +27011,9 @@
 1F32A;CLOUD WITH TORNADO;So;0;ON;;;;;N;;;;;
 1F32B;FOG;So;0;ON;;;;;N;;;;;
 1F32C;WIND BLOWING FACE;So;0;ON;;;;;N;;;;;
+1F32D;HOT DOG;So;0;ON;;;;;N;;;;;
+1F32E;TACO;So;0;ON;;;;;N;;;;;
+1F32F;BURRITO;So;0;ON;;;;;N;;;;;
 1F330;CHESTNUT;So;0;ON;;;;;N;;;;;
 1F331;SEEDLING;So;0;ON;;;;;N;;;;;
 1F332;EVERGREEN TREE;So;0;ON;;;;;N;;;;;
@@ -25186,6 +27092,8 @@
 1F37B;CLINKING BEER MUGS;So;0;ON;;;;;N;;;;;
 1F37C;BABY BOTTLE;So;0;ON;;;;;N;;;;;
 1F37D;FORK AND KNIFE WITH PLATE;So;0;ON;;;;;N;;;;;
+1F37E;BOTTLE WITH POPPING CORK;So;0;ON;;;;;N;;;;;
+1F37F;POPCORN;So;0;ON;;;;;N;;;;;
 1F380;RIBBON;So;0;ON;;;;;N;;;;;
 1F381;WRAPPED PRESENT;So;0;ON;;;;;N;;;;;
 1F382;BIRTHDAY CAKE;So;0;ON;;;;;N;;;;;
@@ -25265,6 +27173,11 @@
 1F3CC;GOLFER;So;0;ON;;;;;N;;;;;
 1F3CD;RACING MOTORCYCLE;So;0;ON;;;;;N;;;;;
 1F3CE;RACING CAR;So;0;ON;;;;;N;;;;;
+1F3CF;CRICKET BAT AND BALL;So;0;ON;;;;;N;;;;;
+1F3D0;VOLLEYBALL;So;0;ON;;;;;N;;;;;
+1F3D1;FIELD HOCKEY STICK AND BALL;So;0;ON;;;;;N;;;;;
+1F3D2;ICE HOCKEY STICK AND PUCK;So;0;ON;;;;;N;;;;;
+1F3D3;TABLE TENNIS PADDLE AND BALL;So;0;ON;;;;;N;;;;;
 1F3D4;SNOW CAPPED MOUNTAIN;So;0;ON;;;;;N;;;;;
 1F3D5;CAMPING;So;0;ON;;;;;N;;;;;
 1F3D6;BEACH WITH UMBRELLA;So;0;ON;;;;;N;;;;;
@@ -25301,6 +27214,14 @@
 1F3F5;ROSETTE;So;0;ON;;;;;N;;;;;
 1F3F6;BLACK ROSETTE;So;0;ON;;;;;N;;;;;
 1F3F7;LABEL;So;0;ON;;;;;N;;;;;
+1F3F8;BADMINTON RACQUET AND SHUTTLECOCK;So;0;ON;;;;;N;;;;;
+1F3F9;BOW AND ARROW;So;0;ON;;;;;N;;;;;
+1F3FA;AMPHORA;So;0;ON;;;;;N;;;;;
+1F3FB;EMOJI MODIFIER FITZPATRICK TYPE-1-2;Sk;0;ON;;;;;N;;;;;
+1F3FC;EMOJI MODIFIER FITZPATRICK TYPE-3;Sk;0;ON;;;;;N;;;;;
+1F3FD;EMOJI MODIFIER FITZPATRICK TYPE-4;Sk;0;ON;;;;;N;;;;;
+1F3FE;EMOJI MODIFIER FITZPATRICK TYPE-5;Sk;0;ON;;;;;N;;;;;
+1F3FF;EMOJI MODIFIER FITZPATRICK TYPE-6;Sk;0;ON;;;;;N;;;;;
 1F400;RAT;So;0;ON;;;;;N;;;;;
 1F401;MOUSE;So;0;ON;;;;;N;;;;;
 1F402;OX;So;0;ON;;;;;N;;;;;
@@ -25556,6 +27477,7 @@
 1F4FC;VIDEOCASSETTE;So;0;ON;;;;;N;;;;;
 1F4FD;FILM PROJECTOR;So;0;ON;;;;;N;;;;;
 1F4FE;PORTABLE STEREO;So;0;ON;;;;;N;;;;;
+1F4FF;PRAYER BEADS;So;0;ON;;;;;N;;;;;
 1F500;TWISTED RIGHTWARDS ARROWS;So;0;ON;;;;;N;;;;;
 1F501;CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS;So;0;ON;;;;;N;;;;;
 1F502;CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS WITH CIRCLED ONE OVERLAY;So;0;ON;;;;;N;;;;;
@@ -25631,6 +27553,11 @@
 1F548;CELTIC CROSS;So;0;ON;;;;;N;;;;;
 1F549;OM SYMBOL;So;0;ON;;;;;N;;;;;
 1F54A;DOVE OF PEACE;So;0;ON;;;;;N;;;;;
+1F54B;KAABA;So;0;ON;;;;;N;;;;;
+1F54C;MOSQUE;So;0;ON;;;;;N;;;;;
+1F54D;SYNAGOGUE;So;0;ON;;;;;N;;;;;
+1F54E;MENORAH WITH NINE BRANCHES;So;0;ON;;;;;N;;;;;
+1F54F;BOWL OF HYGIEIA;So;0;ON;;;;;N;;;;;
 1F550;CLOCK FACE ONE OCLOCK;So;0;ON;;;;;N;;;;;
 1F551;CLOCK FACE TWO OCLOCK;So;0;ON;;;;;N;;;;;
 1F552;CLOCK FACE THREE OCLOCK;So;0;ON;;;;;N;;;;;
@@ -25872,6 +27799,8 @@
 1F640;WEARY CAT FACE;So;0;ON;;;;;N;;;;;
 1F641;SLIGHTLY FROWNING FACE;So;0;ON;;;;;N;;;;;
 1F642;SLIGHTLY SMILING FACE;So;0;ON;;;;;N;;;;;
+1F643;UPSIDE-DOWN FACE;So;0;ON;;;;;N;;;;;
+1F644;FACE WITH ROLLING EYES;So;0;ON;;;;;N;;;;;
 1F645;FACE WITH NO GOOD GESTURE;So;0;ON;;;;;N;;;;;
 1F646;FACE WITH OK GESTURE;So;0;ON;;;;;N;;;;;
 1F647;PERSON BOWING DEEPLY;So;0;ON;;;;;N;;;;;
@@ -26011,6 +27940,7 @@
 1F6CD;SHOPPING BAGS;So;0;ON;;;;;N;;;;;
 1F6CE;BELLHOP BELL;So;0;ON;;;;;N;;;;;
 1F6CF;BED;So;0;ON;;;;;N;;;;;
+1F6D0;PLACE OF WORSHIP;So;0;ON;;;;;N;;;;;
 1F6E0;HAMMER AND WRENCH;So;0;ON;;;;;N;;;;;
 1F6E1;SHIELD;So;0;ON;;;;;N;;;;;
 1F6E2;OIL DRUM;So;0;ON;;;;;N;;;;;
@@ -26377,12 +28307,29 @@
 1F8AB;RIGHTWARDS FRONT-TILTED SHADOWED WHITE ARROW;So;0;ON;;;;;N;;;;;
 1F8AC;WHITE ARROW SHAFT WIDTH ONE;So;0;ON;;;;;N;;;;;
 1F8AD;WHITE ARROW SHAFT WIDTH TWO THIRDS;So;0;ON;;;;;N;;;;;
+1F910;ZIPPER-MOUTH FACE;So;0;ON;;;;;N;;;;;
+1F911;MONEY-MOUTH FACE;So;0;ON;;;;;N;;;;;
+1F912;FACE WITH THERMOMETER;So;0;ON;;;;;N;;;;;
+1F913;NERD FACE;So;0;ON;;;;;N;;;;;
+1F914;THINKING FACE;So;0;ON;;;;;N;;;;;
+1F915;FACE WITH HEAD-BANDAGE;So;0;ON;;;;;N;;;;;
+1F916;ROBOT FACE;So;0;ON;;;;;N;;;;;
+1F917;HUGGING FACE;So;0;ON;;;;;N;;;;;
+1F918;SIGN OF THE HORNS;So;0;ON;;;;;N;;;;;
+1F980;CRAB;So;0;ON;;;;;N;;;;;
+1F981;LION FACE;So;0;ON;;;;;N;;;;;
+1F982;SCORPION;So;0;ON;;;;;N;;;;;
+1F983;TURKEY;So;0;ON;;;;;N;;;;;
+1F984;UNICORN FACE;So;0;ON;;;;;N;;;;;
+1F9C0;CHEESE WEDGE;So;0;ON;;;;;N;;;;;
 20000;<CJK Ideograph Extension B, First>;Lo;0;L;;;;;N;;;;;
 2A6D6;<CJK Ideograph Extension B, Last>;Lo;0;L;;;;;N;;;;;
 2A700;<CJK Ideograph Extension C, First>;Lo;0;L;;;;;N;;;;;
 2B734;<CJK Ideograph Extension C, Last>;Lo;0;L;;;;;N;;;;;
 2B740;<CJK Ideograph Extension D, First>;Lo;0;L;;;;;N;;;;;
 2B81D;<CJK Ideograph Extension D, Last>;Lo;0;L;;;;;N;;;;;
+2B820;<CJK Ideograph Extension E, First>;Lo;0;L;;;;;N;;;;;
+2CEA1;<CJK Ideograph Extension E, Last>;Lo;0;L;;;;;N;;;;;
 2F800;CJK COMPATIBILITY IDEOGRAPH-2F800;Lo;0;L;4E3D;;;;N;;;;;
 2F801;CJK COMPATIBILITY IDEOGRAPH-2F801;Lo;0;L;4E38;;;;N;;;;;
 2F802;CJK COMPATIBILITY IDEOGRAPH-2F802;Lo;0;L;4E41;;;;N;;;;;
--- a/jdk/make/data/unicodedata/VERSION	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/data/unicodedata/VERSION	Tue Oct 27 01:45:03 2015 -0400
@@ -1,1 +1,1 @@
-7.0.0
+8.0.0
--- a/jdk/make/gendata/Gendata-java.base.gmk	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/gendata/Gendata-java.base.gmk	Tue Oct 27 01:45:03 2015 -0400
@@ -70,7 +70,7 @@
 	$(ECHO) "Generating java.security"
 	$(MKDIR) -p $(@D)
 	$(TOOL_MAKEJAVASECURITY) $(GENDATA_JAVA_SECURITY_SRC) $@ $(OPENJDK_TARGET_OS) \
-		$(RESTRICTED_PKGS_SRC) || exit 1
+		$(OPENJDK_TARGET_CPU_ARCH) $(RESTRICTED_PKGS_SRC) || exit 1
 
 TARGETS += $(GENDATA_JAVA_SECURITY)
 
--- a/jdk/make/gensrc/GensrcSwing.gmk	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/gensrc/GensrcSwing.gmk	Tue Oct 27 01:45:03 2015 -0400
@@ -41,71 +41,4 @@
 
 GENSRC_SWING_NIMBUS := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus
 
-#
-# Generate beaninfo java files
-#
-
-BEANINFO_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/gensrc_no_docs/java.desktop
-DOCLET_DATA_DIR := $(JDK_TOPDIR)/make/data/swingbeaninfo
-
-# javax.swing package
-BEANS = AbstractButton Box JComponent JApplet JButton \
-    JCheckBox JCheckBoxMenuItem JComboBox JColorChooser \
-    JDesktopPane JDialog JEditorPane JFileChooser JFrame \
-    JFormattedTextField JInternalFrame JLabel JLayeredPane \
-    JList JMenu JMenuBar JMenuItem JOptionPane JPanel \
-    JPasswordField JPopupMenu JProgressBar JRadioButton \
-    JRadioButtonMenuItem JScrollBar JScrollPane JSeparator \
-    JSlider JSplitPane JSpinner JTabbedPane JTable \
-    JTextArea JTextField JTextPane JToggleButton JToolBar \
-    JTree JWindow
-
-# javax.swing.text package
-BEANS_TEXT = JTextComponent
-
-BEANS_SRC = $(BEANS:%=$(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/%.java) \
-    $(BEANS_TEXT:%=$(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/text/%.java)
-
-# Dummy variable so far, in the old build system it was false by default
-SWINGBEAN_DEBUG_FLAG = false
-# GenDocletBeanInfo is compiled in Tools.gmk and picks up from $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes
-# LocaleDataMetaInfo needs to be generated before running this to avoid confusing errors
-# in the build log.
-$(BEANINFO_OUTPUTDIR)/_the.generated_beaninfo: $(BEANS_SRC) \
-    $(BEANINFO_OUTPUTDIR)/javax/swing/SwingBeanInfoBase.java \
-    $(BEANINFO_OUTPUTDIR)/sun/swing/BeanInfoUtils.java $(BUILD_TOOLS_JDK)
-	$(ECHO) Generating beaninfo
-	$(MKDIR) -p $(BEANINFO_OUTPUTDIR)/javax/swing
-	$(JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) \
-	    -sourcepath $(call PathList,\
-	        $(wildcard $(JDK_TOPDIR)/src/*/*/classes) \
-	        $(SUPPORT_OUTPUTDIR)/gensrc/java.base) \
-	    -doclet build.tools.swingbeaninfo.GenDocletBeanInfo \
-	    -x $(SWINGBEAN_DEBUG_FLAG) -d $(BEANINFO_OUTPUTDIR)/javax/swing \
-	    -t $(DOCLET_DATA_DIR)/SwingBeanInfo.template \
-	    -docletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
-	    -XDignore.symbol.file=true \
-	    -classpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes $(BEANS_SRC) $(LOG_INFO)
-        # Move the JTextComponent into its proper package directory.
-	$(MKDIR) -p $(BEANINFO_OUTPUTDIR)/javax/swing/text
-	$(MV) $(BEANINFO_OUTPUTDIR)/javax/swing/JTextComponentBeanInfo.java \
-	    $(BEANINFO_OUTPUTDIR)/javax/swing/text/JTextComponentBeanInfo.java
-	$(TOUCH) $@
-
-# This file is the part of dt.jar
-# For some reason it is under $(JDK_TOPDIR)/make/data/swingbeaninfo
-# Should it be moved under $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing instead?
-$(BEANINFO_OUTPUTDIR)/javax/swing/SwingBeanInfoBase.java: \
-    $(DOCLET_DATA_DIR)/javax/swing/SwingBeanInfoBase.java
-	$(call install-file)
-
-# This file is the part of dt.jar
-# For some reason it is under $(JDK_TOPDIR)/make/data/swingbeaninfo
-# Should it be moved under $(JDK_TOPDIR)/src/java.desktop/share/classes/sun/swing instead?
-$(BEANINFO_OUTPUTDIR)/sun/swing/BeanInfoUtils.java: \
-    $(DOCLET_DATA_DIR)/sun/swing/BeanInfoUtils.java
-	$(call install-file)
-
-GENSRC_SWING_BEANINFO = $(BEANINFO_OUTPUTDIR)/_the.generated_beaninfo
-
-GENSRC_JAVA_DESKTOP += $(GENSRC_SWING_BEANINFO) $(GENSRC_SWING_NIMBUS)
+GENSRC_JAVA_DESKTOP += $(GENSRC_SWING_NIMBUS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/launcher/Launcher-jdk.jshell.gmk	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+include LauncherCommon.gmk
+
+$(eval $(call SetupLauncher,jshell, \
+    -DEXPAND_CLASSPATH_WILDCARDS \
+    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.internal.jshell.tool.JShellTool"$(COMMA) }'))
--- a/jdk/make/launcher/Launcher-jdk.pack200.gmk	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/launcher/Launcher-jdk.pack200.gmk	Tue Oct 27 01:45:03 2015 -0400
@@ -40,7 +40,7 @@
 
 ifeq ($(USE_EXTERNAL_LIBZ), true)
   UNPACKEXE_CFLAGS += -DSYSTEM_ZLIB
-  UNPACKEXE_ZIPOBJS := -lz
+  UNPACKEXE_LIBS := -lz
 else
   UNPACKEXE_CFLAGS += -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
   UNPACKEXE_ZIPOBJS := $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/zcrc32$(OBJ_SUFFIX) \
@@ -90,9 +90,9 @@
         $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_linux := -lc, \
+    LDFLAGS_linux := , \
     LDFLAGS_solaris := $(UNPACKEXE_LDFLAGS_solaris) -lc, \
-    LDFLAGS_SUFFIX := $(LIBCXX), \
+    LDFLAGS_SUFFIX := $(UNPACKEXE_LIBS) $(LIBCXX), \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpackexe$(OUTPUT_SUBDIR), \
     OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE), \
     PROGRAM := unpack200, \
--- a/jdk/make/lib/Awt2dLibraries.gmk	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/lib/Awt2dLibraries.gmk	Tue Oct 27 01:45:03 2015 -0400
@@ -391,6 +391,8 @@
     -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
     $(LIBJAVA_HEADER_FLAGS) \
     #
+# The fast floor code loses precision.
+LCMS_CFLAGS=-DCMS_DONT_USE_FAST_FLOOR
 
 ifeq ($(USE_EXTERNAL_LCMS), true)
   # If we're using an external library, we'll just need the wrapper part.
@@ -498,10 +500,10 @@
     DISABLED_WARNINGS_clang := logical-op-parentheses, \
     DISABLED_WARNINGS_microsoft := 4267, \
     MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
-    LDFLAGS := $(LDFLAGS_JDKLIB) $(LIBJPEG_LIBS) \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \
-    LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
+    LDFLAGS_SUFFIX := $(LIBJPEG_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=javajpeg.dll" \
--- a/jdk/make/mapfiles/libjava/mapfile-vers	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/mapfiles/libjava/mapfile-vers	Tue Oct 27 01:45:03 2015 -0400
@@ -152,7 +152,6 @@
 		Java_java_lang_StrictMath_log10;
 		Java_java_lang_StrictMath_sin;
 		Java_java_lang_StrictMath_sqrt;
-		Java_java_lang_StrictMath_cbrt;
 		Java_java_lang_StrictMath_tan;
 		Java_java_lang_StrictMath_cosh;
 		Java_java_lang_StrictMath_sinh;
--- a/jdk/make/src/classes/build/tools/cldrconverter/ResourceBundleGenerator.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/src/classes/build/tools/cldrconverter/ResourceBundleGenerator.java	Tue Oct 27 01:45:03 2015 -0400
@@ -28,6 +28,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.util.Arrays;
 import java.util.Formatter;
 import java.util.HashSet;
 import java.util.HashMap;
@@ -285,15 +286,16 @@
                         out.printf("        parentLocalesMap.put(Locale.forLanguageTag(\"%s\"),\n",
                                    parentTag);
                     }
-                    String[] childlen = toLocaleList(metaInfo.get(key), true).split(" ");
+                    String[] children = toLocaleList(metaInfo.get(key), true).split(" ");
+                    Arrays.sort(children);
                     out.printf("             new String[] {\n" +
                                "                 ");
                     int count = 0;
-                    for (int i = 0; i < childlen.length; i++) {
-                        String child = childlen[i];
+                    for (int i = 0; i < children.length; i++) {
+                        String child = children[i];
                         out.printf("\"%s\", ", child);
                         count += child.length() + 4;
-                        if (i != childlen.length - 1 && count > 64) {
+                        if (i != children.length - 1 && count > 64) {
                             out.printf("\n                 ");
                             count = 0;
                         }
--- a/jdk/make/src/classes/build/tools/makejavasecurity/MakeJavaSecurity.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/make/src/classes/build/tools/makejavasecurity/MakeJavaSecurity.java	Tue Oct 27 01:45:03 2015 -0400
@@ -50,19 +50,21 @@
 
     public static void main(String[] args) throws Exception {
 
-        if (args.length < 3) {
+        if (args.length < 4) {
             System.err.println("Usage: java MakeJavaSecurity " +
                                "[input java.security file name] " +
                                "[output java.security file name] " +
                                "[openjdk target os] " +
+                               "[openjdk target cpu architecture]" +
                                "[more restricted packages file name?]");
-            System.exit(1);
+
+                    System.exit(1);
         }
 
         // more restricted packages
         List<String> extraLines;
-        if (args.length == 4) {
-            extraLines = Files.readAllLines(Paths.get(args[3]));
+        if (args.length == 5) {
+            extraLines = Files.readAllLines(Paths.get(args[4]));
         } else {
             extraLines = Collections.emptyList();
         }
@@ -96,7 +98,11 @@
                 mode = 0;
                 iter.remove();
             } else if (line.startsWith("#ifdef ")) {
-                mode = line.endsWith(args[2])?1:2;
+                if (line.indexOf('-') > 0) {
+                    mode = line.endsWith(args[2]+"-"+args[3]) ? 1 : 2;
+                } else {
+                    mode = line.endsWith(args[2]) ? 1 : 2;
+                }
                 iter.remove();
             } else if (line.startsWith("#ifndef ")) {
                 mode = line.endsWith(args[2])?2:1;
--- a/jdk/src/java.base/macosx/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/macosx/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,13 +57,13 @@
 public class HostLocaleProviderAdapterImpl {
 
     // per supported locale instances
-    private static ConcurrentMap<Locale, SoftReference<AtomicReferenceArray<String>>> dateFormatPatternsMap =
+    private static final ConcurrentMap<Locale, SoftReference<AtomicReferenceArray<String>>> dateFormatPatternsMap =
         new ConcurrentHashMap<>(2);
-    private static ConcurrentMap<Locale, SoftReference<AtomicReferenceArray<String>>> numberFormatPatternsMap =
+    private static final ConcurrentMap<Locale, SoftReference<AtomicReferenceArray<String>>> numberFormatPatternsMap =
         new ConcurrentHashMap<>(2);
-    private static ConcurrentMap<Locale, SoftReference<DateFormatSymbols>> dateFormatSymbolsMap =
+    private static final ConcurrentMap<Locale, SoftReference<DateFormatSymbols>> dateFormatSymbolsMap =
         new ConcurrentHashMap<>(2);
-    private static ConcurrentMap<Locale, SoftReference<DecimalFormatSymbols>> decimalFormatSymbolsMap =
+    private static final ConcurrentMap<Locale, SoftReference<DecimalFormatSymbols>> decimalFormatSymbolsMap =
         new ConcurrentHashMap<>(2);
 
     // locale categories
--- a/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java	Tue Oct 27 01:45:03 2015 -0400
@@ -189,6 +189,9 @@
     /** superclass descriptor appearing in stream */
     private ObjectStreamClass superDesc;
 
+    /** true if, and only if, the object has been correctly initialized */
+    private boolean initialized;
+
     /**
      * Initializes native code.
      */
@@ -266,6 +269,7 @@
         if (cl == null) {
             return null;
         }
+        requireInitialized();
         if (System.getSecurityManager() != null) {
             Class<?> caller = Reflection.getCallerClass();
             if (ReflectUtil.needsPackageAccessCheck(caller.getClassLoader(), cl.getClassLoader())) {
@@ -533,6 +537,7 @@
                     name, "unmatched serializable field(s) declared");
             }
         }
+        initialized = true;
     }
 
     /**
@@ -550,6 +555,14 @@
                    ObjectStreamClass superDesc)
         throws InvalidClassException
     {
+        ObjectStreamClass osc = null;
+        if (cl != null) {
+            osc = lookup(cl, true);
+            if (!osc.isProxy) {
+                throw new InvalidClassException(
+                    "cannot bind proxy descriptor to a non-proxy class");
+            }
+        }
         this.cl = cl;
         this.resolveEx = resolveEx;
         this.superDesc = superDesc;
@@ -557,21 +570,17 @@
         serializable = true;
         suid = Long.valueOf(0);
         fields = NO_FIELDS;
-
-        if (cl != null) {
-            localDesc = lookup(cl, true);
-            if (!localDesc.isProxy) {
-                throw new InvalidClassException(
-                    "cannot bind proxy descriptor to a non-proxy class");
-            }
+        if (osc != null) {
+            localDesc = osc;
             name = localDesc.name;
             externalizable = localDesc.externalizable;
-            cons = localDesc.cons;
             writeReplaceMethod = localDesc.writeReplaceMethod;
             readResolveMethod = localDesc.readResolveMethod;
             deserializeEx = localDesc.deserializeEx;
+            cons = localDesc.cons;
         }
         fieldRefl = getReflector(fields, localDesc);
+        initialized = true;
     }
 
     /**
@@ -583,11 +592,57 @@
                       ObjectStreamClass superDesc)
         throws InvalidClassException
     {
+        long suid = Long.valueOf(model.getSerialVersionUID());
+        ObjectStreamClass osc = null;
+        if (cl != null) {
+            osc = lookup(cl, true);
+            if (osc.isProxy) {
+                throw new InvalidClassException(
+                        "cannot bind non-proxy descriptor to a proxy class");
+            }
+            if (model.isEnum != osc.isEnum) {
+                throw new InvalidClassException(model.isEnum ?
+                        "cannot bind enum descriptor to a non-enum class" :
+                        "cannot bind non-enum descriptor to an enum class");
+            }
+
+            if (model.serializable == osc.serializable &&
+                    !cl.isArray() &&
+                    suid != osc.getSerialVersionUID()) {
+                throw new InvalidClassException(osc.name,
+                        "local class incompatible: " +
+                                "stream classdesc serialVersionUID = " + suid +
+                                ", local class serialVersionUID = " +
+                                osc.getSerialVersionUID());
+            }
+
+            if (!classNamesEqual(model.name, osc.name)) {
+                throw new InvalidClassException(osc.name,
+                        "local class name incompatible with stream class " +
+                                "name \"" + model.name + "\"");
+            }
+
+            if (!model.isEnum) {
+                if ((model.serializable == osc.serializable) &&
+                        (model.externalizable != osc.externalizable)) {
+                    throw new InvalidClassException(osc.name,
+                            "Serializable incompatible with Externalizable");
+                }
+
+                if ((model.serializable != osc.serializable) ||
+                        (model.externalizable != osc.externalizable) ||
+                        !(model.serializable || model.externalizable)) {
+                    deserializeEx = new ExceptionInfo(
+                            osc.name, "class invalid for deserialization");
+                }
+            }
+        }
+
         this.cl = cl;
         this.resolveEx = resolveEx;
         this.superDesc = superDesc;
         name = model.name;
-        suid = Long.valueOf(model.getSerialVersionUID());
+        this.suid = suid;
         isProxy = false;
         isEnum = model.isEnum;
         serializable = model.serializable;
@@ -598,53 +653,8 @@
         primDataSize = model.primDataSize;
         numObjFields = model.numObjFields;
 
-        if (cl != null) {
-            localDesc = lookup(cl, true);
-            if (localDesc.isProxy) {
-                throw new InvalidClassException(
-                    "cannot bind non-proxy descriptor to a proxy class");
-            }
-            if (isEnum != localDesc.isEnum) {
-                throw new InvalidClassException(isEnum ?
-                    "cannot bind enum descriptor to a non-enum class" :
-                    "cannot bind non-enum descriptor to an enum class");
-            }
-
-            if (serializable == localDesc.serializable &&
-                !cl.isArray() &&
-                suid.longValue() != localDesc.getSerialVersionUID())
-            {
-                throw new InvalidClassException(localDesc.name,
-                    "local class incompatible: " +
-                    "stream classdesc serialVersionUID = " + suid +
-                    ", local class serialVersionUID = " +
-                    localDesc.getSerialVersionUID());
-            }
-
-            if (!classNamesEqual(name, localDesc.name)) {
-                throw new InvalidClassException(localDesc.name,
-                    "local class name incompatible with stream class " +
-                    "name \"" + name + "\"");
-            }
-
-            if (!isEnum) {
-                if ((serializable == localDesc.serializable) &&
-                    (externalizable != localDesc.externalizable))
-                {
-                    throw new InvalidClassException(localDesc.name,
-                        "Serializable incompatible with Externalizable");
-                }
-
-                if ((serializable != localDesc.serializable) ||
-                    (externalizable != localDesc.externalizable) ||
-                    !(serializable || externalizable))
-                {
-                    deserializeEx = new ExceptionInfo(
-                        localDesc.name, "class invalid for deserialization");
-                }
-            }
-
-            cons = localDesc.cons;
+        if (osc != null) {
+            localDesc = osc;
             writeObjectMethod = localDesc.writeObjectMethod;
             readObjectMethod = localDesc.readObjectMethod;
             readObjectNoDataMethod = localDesc.readObjectNoDataMethod;
@@ -653,10 +663,13 @@
             if (deserializeEx == null) {
                 deserializeEx = localDesc.deserializeEx;
             }
+            cons = localDesc.cons;
         }
+
         fieldRefl = getReflector(fields, localDesc);
         // reassign to matched fields so as to reflect local unshared settings
         fields = fieldRefl.getFields();
+        initialized = true;
     }
 
     /**
@@ -759,11 +772,20 @@
     }
 
     /**
+     * Throws InternalError if not initialized.
+     */
+    private final void requireInitialized() {
+        if (!initialized)
+            throw new InternalError("Unexpected call when not initialized");
+    }
+
+    /**
      * Throws an InvalidClassException if object instances referencing this
      * class descriptor should not be allowed to deserialize.  This method does
      * not apply to deserialization of enum constants.
      */
     void checkDeserialize() throws InvalidClassException {
+        requireInitialized();
         if (deserializeEx != null) {
             throw deserializeEx.newInvalidClassException();
         }
@@ -775,6 +797,7 @@
      * not apply to serialization of enum constants.
      */
     void checkSerialize() throws InvalidClassException {
+        requireInitialized();
         if (serializeEx != null) {
             throw serializeEx.newInvalidClassException();
         }
@@ -788,6 +811,7 @@
      * does not apply to deserialization of enum constants.
      */
     void checkDefaultSerialize() throws InvalidClassException {
+        requireInitialized();
         if (defaultSerializeEx != null) {
             throw defaultSerializeEx.newInvalidClassException();
         }
@@ -799,6 +823,7 @@
      * of the subclass descriptor's bound class.
      */
     ObjectStreamClass getSuperDesc() {
+        requireInitialized();
         return superDesc;
     }
 
@@ -809,6 +834,7 @@
      * associated with this descriptor.
      */
     ObjectStreamClass getLocalDesc() {
+        requireInitialized();
         return localDesc;
     }
 
@@ -851,6 +877,7 @@
      * otherwise.
      */
     boolean isProxy() {
+        requireInitialized();
         return isProxy;
     }
 
@@ -859,6 +886,7 @@
      * otherwise.
      */
     boolean isEnum() {
+        requireInitialized();
         return isEnum;
     }
 
@@ -867,6 +895,7 @@
      * otherwise.
      */
     boolean isExternalizable() {
+        requireInitialized();
         return externalizable;
     }
 
@@ -875,6 +904,7 @@
      * otherwise.
      */
     boolean isSerializable() {
+        requireInitialized();
         return serializable;
     }
 
@@ -883,6 +913,7 @@
      * has written its data in 1.2 (block data) format, false otherwise.
      */
     boolean hasBlockExternalData() {
+        requireInitialized();
         return hasBlockExternalData;
     }
 
@@ -892,6 +923,7 @@
      * writeObject() method, false otherwise.
      */
     boolean hasWriteObjectData() {
+        requireInitialized();
         return hasWriteObjectData;
     }
 
@@ -903,6 +935,7 @@
      * accessible no-arg constructor.  Otherwise, returns false.
      */
     boolean isInstantiable() {
+        requireInitialized();
         return (cons != null);
     }
 
@@ -912,6 +945,7 @@
      * returns false.
      */
     boolean hasWriteObjectMethod() {
+        requireInitialized();
         return (writeObjectMethod != null);
     }
 
@@ -921,6 +955,7 @@
      * returns false.
      */
     boolean hasReadObjectMethod() {
+        requireInitialized();
         return (readObjectMethod != null);
     }
 
@@ -930,6 +965,7 @@
      * Otherwise, returns false.
      */
     boolean hasReadObjectNoDataMethod() {
+        requireInitialized();
         return (readObjectNoDataMethod != null);
     }
 
@@ -938,6 +974,7 @@
      * defines a conformant writeReplace method.  Otherwise, returns false.
      */
     boolean hasWriteReplaceMethod() {
+        requireInitialized();
         return (writeReplaceMethod != null);
     }
 
@@ -946,6 +983,7 @@
      * defines a conformant readResolve method.  Otherwise, returns false.
      */
     boolean hasReadResolveMethod() {
+        requireInitialized();
         return (readResolveMethod != null);
     }
 
@@ -962,6 +1000,7 @@
         throws InstantiationException, InvocationTargetException,
                UnsupportedOperationException
     {
+        requireInitialized();
         if (cons != null) {
             try {
                 return cons.newInstance();
@@ -983,6 +1022,7 @@
     void invokeWriteObject(Object obj, ObjectOutputStream out)
         throws IOException, UnsupportedOperationException
     {
+        requireInitialized();
         if (writeObjectMethod != null) {
             try {
                 writeObjectMethod.invoke(obj, new Object[]{ out });
@@ -1012,6 +1052,7 @@
         throws ClassNotFoundException, IOException,
                UnsupportedOperationException
     {
+        requireInitialized();
         if (readObjectMethod != null) {
             try {
                 readObjectMethod.invoke(obj, new Object[]{ in });
@@ -1042,6 +1083,7 @@
     void invokeReadObjectNoData(Object obj)
         throws IOException, UnsupportedOperationException
     {
+        requireInitialized();
         if (readObjectNoDataMethod != null) {
             try {
                 readObjectNoDataMethod.invoke(obj, (Object[]) null);
@@ -1070,6 +1112,7 @@
     Object invokeWriteReplace(Object obj)
         throws IOException, UnsupportedOperationException
     {
+        requireInitialized();
         if (writeReplaceMethod != null) {
             try {
                 return writeReplaceMethod.invoke(obj, (Object[]) null);
@@ -1099,6 +1142,7 @@
     Object invokeReadResolve(Object obj)
         throws IOException, UnsupportedOperationException
     {
+        requireInitialized();
         if (readResolveMethod != null) {
             try {
                 return readResolveMethod.invoke(obj, (Object[]) null);
--- a/jdk/src/java.base/share/classes/java/lang/Character.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/Character.java	Tue Oct 27 01:45:03 2015 -0400
@@ -42,7 +42,7 @@
  * a character's category (lowercase letter, digit, etc.) and for converting
  * characters from uppercase to lowercase and vice versa.
  * <p>
- * Character information is based on the Unicode Standard, version 7.0.0.
+ * Character information is based on the Unicode Standard, version 8.0.0.
  * <p>
  * The methods and data of class {@code Character} are defined by
  * the information in the <i>UnicodeData</i> file that is part of the
@@ -2850,6 +2850,93 @@
                              "SUPPLEMENTAL ARROWS-C",
                              "SUPPLEMENTALARROWS-C");
 
+        /**
+         * Constant for the "Cherokee Supplement" Unicode character block.
+         * @since 1.9
+         */
+        public static final UnicodeBlock CHEROKEE_SUPPLEMENT =
+            new UnicodeBlock("CHEROKEE_SUPPLEMENT",
+                             "CHEROKEE SUPPLEMENT",
+                             "CHEROKEESUPPLEMENT");
+
+        /**
+         * Constant for the "Hatran" Unicode character block.
+         * @since 1.9
+         */
+        public static final UnicodeBlock HATRAN =
+            new UnicodeBlock("HATRAN");
+
+        /**
+         * Constant for the "Old Hungarian" Unicode character block.
+         * @since 1.9
+         */
+        public static final UnicodeBlock OLD_HUNGARIAN =
+            new UnicodeBlock("OLD_HUNGARIAN",
+                             "OLD HUNGARIAN",
+                             "OLDHUNGARIAN");
+
+        /**
+         * Constant for the "Multani" Unicode character block.
+         * @since 1.9
+         */
+        public static final UnicodeBlock MULTANI =
+            new UnicodeBlock("MULTANI");
+
+        /**
+         * Constant for the "Ahom" Unicode character block.
+         * @since 1.9
+         */
+        public static final UnicodeBlock AHOM =
+            new UnicodeBlock("AHOM");
+
+        /**
+         * Constant for the "Early Dynastic Cuneiform" Unicode character block.
+         * @since 1.9
+         */
+        public static final UnicodeBlock EARLY_DYNASTIC_CUNEIFORM =
+            new UnicodeBlock("EARLY_DYNASTIC_CUNEIFORM",
+                             "EARLY DYNASTIC CUNEIFORM",
+                             "EARLYDYNASTICCUNEIFORM");
+
+        /**
+         * Constant for the "Anatolian Hieroglyphs" Unicode character block.
+         * @since 1.9
+         */
+        public static final UnicodeBlock ANATOLIAN_HIEROGLYPHS =
+            new UnicodeBlock("ANATOLIAN_HIEROGLYPHS",
+                             "ANATOLIAN HIEROGLYPHS",
+                             "ANATOLIANHIEROGLYPHS");
+
+        /**
+         * Constant for the "Sutton SignWriting" Unicode character block.
+         * @since 1.9
+         */
+        public static final UnicodeBlock SUTTON_SIGNWRITING =
+            new UnicodeBlock("SUTTON_SIGNWRITING",
+                             "SUTTON SIGNWRITING",
+                             "SUTTONSIGNWRITING");
+
+        /**
+         * Constant for the "Supplemental Symbols and Pictographs" Unicode
+         * character block.
+         * @since 1.9
+         */
+        public static final UnicodeBlock SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS =
+            new UnicodeBlock("SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS",
+                             "SUPPLEMENTAL SYMBOLS AND PICTOGRAPHS",
+                             "SUPPLEMENTALSYMBOLSANDPICTOGRAPHS");
+
+        /**
+         * Constant for the "CJK Unified Ideographs Extension E" Unicode
+         * character block.
+         * @since 1.9
+         */
+        public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E =
+            new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E",
+                             "CJK UNIFIED IDEOGRAPHS EXTENSION E",
+                             "CJKUNIFIEDIDEOGRAPHSEXTENSIONE");
+
+
         private static final int blockStarts[] = {
             0x0000,   // 0000..007F; Basic Latin
             0x0080,   // 0080..00FF; Latin-1 Supplement
@@ -2995,7 +3082,7 @@
             0xAAE0,   // AAE0..AAFF; Meetei Mayek Extensions
             0xAB00,   // AB00..AB2F; Ethiopic Extended-A
             0xAB30,   // AB30..AB6F; Latin Extended-E
-            0xAB70,   //             unassigned
+            0xAB70,   // AB70..ABBF; Cherokee Supplement
             0xABC0,   // ABC0..ABFF; Meetei Mayek
             0xAC00,   // AC00..D7AF; Hangul Syllables
             0xD7B0,   // D7B0..D7FF; Hangul Jamo Extended-B
@@ -3044,6 +3131,7 @@
             0x10860,  // 10860..1087F; Palmyrene
             0x10880,  // 10880..108AF; Nabataean
             0x108B0,  //               unassigned
+            0x108E0,  // 108E0..108FF; Hatran
             0x10900,  // 10900..1091F; Phoenician
             0x10920,  // 10920..1093F; Lydian
             0x10940,  //               unassigned
@@ -3061,6 +3149,8 @@
             0x10BB0,  //               unassigned
             0x10C00,  // 10C00..10C4F; Old Turkic
             0x10C50,  //               unassigned
+            0x10C80,  // 10C80..10CFF; Old Hungarian
+            0x10D00,  //               unassigned
             0x10E60,  // 10E60..10E7F; Rumi Numeral Symbols
             0x10E80,  //               unassigned
             0x11000,  // 11000..1107F; Brahmi
@@ -3072,6 +3162,7 @@
             0x111E0,  // 111E0..111FF; Sinhala Archaic Numbers
             0x11200,  // 11200..1124F; Khojki
             0x11250,  //               unassigned
+            0x11280,  // 11280..112AF; Multani
             0x112B0,  // 112B0..112FF; Khudawadi
             0x11300,  // 11300..1137F; Grantha
             0x11380,  //               unassigned
@@ -3082,15 +3173,20 @@
             0x11660,  //               unassigned
             0x11680,  // 11680..116CF; Takri
             0x116D0,  //               unassigned
+            0x11700,  // 11700..1173F; Ahom
+            0x11740,  //               unassigned
             0x118A0,  // 118A0..118FF; Warang Citi
             0x11900,  //               unassigned
             0x11AC0,  // 11AC0..11AFF; Pau Cin Hau
             0x11B00,  //               unassigned
             0x12000,  // 12000..123FF; Cuneiform
             0x12400,  // 12400..1247F; Cuneiform Numbers and Punctuation
-            0x12480,  //               unassigned
+            0x12480,  // 12480..1254F; Early Dynastic Cuneiform
+            0x12550,  //               unassigned
             0x13000,  // 13000..1342F; Egyptian Hieroglyphs
             0x13430,  //               unassigned
+            0x14400,  // 14400..1467F; Anatolian Hieroglyphs
+            0x14680,  //               unassigned
             0x16800,  // 16800..16A3F; Bamum Supplement
             0x16A40,  // 16A40..16A6F; Mro
             0x16A70,  //               unassigned
@@ -3112,7 +3208,8 @@
             0x1D360,  // 1D360..1D37F; Counting Rod Numerals
             0x1D380,  //               unassigned
             0x1D400,  // 1D400..1D7FF; Mathematical Alphanumeric Symbols
-            0x1D800,  //               unassigned
+            0x1D800,  // 1D800..1DAAF; Sutton SignWriting
+            0x1DAB0,  //               unassigned
             0x1E800,  // 1E800..1E8DF; Mende Kikakui
             0x1E8E0,  //               unassigned
             0x1EE00,  // 1EE00..1EEFF; Arabic Mathematical Alphabetic Symbols
@@ -3122,19 +3219,21 @@
             0x1F0A0,  // 1F0A0..1F0FF; Playing Cards
             0x1F100,  // 1F100..1F1FF; Enclosed Alphanumeric Supplement
             0x1F200,  // 1F200..1F2FF; Enclosed Ideographic Supplement
-            0x1F300,  // 1F300..1F5FF; Miscellaneous Symbols And Pictographs
+            0x1F300,  // 1F300..1F5FF; Miscellaneous Symbols and Pictographs
             0x1F600,  // 1F600..1F64F; Emoticons
             0x1F650,  // 1F650..1F67F; Ornamental Dingbats
-            0x1F680,  // 1F680..1F6FF; Transport And Map Symbols
+            0x1F680,  // 1F680..1F6FF; Transport and Map Symbols
             0x1F700,  // 1F700..1F77F; Alchemical Symbols
             0x1F780,  // 1F780..1F7FF; Geometric Shapes Extended
             0x1F800,  // 1F800..1F8FF; Supplemental Arrows-C
-            0x1F900,  //               unassigned
+            0x1F900,  // 1F900..1F9FF; Supplemental Symbols and Pictographs
+            0x1FA00,  //               unassigned
             0x20000,  // 20000..2A6DF; CJK Unified Ideographs Extension B
             0x2A6E0,  //               unassigned
             0x2A700,  // 2A700..2B73F; CJK Unified Ideographs Extension C
             0x2B740,  // 2B740..2B81F; CJK Unified Ideographs Extension D
-            0x2B820,  //               unassigned
+            0x2B820,  // 2B820..2CEAF; CJK Unified Ideographs Extension E
+            0x2CEB0,  //               unassigned
             0x2F800,  // 2F800..2FA1F; CJK Compatibility Ideographs Supplement
             0x2FA20,  //               unassigned
             0xE0000,  // E0000..E007F; Tags
@@ -3290,7 +3389,7 @@
             MEETEI_MAYEK_EXTENSIONS,
             ETHIOPIC_EXTENDED_A,
             LATIN_EXTENDED_E,
-            null,
+            CHEROKEE_SUPPLEMENT,
             MEETEI_MAYEK,
             HANGUL_SYLLABLES,
             HANGUL_JAMO_EXTENDED_B,
@@ -3339,6 +3438,7 @@
             PALMYRENE,
             NABATAEAN,
             null,
+            HATRAN,
             PHOENICIAN,
             LYDIAN,
             null,
@@ -3356,6 +3456,8 @@
             null,
             OLD_TURKIC,
             null,
+            OLD_HUNGARIAN,
+            null,
             RUMI_NUMERAL_SYMBOLS,
             null,
             BRAHMI,
@@ -3367,6 +3469,7 @@
             SINHALA_ARCHAIC_NUMBERS,
             KHOJKI,
             null,
+            MULTANI,
             KHUDAWADI,
             GRANTHA,
             null,
@@ -3377,15 +3480,20 @@
             null,
             TAKRI,
             null,
+            AHOM,
+            null,
             WARANG_CITI,
             null,
             PAU_CIN_HAU,
             null,
             CUNEIFORM,
             CUNEIFORM_NUMBERS_AND_PUNCTUATION,
+            EARLY_DYNASTIC_CUNEIFORM,
             null,
             EGYPTIAN_HIEROGLYPHS,
             null,
+            ANATOLIAN_HIEROGLYPHS,
+            null,
             BAMUM_SUPPLEMENT,
             MRO,
             null,
@@ -3407,6 +3515,7 @@
             COUNTING_ROD_NUMERALS,
             null,
             MATHEMATICAL_ALPHANUMERIC_SYMBOLS,
+            SUTTON_SIGNWRITING,
             null,
             MENDE_KIKAKUI,
             null,
@@ -3424,11 +3533,13 @@
             ALCHEMICAL_SYMBOLS,
             GEOMETRIC_SHAPES_EXTENDED,
             SUPPLEMENTAL_ARROWS_C,
+            SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS,
             null,
             CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B,
             null,
             CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C,
             CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D,
+            CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E,
             null,
             CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT,
             null,
@@ -4214,6 +4325,42 @@
          */
         WARANG_CITI,
 
+         /**
+         * Unicode script "Ahom".
+         * @since 1.9
+         */
+        AHOM,
+
+        /**
+         * Unicode script "Anatolian Hieroglyphs".
+         * @since 1.9
+         */
+        ANATOLIAN_HIEROGLYPHS,
+
+        /**
+         * Unicode script "Hatran".
+         * @since 1.9
+         */
+        HATRAN,
+
+        /**
+         * Unicode script "Multani".
+         * @since 1.9
+         */
+        MULTANI,
+
+        /**
+         * Unicode script "Old Hungarian".
+         * @since 1.9
+         */
+        OLD_HUNGARIAN,
+
+        /**
+         * Unicode script "SignWriting".
+         * @since 1.9
+         */
+        SIGNWRITING,
+
         /**
          * Unicode script "Unknown".
          */
@@ -4295,9 +4442,7 @@
             0x0640,   // 0640      ; COMMON
             0x0641,   // 0641..064A; ARABIC
             0x064B,   // 064B..0655; INHERITED
-            0x0656,   // 0656..065F; ARABIC
-            0x0660,   // 0660..0669; COMMON
-            0x066A,   // 066A..066F; ARABIC
+            0x0656,   // 0656..066F; ARABIC
             0x0670,   // 0670      ; INHERITED
             0x0671,   // 0671..06DC; ARABIC
             0x06DD,   // 06DD      ; COMMON
@@ -4320,9 +4465,9 @@
             0x085C,   // 085C..085D; UNKNOWN
             0x085E,   // 085E      ; MANDAIC
             0x085F,   // 085F..089F; UNKNOWN
-            0x08A0,   // 08A0..08B2; ARABIC
-            0x08B3,   // 08B3..08E3; UNKNOWN
-            0x08E4,   // 08E4..08FF; ARABIC
+            0x08A0,   // 08A0..08B4; ARABIC
+            0x08B5,   // 08B5..08E2; UNKNOWN
+            0x08E3,   // 08E3..08FF; ARABIC
             0x0900,   // 0900..0950; DEVANAGARI
             0x0951,   // 0951..0952; INHERITED
             0x0953,   // 0953..0963; DEVANAGARI
@@ -4413,7 +4558,9 @@
             0x0AE0,   // 0AE0..0AE3; GUJARATI
             0x0AE4,   // 0AE4..0AE5; UNKNOWN
             0x0AE6,   // 0AE6..0AF1; GUJARATI
-            0x0AF2,   // 0AF2..0B00; UNKNOWN
+            0x0AF2,   // 0AF2..0AF8; UNKNOWN
+            0x0AF9,   // 0AF9      ; GUJARATI
+            0x0AFA,   // 0AFA..0B00; UNKNOWN
             0x0B01,   // 0B01..0B03; ORIYA
             0x0B04,   // 0B04      ; UNKNOWN
             0x0B05,   // 0B05..0B0C; ORIYA
@@ -4492,8 +4639,8 @@
             0x0C4E,   // 0C4E..0C54; UNKNOWN
             0x0C55,   // 0C55..0C56; TELUGU
             0x0C57,   // 0C57      ; UNKNOWN
-            0x0C58,   // 0C58..0C59; TELUGU
-            0x0C5A,   // 0C5A..0C5F; UNKNOWN
+            0x0C58,   // 0C58..0C5A; TELUGU
+            0x0C5B,   // 0C5B..0C5F; UNKNOWN
             0x0C60,   // 0C60..0C63; TELUGU
             0x0C64,   // 0C64..0C65; UNKNOWN
             0x0C66,   // 0C66..0C6F; TELUGU
@@ -4543,8 +4690,8 @@
             0x0D4A,   // 0D4A..0D4E; MALAYALAM
             0x0D4F,   // 0D4F..0D56; UNKNOWN
             0x0D57,   // 0D57      ; MALAYALAM
-            0x0D58,   // 0D58..0D5F; UNKNOWN
-            0x0D60,   // 0D60..0D63; MALAYALAM
+            0x0D58,   // 0D58..0D5E; UNKNOWN
+            0x0D5F,   // 0D5F..0D63; MALAYALAM
             0x0D64,   // 0D64..0D65; UNKNOWN
             0x0D66,   // 0D66..0D75; MALAYALAM
             0x0D76,   // 0D76..0D78; UNKNOWN
@@ -4676,8 +4823,10 @@
             0x137D,   // 137D..137F; UNKNOWN
             0x1380,   // 1380..1399; ETHIOPIC
             0x139A,   // 139A..139F; UNKNOWN
-            0x13A0,   // 13A0..13F4; CHEROKEE
-            0x13F5,   // 13F5..13FF; UNKNOWN
+            0x13A0,   // 13A0..13F5; CHEROKEE
+            0x13F6,   // 13F6..13F7; UNKNOWN
+            0x13F8,   // 13F8..13FD; CHEROKEE
+            0x13FE,   // 13FE..13FF; UNKNOWN
             0x1400,   // 1400..167F; CANADIAN_ABORIGINAL
             0x1680,   // 1680..169C; OGHAM
             0x169D,   // 169D..169F; UNKNOWN
@@ -4846,8 +4995,8 @@
             0x208F,   // 208F      ; UNKNOWN
             0x2090,   // 2090..209C; LATIN
             0x209D,   // 209D..209F; UNKNOWN
-            0x20A0,   // 20A0..20BD; COMMON
-            0x20BE,   // 20BE..20CF; UNKNOWN
+            0x20A0,   // 20A0..20BE; COMMON
+            0x20BF,   // 20BF..20CF; UNKNOWN
             0x20D0,   // 20D0..20F0; INHERITED
             0x20F1,   // 20F1..20FF; UNKNOWN
             0x2100,   // 2100..2125; COMMON
@@ -4860,8 +5009,8 @@
             0x214E,   // 214E      ; LATIN
             0x214F,   // 214F..215F; COMMON
             0x2160,   // 2160..2188; LATIN
-            0x2189,   // 2189      ; COMMON
-            0x218A,   // 218A..218F; UNKNOWN
+            0x2189,   // 2189..218B; COMMON
+            0x218C,   // 218C..218F; UNKNOWN
             0x2190,   // 2190..23FA; COMMON
             0x23FB,   // 23FB..23FF; UNKNOWN
             0x2400,   // 2400..2426; COMMON
@@ -4879,7 +5028,9 @@
             0x2BBD,   // 2BBD..2BC8; COMMON
             0x2BC9,   // 2BC9      ; UNKNOWN
             0x2BCA,   // 2BCA..2BD1; COMMON
-            0x2BD2,   // 2BD2..2BFF; UNKNOWN
+            0x2BD2,   // 2BD2..2BEB; UNKNOWN
+            0x2BEC,   // 2BEC..2BEF; COMMON
+            0x2BF0,   // 2BF0..2BFF; UNKNOWN
             0x2C00,   // 2C00..2C2E; GLAGOLITIC
             0x2C2F,   // 2C2F      ; UNKNOWN
             0x2C30,   // 2C30..2C5E; GLAGOLITIC
@@ -4972,8 +5123,8 @@
             0x3400,   // 3400..4DB5; HAN
             0x4DB6,   // 4DB6..4DBF; UNKNOWN
             0x4DC0,   // 4DC0..4DFF; COMMON
-            0x4E00,   // 4E00..9FCC; HAN
-            0x9FCD,   // 9FCD..9FFF; UNKNOWN
+            0x4E00,   // 4E00..9FD5; HAN
+            0x9FD6,   // 9FD6..9FFF; UNKNOWN
             0xA000,   // A000..A48C; YI
             0xA48D,   // A48D..A48F; UNKNOWN
             0xA490,   // A490..A4C6; YI
@@ -4981,20 +5132,16 @@
             0xA4D0,   // A4D0..A4FF; LISU
             0xA500,   // A500..A62B; VAI
             0xA62C,   // A62C..A63F; UNKNOWN
-            0xA640,   // A640..A69D; CYRILLIC
-            0xA69E,   // A69E      ; UNKNOWN
-            0xA69F,   // A69F      ; CYRILLIC
+            0xA640,   // A640..A69F; CYRILLIC
             0xA6A0,   // A6A0..A6F7; BAMUM
             0xA6F8,   // A6F8..A6FF; UNKNOWN
             0xA700,   // A700..A721; COMMON
             0xA722,   // A722..A787; LATIN
             0xA788,   // A788..A78A; COMMON
-            0xA78B,   // A78B..A78E; LATIN
-            0xA78F,   // A78F      ; UNKNOWN
-            0xA790,   // A790..A7AD; LATIN
+            0xA78B,   // A78B..A7AD; LATIN
             0xA7AE,   // A7AE..A7AF; UNKNOWN
-            0xA7B0,   // A7B0..A7B1; LATIN
-            0xA7B2,   // A7B2..A7F6; UNKNOWN
+            0xA7B0,   // A7B0..A7B7; LATIN
+            0xA7B8,   // A7B8..A7F6; UNKNOWN
             0xA7F7,   // A7F7..A7FF; LATIN
             0xA800,   // A800..A82B; SYLOTI_NAGRI
             0xA82C,   // A82C..A82F; UNKNOWN
@@ -5006,8 +5153,8 @@
             0xA8C5,   // A8C5..A8CD; UNKNOWN
             0xA8CE,   // A8CE..A8D9; SAURASHTRA
             0xA8DA,   // A8DA..A8DF; UNKNOWN
-            0xA8E0,   // A8E0..A8FB; DEVANAGARI
-            0xA8FC,   // A8FC..A8FF; UNKNOWN
+            0xA8E0,   // A8E0..A8FD; DEVANAGARI
+            0xA8FE,   // A8FE..A8FF; UNKNOWN
             0xA900,   // A900..A92D; KAYAH_LI
             0xA92E,   // A92E      ; COMMON
             0xA92F,   // A92F      ; KAYAH_LI
@@ -5049,11 +5196,10 @@
             0xAB2F,   // AB2F      ; UNKNOWN
             0xAB30,   // AB30..AB5A; LATIN
             0xAB5B,   // AB5B      ; COMMON
-            0xAB5C,   // AB5C..AB5F; LATIN
-            0xAB60,   // AB60..AB63; UNKNOWN
-            0xAB64,   // AB64      ; LATIN
+            0xAB5C,   // AB5C..AB64; LATIN
             0xAB65,   // AB65      ; GREEK
-            0xAB66,   // AB66..ABBF; UNKNOWN
+            0xAB66,   // AB66..AB6F; UNKNOWN
+            0xAB70,   // AB70..ABBF; CHEROKEE
             0xABC0,   // ABC0..ABED; MEETEI_MAYEK
             0xABEE,   // ABEE..ABEF; UNKNOWN
             0xABF0,   // ABF0..ABF9; MEETEI_MAYEK
@@ -5098,7 +5244,7 @@
             0xFE10,   // FE10..FE19; COMMON
             0xFE1A,   // FE1A..FE1F; UNKNOWN
             0xFE20,   // FE20..FE2D; INHERITED
-            0xFE2E,   // FE2E..FE2F; UNKNOWN
+            0xFE2E,   // FE2E..FE2F; CYRILLIC
             0xFE30,   // FE30..FE52; COMMON
             0xFE53,   // FE53      ; UNKNOWN
             0xFE54,   // FE54..FE66; COMMON
@@ -5220,7 +5366,12 @@
             0x10880,  // 10880..1089E; NABATAEAN
             0x1089F,  // 1089F..108A6; UNKNOWN
             0x108A7,  // 108A7..108AF; NABATAEAN
-            0x108B0,  // 108B0..108FF; UNKNOWN
+            0x108B0,  // 108B0..108DF; UNKNOWN
+            0x108E0,  // 108E0..108F2; HATRAN
+            0x108F3,  // 108F3       ; UNKNOWN
+            0x108F4,  // 108F4..108F5; HATRAN
+            0x108F6,  // 108F6..108FA; UNKNOWN
+            0x108FB,  // 108FB..108FF; HATRAN
             0x10900,  // 10900..1091B; PHOENICIAN
             0x1091C,  // 1091C..1091E; UNKNOWN
             0x1091F,  // 1091F       ; PHOENICIAN
@@ -5230,9 +5381,10 @@
             0x10940,  // 10940..1097F; UNKNOWN
             0x10980,  // 10980..1099F; MEROITIC_HIEROGLYPHS
             0x109A0,  // 109A0..109B7; MEROITIC_CURSIVE
-            0x109B8,  // 109B8..109BD; UNKNOWN
-            0x109BE,  // 109BE..109BF; MEROITIC_CURSIVE
-            0x109C0,  // 109C0..109FF; UNKNOWN
+            0x109B8,  // 109B8..109BB; UNKNOWN
+            0x109BC,  // 109BC..109CF; MEROITIC_CURSIVE
+            0x109D0,  // 109D0..109D1; UNKNOWN
+            0x109D2,  // 109D2..109FF; MEROITIC_CURSIVE
             0x10A00,  // 10A00..10A03; KHAROSHTHI
             0x10A04,  // 10A04       ; UNKNOWN
             0x10A05,  // 10A05..10A06; KHAROSHTHI
@@ -5272,7 +5424,13 @@
             0x10BA9,  // 10BA9..10BAF; PSALTER_PAHLAVI
             0x10BB0,  // 10BB0..10BFF; UNKNOWN
             0x10C00,  // 10C00..10C48; OLD_TURKIC
-            0x10C49,  // 10C49..10E5F; UNKNOWN
+            0x10C49,  // 10C49..10C7F; UNKNOWN
+            0x10C80,  // 10C80..10CB2; OLD_HUNGARIAN
+            0x10CB3,  // 10CB3..10CBF; UNKNOWN
+            0x10CC0,  // 10CC0..10CF2; OLD_HUNGARIAN
+            0x10CF3,  // 10CF3..10CF9; UNKNOWN
+            0x10CFA,  // 10CFA..10CFF; OLD_HUNGARIAN
+            0x10D00,  // 10D00..10E5F; UNKNOWN
             0x10E60,  // 10E60..10E7E; ARABIC
             0x10E7F,  // 10E7F..10FFF; UNKNOWN
             0x11000,  // 11000..1104D; BRAHMI
@@ -5292,23 +5450,31 @@
             0x11144,  // 11144..1114F; UNKNOWN
             0x11150,  // 11150..11176; MAHAJANI
             0x11177,  // 11177..1117F; UNKNOWN
-            0x11180,  // 11180..111C8; SHARADA
-            0x111C9,  // 111C9..111CC; UNKNOWN
-            0x111CD,  // 111CD       ; SHARADA
+            0x11180,  // 11180..111CD; SHARADA
             0x111CE,  // 111CE..111CF; UNKNOWN
-            0x111D0,  // 111D0..111DA; SHARADA
-            0x111DB,  // 111DB..111E0; UNKNOWN
+            0x111D0,  // 111D0..111DF; SHARADA
+            0x111E0,  // 111E0       ; UNKNOWN
             0x111E1,  // 111E1..111F4; SINHALA
             0x111F5,  // 111F5..111FF; UNKNOWN
             0x11200,  // 11200..11211; KHOJKI
             0x11212,  // 11212       ; UNKNOWN
             0x11213,  // 11213..1123D; KHOJKI
-            0x1123E,  // 1123E..112AF; UNKNOWN
+            0x1123E,  // 1123E..1127F; UNKNOWN
+            0x11280,  // 11280..11286; MULTANI
+            0x11287,  // 11287       ; UNKNOWN
+            0x11288,  // 11288       ; MULTANI
+            0x11289,  // 11289       ; UNKNOWN
+            0x1128A,  // 1128A..1128D; MULTANI
+            0x1128E,  // 1128E       ; UNKNOWN
+            0x1128F,  // 1128F..1129D; MULTANI
+            0x1129E,  // 1129E       ; UNKNOWN
+            0x1129F,  // 1129F..112A9; MULTANI
+            0x112AA,  // 112AA..112AF; UNKNOWN
             0x112B0,  // 112B0..112EA; KHUDAWADI
             0x112EB,  // 112EB..112EF; UNKNOWN
             0x112F0,  // 112F0..112F9; KHUDAWADI
-            0x112FA,  // 112FA..11300; UNKNOWN
-            0x11301,  // 11301..11303; GRANTHA
+            0x112FA,  // 112FA..112FF; UNKNOWN
+            0x11300,  // 11300..11303; GRANTHA
             0x11304,  // 11304       ; UNKNOWN
             0x11305,  // 11305..1130C; GRANTHA
             0x1130D,  // 1130D..1130E; UNKNOWN
@@ -5327,7 +5493,9 @@
             0x11347,  // 11347..11348; GRANTHA
             0x11349,  // 11349..1134A; UNKNOWN
             0x1134B,  // 1134B..1134D; GRANTHA
-            0x1134E,  // 1134E..11356; UNKNOWN
+            0x1134E,  // 1134E..1134F; UNKNOWN
+            0x11350,  // 11350       ; GRANTHA
+            0x11351,  // 11351..11356; UNKNOWN
             0x11357,  // 11357       ; GRANTHA
             0x11358,  // 11358..1135C; UNKNOWN
             0x1135D,  // 1135D..11363; GRANTHA
@@ -5342,8 +5510,8 @@
             0x114DA,  // 114DA..1157F; UNKNOWN
             0x11580,  // 11580..115B5; SIDDHAM
             0x115B6,  // 115B6..115B7; UNKNOWN
-            0x115B8,  // 115B8..115C9; SIDDHAM
-            0x115CA,  // 115CA..115FF; UNKNOWN
+            0x115B8,  // 115B8..115DD; SIDDHAM
+            0x115DE,  // 115DE..115FF; UNKNOWN
             0x11600,  // 11600..11644; MODI
             0x11645,  // 11645..1164F; UNKNOWN
             0x11650,  // 11650..11659; MODI
@@ -5351,21 +5519,31 @@
             0x11680,  // 11680..116B7; TAKRI
             0x116B8,  // 116B8..116BF; UNKNOWN
             0x116C0,  // 116C0..116C9; TAKRI
-            0x116CA,  // 116CA..1189F; UNKNOWN
+            0x116CA,  // 116CA..116FF; UNKNOWN
+            0x11700,  // 11700..11719; AHOM
+            0x1171A,  // 1171A..1171C; UNKNOWN
+            0x1171D,  // 1171D..1172B; AHOM
+            0x1172C,  // 1172C..1172F; UNKNOWN
+            0x11730,  // 11730..1173F; AHOM
+            0x11740,  // 11740..1189F; UNKNOWN
             0x118A0,  // 118A0..118F2; WARANG_CITI
             0x118F3,  // 118F3..118FE; UNKNOWN
             0x118FF,  // 118FF       ; WARANG_CITI
             0x11900,  // 11900..11ABF; UNKNOWN
             0x11AC0,  // 11AC0..11AF8; PAU_CIN_HAU
             0x11AF9,  // 11AF9..11FFF; UNKNOWN
-            0x12000,  // 12000..12398; CUNEIFORM
-            0x12399,  // 12399..123FF; UNKNOWN
+            0x12000,  // 12000..12399; CUNEIFORM
+            0x1239A,  // 1239A..123FF; UNKNOWN
             0x12400,  // 12400..1246E; CUNEIFORM
             0x1246F,  // 1246F       ; UNKNOWN
             0x12470,  // 12470..12474; CUNEIFORM
-            0x12475,  // 12475..12FFF; UNKNOWN
+            0x12475,  // 12475..1247F; UNKNOWN
+            0x12480,  // 12480..12543; CUNEIFORM
+            0x12544,  // 12544..12FFF; UNKNOWN
             0x13000,  // 13000..1342E; EGYPTIAN_HIEROGLYPHS
-            0x1342F,  // 1342F..167FF; UNKNOWN
+            0x1342F,  // 1342F..143FF; UNKNOWN
+            0x14400,  // 14400..14646; ANATOLIAN_HIEROGLYPHS
+            0x14647,  // 14647..167FF; UNKNOWN
             0x16800,  // 16800..16A38; BAMUM
             0x16A39,  // 16A39..16A3F; UNKNOWN
             0x16A40,  // 16A40..16A5E; MRO
@@ -5420,8 +5598,8 @@
             0x1D185,  // 1D185..1D18B; INHERITED
             0x1D18C,  // 1D18C..1D1A9; COMMON
             0x1D1AA,  // 1D1AA..1D1AD; INHERITED
-            0x1D1AE,  // 1D1AE..1D1DD; COMMON
-            0x1D1DE,  // 1D1DE..1D1FF; UNKNOWN
+            0x1D1AE,  // 1D1AE..1D1E8; COMMON
+            0x1D1E9,  // 1D1E9..1D1FF; UNKNOWN
             0x1D200,  // 1D200..1D245; GREEK
             0x1D246,  // 1D246..1D2FF; UNKNOWN
             0x1D300,  // 1D300..1D356; COMMON
@@ -5469,7 +5647,12 @@
             0x1D6A8,  // 1D6A8..1D7CB; COMMON
             0x1D7CC,  // 1D7CC..1D7CD; UNKNOWN
             0x1D7CE,  // 1D7CE..1D7FF; COMMON
-            0x1D800,  // 1D800..1E7FF; UNKNOWN
+            0x1D800,  // 1D800..1DA8B; SIGNWRITING
+            0x1DA8C,  // 1DA8C..1DA9A; UNKNOWN
+            0x1DA9B,  // 1DA9B..1DA9F; SIGNWRITING
+            0x1DAA0,  // 1DAA0       ; UNKNOWN
+            0x1DAA1,  // 1DAA1..1DAAF; SIGNWRITING
+            0x1DAB0,  // 1DAB0..1E7FF; UNKNOWN
             0x1E800,  // 1E800..1E8C4; MENDE_KIKAKUI
             0x1E8C5,  // 1E8C5..1E8C6; UNKNOWN
             0x1E8C7,  // 1E8C7..1E8D6; MENDE_KIKAKUI
@@ -5572,26 +5755,12 @@
             0x1F249,  // 1F249..1F24F; UNKNOWN
             0x1F250,  // 1F250..1F251; COMMON
             0x1F252,  // 1F252..1F2FF; UNKNOWN
-            0x1F300,  // 1F300..1F32C; COMMON
-            0x1F32D,  // 1F32D..1F32F; UNKNOWN
-            0x1F330,  // 1F330..1F37D; COMMON
-            0x1F37E,  // 1F37E..1F37F; UNKNOWN
-            0x1F380,  // 1F380..1F3CE; COMMON
-            0x1F3CF,  // 1F3CF..1F3D3; UNKNOWN
-            0x1F3D4,  // 1F3D4..1F3F7; COMMON
-            0x1F3F8,  // 1F3F8..1F3FF; UNKNOWN
-            0x1F400,  // 1F400..1F4FE; COMMON
-            0x1F4FF,  // 1F4FF       ; UNKNOWN
-            0x1F500,  // 1F500..1F54A; COMMON
-            0x1F54B,  // 1F54B..1F54F; UNKNOWN
-            0x1F550,  // 1F550..1F579; COMMON
+            0x1F300,  // 1F300..1F579; COMMON
             0x1F57A,  // 1F57A       ; UNKNOWN
             0x1F57B,  // 1F57B..1F5A3; COMMON
             0x1F5A4,  // 1F5A4       ; UNKNOWN
-            0x1F5A5,  // 1F5A5..1F642; COMMON
-            0x1F643,  // 1F643..1F644; UNKNOWN
-            0x1F645,  // 1F645..1F6CF; COMMON
-            0x1F6D0,  // 1F6D0..1F6DF; UNKNOWN
+            0x1F5A5,  // 1F5A5..1F6D0; COMMON
+            0x1F6D1,  // 1F6D1..1F6DF; UNKNOWN
             0x1F6E0,  // 1F6E0..1F6EC; COMMON
             0x1F6ED,  // 1F6ED..1F6EF; UNKNOWN
             0x1F6F0,  // 1F6F0..1F6F3; COMMON
@@ -5609,13 +5778,21 @@
             0x1F860,  // 1F860..1F887; COMMON
             0x1F888,  // 1F888..1F88F; UNKNOWN
             0x1F890,  // 1F890..1F8AD; COMMON
-            0x1F8AE,  // 1F8AE..1FFFF; UNKNOWN
+            0x1F8AE,  // 1F8AE..1F90F; UNKNOWN
+            0x1F910,  // 1F910..1F918; COMMON
+            0x1F919,  // 1F919..1F97F; UNKNOWN
+            0x1F980,  // 1F980..1F984; COMMON
+            0x1F985,  // 1F985..1F9BF; UNKNOWN
+            0x1F9C0,  // 1F9C0       ; COMMON
+            0x1F9C1,  // 1F9C1..1FFFF; UNKNOWN
             0x20000,  // 20000..2A6D6; HAN
             0x2A6D7,  // 2A6D7..2A6FF; UNKNOWN
             0x2A700,  // 2A700..2B734; HAN
             0x2B735,  // 2B735..2B73F; UNKNOWN
             0x2B740,  // 2B740..2B81D; HAN
-            0x2B81E,  // 2B81E..2F7FF; UNKNOWN
+            0x2B81E,  // 2B81E..2B81F; UNKNOWN
+            0x2B820,  // 2B820..2CEA1; HAN
+            0x2CEA2,  // 2CEA2..2F7FF; UNKNOWN
             0x2F800,  // 2F800..2FA1D; HAN
             0x2FA1E,  // 2FA1E..E0000; UNKNOWN
             0xE0001,  // E0001       ; COMMON
@@ -5702,9 +5879,7 @@
             COMMON,                   // 0640
             ARABIC,                   // 0641..064A
             INHERITED,                // 064B..0655
-            ARABIC,                   // 0656..065F
-            COMMON,                   // 0660..0669
-            ARABIC,                   // 066A..066F
+            ARABIC,                   // 0656..066F
             INHERITED,                // 0670
             ARABIC,                   // 0671..06DC
             COMMON,                   // 06DD
@@ -5727,9 +5902,9 @@
             UNKNOWN,                  // 085C..085D
             MANDAIC,                  // 085E
             UNKNOWN,                  // 085F..089F
-            ARABIC,                   // 08A0..08B2
-            UNKNOWN,                  // 08B3..08E3
-            ARABIC,                   // 08E4..08FF
+            ARABIC,                   // 08A0..08B4
+            UNKNOWN,                  // 08B5..08E2
+            ARABIC,                   // 08E3..08FF
             DEVANAGARI,               // 0900..0950
             INHERITED,                // 0951..0952
             DEVANAGARI,               // 0953..0963
@@ -5820,7 +5995,9 @@
             GUJARATI,                 // 0AE0..0AE3
             UNKNOWN,                  // 0AE4..0AE5
             GUJARATI,                 // 0AE6..0AF1
-            UNKNOWN,                  // 0AF2..0B00
+            UNKNOWN,                  // 0AF2..0AF8
+            GUJARATI,                 // 0AF9
+            UNKNOWN,                  // 0AFA..0B00
             ORIYA,                    // 0B01..0B03
             UNKNOWN,                  // 0B04
             ORIYA,                    // 0B05..0B0C
@@ -5899,8 +6076,8 @@
             UNKNOWN,                  // 0C4E..0C54
             TELUGU,                   // 0C55..0C56
             UNKNOWN,                  // 0C57
-            TELUGU,                   // 0C58..0C59
-            UNKNOWN,                  // 0C5A..0C5F
+            TELUGU,                   // 0C58..0C5A
+            UNKNOWN,                  // 0C5B..0C5F
             TELUGU,                   // 0C60..0C63
             UNKNOWN,                  // 0C64..0C65
             TELUGU,                   // 0C66..0C6F
@@ -5950,8 +6127,8 @@
             MALAYALAM,                // 0D4A..0D4E
             UNKNOWN,                  // 0D4F..0D56
             MALAYALAM,                // 0D57
-            UNKNOWN,                  // 0D58..0D5F
-            MALAYALAM,                // 0D60..0D63
+            UNKNOWN,                  // 0D58..0D5E
+            MALAYALAM,                // 0D5F..0D63
             UNKNOWN,                  // 0D64..0D65
             MALAYALAM,                // 0D66..0D75
             UNKNOWN,                  // 0D76..0D78
@@ -6083,8 +6260,10 @@
             UNKNOWN,                  // 137D..137F
             ETHIOPIC,                 // 1380..1399
             UNKNOWN,                  // 139A..139F
-            CHEROKEE,                 // 13A0..13F4
-            UNKNOWN,                  // 13F5..13FF
+            CHEROKEE,                 // 13A0..13F5
+            UNKNOWN,                  // 13F6..13F7
+            CHEROKEE,                 // 13F8..13FD
+            UNKNOWN,                  // 13FE..13FF
             CANADIAN_ABORIGINAL,      // 1400..167F
             OGHAM,                    // 1680..169C
             UNKNOWN,                  // 169D..169F
@@ -6253,8 +6432,8 @@
             UNKNOWN,                  // 208F
             LATIN,                    // 2090..209C
             UNKNOWN,                  // 209D..209F
-            COMMON,                   // 20A0..20BD
-            UNKNOWN,                  // 20BE..20CF
+            COMMON,                   // 20A0..20BE
+            UNKNOWN,                  // 20BF..20CF
             INHERITED,                // 20D0..20F0
             UNKNOWN,                  // 20F1..20FF
             COMMON,                   // 2100..2125
@@ -6267,8 +6446,8 @@
             LATIN,                    // 214E
             COMMON,                   // 214F..215F
             LATIN,                    // 2160..2188
-            COMMON,                   // 2189
-            UNKNOWN,                  // 218A..218F
+            COMMON,                   // 2189..218B
+            UNKNOWN,                  // 218C..218F
             COMMON,                   // 2190..23FA
             UNKNOWN,                  // 23FB..23FF
             COMMON,                   // 2400..2426
@@ -6286,7 +6465,9 @@
             COMMON,                   // 2BBD..2BC8
             UNKNOWN,                  // 2BC9
             COMMON,                   // 2BCA..2BD1
-            UNKNOWN,                  // 2BD2..2BFF
+            UNKNOWN,                  // 2BD2..2BEB
+            COMMON,                   // 2BEC..2BEF
+            UNKNOWN,                  // 2BF0..2BFF
             GLAGOLITIC,               // 2C00..2C2E
             UNKNOWN,                  // 2C2F
             GLAGOLITIC,               // 2C30..2C5E
@@ -6379,8 +6560,8 @@
             HAN,                      // 3400..4DB5
             UNKNOWN,                  // 4DB6..4DBF
             COMMON,                   // 4DC0..4DFF
-            HAN,                      // 4E00..9FCC
-            UNKNOWN,                  // 9FCD..9FFF
+            HAN,                      // 4E00..9FD5
+            UNKNOWN,                  // 9FD6..9FFF
             YI,                       // A000..A48C
             UNKNOWN,                  // A48D..A48F
             YI,                       // A490..A4C6
@@ -6388,20 +6569,16 @@
             LISU,                     // A4D0..A4FF
             VAI,                      // A500..A62B
             UNKNOWN,                  // A62C..A63F
-            CYRILLIC,                 // A640..A69D
-            UNKNOWN,                  // A69E
-            CYRILLIC,                 // A69F
+            CYRILLIC,                 // A640..A69F
             BAMUM,                    // A6A0..A6F7
             UNKNOWN,                  // A6F8..A6FF
             COMMON,                   // A700..A721
             LATIN,                    // A722..A787
             COMMON,                   // A788..A78A
-            LATIN,                    // A78B..A78E
-            UNKNOWN,                  // A78F
-            LATIN,                    // A790..A7AD
+            LATIN,                    // A78B..A7AD
             UNKNOWN,                  // A7AE..A7AF
-            LATIN,                    // A7B0..A7B1
-            UNKNOWN,                  // A7B2..A7F6
+            LATIN,                    // A7B0..A7B7
+            UNKNOWN,                  // A7B8..A7F6
             LATIN,                    // A7F7..A7FF
             SYLOTI_NAGRI,             // A800..A82B
             UNKNOWN,                  // A82C..A82F
@@ -6413,8 +6590,8 @@
             UNKNOWN,                  // A8C5..A8CD
             SAURASHTRA,               // A8CE..A8D9
             UNKNOWN,                  // A8DA..A8DF
-            DEVANAGARI,               // A8E0..A8FB
-            UNKNOWN,                  // A8FC..A8FF
+            DEVANAGARI,               // A8E0..A8FD
+            UNKNOWN,                  // A8FE..A8FF
             KAYAH_LI,                 // A900..A92D
             COMMON,                   // A92E
             KAYAH_LI,                 // A92F
@@ -6456,11 +6633,10 @@
             UNKNOWN,                  // AB2F
             LATIN,                    // AB30..AB5A
             COMMON,                   // AB5B
-            LATIN,                    // AB5C..AB5F
-            UNKNOWN,                  // AB60..AB63
-            LATIN,                    // AB64
+            LATIN,                    // AB5C..AB64
             GREEK,                    // AB65
-            UNKNOWN,                  // AB66..ABBF
+            UNKNOWN,                  // AB66..AB6F
+            CHEROKEE,                 // AB70..ABBF
             MEETEI_MAYEK,             // ABC0..ABED
             UNKNOWN,                  // ABEE..ABEF
             MEETEI_MAYEK,             // ABF0..ABF9
@@ -6505,7 +6681,7 @@
             COMMON,                   // FE10..FE19
             UNKNOWN,                  // FE1A..FE1F
             INHERITED,                // FE20..FE2D
-            UNKNOWN,                  // FE2E..FE2F
+            CYRILLIC,                 // FE2E..FE2F
             COMMON,                   // FE30..FE52
             UNKNOWN,                  // FE53
             COMMON,                   // FE54..FE66
@@ -6627,7 +6803,12 @@
             NABATAEAN,                // 10880..1089E
             UNKNOWN,                  // 1089F..108A6
             NABATAEAN,                // 108A7..108AF
-            UNKNOWN,                  // 108B0..108FF
+            UNKNOWN,                  // 108B0..108DF
+            HATRAN,                   // 108E0..108F2
+            UNKNOWN,                  // 108F3
+            HATRAN,                   // 108F4..108F5
+            UNKNOWN,                  // 108F6..108FA
+            HATRAN,                   // 108FB..108FF
             PHOENICIAN,               // 10900..1091B
             UNKNOWN,                  // 1091C..1091E
             PHOENICIAN,               // 1091F
@@ -6637,9 +6818,10 @@
             UNKNOWN,                  // 10940..1097F
             MEROITIC_HIEROGLYPHS,     // 10980..1099F
             MEROITIC_CURSIVE,         // 109A0..109B7
-            UNKNOWN,                  // 109B8..109BD
-            MEROITIC_CURSIVE,         // 109BE..109BF
-            UNKNOWN,                  // 109C0..109FF
+            UNKNOWN,                  // 109B8..109BB
+            MEROITIC_CURSIVE,         // 109BC..109CF
+            UNKNOWN,                  // 109D0..109D1
+            MEROITIC_CURSIVE,         // 109D2..109FF
             KHAROSHTHI,               // 10A00..10A03
             UNKNOWN,                  // 10A04
             KHAROSHTHI,               // 10A05..10A06
@@ -6679,7 +6861,13 @@
             PSALTER_PAHLAVI,          // 10BA9..10BAF
             UNKNOWN,                  // 10BB0..10BFF
             OLD_TURKIC,               // 10C00..10C48
-            UNKNOWN,                  // 10C49..10E5F
+            UNKNOWN,                  // 10C49..10C7F
+            OLD_HUNGARIAN,            // 10C80..10CB2
+            UNKNOWN,                  // 10CB3..10CBF
+            OLD_HUNGARIAN,            // 10CC0..10CF2
+            UNKNOWN,                  // 10CF3..10CF9
+            OLD_HUNGARIAN,            // 10CFA..10CFF
+            UNKNOWN,                  // 10D00..10E5F
             ARABIC,                   // 10E60..10E7E
             UNKNOWN,                  // 10E7F..10FFF
             BRAHMI,                   // 11000..1104D
@@ -6699,23 +6887,31 @@
             UNKNOWN,                  // 11144..1114F
             MAHAJANI,                 // 11150..11176
             UNKNOWN,                  // 11177..1117F
-            SHARADA,                  // 11180..111C8
-            UNKNOWN,                  // 111C9..111CC
-            SHARADA,                  // 111CD
+            SHARADA,                  // 11180..111CD
             UNKNOWN,                  // 111CE..111CF
-            SHARADA,                  // 111D0..111DA
-            UNKNOWN,                  // 111DB..111E0
+            SHARADA,                  // 111D0..111DF
+            UNKNOWN,                  // 111E0
             SINHALA,                  // 111E1..111F4
             UNKNOWN,                  // 111F5..111FF
             KHOJKI,                   // 11200..11211
             UNKNOWN,                  // 11212
             KHOJKI,                   // 11213..1123D
-            UNKNOWN,                  // 1123E..112AF
+            UNKNOWN,                  // 1123E..1127F
+            MULTANI,                  // 11280..11286
+            UNKNOWN,                  // 11287
+            MULTANI,                  // 11288
+            UNKNOWN,                  // 11289
+            MULTANI,                  // 1128A..1128D
+            UNKNOWN,                  // 1128E
+            MULTANI,                  // 1128F..1129D
+            UNKNOWN,                  // 1129E
+            MULTANI,                  // 1129F..112A9
+            UNKNOWN,                  // 112AA..112AF
             KHUDAWADI,                // 112B0..112EA
             UNKNOWN,                  // 112EB..112EF
             KHUDAWADI,                // 112F0..112F9
-            UNKNOWN,                  // 112FA..11300
-            GRANTHA,                  // 11301..11303
+            UNKNOWN,                  // 112FA..112FF
+            GRANTHA,                  // 11300..11303
             UNKNOWN,                  // 11304
             GRANTHA,                  // 11305..1130C
             UNKNOWN,                  // 1130D..1130E
@@ -6734,7 +6930,9 @@
             GRANTHA,                  // 11347..11348
             UNKNOWN,                  // 11349..1134A
             GRANTHA,                  // 1134B..1134D
-            UNKNOWN,                  // 1134E..11356
+            UNKNOWN,                  // 1134E..1134F
+            GRANTHA,                  // 11350
+            UNKNOWN,                  // 11351..11356
             GRANTHA,                  // 11357
             UNKNOWN,                  // 11358..1135C
             GRANTHA,                  // 1135D..11363
@@ -6749,8 +6947,8 @@
             UNKNOWN,                  // 114DA..1157F
             SIDDHAM,                  // 11580..115B5
             UNKNOWN,                  // 115B6..115B7
-            SIDDHAM,                  // 115B8..115C9
-            UNKNOWN,                  // 115CA..115FF
+            SIDDHAM,                  // 115B8..115DD
+            UNKNOWN,                  // 115DE..115FF
             MODI,                     // 11600..11644
             UNKNOWN,                  // 11645..1164F
             MODI,                     // 11650..11659
@@ -6758,21 +6956,31 @@
             TAKRI,                    // 11680..116B7
             UNKNOWN,                  // 116B8..116BF
             TAKRI,                    // 116C0..116C9
-            UNKNOWN,                  // 116CA..1189F
+            UNKNOWN,                  // 116CA..116FF
+            AHOM,                     // 11700..11719
+            UNKNOWN,                  // 1171A..1171C
+            AHOM,                     // 1171D..1172B
+            UNKNOWN,                  // 1172C..1172F
+            AHOM,                     // 11730..1173F
+            UNKNOWN,                  // 11740..1189F
             WARANG_CITI,              // 118A0..118F2
             UNKNOWN,                  // 118F3..118FE
             WARANG_CITI,              // 118FF
             UNKNOWN,                  // 11900..11ABF
             PAU_CIN_HAU,              // 11AC0..11AF8
             UNKNOWN,                  // 11AF9..11FFF
-            CUNEIFORM,                // 12000..12398
-            UNKNOWN,                  // 12399..123FF
+            CUNEIFORM,                // 12000..12399
+            UNKNOWN,                  // 1239A..123FF
             CUNEIFORM,                // 12400..1246E
             UNKNOWN,                  // 1246F
             CUNEIFORM,                // 12470..12474
-            UNKNOWN,                  // 12475..12FFF
+            UNKNOWN,                  // 12475..1247F
+            CUNEIFORM,                // 12480..12543
+            UNKNOWN,                  // 12544..12FFF
             EGYPTIAN_HIEROGLYPHS,     // 13000..1342E
-            UNKNOWN,                  // 1342F..167FF
+            UNKNOWN,                  // 1342F..143FF
+            ANATOLIAN_HIEROGLYPHS,    // 14400..14646
+            UNKNOWN,                  // 14647..167FF
             BAMUM,                    // 16800..16A38
             UNKNOWN,                  // 16A39..16A3F
             MRO,                      // 16A40..16A5E
@@ -6827,8 +7035,8 @@
             INHERITED,                // 1D185..1D18B
             COMMON,                   // 1D18C..1D1A9
             INHERITED,                // 1D1AA..1D1AD
-            COMMON,                   // 1D1AE..1D1DD
-            UNKNOWN,                  // 1D1DE..1D1FF
+            COMMON,                   // 1D1AE..1D1E8
+            UNKNOWN,                  // 1D1E9..1D1FF
             GREEK,                    // 1D200..1D245
             UNKNOWN,                  // 1D246..1D2FF
             COMMON,                   // 1D300..1D356
@@ -6876,7 +7084,12 @@
             COMMON,                   // 1D6A8..1D7CB
             UNKNOWN,                  // 1D7CC..1D7CD
             COMMON,                   // 1D7CE..1D7FF
-            UNKNOWN,                  // 1D800..1E7FF
+            SIGNWRITING,              // 1D800..1DA8B
+            UNKNOWN,                  // 1DA8C..1DA9A
+            SIGNWRITING,              // 1DA9B..1DA9F
+            UNKNOWN,                  // 1DAA0
+            SIGNWRITING,              // 1DAA1..1DAAF
+            UNKNOWN,                  // 1DAB0..1E7FF
             MENDE_KIKAKUI,            // 1E800..1E8C4
             UNKNOWN,                  // 1E8C5..1E8C6
             MENDE_KIKAKUI,            // 1E8C7..1E8D6
@@ -6979,26 +7192,12 @@
             UNKNOWN,                  // 1F249..1F24F
             COMMON,                   // 1F250..1F251
             UNKNOWN,                  // 1F252..1F2FF
-            COMMON,                   // 1F300..1F32C
-            UNKNOWN,                  // 1F32D..1F32F
-            COMMON,                   // 1F330..1F37D
-            UNKNOWN,                  // 1F37E..1F37F
-            COMMON,                   // 1F380..1F3CE
-            UNKNOWN,                  // 1F3CF..1F3D3
-            COMMON,                   // 1F3D4..1F3F7
-            UNKNOWN,                  // 1F3F8..1F3FF
-            COMMON,                   // 1F400..1F4FE
-            UNKNOWN,                  // 1F4FF
-            COMMON,                   // 1F500..1F54A
-            UNKNOWN,                  // 1F54B..1F54F
-            COMMON,                   // 1F550..1F579
+            COMMON,                   // 1F300..1F579
             UNKNOWN,                  // 1F57A
             COMMON,                   // 1F57B..1F5A3
             UNKNOWN,                  // 1F5A4
-            COMMON,                   // 1F5A5..1F642
-            UNKNOWN,                  // 1F643..1F644
-            COMMON,                   // 1F645..1F6CF
-            UNKNOWN,                  // 1F6D0..1F6DF
+            COMMON,                   // 1F5A5..1F6D0
+            UNKNOWN,                  // 1F6D1..1F6DF
             COMMON,                   // 1F6E0..1F6EC
             UNKNOWN,                  // 1F6ED..1F6EF
             COMMON,                   // 1F6F0..1F6F3
@@ -7016,13 +7215,21 @@
             COMMON,                   // 1F860..1F887
             UNKNOWN,                  // 1F888..1F88F
             COMMON,                   // 1F890..1F8AD
-            UNKNOWN,                  // 1F8AE..1FFFF
+            UNKNOWN,                  // 1F8AE..1F90F
+            COMMON,                   // 1F910..1F918
+            UNKNOWN,                  // 1F919..1F97F
+            COMMON,                   // 1F980..1F984
+            UNKNOWN,                  // 1F985..1F9BF
+            COMMON,                   // 1F9C0
+            UNKNOWN,                  // 1F9C1..1FFFF
             HAN,                      // 20000..2A6D6
             UNKNOWN,                  // 2A6D7..2A6FF
             HAN,                      // 2A700..2B734
             UNKNOWN,                  // 2B735..2B73F
             HAN,                      // 2B740..2B81D
-            UNKNOWN,                  // 2B81E..2F7FF
+            UNKNOWN,                  // 2B81E..2B81F
+            HAN,                      // 2B820..2CEA1
+            UNKNOWN,                  // 2CEA2..2F7FF
             HAN,                      // 2F800..2FA1D
             UNKNOWN,                  // 2FA1E..E0000
             COMMON,                   // E0001
@@ -7035,8 +7242,9 @@
 
         private static HashMap<String, Character.UnicodeScript> aliases;
         static {
-            aliases = new HashMap<>(128);
+            aliases = new HashMap<>(134);
             aliases.put("AGHB", CAUCASIAN_ALBANIAN);
+            aliases.put("AHOM", AHOM);
             aliases.put("ARAB", ARABIC);
             aliases.put("ARMI", IMPERIAL_ARAMAIC);
             aliases.put("ARMN", ARMENIAN);
@@ -7075,11 +7283,14 @@
             aliases.put("HANG", HANGUL);
             aliases.put("HANI", HAN);
             aliases.put("HANO", HANUNOO);
+            aliases.put("HATR", HATRAN);
             aliases.put("HEBR", HEBREW);
             aliases.put("HIRA", HIRAGANA);
+            aliases.put("HLUW", ANATOLIAN_HIEROGLYPHS);
             aliases.put("HMNG", PAHAWH_HMONG);
             // it appears we don't have the KATAKANA_OR_HIRAGANA
             //aliases.put("HRKT", KATAKANA_OR_HIRAGANA);
+            aliases.put("HUNG", OLD_HUNGARIAN);
             aliases.put("ITAL", OLD_ITALIC);
             aliases.put("JAVA", JAVANESE);
             aliases.put("KALI", KAYAH_LI);
@@ -7110,6 +7321,7 @@
             aliases.put("MONG", MONGOLIAN);
             aliases.put("MROO", MRO);
             aliases.put("MTEI", MEETEI_MAYEK);
+            aliases.put("MULT", MULTANI);
             aliases.put("MYMR", MYANMAR);
             aliases.put("NARB", OLD_NORTH_ARABIAN);
             aliases.put("NBAT", NABATAEAN);
@@ -7133,6 +7345,7 @@
             aliases.put("SAMR", SAMARITAN);
             aliases.put("SARB", OLD_SOUTH_ARABIAN);
             aliases.put("SAUR", SAURASHTRA);
+            aliases.put("SGNW", SIGNWRITING);
             aliases.put("SHAW", SHAVIAN);
             aliases.put("SHRD", SHARADA);
             aliases.put("SIDD", SIDDHAM);
@@ -9356,7 +9569,7 @@
      *     <td>{@code FORM FEED}</td></tr>
      * <tr><td>{@code '\r'}</td>            <td>{@code U+000D}</td>
      *     <td>{@code CARRIAGE RETURN}</td></tr>
-     * <tr><td>{@code ' '}</td>             <td>{@code U+0020}</td>
+     * <tr><td>{@code ' '}</td>  <td>{@code U+0020}</td>
      *     <td>{@code SPACE}</td></tr>
      * </table>
      *
--- a/jdk/src/java.base/share/classes/java/lang/FdLibm.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/FdLibm.java	Tue Oct 27 01:45:03 2015 -0400
@@ -100,6 +100,64 @@
     }
 
     /**
+     * cbrt(x)
+     * Return cube root of x
+     */
+    public static class Cbrt {
+        // unsigned
+        private static final int B1 = 715094163; /* B1 = (682-0.03306235651)*2**20 */
+        private static final int B2 = 696219795; /* B2 = (664-0.03306235651)*2**20 */
+
+        private static final double C =  0x1.15f15f15f15f1p-1; //   19/35   ~= 5.42857142857142815906e-01
+        private static final double D = -0x1.691de2532c834p-1; // -864/1225 ~= 7.05306122448979611050e-01
+        private static final double E =  0x1.6a0ea0ea0ea0fp0;  //   99/70   ~= 1.41428571428571436819e+00
+        private static final double F =  0x1.9b6db6db6db6ep0;  //   45/28   ~= 1.60714285714285720630e+00
+        private static final double G =  0x1.6db6db6db6db7p-2; //    5/14   ~= 3.57142857142857150787e-01
+
+        public static strictfp double compute(double x) {
+            double  t = 0.0;
+            double sign;
+
+            if (x == 0.0 || !Double.isFinite(x))
+                return x; // Handles signed zeros properly
+
+            sign = (x < 0.0) ? -1.0:  1.0;
+
+            x = Math.abs(x);   // x <- |x|
+
+            // Rough cbrt to 5 bits
+            if (x < 0x1.0p-1022) {     // subnormal number
+                t = 0x1.0p54;          // set t= 2**54
+                t *= x;
+                t = __HI(t, __HI(t)/3 + B2);
+            } else {
+                int hx = __HI(x);           // high word of x
+                t = __HI(t, hx/3 + B1);
+            }
+
+            // New cbrt to 23 bits, may be implemented in single precision
+            double  r, s, w;
+            r = t * t/x;
+            s = C + r*t;
+            t *= G + F/(s + E + D/s);
+
+            // Chopped to 20 bits and make it larger than cbrt(x)
+            t = __LO(t, 0);
+            t = __HI(t, __HI(t) + 0x00000001);
+
+            // One step newton iteration to 53 bits with error less than 0.667 ulps
+            s = t * t;          // t*t is exact
+            r = x / s;
+            w = t + t;
+            r = (r - t)/(w + r);  // r-s is exact
+            t = t + t*r;
+
+            // Restore the original sign bit
+            return sign * t;
+        }
+    }
+
+    /**
      * hypot(x,y)
      *
      * Method :
--- a/jdk/src/java.base/share/classes/java/lang/StrictMath.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/StrictMath.java	Tue Oct 27 01:45:03 2015 -0400
@@ -307,7 +307,9 @@
      * @return  the cube root of {@code a}.
      * @since 1.5
      */
-    public static native double cbrt(double a);
+    public static double cbrt(double a) {
+        return FdLibm.Cbrt.compute(a);
+    }
 
     /**
      * Computes the remainder operation on two arguments as prescribed
--- a/jdk/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -834,7 +834,7 @@
 
         static MethodHandle makeCbmhCtor(Class<? extends BoundMethodHandle> cbmh, String types) {
             try {
-                return LOOKUP.findStatic(cbmh, "make", MethodType.fromMethodDescriptorString(makeSignature(types, false), null));
+                return LOOKUP.findStatic(cbmh, "make", MethodType.fromDescriptor(makeSignature(types, false), null));
             } catch (NoSuchMethodException | IllegalAccessException | IllegalArgumentException | TypeNotPresentException e) {
                 throw newInternalError(e);
             }
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -141,7 +141,7 @@
         synchronized (this) {
             if (type instanceof String) {
                 String sig = (String) type;
-                MethodType res = MethodType.fromMethodDescriptorString(sig, getClassLoader());
+                MethodType res = MethodType.fromDescriptor(sig, getClassLoader());
                 type = res;
             } else if (type instanceof Object[]) {
                 Object[] typeInfo = (Object[]) type;
@@ -206,7 +206,7 @@
         synchronized (this) {
             if (type instanceof String) {
                 String sig = (String) type;
-                MethodType mtype = MethodType.fromMethodDescriptorString("()"+sig, getClassLoader());
+                MethodType mtype = MethodType.fromDescriptor("()"+sig, getClassLoader());
                 Class<?> res = mtype.returnType();
                 type = res;
             }
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java	Tue Oct 27 01:45:03 2015 -0400
@@ -383,7 +383,7 @@
         if (type instanceof MethodType)
             return (MethodType) type;
         else
-            return MethodType.fromMethodDescriptorString((String)type, callerClass.getClassLoader());
+            return MethodType.fromDescriptor((String)type, callerClass.getClassLoader());
     }
     // Tracing logic:
     static MemberName linkMethodTracing(Class<?> callerClass, int refKind,
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1058,6 +1058,23 @@
     public static MethodType fromMethodDescriptorString(String descriptor, ClassLoader loader)
         throws IllegalArgumentException, TypeNotPresentException
     {
+        return fromDescriptor(descriptor,
+                              (loader == null) ? ClassLoader.getSystemClassLoader() : loader);
+    }
+
+    /**
+     * Same as {@link #fromMethodDescriptorString(String, ClassLoader)}, but
+     * {@code null} ClassLoader means the bootstrap loader is used here.
+     * <p>
+     * IMPORTANT: This method is preferable for JDK internal use as it more
+     * correctly interprets {@code null} ClassLoader than
+     * {@link #fromMethodDescriptorString(String, ClassLoader)}.
+     * Use of this method also avoids early initialization issues when system
+     * ClassLoader is not initialized yet.
+     */
+    static MethodType fromDescriptor(String descriptor, ClassLoader loader)
+        throws IllegalArgumentException, TypeNotPresentException
+    {
         if (!descriptor.startsWith("(") ||  // also generates NPE if needed
             descriptor.indexOf(')') < 0 ||
             descriptor.indexOf('.') >= 0)
--- a/jdk/src/java.base/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -131,7 +131,7 @@
     }
 
     private static String boxingDescriptor(Wrapper w) {
-        return String.format("(%s)L%s;", w.basicTypeChar(), wrapperName(w));
+        return "(" + w.basicTypeChar() + ")L" + wrapperName(w) + ";";
     }
 
     private static String unboxingDescriptor(Wrapper w) {
--- a/jdk/src/java.base/share/classes/java/net/Inet4Address.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/net/Inet4Address.java	Tue Oct 27 01:45:03 2015 -0400
@@ -117,11 +117,13 @@
                 holder().address = address;
             }
         }
+        holder().originalHostName = hostName;
     }
     Inet4Address(String hostName, int address) {
         holder().hostName = hostName;
         holder().family = IPv4;
         holder().address = address;
+        holder().originalHostName = hostName;
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/net/InetAddress.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java	Tue Oct 27 01:45:03 2015 -0400
@@ -221,7 +221,7 @@
          *
          * Note: May define a new public method in the future if necessary.
          */
-        private String originalHostName;
+        String originalHostName;
 
         InetAddressHolder() {}
 
--- a/jdk/src/java.base/share/classes/java/net/URLStreamHandlerFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/net/URLStreamHandlerFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -28,9 +28,9 @@
 /**
  * This interface defines a factory for {@code URL} stream
  * protocol handlers.
- * <p>
- * It is used by the {@code URL} class to create a
- * {@code URLStreamHandler} for a specific protocol.
+ *
+ * <p> A URL stream handler factory is used as specified in the
+ * {@linkplain java.net.URL#URL(String,String,int,String) URL constructor}.
  *
  * @author  Arthur van Hoff
  * @see     java.net.URL
--- a/jdk/src/java.base/share/classes/java/net/spi/URLStreamHandlerProvider.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/net/spi/URLStreamHandlerProvider.java	Tue Oct 27 01:45:03 2015 -0400
@@ -41,6 +41,9 @@
  * fully-qualified concrete URL stream handler provider class names, one per
  * line.
  *
+ * <p> URL stream handler providers are located at runtime, as specified in the
+ * {@linkplain java.net.URL#URL(String,String,int,String) URL constructor}.
+ *
  * @since 1.9
  */
 public abstract class URLStreamHandlerProvider
--- a/jdk/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template	Tue Oct 27 01:45:03 2015 -0400
@@ -242,7 +242,7 @@
     }
 
     private long ix(int i) {
-        return address + (i << $LG_BYTES_PER_VALUE$);
+        return address + ((long)i << $LG_BYTES_PER_VALUE$);
     }
 
     public $type$ get() {
@@ -261,7 +261,7 @@
 
     public $Type$Buffer get($type$[] dst, int offset, int length) {
 #if[rw]
-        if ((length << $LG_BYTES_PER_VALUE$) > Bits.JNI_COPY_TO_ARRAY_THRESHOLD) {
+        if (((long)length << $LG_BYTES_PER_VALUE$) > Bits.JNI_COPY_TO_ARRAY_THRESHOLD) {
             checkBounds(offset, length, dst.length);
             int pos = position();
             int lim = limit();
@@ -273,13 +273,13 @@
 #if[!byte]
             if (order() != ByteOrder.nativeOrder())
                 Bits.copyTo$Memtype$Array(ix(pos), dst,
-                                          offset << $LG_BYTES_PER_VALUE$,
-                                          length << $LG_BYTES_PER_VALUE$);
+                                          (long)offset << $LG_BYTES_PER_VALUE$,
+                                          (long)length << $LG_BYTES_PER_VALUE$);
             else
 #end[!byte]
                 Bits.copyToArray(ix(pos), dst, arrayBaseOffset,
-                                 offset << $LG_BYTES_PER_VALUE$,
-                                 length << $LG_BYTES_PER_VALUE$);
+                                 (long)offset << $LG_BYTES_PER_VALUE$,
+                                 (long)length << $LG_BYTES_PER_VALUE$);
             position(pos + length);
         } else {
             super.get(dst, offset, length);
@@ -329,7 +329,7 @@
 
             if (srem > rem)
                 throw new BufferOverflowException();
-            unsafe.copyMemory(sb.ix(spos), ix(pos), srem << $LG_BYTES_PER_VALUE$);
+            unsafe.copyMemory(sb.ix(spos), ix(pos), (long)srem << $LG_BYTES_PER_VALUE$);
             sb.position(spos + srem);
             position(pos + srem);
         } else if (src.hb != null) {
@@ -353,7 +353,7 @@
 
     public $Type$Buffer put($type$[] src, int offset, int length) {
 #if[rw]
-        if ((length << $LG_BYTES_PER_VALUE$) > Bits.JNI_COPY_FROM_ARRAY_THRESHOLD) {
+        if (((long)length << $LG_BYTES_PER_VALUE$) > Bits.JNI_COPY_FROM_ARRAY_THRESHOLD) {
             checkBounds(offset, length, src.length);
             int pos = position();
             int lim = limit();
@@ -364,12 +364,16 @@
 
 #if[!byte]
             if (order() != ByteOrder.nativeOrder())
-                Bits.copyFrom$Memtype$Array(src, offset << $LG_BYTES_PER_VALUE$,
-                                            ix(pos), length << $LG_BYTES_PER_VALUE$);
+                Bits.copyFrom$Memtype$Array(src,
+                                            (long)offset << $LG_BYTES_PER_VALUE$,
+                                            ix(pos),
+                                            (long)length << $LG_BYTES_PER_VALUE$);
             else
 #end[!byte]
-                Bits.copyFromArray(src, arrayBaseOffset, offset << $LG_BYTES_PER_VALUE$,
-                                   ix(pos), length << $LG_BYTES_PER_VALUE$);
+                Bits.copyFromArray(src, arrayBaseOffset,
+                                   (long)offset << $LG_BYTES_PER_VALUE$,
+                                   ix(pos),
+                                   (long)length << $LG_BYTES_PER_VALUE$);
             position(pos + length);
         } else {
             super.put(src, offset, length);
@@ -387,7 +391,7 @@
         assert (pos <= lim);
         int rem = (pos <= lim ? lim - pos : 0);
 
-        unsafe.copyMemory(ix(pos), ix(0), rem << $LG_BYTES_PER_VALUE$);
+        unsafe.copyMemory(ix(pos), ix(0), (long)rem << $LG_BYTES_PER_VALUE$);
         position(rem);
         limit(capacity());
         discardMark();
--- a/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java	Tue Oct 27 01:45:03 2015 -0400
@@ -138,6 +138,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the name of the algorithm this
      * parameter generator is associated with.
      * See the AlgorithmParameterGenerator section in the <a href=
--- a/jdk/src/java.base/share/classes/java/security/AlgorithmParameters.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/AlgorithmParameters.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -126,6 +126,13 @@
      * {@code init}, using an appropriate parameter specification or
      * parameter encoding.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the name of the algorithm requested.
      * See the AlgorithmParameters section in the <a href=
      * "{@docRoot}/../technotes/guides/security/StandardNames.html#AlgorithmParameters">
--- a/jdk/src/java.base/share/classes/java/security/AuthProvider.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/AuthProvider.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -79,8 +79,10 @@
      *          this provider to obtain authentication information
      *          from the caller, which may be {@code null}
      *
-     * @exception LoginException if the login operation fails
-     * @exception SecurityException if the caller does not pass a
+     * @throws IllegalStateException if the provider requires configuration
+     * and {@link configure} has not been called
+     * @throws LoginException if the login operation fails
+     * @throws SecurityException if the caller does not pass a
      *  security check for
      *  {@code SecurityPermission("authProvider.name")},
      *  where {@code name} is the value returned by
@@ -92,8 +94,10 @@
     /**
      * Log out from this provider.
      *
-     * @exception LoginException if the logout operation fails
-     * @exception SecurityException if the caller does not pass a
+     * @throws IllegalStateException if the provider requires configuration
+     * and {@link configure} has not been called
+     * @throws LoginException if the logout operation fails
+     * @throws SecurityException if the caller does not pass a
      *  security check for
      *  {@code SecurityPermission("authProvider.name")},
      *  where {@code name} is the value returned by
@@ -118,7 +122,9 @@
      * @param handler a {@code CallbackHandler} for obtaining
      *          authentication information, which may be {@code null}
      *
-     * @exception SecurityException if the caller does not pass a
+     * @throws IllegalStateException if the provider requires configuration
+     * and {@link configure} has not been called
+     * @throws SecurityException if the caller does not pass a
      *  security check for
      *  {@code SecurityPermission("authProvider.name")},
      *  where {@code name} is the value returned by
--- a/jdk/src/java.base/share/classes/java/security/KeyFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/KeyFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -153,6 +153,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the name of the requested key algorithm.
      * See the KeyFactory section in the <a href=
      * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyFactory">
--- a/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java	Tue Oct 27 01:45:03 2015 -0400
@@ -195,6 +195,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the standard string name of the algorithm.
      * See the KeyPairGenerator section in the <a href=
      * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyPairGenerator">
--- a/jdk/src/java.base/share/classes/java/security/KeyStore.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/KeyStore.java	Tue Oct 27 01:45:03 2015 -0400
@@ -841,6 +841,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param type the type of keystore.
      * See the KeyStore section in the <a href=
      * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyStore">
--- a/jdk/src/java.base/share/classes/java/security/MessageDigest.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/MessageDigest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -146,6 +146,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the name of the algorithm requested.
      * See the MessageDigest section in the <a href=
      * "{@docRoot}/../technotes/guides/security/StandardNames.html#MessageDigest">
--- a/jdk/src/java.base/share/classes/java/security/Policy.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/Policy.java	Tue Oct 27 01:45:03 2015 -0400
@@ -355,6 +355,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param type the specified Policy type.  See the Policy section in the
      *    <a href=
      *    "{@docRoot}/../technotes/guides/security/StandardNames.html#Policy">
--- a/jdk/src/java.base/share/classes/java/security/Provider.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/Provider.java	Tue Oct 27 01:45:03 2015 -0400
@@ -187,13 +187,30 @@
      *         is invalid.
      * @return a provider configured with the supplied configuration argument.
      *
-     * @since 1.9
+     * @since 9
      */
     public Provider configure(String configArg) {
         throw new UnsupportedOperationException("configure is not supported");
     }
 
     /**
+     * Check if this provider instance has been configured.
+     *
+     * @implSpec
+     * The default implementation returns true.
+     * Subclasses should override this method if the provider instance requires
+     * an explicit {@code configure} call after being constructed.
+     *
+     * @return true if no further configuration is needed, false otherwise.
+     *
+     * @since 9
+     */
+    public boolean isConfigured() {
+        return true;
+    }
+
+
+    /**
      * Returns the name of this provider.
      *
      * @return the name of this provider.
--- a/jdk/src/java.base/share/classes/java/security/SecureRandom.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/SecureRandom.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -268,6 +268,13 @@
      * This self-seeding will not occur if {@code setSeed} was
      * previously called.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the name of the RNG algorithm.
      * See the SecureRandom section in the <a href=
      * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
--- a/jdk/src/java.base/share/classes/java/security/SecurityPermission.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/SecurityPermission.java	Tue Oct 27 01:45:03 2015 -0400
@@ -53,6 +53,17 @@
  * </tr>
  *
  * <tr>
+ *   <td>authProvider.{provider name}</td>
+ *   <td>Allow the named provider to be an AuthProvider for login and
+ * logout operations. </td>
+ *   <td>This allows the named provider to perform login and logout
+ * operations. The named provider must extend {@code AuthProvider}
+ * and care must be taken to grant to a trusted provider since
+ * login operations involve sensitive authentication information
+ * such as PINs and passwords. </td>
+ * </tr>
+ *
+ * <tr>
  *   <td>createAccessControlContext</td>
  *   <td>Creation of an AccessControlContext</td>
  *   <td>This allows someone to instantiate an AccessControlContext
--- a/jdk/src/java.base/share/classes/java/security/Signature.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/Signature.java	Tue Oct 27 01:45:03 2015 -0400
@@ -203,6 +203,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the standard name of the algorithm requested.
      * See the Signature section in the <a href=
      * "{@docRoot}/../technotes/guides/security/StandardNames.html#Signature">
--- a/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -142,6 +142,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the name of the requested {@code CertPathBuilder}
      *  algorithm.  See the CertPathBuilder section in the <a href=
      *  "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathBuilder">
--- a/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -143,6 +143,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the name of the requested {@code CertPathValidator}
      *  algorithm. See the CertPathValidator section in the <a href=
      *  "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathValidator">
--- a/jdk/src/java.base/share/classes/java/security/cert/CertStore.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertStore.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -201,6 +201,13 @@
      * Note that the specified {@code CertStoreParameters} object is
      * cloned.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param type the name of the requested {@code CertStore} type.
      * See the CertStore section in the <a href=
      * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertStore">
--- a/jdk/src/java.base/share/classes/java/security/cert/CertificateFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -163,6 +163,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param type the name of the requested certificate type.
      * See the CertificateFactory section in the <a href=
      * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertificateFactory">
--- a/jdk/src/java.base/share/classes/java/text/DecimalFormatSymbols.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/text/DecimalFormatSymbols.java	Tue Oct 27 01:45:03 2015 -0400
@@ -384,6 +384,7 @@
      */
     public String getCurrencySymbol()
     {
+        initializeCurrency(locale);
         return currencySymbol;
     }
 
@@ -396,6 +397,7 @@
      */
     public void setCurrencySymbol(String currency)
     {
+        initializeCurrency(locale);
         currencySymbol = currency;
     }
 
@@ -408,6 +410,7 @@
      */
     public String getInternationalCurrencySymbol()
     {
+        initializeCurrency(locale);
         return intlCurrencySymbol;
     }
 
@@ -429,6 +432,7 @@
      */
     public void setInternationalCurrencySymbol(String currencyCode)
     {
+        initializeCurrency(locale);
         intlCurrencySymbol = currencyCode;
         currency = null;
         if (currencyCode != null) {
@@ -449,6 +453,7 @@
      * @since 1.4
      */
     public Currency getCurrency() {
+        initializeCurrency(locale);
         return currency;
     }
 
@@ -468,6 +473,7 @@
         if (currency == null) {
             throw new NullPointerException();
         }
+        initializeCurrency(locale);
         this.currency = currency;
         intlCurrencySymbol = currency.getCurrencyCode();
         currencySymbol = currency.getSymbol(locale);
@@ -507,14 +513,15 @@
     {
         return exponential;
     }
-  /**
-   * Returns the string used to separate the mantissa from the exponent.
-   * Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
-   *
-   * @return the exponent separator string
-   * @see #setExponentSeparator(java.lang.String)
-   * @since 1.6
-   */
+
+    /**
+     * Returns the string used to separate the mantissa from the exponent.
+     * Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
+     *
+     * @return the exponent separator string
+     * @see #setExponentSeparator(java.lang.String)
+     * @since 1.6
+     */
     public String getExponentSeparator()
     {
         return exponentialSeparator;
@@ -528,22 +535,22 @@
         exponential = exp;
     }
 
-  /**
-   * Sets the string used to separate the mantissa from the exponent.
-   * Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
-   *
-   * @param exp the exponent separator string
-   * @exception NullPointerException if <code>exp</code> is null
-   * @see #getExponentSeparator()
-   * @since 1.6
-   */
+    /**
+     * Sets the string used to separate the mantissa from the exponent.
+     * Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
+     *
+     * @param exp the exponent separator string
+     * @exception NullPointerException if <code>exp</code> is null
+     * @see #getExponentSeparator()
+     * @since 1.6
+     */
     public void setExponentSeparator(String exp)
     {
         if (exp == null) {
             throw new NullPointerException();
         }
         exponentialSeparator = exp;
-     }
+    }
 
 
     //------------------------------------------------------------
@@ -582,7 +589,7 @@
         patternSeparator == other.patternSeparator &&
         infinity.equals(other.infinity) &&
         NaN.equals(other.NaN) &&
-        currencySymbol.equals(other.currencySymbol) &&
+        getCurrencySymbol().equals(other.getCurrencySymbol()) && // possible currency init occurs here
         intlCurrencySymbol.equals(other.intlCurrencySymbol) &&
         currency == other.currency &&
         monetarySeparator == other.monetarySeparator &&
@@ -629,6 +636,24 @@
         infinity  = numberElements[9];
         NaN = numberElements[10];
 
+        // maybe filled with previously cached values, or null.
+        intlCurrencySymbol = (String) data[1];
+        currencySymbol = (String) data[2];
+
+        // Currently the monetary decimal separator is the same as the
+        // standard decimal separator for all locales that we support.
+        // If that changes, add a new entry to NumberElements.
+        monetarySeparator = decimalSeparator;
+    }
+
+    /**
+     * Lazy initialization for currency related fields
+     */
+    private void initializeCurrency(Locale locale) {
+        if (currencyInitialized) {
+            return;
+        }
+
         // Try to obtain the currency used in the locale's country.
         // Check for empty country string separately because it's a valid
         // country ID for Locale (and used for the C locale), but not a valid
@@ -640,7 +665,16 @@
                 // use default values below for compatibility
             }
         }
+
         if (currency != null) {
+            // get resource bundle data
+            LocaleProviderAdapter adapter =
+                LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale);
+            // Avoid potential recursions
+            if (!(adapter instanceof ResourceBundleBasedAdapter)) {
+                adapter = LocaleProviderAdapter.getResourceBundleBased();
+            }
+            Object[] data = adapter.getLocaleResources(locale).getDecimalFormatSymbolsData();
             intlCurrencySymbol = currency.getCurrencyCode();
             if (data[1] != null && data[1] == intlCurrencySymbol) {
                 currencySymbol = (String) data[2];
@@ -658,10 +692,8 @@
             }
             currencySymbol = "\u00A4";
         }
-        // Currently the monetary decimal separator is the same as the
-        // standard decimal separator for all locales that we support.
-        // If that changes, add a new entry to NumberElements.
-        monetarySeparator = decimalSeparator;
+
+        currencyInitialized = true;
     }
 
     /**
@@ -705,6 +737,7 @@
                  currency = Currency.getInstance(intlCurrencySymbol);
             } catch (IllegalArgumentException e) {
             }
+            currencyInitialized = true;
         }
     }
 
@@ -820,16 +853,16 @@
      */
     private  char    exponential;       // Field new in JDK 1.1.6
 
-  /**
-   * The string used to separate the mantissa from the exponent.
-   * Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
-   * <p>
-   * If both <code>exponential</code> and <code>exponentialSeparator</code>
-   * exist, this <code>exponentialSeparator</code> has the precedence.
-   *
-   * @serial
-   * @since 1.6
-   */
+    /**
+     * The string used to separate the mantissa from the exponent.
+     * Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
+     * <p>
+     * If both <code>exponential</code> and <code>exponentialSeparator</code>
+     * exist, this <code>exponentialSeparator</code> has the precedence.
+     *
+     * @serial
+     * @since 1.6
+     */
     private  String    exponentialSeparator;       // Field new in JDK 1.6
 
     /**
@@ -842,6 +875,7 @@
 
     // currency; only the ISO code is serialized.
     private transient Currency currency;
+    private transient volatile boolean currencyInitialized = false;
 
     // Proclaim JDK 1.1 FCS compatibility
     static final long serialVersionUID = 5772796243397350300L;
--- a/jdk/src/java.base/share/classes/java/time/Instant.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/time/Instant.java	Tue Oct 27 01:45:03 2015 -0400
@@ -758,7 +758,7 @@
             throw new UnsupportedTemporalTypeException("Unit must divide into a standard day without remainder");
         }
         long nod = (seconds % LocalTime.SECONDS_PER_DAY) * LocalTime.NANOS_PER_SECOND + nanos;
-        long result = (nod / dur) * dur;
+        long result = Math.floorDiv(nod, dur) * dur ;
         return plusNanos(result - nod);
     }
 
--- a/jdk/src/java.base/share/classes/java/util/AbstractQueue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/AbstractQueue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -38,16 +38,16 @@
 /**
  * This class provides skeletal implementations of some {@link Queue}
  * operations. The implementations in this class are appropriate when
- * the base implementation does <em>not</em> allow <tt>null</tt>
+ * the base implementation does <em>not</em> allow {@code null}
  * elements.  Methods {@link #add add}, {@link #remove remove}, and
  * {@link #element element} are based on {@link #offer offer}, {@link
  * #poll poll}, and {@link #peek peek}, respectively, but throw
- * exceptions instead of indicating failure via <tt>false</tt> or
- * <tt>null</tt> returns.
+ * exceptions instead of indicating failure via {@code false} or
+ * {@code null} returns.
  *
- * <p>A <tt>Queue</tt> implementation that extends this class must
+ * <p>A {@code Queue} implementation that extends this class must
  * minimally define a method {@link Queue#offer} which does not permit
- * insertion of <tt>null</tt> elements, along with methods {@link
+ * insertion of {@code null} elements, along with methods {@link
  * Queue#peek}, {@link Queue#poll}, {@link Collection#size}, and
  * {@link Collection#iterator}.  Typically, additional methods will be
  * overridden as well.  If these requirements cannot be met, consider
@@ -59,7 +59,7 @@
  *
  * @since 1.5
  * @author Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this queue
  */
 public abstract class AbstractQueue<E>
     extends AbstractCollection<E>
@@ -74,14 +74,14 @@
     /**
      * Inserts the specified element into this queue if it is possible to do so
      * immediately without violating capacity restrictions, returning
-     * <tt>true</tt> upon success and throwing an <tt>IllegalStateException</tt>
+     * {@code true} upon success and throwing an {@code IllegalStateException}
      * if no space is currently available.
      *
-     * <p>This implementation returns <tt>true</tt> if <tt>offer</tt> succeeds,
-     * else throws an <tt>IllegalStateException</tt>.
+     * <p>This implementation returns {@code true} if {@code offer} succeeds,
+     * else throws an {@code IllegalStateException}.
      *
      * @param e the element to add
-     * @return <tt>true</tt> (as specified by {@link Collection#add})
+     * @return {@code true} (as specified by {@link Collection#add})
      * @throws IllegalStateException if the element cannot be added at this
      *         time due to capacity restrictions
      * @throws ClassCastException if the class of the specified element
@@ -103,7 +103,7 @@
      * from {@link #poll poll} only in that it throws an exception if this
      * queue is empty.
      *
-     * <p>This implementation returns the result of <tt>poll</tt>
+     * <p>This implementation returns the result of {@code poll}
      * unless the queue is empty.
      *
      * @return the head of this queue
@@ -122,7 +122,7 @@
      * differs from {@link #peek peek} only in that it throws an exception if
      * this queue is empty.
      *
-     * <p>This implementation returns the result of <tt>peek</tt>
+     * <p>This implementation returns the result of {@code peek}
      * unless the queue is empty.
      *
      * @return the head of this queue
@@ -141,7 +141,7 @@
      * The queue will be empty after this call returns.
      *
      * <p>This implementation repeatedly invokes {@link #poll poll} until it
-     * returns <tt>null</tt>.
+     * returns {@code null}.
      */
     public void clear() {
         while (poll() != null)
@@ -151,7 +151,7 @@
     /**
      * Adds all of the elements in the specified collection to this
      * queue.  Attempts to addAll of a queue to itself result in
-     * <tt>IllegalArgumentException</tt>. Further, the behavior of
+     * {@code IllegalArgumentException}. Further, the behavior of
      * this operation is undefined if the specified collection is
      * modified while the operation is in progress.
      *
@@ -159,12 +159,12 @@
      * and adds each element returned by the iterator to this
      * queue, in turn.  A runtime exception encountered while
      * trying to add an element (including, in particular, a
-     * <tt>null</tt> element) may result in only some of the elements
+     * {@code null} element) may result in only some of the elements
      * having been successfully added when the associated exception is
      * thrown.
      *
      * @param c collection containing elements to be added to this queue
-     * @return <tt>true</tt> if this queue changed as a result of the call
+     * @return {@code true} if this queue changed as a result of the call
      * @throws ClassCastException if the class of an element of the specified
      *         collection prevents it from being added to this queue
      * @throws NullPointerException if the specified collection contains a
--- a/jdk/src/java.base/share/classes/java/util/ArrayDeque.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/ArrayDeque.java	Tue Oct 27 01:45:03 2015 -0400
@@ -47,16 +47,18 @@
  * when used as a queue.
  *
  * <p>Most {@code ArrayDeque} operations run in amortized constant time.
- * Exceptions include {@link #remove(Object) remove}, {@link
- * #removeFirstOccurrence removeFirstOccurrence}, {@link #removeLastOccurrence
- * removeLastOccurrence}, {@link #contains contains}, {@link #iterator
- * iterator.remove()}, and the bulk operations, all of which run in linear
- * time.
+ * Exceptions include
+ * {@link #remove(Object) remove},
+ * {@link #removeFirstOccurrence removeFirstOccurrence},
+ * {@link #removeLastOccurrence removeLastOccurrence},
+ * {@link #contains contains},
+ * {@link #iterator iterator.remove()},
+ * and the bulk operations, all of which run in linear time.
  *
- * <p>The iterators returned by this class's {@code iterator} method are
- * <i>fail-fast</i>: If the deque is modified at any time after the iterator
- * is created, in any way except through the iterator's own {@code remove}
- * method, the iterator will generally throw a {@link
+ * <p>The iterators returned by this class's {@link #iterator() iterator}
+ * method are <em>fail-fast</em>: If the deque is modified at any time after
+ * the iterator is created, in any way except through the iterator's own
+ * {@code remove} method, the iterator will generally throw a {@link
  * ConcurrentModificationException}.  Thus, in the face of concurrent
  * modification, the iterator fails quickly and cleanly, rather than risking
  * arbitrary, non-deterministic behavior at an undetermined time in the
@@ -80,7 +82,7 @@
  *
  * @author  Josh Bloch and Doug Lea
  * @since   1.6
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this deque
  */
 public class ArrayDeque<E> extends AbstractCollection<E>
                            implements Deque<E>, Cloneable, Serializable
@@ -136,8 +138,8 @@
             initialCapacity |= (initialCapacity >>> 16);
             initialCapacity++;
 
-            if (initialCapacity < 0)   // Too many elements, must back off
-                initialCapacity >>>= 1;// Good luck allocating 2 ^ 30 elements
+            if (initialCapacity < 0)    // Too many elements, must back off
+                initialCapacity >>>= 1; // Good luck allocating 2^30 elements
         }
         elements = new Object[initialCapacity];
     }
@@ -163,24 +165,6 @@
     }
 
     /**
-     * Copies the elements from our element array into the specified array,
-     * in order (from first to last element in the deque).  It is assumed
-     * that the array is large enough to hold all elements in the deque.
-     *
-     * @return its argument
-     */
-    private <T> T[] copyElements(T[] a) {
-        if (head < tail) {
-            System.arraycopy(elements, head, a, 0, size());
-        } else if (head > tail) {
-            int headPortionLen = elements.length - head;
-            System.arraycopy(elements, head, a, 0, headPortionLen);
-            System.arraycopy(elements, 0, a, headPortionLen, tail);
-        }
-        return a;
-    }
-
-    /**
      * Constructs an empty array deque with an initial capacity
      * sufficient to hold 16 elements.
      */
@@ -292,25 +276,27 @@
     }
 
     public E pollFirst() {
-        int h = head;
+        final Object[] elements = this.elements;
+        final int h = head;
         @SuppressWarnings("unchecked")
         E result = (E) elements[h];
         // Element is null if deque empty
-        if (result == null)
-            return null;
-        elements[h] = null;     // Must null out slot
-        head = (h + 1) & (elements.length - 1);
+        if (result != null) {
+            elements[h] = null; // Must null out slot
+            head = (h + 1) & (elements.length - 1);
+        }
         return result;
     }
 
     public E pollLast() {
-        int t = (tail - 1) & (elements.length - 1);
+        final Object[] elements = this.elements;
+        final int t = (tail - 1) & (elements.length - 1);
         @SuppressWarnings("unchecked")
         E result = (E) elements[t];
-        if (result == null)
-            return null;
-        elements[t] = null;
-        tail = t;
+        if (result != null) {
+            elements[t] = null;
+            tail = t;
+        }
         return result;
     }
 
@@ -360,17 +346,15 @@
      * @return {@code true} if the deque contained the specified element
      */
     public boolean removeFirstOccurrence(Object o) {
-        if (o == null)
-            return false;
-        int mask = elements.length - 1;
-        int i = head;
-        Object x;
-        while ( (x = elements[i]) != null) {
-            if (o.equals(x)) {
-                delete(i);
-                return true;
+        if (o != null) {
+            int mask = elements.length - 1;
+            int i = head;
+            for (Object x; (x = elements[i]) != null; i = (i + 1) & mask) {
+                if (o.equals(x)) {
+                    delete(i);
+                    return true;
+                }
             }
-            i = (i + 1) & mask;
         }
         return false;
     }
@@ -388,17 +372,15 @@
      * @return {@code true} if the deque contained the specified element
      */
     public boolean removeLastOccurrence(Object o) {
-        if (o == null)
-            return false;
-        int mask = elements.length - 1;
-        int i = (tail - 1) & mask;
-        Object x;
-        while ( (x = elements[i]) != null) {
-            if (o.equals(x)) {
-                delete(i);
-                return true;
+        if (o != null) {
+            int mask = elements.length - 1;
+            int i = (tail - 1) & mask;
+            for (Object x; (x = elements[i]) != null; i = (i - 1) & mask) {
+                if (o.equals(x)) {
+                    delete(i);
+                    return true;
+                }
             }
-            i = (i - 1) & mask;
         }
         return false;
     }
@@ -535,7 +517,7 @@
      *
      * @return true if elements moved backwards
      */
-    private boolean delete(int i) {
+    boolean delete(int i) {
         checkInvariants();
         final Object[] elements = this.elements;
         final int mask = elements.length - 1;
@@ -671,12 +653,12 @@
         }
     }
 
+    /**
+     * This class is nearly a mirror-image of DeqIterator, using tail
+     * instead of head for initial cursor, and head instead of tail
+     * for fence.
+     */
     private class DescendingIterator implements Iterator<E> {
-        /*
-         * This class is nearly a mirror-image of DeqIterator, using
-         * tail instead of head for initial cursor, and head instead of
-         * tail for fence.
-         */
         private int cursor = tail;
         private int fence = head;
         private int lastRet = -1;
@@ -717,15 +699,13 @@
      * @return {@code true} if this deque contains the specified element
      */
     public boolean contains(Object o) {
-        if (o == null)
-            return false;
-        int mask = elements.length - 1;
-        int i = head;
-        Object x;
-        while ( (x = elements[i]) != null) {
-            if (o.equals(x))
-                return true;
-            i = (i + 1) & mask;
+        if (o != null) {
+            int mask = elements.length - 1;
+            int i = head;
+            for (Object x; (x = elements[i]) != null; i = (i + 1) & mask) {
+                if (o.equals(x))
+                    return true;
+            }
         }
         return false;
     }
@@ -779,7 +759,14 @@
      * @return an array containing all of the elements in this deque
      */
     public Object[] toArray() {
-        return copyElements(new Object[size()]);
+        final int head = this.head;
+        final int tail = this.tail;
+        boolean wrap = (tail < head);
+        int end = wrap ? tail + elements.length : tail;
+        Object[] a = Arrays.copyOfRange(elements, head, end);
+        if (wrap)
+            System.arraycopy(elements, 0, a, elements.length - head, tail);
+        return a;
     }
 
     /**
@@ -804,7 +791,7 @@
      * The following code can be used to dump the deque into a newly
      * allocated array of {@code String}:
      *
-     *  <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
+     * <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
      *
      * Note that {@code toArray(new Object[0])} is identical in function to
      * {@code toArray()}.
@@ -820,13 +807,22 @@
      */
     @SuppressWarnings("unchecked")
     public <T> T[] toArray(T[] a) {
-        int size = size();
-        if (a.length < size)
-            a = (T[])java.lang.reflect.Array.newInstance(
-                    a.getClass().getComponentType(), size);
-        copyElements(a);
-        if (a.length > size)
-            a[size] = null;
+        final int head = this.head;
+        final int tail = this.tail;
+        boolean wrap = (tail < head);
+        int size = (tail - head) + (wrap ? elements.length : 0);
+        int firstLeg = size - (wrap ? tail : 0);
+        int len = a.length;
+        if (size > len) {
+            a = (T[]) Arrays.copyOfRange(elements, head, head + size,
+                                         a.getClass());
+        } else {
+            System.arraycopy(elements, head, a, 0, firstLeg);
+            if (size < len)
+                a[size] = null;
+        }
+        if (wrap)
+            System.arraycopy(elements, 0, a, firstLeg, tail);
         return a;
     }
 
@@ -853,6 +849,8 @@
     /**
      * Saves this deque to a stream (that is, serializes it).
      *
+     * @param s the stream
+     * @throws java.io.IOException if an I/O error occurs
      * @serialData The current size ({@code int}) of the deque,
      * followed by all of its elements (each an object reference) in
      * first-to-last order.
@@ -872,6 +870,10 @@
 
     /**
      * Reconstitutes this deque from a stream (that is, deserializes it).
+     * @param s the stream
+     * @throws ClassNotFoundException if the class of a serialized object
+     *         could not be found
+     * @throws java.io.IOException if an I/O error occurs
      */
     private void readObject(java.io.ObjectInputStream s)
             throws java.io.IOException, ClassNotFoundException {
@@ -910,7 +912,7 @@
         private int fence;  // -1 until first use
         private int index;  // current index, modified on traverse/split
 
-        /** Creates new spliterator covering the given array and range */
+        /** Creates new spliterator covering the given array and range. */
         DeqSpliterator(ArrayDeque<E> deq, int origin, int fence) {
             this.deq = deq;
             this.index = origin;
@@ -932,7 +934,7 @@
                 if (h > t)
                     t += n;
                 int m = ((h + t) >>> 1) & (n - 1);
-                return new DeqSpliterator<>(deq, h, index = m);
+                return new DeqSpliterator<E>(deq, h, index = m);
             }
             return null;
         }
@@ -957,7 +959,7 @@
                 throw new NullPointerException();
             Object[] a = deq.elements;
             int m = a.length - 1, f = getFence(), i = index;
-            if (i != fence) {
+            if (i != f) {
                 @SuppressWarnings("unchecked") E e = (E)a[i];
                 index = (i + 1) & m;
                 if (e == null)
--- a/jdk/src/java.base/share/classes/java/util/ArrayPrefixHelpers.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/ArrayPrefixHelpers.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,4 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,20 +21,26 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-package java.util;
 
 /*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
  * Written by Doug Lea with assistance from members of JCP JSR-166
  * Expert Group and released to the public domain, as explained at
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
-import java.util.concurrent.ForkJoinPool;
+package java.util;
+
 import java.util.concurrent.CountedCompleter;
+import java.util.concurrent.ForkJoinPool;
 import java.util.function.BinaryOperator;
+import java.util.function.DoubleBinaryOperator;
 import java.util.function.IntBinaryOperator;
 import java.util.function.LongBinaryOperator;
-import java.util.function.DoubleBinaryOperator;
 
 /**
  * ForkJoin tasks to perform Arrays.parallelPrefix operations.
@@ -44,7 +49,7 @@
  * @since 1.8
  */
 class ArrayPrefixHelpers {
-    private ArrayPrefixHelpers() {}; // non-instantiable
+    private ArrayPrefixHelpers() {} // non-instantiable
 
     /*
      * Parallel prefix (aka cumulate, scan) task classes
@@ -113,8 +118,8 @@
             this.lo = this.origin = lo; this.hi = this.fence = hi;
             int p;
             this.threshold =
-                    (p = (hi - lo) / (ForkJoinPool.getCommonPoolParallelism() << 3))
-                    <= MIN_PARTITION ? MIN_PARTITION : p;
+                (p = (hi - lo) / (ForkJoinPool.getCommonPoolParallelism() << 3))
+                <= MIN_PARTITION ? MIN_PARTITION : p;
         }
 
         /** Subtask constructor */
@@ -141,9 +146,9 @@
                     if (lt == null) {                // first pass
                         int mid = (l + h) >>> 1;
                         f = rt = t.right =
-                                new CumulateTask<T>(t, fn, a, org, fnc, th, mid, h);
-                        t = lt = t.left  =
-                                new CumulateTask<T>(t, fn, a, org, fnc, th, l, mid);
+                            new CumulateTask<T>(t, fn, a, org, fnc, th, mid, h);
+                        t = lt = t.left =
+                            new CumulateTask<T>(t, fn, a, org, fnc, th, l, mid);
                     }
                     else {                           // possibly refork
                         T pin = t.in;
@@ -183,7 +188,7 @@
                     for (int b;;) {
                         if (((b = t.getPendingCount()) & FINISHED) != 0)
                             break outer;                      // already done
-                        state = ((b & CUMULATE) != 0? FINISHED :
+                        state = ((b & CUMULATE) != 0 ? FINISHED :
                                  (l > org) ? SUMMED : (SUMMED|FINISHED));
                         if (t.compareAndSetPendingCount(b, b|state))
                             break;
@@ -265,8 +270,8 @@
             this.lo = this.origin = lo; this.hi = this.fence = hi;
             int p;
             this.threshold =
-                    (p = (hi - lo) / (ForkJoinPool.getCommonPoolParallelism() << 3))
-                    <= MIN_PARTITION ? MIN_PARTITION : p;
+                (p = (hi - lo) / (ForkJoinPool.getCommonPoolParallelism() << 3))
+                <= MIN_PARTITION ? MIN_PARTITION : p;
         }
 
         /** Subtask constructor */
@@ -293,9 +298,9 @@
                     if (lt == null) {                // first pass
                         int mid = (l + h) >>> 1;
                         f = rt = t.right =
-                                new LongCumulateTask(t, fn, a, org, fnc, th, mid, h);
-                        t = lt = t.left  =
-                                new LongCumulateTask(t, fn, a, org, fnc, th, l, mid);
+                            new LongCumulateTask(t, fn, a, org, fnc, th, mid, h);
+                        t = lt = t.left =
+                            new LongCumulateTask(t, fn, a, org, fnc, th, l, mid);
                     }
                     else {                           // possibly refork
                         long pin = t.in;
@@ -335,7 +340,7 @@
                     for (int b;;) {
                         if (((b = t.getPendingCount()) & FINISHED) != 0)
                             break outer;                      // already done
-                        state = ((b & CUMULATE) != 0? FINISHED :
+                        state = ((b & CUMULATE) != 0 ? FINISHED :
                                  (l > org) ? SUMMED : (SUMMED|FINISHED));
                         if (t.compareAndSetPendingCount(b, b|state))
                             break;
@@ -415,8 +420,8 @@
             this.lo = this.origin = lo; this.hi = this.fence = hi;
             int p;
             this.threshold =
-                    (p = (hi - lo) / (ForkJoinPool.getCommonPoolParallelism() << 3))
-                    <= MIN_PARTITION ? MIN_PARTITION : p;
+                (p = (hi - lo) / (ForkJoinPool.getCommonPoolParallelism() << 3))
+                <= MIN_PARTITION ? MIN_PARTITION : p;
         }
 
         /** Subtask constructor */
@@ -443,9 +448,9 @@
                     if (lt == null) {                // first pass
                         int mid = (l + h) >>> 1;
                         f = rt = t.right =
-                                new DoubleCumulateTask(t, fn, a, org, fnc, th, mid, h);
-                        t = lt = t.left  =
-                                new DoubleCumulateTask(t, fn, a, org, fnc, th, l, mid);
+                            new DoubleCumulateTask(t, fn, a, org, fnc, th, mid, h);
+                        t = lt = t.left =
+                            new DoubleCumulateTask(t, fn, a, org, fnc, th, l, mid);
                     }
                     else {                           // possibly refork
                         double pin = t.in;
@@ -485,7 +490,7 @@
                     for (int b;;) {
                         if (((b = t.getPendingCount()) & FINISHED) != 0)
                             break outer;                      // already done
-                        state = ((b & CUMULATE) != 0? FINISHED :
+                        state = ((b & CUMULATE) != 0 ? FINISHED :
                                  (l > org) ? SUMMED : (SUMMED|FINISHED));
                         if (t.compareAndSetPendingCount(b, b|state))
                             break;
@@ -565,8 +570,8 @@
             this.lo = this.origin = lo; this.hi = this.fence = hi;
             int p;
             this.threshold =
-                    (p = (hi - lo) / (ForkJoinPool.getCommonPoolParallelism() << 3))
-                    <= MIN_PARTITION ? MIN_PARTITION : p;
+                (p = (hi - lo) / (ForkJoinPool.getCommonPoolParallelism() << 3))
+                <= MIN_PARTITION ? MIN_PARTITION : p;
         }
 
         /** Subtask constructor */
@@ -593,9 +598,9 @@
                     if (lt == null) {                // first pass
                         int mid = (l + h) >>> 1;
                         f = rt = t.right =
-                                new IntCumulateTask(t, fn, a, org, fnc, th, mid, h);
-                        t = lt = t.left  =
-                                new IntCumulateTask(t, fn, a, org, fnc, th, l, mid);
+                            new IntCumulateTask(t, fn, a, org, fnc, th, mid, h);
+                        t = lt = t.left =
+                            new IntCumulateTask(t, fn, a, org, fnc, th, l, mid);
                     }
                     else {                           // possibly refork
                         int pin = t.in;
@@ -635,7 +640,7 @@
                     for (int b;;) {
                         if (((b = t.getPendingCount()) & FINISHED) != 0)
                             break outer;                      // already done
-                        state = ((b & CUMULATE) != 0? FINISHED :
+                        state = ((b & CUMULATE) != 0 ? FINISHED :
                                  (l > org) ? SUMMED : (SUMMED|FINISHED));
                         if (t.compareAndSetPendingCount(b, b|state))
                             break;
--- a/jdk/src/java.base/share/classes/java/util/Collections.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/Collections.java	Tue Oct 27 01:45:03 2015 -0400
@@ -537,8 +537,9 @@
      * Copies all of the elements from one list into another.  After the
      * operation, the index of each copied element in the destination list
      * will be identical to its index in the source list.  The destination
-     * list must be at least as long as the source list.  If it is longer, the
-     * remaining elements in the destination list are unaffected. <p>
+     * list's size must be greater than or equal to the source list's size.
+     * If it is greater, the remaining elements in the destination list are
+     * unaffected. <p>
      *
      * This method runs in linear time.
      *
--- a/jdk/src/java.base/share/classes/java/util/Deque.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/Deque.java	Tue Oct 27 01:45:03 2015 -0400
@@ -188,7 +188,7 @@
  * @author Doug Lea
  * @author Josh Bloch
  * @since  1.6
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this deque
  */
 public interface Deque<E> extends Queue<E> {
     /**
@@ -344,8 +344,7 @@
      * Removes the first occurrence of the specified element from this deque.
      * If the deque does not contain the element, it is unchanged.
      * More formally, removes the first element {@code e} such that
-     * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>
-     * (if such an element exists).
+     * {@code Objects.equals(o, e)} (if such an element exists).
      * Returns {@code true} if this deque contained the specified element
      * (or equivalently, if this deque changed as a result of the call).
      *
@@ -353,10 +352,10 @@
      * @return {@code true} if an element was removed as a result of this call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     * (<a href="Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null and this
      *         deque does not permit null elements
-     * (<a href="Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean removeFirstOccurrence(Object o);
 
@@ -364,8 +363,7 @@
      * Removes the last occurrence of the specified element from this deque.
      * If the deque does not contain the element, it is unchanged.
      * More formally, removes the last element {@code e} such that
-     * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>
-     * (if such an element exists).
+     * {@code Objects.equals(o, e)} (if such an element exists).
      * Returns {@code true} if this deque contained the specified element
      * (or equivalently, if this deque changed as a result of the call).
      *
@@ -373,10 +371,10 @@
      * @return {@code true} if an element was removed as a result of this call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     * (<a href="Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null and this
      *         deque does not permit null elements
-     * (<a href="Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean removeLastOccurrence(Object o);
 
@@ -521,8 +519,7 @@
      * Removes the first occurrence of the specified element from this deque.
      * If the deque does not contain the element, it is unchanged.
      * More formally, removes the first element {@code e} such that
-     * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>
-     * (if such an element exists).
+     * {@code Objects.equals(o, e)} (if such an element exists).
      * Returns {@code true} if this deque contained the specified element
      * (or equivalently, if this deque changed as a result of the call).
      *
@@ -532,27 +529,26 @@
      * @return {@code true} if an element was removed as a result of this call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     * (<a href="Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null and this
      *         deque does not permit null elements
-     * (<a href="Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean remove(Object o);
 
     /**
      * Returns {@code true} if this deque contains the specified element.
      * More formally, returns {@code true} if and only if this deque contains
-     * at least one element {@code e} such that
-     * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.
+     * at least one element {@code e} such that {@code Objects.equals(o, e)}.
      *
      * @param o element whose presence in this deque is to be tested
      * @return {@code true} if this deque contains the specified element
-     * @throws ClassCastException if the type of the specified element
+     * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     * (<a href="Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null and this
      *         deque does not permit null elements
-     * (<a href="Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean contains(Object o);
 
@@ -561,7 +557,7 @@
      *
      * @return the number of elements in this deque
      */
-    public int size();
+    int size();
 
     /**
      * Returns an iterator over the elements in this deque in proper sequence.
--- a/jdk/src/java.base/share/classes/java/util/NavigableMap.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/NavigableMap.java	Tue Oct 27 01:45:03 2015 -0400
@@ -38,30 +38,32 @@
 /**
  * A {@link SortedMap} extended with navigation methods returning the
  * closest matches for given search targets. Methods
- * {@code lowerEntry}, {@code floorEntry}, {@code ceilingEntry},
- * and {@code higherEntry} return {@code Map.Entry} objects
+ * {@link #lowerEntry}, {@link #floorEntry}, {@link #ceilingEntry},
+ * and {@link #higherEntry} return {@code Map.Entry} objects
  * associated with keys respectively less than, less than or equal,
  * greater than or equal, and greater than a given key, returning
  * {@code null} if there is no such key.  Similarly, methods
- * {@code lowerKey}, {@code floorKey}, {@code ceilingKey}, and
- * {@code higherKey} return only the associated keys. All of these
+ * {@link #lowerKey}, {@link #floorKey}, {@link #ceilingKey}, and
+ * {@link #higherKey} return only the associated keys. All of these
  * methods are designed for locating, not traversing entries.
  *
  * <p>A {@code NavigableMap} may be accessed and traversed in either
- * ascending or descending key order.  The {@code descendingMap}
+ * ascending or descending key order.  The {@link #descendingMap}
  * method returns a view of the map with the senses of all relational
  * and directional methods inverted. The performance of ascending
  * operations and views is likely to be faster than that of descending
- * ones.  Methods {@code subMap}, {@code headMap},
- * and {@code tailMap} differ from the like-named {@code
- * SortedMap} methods in accepting additional arguments describing
- * whether lower and upper bounds are inclusive versus exclusive.
- * Submaps of any {@code NavigableMap} must implement the {@code
- * NavigableMap} interface.
+ * ones.  Methods
+ * {@link #subMap(Object, boolean, Object, boolean) subMap(K, boolean, K, boolean)},
+ * {@link #headMap(Object, boolean) headMap(K, boolean)}, and
+ * {@link #tailMap(Object, boolean) tailMap(K, boolean)}
+ * differ from the like-named {@code SortedMap} methods in accepting
+ * additional arguments describing whether lower and upper bounds are
+ * inclusive versus exclusive.  Submaps of any {@code NavigableMap}
+ * must implement the {@code NavigableMap} interface.
  *
- * <p>This interface additionally defines methods {@code firstEntry},
- * {@code pollFirstEntry}, {@code lastEntry}, and
- * {@code pollLastEntry} that return and/or remove the least and
+ * <p>This interface additionally defines methods {@link #firstEntry},
+ * {@link #pollFirstEntry}, {@link #lastEntry}, and
+ * {@link #pollLastEntry} that return and/or remove the least and
  * greatest mappings, if any exist, else returning {@code null}.
  *
  * <p>Implementations of entry-returning methods are expected to
@@ -80,7 +82,7 @@
  * implement {@code NavigableMap}, but extensions and implementations
  * of this interface are encouraged to override these methods to return
  * {@code NavigableMap}.  Similarly,
- * {@link #keySet()} can be overriden to return {@code NavigableSet}.
+ * {@link #keySet()} can be overridden to return {@link NavigableSet}.
  *
  * <p>This interface is a member of the
  * <a href="{@docRoot}/../technotes/guides/collections/index.html">
@@ -254,7 +256,7 @@
      * operation), the results of the iteration are undefined.
      *
      * <p>The returned map has an ordering equivalent to
-     * <tt>{@link Collections#reverseOrder(Comparator) Collections.reverseOrder}(comparator())</tt>.
+     * {@link Collections#reverseOrder(Comparator) Collections.reverseOrder}{@code (comparator())}.
      * The expression {@code m.descendingMap().descendingMap()} returns a
      * view of {@code m} essentially equivalent to {@code m}.
      *
--- a/jdk/src/java.base/share/classes/java/util/NavigableSet.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/NavigableSet.java	Tue Oct 27 01:45:03 2015 -0400
@@ -37,26 +37,30 @@
 
 /**
  * A {@link SortedSet} extended with navigation methods reporting
- * closest matches for given search targets. Methods {@code lower},
- * {@code floor}, {@code ceiling}, and {@code higher} return elements
+ * closest matches for given search targets. Methods {@link #lower},
+ * {@link #floor}, {@link #ceiling}, and {@link #higher} return elements
  * respectively less than, less than or equal, greater than or equal,
  * and greater than a given element, returning {@code null} if there
- * is no such element.  A {@code NavigableSet} may be accessed and
- * traversed in either ascending or descending order.  The {@code
- * descendingSet} method returns a view of the set with the senses of
- * all relational and directional methods inverted. The performance of
- * ascending operations and views is likely to be faster than that of
- * descending ones.  This interface additionally defines methods
- * {@code pollFirst} and {@code pollLast} that return and remove the
- * lowest and highest element, if one exists, else returning {@code
- * null}.  Methods {@code subSet}, {@code headSet},
- * and {@code tailSet} differ from the like-named {@code
- * SortedSet} methods in accepting additional arguments describing
- * whether lower and upper bounds are inclusive versus exclusive.
- * Subsets of any {@code NavigableSet} must implement the {@code
- * NavigableSet} interface.
+ * is no such element.
  *
- * <p> The return values of navigation methods may be ambiguous in
+ * <p>A {@code NavigableSet} may be accessed and traversed in either
+ * ascending or descending order.  The {@link #descendingSet} method
+ * returns a view of the set with the senses of all relational and
+ * directional methods inverted. The performance of ascending
+ * operations and views is likely to be faster than that of descending
+ * ones.  This interface additionally defines methods {@link
+ * #pollFirst} and {@link #pollLast} that return and remove the lowest
+ * and highest element, if one exists, else returning {@code null}.
+ * Methods
+ * {@link #subSet(Object, boolean, Object, boolean) subSet(E, boolean, E, boolean)},
+ * {@link #headSet(Object, boolean) headSet(E, boolean)}, and
+ * {@link #tailSet(Object, boolean) tailSet(E, boolean)}
+ * differ from the like-named {@code SortedSet} methods in accepting
+ * additional arguments describing whether lower and upper bounds are
+ * inclusive versus exclusive.  Subsets of any {@code NavigableSet}
+ * must implement the {@code NavigableSet} interface.
+ *
+ * <p>The return values of navigation methods may be ambiguous in
  * implementations that permit {@code null} elements. However, even
  * in this case the result can be disambiguated by checking
  * {@code contains(null)}. To avoid such issues, implementations of
@@ -172,7 +176,7 @@
      * the iteration are undefined.
      *
      * <p>The returned set has an ordering equivalent to
-     * <tt>{@link Collections#reverseOrder(Comparator) Collections.reverseOrder}(comparator())</tt>.
+     * {@link Collections#reverseOrder(Comparator) Collections.reverseOrder}{@code (comparator())}.
      * The expression {@code s.descendingSet().descendingSet()} returns a
      * view of {@code s} essentially equivalent to {@code s}.
      *
--- a/jdk/src/java.base/share/classes/java/util/Objects.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/Objects.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -282,6 +282,43 @@
     }
 
     /**
+     * Returns the first argument if it is non-{@code null} and
+     * otherwise returns the non-{@code null} second argument.
+     *
+     * @param obj an object
+     * @param defaultObj a non-{@code null} object to return if the first argument
+     *                   is {@code null}
+     * @param <T> the type of the reference
+     * @return the first argument if it is non-{@code null} and
+     *        otherwise the second argument if it is non-{@code null}
+     * @throws NullPointerException if both {@code obj} is null and
+     *        {@code defaultObj} is {@code null}
+     * @since 9
+     */
+    public static <T> T nonNullElse(T obj, T defaultObj) {
+        return (obj != null) ? obj : requireNonNull(defaultObj, "defaultObj");
+    }
+
+    /**
+     * Returns the first argument if it is non-{@code null} and otherwise
+     * returns the non-{@code null} value of {@code supplier.get()}.
+     *
+     * @param obj an object
+     * @param supplier of a non-{@code null} object to return if the first argument
+     *                 is {@code null}
+     * @param <T> the type of the first argument and return type
+     * @return the first argument if it is non-{@code null} and otherwise
+     *         the value from {@code supplier.get()} if it is non-{@code null}
+     * @throws NullPointerException if both {@code obj} is null and
+     *        either the {@code supplier} is {@code null} or
+     *        the {@code supplier.get()} value is {@code null}
+     * @since 9
+     */
+    public static <T> T nonNullElseGet(T obj, Supplier<? extends T> supplier) {
+        return (obj != null) ? obj : requireNonNull(requireNonNull(supplier, "supplier").get(), "supplier.get()");
+    }
+
+    /**
      * Checks that the specified object reference is not {@code null} and
      * throws a customized {@link NullPointerException} if it is.
      *
--- a/jdk/src/java.base/share/classes/java/util/Optional.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/Optional.java	Tue Oct 27 01:45:03 2015 -0400
@@ -31,21 +31,22 @@
 import java.util.stream.Stream;
 
 /**
- * A container object which may or may not contain a non-null value.
- * If a value is present, {@code isPresent()} will return {@code true} and
- * {@code get()} will return the value.
+ * A container object which may or may not contain a non-{@code null} value.
+ * If a value is present, {@code isPresent()} returns {@code true} and
+ * {@code get()} returns the value.
  *
  * <p>Additional methods that depend on the presence or absence of a contained
  * value are provided, such as {@link #orElse(java.lang.Object) orElse()}
- * (return a default value if value not present) and
- * {@link #ifPresent(java.util.function.Consumer) ifPresent()} (perform an
- * action if the value is present).
+ * (returns a default value if no value is present) and
+ * {@link #ifPresent(java.util.function.Consumer) ifPresent()} (performs an
+ * action if a value is present).
  *
  * <p>This is a <a href="../lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code Optional} may have unpredictable results and should be avoided.
  *
+ * @param <T> the type of value
  * @since 1.8
  */
 public final class Optional<T> {
@@ -71,14 +72,15 @@
 
     /**
      * Returns an empty {@code Optional} instance.  No value is present for this
-     * Optional.
+     * {@code Optional}.
      *
-     * @apiNote Though it may be tempting to do so, avoid testing if an object
-     * is empty by comparing with {@code ==} against instances returned by
-     * {@code Option.empty()}. There is no guarantee that it is a singleton.
+     * @apiNote
+     * Though it may be tempting to do so, avoid testing if an object is empty
+     * by comparing with {@code ==} against instances returned by
+     * {@code Optional.empty()}.  There is no guarantee that it is a singleton.
      * Instead, use {@link #isPresent()}.
      *
-     * @param <T> Type of the non-existent value
+     * @param <T> The type of the non-existent value
      * @return an empty {@code Optional}
      */
     public static<T> Optional<T> empty() {
@@ -88,47 +90,47 @@
     }
 
     /**
-     * Constructs an instance with the value present.
+     * Constructs an instance with the described value.
      *
-     * @param value the non-null value to be present
-     * @throws NullPointerException if value is null
+     * @param value the non-{@code null} value to describe
+     * @throws NullPointerException if value is {@code null}
      */
     private Optional(T value) {
         this.value = Objects.requireNonNull(value);
     }
 
     /**
-     * Returns an {@code Optional} with the specified present non-null value.
+     * Returns an {@code Optional} describing the given non-{@code null}
+     * value.
      *
-     * @param <T> the class of the value
-     * @param value the value to be present, which must be non-null
+     * @param value the value to describe, which must be non-{@code null}
+     * @param <T> the type of the value
      * @return an {@code Optional} with the value present
-     * @throws NullPointerException if value is null
+     * @throws NullPointerException if value is {@code null}
      */
     public static <T> Optional<T> of(T value) {
         return new Optional<>(value);
     }
 
     /**
-     * Returns an {@code Optional} describing the specified value, if non-null,
-     * otherwise returns an empty {@code Optional}.
+     * Returns an {@code Optional} describing the given value, if
+     * non-{@code null}, otherwise returns an empty {@code Optional}.
      *
-     * @param <T> the class of the value
-     * @param value the possibly-null value to describe
+     * @param value the possibly-{@code null} value to describe
+     * @param <T> the type of the value
      * @return an {@code Optional} with a present value if the specified value
-     * is non-null, otherwise an empty {@code Optional}
+     *         is non-{@code null}, otherwise an empty {@code Optional}
      */
     public static <T> Optional<T> ofNullable(T value) {
         return value == null ? empty() : of(value);
     }
 
     /**
-     * If a value is present in this {@code Optional}, returns the value,
-     * otherwise throws {@code NoSuchElementException}.
+     * If a value is present, returns the value, otherwise throws
+     * {@code NoSuchElementException}.
      *
-     * @return the non-null value held by this {@code Optional}
-     * @throws NoSuchElementException if there is no value present
-     *
+     * @return the non-{@code null} value described by this {@code Optional}
+     * @throws NoSuchElementException if no value is present
      * @see Optional#isPresent()
      */
     public T get() {
@@ -139,21 +141,21 @@
     }
 
     /**
-     * Return {@code true} if there is a value present, otherwise {@code false}.
+     * If a value is present, returns {@code true}, otherwise {@code false}.
      *
-     * @return {@code true} if there is a value present, otherwise {@code false}
+     * @return {@code true} if a value is present, otherwise {@code false}
      */
     public boolean isPresent() {
         return value != null;
     }
 
     /**
-     * If a value is present, perform the given action with the value,
-     * otherwise do nothing.
+     * If a value is present, performs the given action with the value,
+     * otherwise does nothing.
      *
-     * @param action the action to be performed if a value is present
-     * @throws NullPointerException if a value is present and {@code action} is
-     * null
+     * @param action the action to be performed, if a value is present
+     * @throws NullPointerException if value is present and the given action is
+     *         {@code null}
      */
     public void ifPresent(Consumer<? super T> action) {
         if (value != null) {
@@ -162,15 +164,16 @@
     }
 
     /**
-     * If a value is present, perform the given action with the value,
-     * otherwise perform the given empty-based action.
+     * If a value is present, performs the given action with the value,
+     * otherwise performs the given empty-based action.
      *
-     * @param action the action to be performed if a value is present
-     * @param emptyAction the empty-based action to be performed if a value is
-     * not present
-     * @throws NullPointerException if a value is present and {@code action} is
-     * null, or a value is not present and {@code emptyAction} is null.
-     * @since 1.9
+     * @param action the action to be performed, if a value is present
+     * @param emptyAction the empty-based action to be performed, if no value is
+     *        present
+     * @throws NullPointerException if a value is present and the given action
+     *         is {@code null}, or no value is present and the given empty-based
+     *         action is {@code null}.
+     * @since 9
      */
     public void ifPresentOrElse(Consumer<? super T> action, Runnable emptyAction) {
         if (value != null) {
@@ -182,14 +185,14 @@
 
     /**
      * If a value is present, and the value matches the given predicate,
-     * return an {@code Optional} describing the value, otherwise return an
+     * returns an {@code Optional} describing the value, otherwise returns an
      * empty {@code Optional}.
      *
-     * @param predicate a predicate to apply to the value, if present
-     * @return an {@code Optional} describing the value of this {@code Optional}
-     * if a value is present and the value matches the given predicate,
-     * otherwise an empty {@code Optional}
-     * @throws NullPointerException if the predicate is null
+     * @param predicate the predicate to apply to a value, if present
+     * @return an {@code Optional} describing the value of this
+     *         {@code Optional}, if a value is present and the value matches the
+     *         given predicate, otherwise an empty {@code Optional}
+     * @throws NullPointerException if the predicate is {@code null}
      */
     public Optional<T> filter(Predicate<? super T> predicate) {
         Objects.requireNonNull(predicate);
@@ -201,14 +204,18 @@
     }
 
     /**
-     * If a value is present, apply the provided mapping function to it,
-     * and if the result is non-null, return an {@code Optional} describing the
-     * result.  Otherwise return an empty {@code Optional}.
+     * If a value is present, returns an {@code Optional} describing (as if by
+     * {@link #ofNullable}) the result of applying the given mapping function to
+     * the value, otherwise returns an empty {@code Optional}.
      *
-     * @apiNote This method supports post-processing on optional values, without
+     * <p>If the mapping function returns a {@code null} result then this method
+     * returns an empty {@code Optional}.
+     *
+     * @apiNote
+     * This method supports post-processing on {@code Optional} values, without
      * the need to explicitly check for a return status.  For example, the
-     * following code traverses a stream of file names, selects one that has
-     * not yet been processed, and then opens that file, returning an
+     * following code traverses a stream of file names, selects one that has not
+     * yet been processed, and then opens that file, returning an
      * {@code Optional<FileInputStream>}:
      *
      * <pre>{@code
@@ -222,12 +229,12 @@
      * {@code map} returns an {@code Optional<FileInputStream>} for the desired
      * file if one exists.
      *
-     * @param <U> The type of the result of the mapping function
-     * @param mapper a mapping function to apply to the value, if present
+     * @param mapper the mapping function to apply to a value, if present
+     * @param <U> The type of the value returned from the mapping function
      * @return an {@code Optional} describing the result of applying a mapping
-     * function to the value of this {@code Optional}, if a value is present,
-     * otherwise an empty {@code Optional}
-     * @throws NullPointerException if the mapping function is null
+     *         function to the value of this {@code Optional}, if a value is
+     *         present, otherwise an empty {@code Optional}
+     * @throws NullPointerException if the mapping function is {@code null}
      */
     public<U> Optional<U> map(Function<? super T, ? extends U> mapper) {
         Objects.requireNonNull(mapper);
@@ -239,21 +246,23 @@
     }
 
     /**
-     * If a value is present, apply the provided {@code Optional}-bearing
-     * mapping function to it, return that result, otherwise return an empty
-     * {@code Optional}.  This method is similar to {@link #map(Function)},
-     * but the provided mapper is one whose result is already an {@code Optional},
-     * and if invoked, {@code flatMap} does not wrap it with an additional
+     * If a value is present, returns the result of applying the given
+     * {@code Optional}-bearing mapping function to the value, otherwise returns
+     * an empty {@code Optional}.
+     *
+     * <p>This method is similar to {@link #map(Function)}, but the mapping
+     * function is one whose result is already an {@code Optional}, and if
+     * invoked, {@code flatMap} does not wrap it within an additional
      * {@code Optional}.
      *
-     * @param <U> The type parameter to the {@code Optional} returned by
-     * @param mapper a mapping function to apply to the value, if present
-     *           the mapping function
+     * @param <U> The type of value of the {@code Optional} returned by the
+     *            mapping function
+     * @param mapper the mapping function to apply to a value, if present
      * @return the result of applying an {@code Optional}-bearing mapping
-     * function to the value of this {@code Optional}, if a value is present,
-     * otherwise an empty {@code Optional}
-     * @throws NullPointerException if the mapping function is null or returns
-     * a null result
+     *         function to the value of this {@code Optional}, if a value is
+     *         present, otherwise an empty {@code Optional}
+     * @throws NullPointerException if the mapping function is {@code null} or
+     *         returns a {@code null} result
      */
     public<U> Optional<U> flatMap(Function<? super T, Optional<U>> mapper) {
         Objects.requireNonNull(mapper);
@@ -265,19 +274,41 @@
     }
 
     /**
-     * If a value is present return a sequential {@link Stream} containing only
-     * that value, otherwise return an empty {@code Stream}.
+     * If a value is present, returns an {@code Optional} describing the value,
+     * otherwise returns an {@code Optional} produced by the supplying function.
      *
-     * @apiNote This method can be used to transform a {@code Stream} of
-     * optional elements to a {@code Stream} of present value elements:
+     * @param supplier the supplying function that produces an {@code Optional}
+     *        to be returned
+     * @return returns an {@code Optional} describing the value of this
+     *         {@code Optional}, if a value is present, otherwise an
+     *         {@code Optional} produced by the supplying function.
+     * @throws NullPointerException if the supplying function is {@code null} or
+     *         produces a {@code null} result
+     * @since 9
+     */
+    public Optional<T> or(Supplier<Optional<T>> supplier) {
+        Objects.requireNonNull(supplier);
+        if (isPresent()) {
+            return this;
+        } else {
+            return Objects.requireNonNull(supplier.get());
+        }
+    }
+
+    /**
+     * If a value is present, returns a sequential {@link Stream} containing
+     * only that value, otherwise returns an empty {@code Stream}.
      *
+     * @apiNote
+     * This method can be used to transform a {@code Stream} of optional
+     * elements to a {@code Stream} of present value elements:
      * <pre>{@code
      *     Stream<Optional<T>> os = ..
      *     Stream<T> s = os.flatMap(Optional::stream)
      * }</pre>
      *
      * @return the optional value as a {@code Stream}
-     * @since 1.9
+     * @since 9
      */
     public Stream<T> stream() {
         if (!isPresent()) {
@@ -288,10 +319,11 @@
     }
 
     /**
-     * Return the value if present, otherwise return {@code other}.
+     * If a value is present, returns the value, otherwise returns
+     * {@code other}.
      *
-     * @param other the value to be returned if there is no value present, may
-     * be null
+     * @param other the value to be returned, if no value is present.
+     *        May be {@code null}.
      * @return the value, if present, otherwise {@code other}
      */
     public T orElse(T other) {
@@ -299,34 +331,35 @@
     }
 
     /**
-     * Return the value if present, otherwise invoke {@code other} and return
-     * the result of that invocation.
+     * If a value is present, returns the value, otherwise returns the result
+     * produced by the supplying function.
      *
-     * @param other a {@code Supplier} whose result is returned if no value
-     * is present
-     * @return the value if present otherwise the result of {@code other.get()}
-     * @throws NullPointerException if value is not present and {@code other} is
-     * null
+     * @param supplier the supplying function that produces a value to be returned
+     * @return the value, if present, otherwise the result produced by the
+     *         supplying function
+     * @throws NullPointerException if no value is present and the supplying
+     *         function is {@code null}
      */
-    public T orElseGet(Supplier<? extends T> other) {
-        return value != null ? value : other.get();
+    public T orElseGet(Supplier<? extends T> supplier) {
+        return value != null ? value : supplier.get();
     }
 
     /**
-     * Return the contained value, if present, otherwise throw an exception
-     * to be created by the provided supplier.
+     * If a value is present, returns the value, otherwise throws an exception
+     * produced by the exception supplying function.
      *
-     * @apiNote A method reference to the exception constructor with an empty
-     * argument list can be used as the supplier. For example,
+     * @apiNote
+     * A method reference to the exception constructor with an empty argument
+     * list can be used as the supplier. For example,
      * {@code IllegalStateException::new}
      *
      * @param <X> Type of the exception to be thrown
-     * @param exceptionSupplier The supplier which will return the exception to
-     * be thrown
-     * @return the present value
-     * @throws X if there is no value present
-     * @throws NullPointerException if no value is present and
-     * {@code exceptionSupplier} is null
+     * @param exceptionSupplier the supplying function that produces an
+     *        exception to be thrown
+     * @return the value, if present
+     * @throws X if no value is present
+     * @throws NullPointerException if no value is present and the exception
+     *          supplying function is {@code null}
      */
     public <X extends Throwable> T orElseThrow(Supplier<? extends X> exceptionSupplier) throws X {
         if (value != null) {
@@ -337,8 +370,8 @@
     }
 
     /**
-     * Indicates whether some other object is "equal to" this Optional. The
-     * other object is considered equal if:
+     * Indicates whether some other object is "equal to" this {@code Optional}.
+     * The other object is considered equal if:
      * <ul>
      * <li>it is also an {@code Optional} and;
      * <li>both instances have no value present or;
@@ -347,7 +380,7 @@
      *
      * @param obj an object to be tested for equality
      * @return {@code true} if the other object is "equal to" this object
-     * otherwise {@code false}
+     *         otherwise {@code false}
      */
     @Override
     public boolean equals(Object obj) {
@@ -364,10 +397,11 @@
     }
 
     /**
-     * Returns the hash code value of the present value, if any, or 0 (zero) if
-     * no value is present.
+     * Returns the hash code of the value, if present, otherwise {@code 0}
+     * (zero) if no value is present.
      *
-     * @return hash code value of the present value or 0 if no value is present
+     * @return hash code value of the present value or {@code 0} if no value is
+     *         present
      */
     @Override
     public int hashCode() {
@@ -375,13 +409,14 @@
     }
 
     /**
-     * Returns a non-empty string representation of this Optional suitable for
-     * debugging. The exact presentation format is unspecified and may vary
-     * between implementations and versions.
+     * Returns a non-empty string representation of this {@code Optional}
+     * suitable for debugging.  The exact presentation format is unspecified and
+     * may vary between implementations and versions.
      *
-     * @implSpec If a value is present the result must include its string
-     * representation in the result. Empty and present Optionals must be
-     * unambiguously differentiable.
+     * @implSpec
+     * If a value is present the result must include its string representation
+     * in the result.  Empty and present {@code Optional}s must be unambiguously
+     * differentiable.
      *
      * @return the string representation of this instance
      */
--- a/jdk/src/java.base/share/classes/java/util/OptionalDouble.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/OptionalDouble.java	Tue Oct 27 01:45:03 2015 -0400
@@ -30,15 +30,15 @@
 import java.util.stream.DoubleStream;
 
 /**
- * A container object which may or may not contain a {@code double} value.
- * If a value is present, {@code isPresent()} will return {@code true} and
- * {@code getAsDouble()} will return the value.
+ * A container object which may or may not contain a {@code double} value.  If a
+ * value is present, {@code isPresent()} returns {@code true} and
+ * {@code getAsDouble()} returns the value.
  *
  * <p>Additional methods that depend on the presence or absence of a contained
  * value are provided, such as {@link #orElse(double) orElse()}
- * (return a default value if value not present) and
- * {@link #ifPresent(java.util.function.DoubleConsumer) ifPresent()} (perform an
- * action if the value is present).
+ * (returns a default value if no value is present) and
+ * {@link #ifPresent(java.util.function.DoubleConsumer) ifPresent()} (performs
+ * an action if a value is present).
  *
  * <p>This is a <a href="../lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
@@ -71,12 +71,13 @@
     }
 
     /**
-     * Returns an empty {@code OptionalDouble} instance.  No value is present for this
-     * OptionalDouble.
+     * Returns an empty {@code OptionalDouble} instance.  No value is present
+     * for this {@code OptionalDouble}.
      *
-     * @apiNote Though it may be tempting to do so, avoid testing if an object
-     * is empty by comparing with {@code ==} against instances returned by
-     * {@code Option.empty()}. There is no guarantee that it is a singleton.
+     * @apiNote
+     * Though it may be tempting to do so, avoid testing if an object is empty
+     * by comparing with {@code ==} against instances returned by
+     * {@code OptionalDouble.empty()}.  There is no guarantee that it is a singleton.
      * Instead, use {@link #isPresent()}.
      *
      *  @return an empty {@code OptionalDouble}.
@@ -86,9 +87,9 @@
     }
 
     /**
-     * Construct an instance with the value present.
+     * Construct an instance with the described value.
      *
-     * @param value the double value to be present.
+     * @param value the double value to describe.
      */
     private OptionalDouble(double value) {
         this.isPresent = true;
@@ -96,9 +97,9 @@
     }
 
     /**
-     * Return an {@code OptionalDouble} with the specified value present.
+     * Returns an {@code OptionalDouble} describing the given value.
      *
-     * @param value the value to be present
+     * @param value the value to describe
      * @return an {@code OptionalDouble} with the value present
      */
     public static OptionalDouble of(double value) {
@@ -106,12 +107,11 @@
     }
 
     /**
-     * If a value is present in this {@code OptionalDouble}, returns the value,
-     * otherwise throws {@code NoSuchElementException}.
+     * If a value is present, returns the value, otherwise throws
+     * {@code NoSuchElementException}.
      *
-     * @return the value held by this {@code OptionalDouble}
-     * @throws NoSuchElementException if there is no value present
-     *
+     * @return the value described by this {@code OptionalDouble}
+     * @throws NoSuchElementException if no value is present
      * @see OptionalDouble#isPresent()
      */
     public double getAsDouble() {
@@ -122,21 +122,21 @@
     }
 
     /**
-     * Return {@code true} if there is a value present, otherwise {@code false}.
+     * If a value is present, returns {@code true}, otherwise {@code false}.
      *
-     * @return {@code true} if there is a value present, otherwise {@code false}
+     * @return {@code true} if a value is present, otherwise {@code false}
      */
     public boolean isPresent() {
         return isPresent;
     }
 
     /**
-     * If a value is present, perform the given action with the value,
-     * otherwise do nothing.
+     * If a value is present, performs the given action with the value,
+     * otherwise does nothing.
      *
-     * @param action the action to be performed if a value is present
-     * @throws NullPointerException if a value is present and {@code action} is
-     * null
+     * @param action the action to be performed, if a value is present
+     * @throws NullPointerException if value is present and the given action is
+     *         {@code null}
      */
     public void ifPresent(DoubleConsumer action) {
         if (isPresent) {
@@ -145,15 +145,16 @@
     }
 
     /**
-     * If a value is present, perform the given action with the value,
-     * otherwise perform the given empty-based action.
+     * If a value is present, performs the given action with the value,
+     * otherwise performs the given empty-based action.
      *
-     * @param action the action to be performed if a value is present
-     * @param emptyAction the empty-based action to be performed if a value is
-     * not present
-     * @throws NullPointerException if a value is present and {@code action} is
-     * null, or a value is not present and {@code emptyAction} is null.
-     * @since 1.9
+     * @param action the action to be performed, if a value is present
+     * @param emptyAction the empty-based action to be performed, if no value is
+     * present
+     * @throws NullPointerException if a value is present and the given action
+     *         is {@code null}, or no value is present and the given empty-based
+     *         action is {@code null}.
+     * @since 9
      */
     public void ifPresentOrElse(DoubleConsumer action, Runnable emptyAction) {
         if (isPresent) {
@@ -164,19 +165,20 @@
     }
 
     /**
-     * If a value is present return a sequential {@link DoubleStream} containing
-     * only that value, otherwise return an empty {@code DoubleStream}.
+     * If a value is present, returns a sequential {@link DoubleStream}
+     * containing only that value, otherwise returns an empty
+     * {@code DoubleStream}.
      *
-     * @apiNote This method can be used to transform a {@code Stream} of
-     * optional doubles to a {@code DoubleStream} of present doubles:
-     *
+     * @apiNote
+     * This method can be used to transform a {@code Stream} of optional doubles
+     * to a {@code DoubleStream} of present doubles:
      * <pre>{@code
      *     Stream<OptionalDouble> os = ..
      *     DoubleStream s = os.flatMapToDouble(OptionalDouble::stream)
      * }</pre>
      *
      * @return the optional value as a {@code DoubleStream}
-     * @since 1.9
+     * @since 9
      */
     public DoubleStream stream() {
         if (isPresent) {
@@ -187,9 +189,10 @@
     }
 
     /**
-     * Return the value if present, otherwise return {@code other}.
+     * If a value is present, returns the value, otherwise returns
+     * {@code other}.
      *
-     * @param other the value to be returned if there is no value present
+     * @param other the value to be returned, if no value is present
      * @return the value, if present, otherwise {@code other}
      */
     public double orElse(double other) {
@@ -197,34 +200,35 @@
     }
 
     /**
-     * Return the value if present, otherwise invoke {@code other} and return
-     * the result of that invocation.
+     * If a value is present, returns the value, otherwise returns the result
+     * produced by the supplying function.
      *
-     * @param other a {@code DoubleSupplier} whose result is returned if no value
-     * is present
-     * @return the value if present otherwise the result of {@code other.getAsDouble()}
-     * @throws NullPointerException if value is not present and {@code other} is
-     * null
+     * @param supplier the supplying function that produces a value to be returned
+     * @return the value, if present, otherwise the result produced by the
+     *         supplying function
+     * @throws NullPointerException if no value is present and the supplying
+     *         function is {@code null}
      */
-    public double orElseGet(DoubleSupplier other) {
-        return isPresent ? value : other.getAsDouble();
+    public double orElseGet(DoubleSupplier supplier) {
+        return isPresent ? value : supplier.getAsDouble();
     }
 
     /**
-     * Return the contained value, if present, otherwise throw an exception
-     * to be created by the provided supplier.
+     * If a value is present, returns the value, otherwise throws an exception
+     * produced by the exception supplying function.
      *
-     * @apiNote A method reference to the exception constructor with an empty
-     * argument list can be used as the supplier. For example,
+     * @apiNote
+     * A method reference to the exception constructor with an empty argument
+     * list can be used as the supplier. For example,
      * {@code IllegalStateException::new}
      *
      * @param <X> Type of the exception to be thrown
-     * @param exceptionSupplier The supplier which will return the exception to
-     * be thrown
-     * @return the present value
-     * @throws X if there is no value present
-     * @throws NullPointerException if no value is present and
-     * {@code exceptionSupplier} is null
+     * @param exceptionSupplier the supplying function that produces an
+     *        exception to be thrown
+     * @return the value, if present
+     * @throws X if no value is present
+     * @throws NullPointerException if no value is present and the exception
+     *         supplying function is {@code null}
      */
     public<X extends Throwable> double orElseThrow(Supplier<? extends X> exceptionSupplier) throws X {
         if (isPresent) {
@@ -235,17 +239,18 @@
     }
 
     /**
-     * Indicates whether some other object is "equal to" this OptionalDouble. The
-     * other object is considered equal if:
+     * Indicates whether some other object is "equal to" this
+     * {@code OptionalDouble}. The other object is considered equal if:
      * <ul>
      * <li>it is also an {@code OptionalDouble} and;
      * <li>both instances have no value present or;
-     * <li>the present values are "equal to" each other via {@code Double.compare() == 0}.
+     * <li>the present values are "equal to" each other via
+     * {@code Double.compare() == 0}.
      * </ul>
      *
      * @param obj an object to be tested for equality
      * @return {@code true} if the other object is "equal to" this object
-     * otherwise {@code false}
+     *         otherwise {@code false}
      */
     @Override
     public boolean equals(Object obj) {
@@ -264,10 +269,11 @@
     }
 
     /**
-     * Returns the hash code value of the present value, if any, or 0 (zero) if
-     * no value is present.
+     * Returns the hash code of the value, if present, otherwise {@code 0}
+     * (zero) if no value is present.
      *
-     * @return hash code value of the present value or 0 if no value is present
+     * @return hash code value of the present value or {@code 0} if no value is
+     *         present
      */
     @Override
     public int hashCode() {
@@ -275,14 +281,13 @@
     }
 
     /**
-     * {@inheritDoc}
+     * Returns a non-empty string representation of this {@code OptionalDouble}
+     * suitable for debugging.  The exact presentation format is unspecified and
+     * may vary between implementations and versions.
      *
-     * Returns a non-empty string representation of this object suitable for
-     * debugging. The exact presentation format is unspecified and may vary
-     * between implementations and versions.
-     *
-     * @implSpec If a value is present the result must include its string
-     * representation in the result. Empty and present instances must be
+     * @implSpec
+     * If a value is present the result must include its string representation
+     * in the result.  Empty and present {@code OptionalDouble}s must be
      * unambiguously differentiable.
      *
      * @return the string representation of this instance
--- a/jdk/src/java.base/share/classes/java/util/OptionalInt.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/OptionalInt.java	Tue Oct 27 01:45:03 2015 -0400
@@ -30,15 +30,15 @@
 import java.util.stream.IntStream;
 
 /**
- * A container object which may or may not contain a {@code int} value.
- * If a value is present, {@code isPresent()} will return {@code true} and
- * {@code getAsInt()} will return the value.
+ * A container object which may or may not contain an {@code int} value.  If a
+ * value is present, {@code isPresent()} returns {@code true} and
+ * {@code getAsInt()} returns the value.
  *
  * <p>Additional methods that depend on the presence or absence of a contained
  * value are provided, such as {@link #orElse(int) orElse()}
- * (return a default value if value not present) and
- * {@link #ifPresent(java.util.function.IntConsumer) ifPresent()} (perform an
- * action if the value is present).
+ * (returns a default value if no value is present) and
+ * {@link #ifPresent(java.util.function.IntConsumer) ifPresent()} (performs an
+ * action if a value is present).
  *
  * <p>This is a <a href="../lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
@@ -71,24 +71,25 @@
     }
 
     /**
-     * Returns an empty {@code OptionalInt} instance.  No value is present for this
-     * OptionalInt.
+     * Returns an empty {@code OptionalInt} instance.  No value is present for
+     * this {@code OptionalInt}.
      *
-     * @apiNote Though it may be tempting to do so, avoid testing if an object
-     * is empty by comparing with {@code ==} against instances returned by
-     * {@code Option.empty()}. There is no guarantee that it is a singleton.
+     * @apiNote
+     * Though it may be tempting to do so, avoid testing if an object is empty
+     * by comparing with {@code ==} against instances returned by
+     * {@code OptionalInt.empty()}.  There is no guarantee that it is a singleton.
      * Instead, use {@link #isPresent()}.
      *
-     *  @return an empty {@code OptionalInt}
+     * @return an empty {@code OptionalInt}
      */
     public static OptionalInt empty() {
         return EMPTY;
     }
 
     /**
-     * Construct an instance with the value present.
+     * Construct an instance with the described value.
      *
-     * @param value the int value to be present
+     * @param value the int value to describe
      */
     private OptionalInt(int value) {
         this.isPresent = true;
@@ -96,9 +97,9 @@
     }
 
     /**
-     * Return an {@code OptionalInt} with the specified value present.
+     * Returns an {@code OptionalInt} describing the given value.
      *
-     * @param value the value to be present
+     * @param value the value to describe
      * @return an {@code OptionalInt} with the value present
      */
     public static OptionalInt of(int value) {
@@ -106,12 +107,11 @@
     }
 
     /**
-     * If a value is present in this {@code OptionalInt}, returns the value,
-     * otherwise throws {@code NoSuchElementException}.
+     * If a value is present, returns the value, otherwise throws
+     * {@code NoSuchElementException}.
      *
-     * @return the value held by this {@code OptionalInt}
-     * @throws NoSuchElementException if there is no value present
-     *
+     * @return the value described by this {@code OptionalInt}
+     * @throws NoSuchElementException if no value is present
      * @see OptionalInt#isPresent()
      */
     public int getAsInt() {
@@ -122,21 +122,21 @@
     }
 
     /**
-     * Return {@code true} if there is a value present, otherwise {@code false}.
+     * If a value is present, returns {@code true}, otherwise {@code false}.
      *
-     * @return {@code true} if there is a value present, otherwise {@code false}
+     * @return {@code true} if a value is present, otherwise {@code false}
      */
     public boolean isPresent() {
         return isPresent;
     }
 
     /**
-     * If a value is present, perform the given action with the value,
-     * otherwise do nothing.
+     * If a value is present, performs the given action with the value,
+     * otherwise does nothing.
      *
-     * @param action the action to be performed if a value is present
-     * @throws NullPointerException if value is present and {@code action} is
-     * null
+     * @param action the action to be performed, if a value is present
+     * @throws NullPointerException if value is present and the given action is
+     *         {@code null}
      */
     public void ifPresent(IntConsumer action) {
         if (isPresent) {
@@ -145,15 +145,16 @@
     }
 
     /**
-     * If a value is present, perform the given action with the value,
-     * otherwise perform the given empty-based action.
+     * If a value is present, performs the given action with the value,
+     * otherwise performs the given empty-based action.
      *
-     * @param action the action to be performed if a value is present
-     * @param emptyAction the empty-based action to be performed if a value is
-     * not present
-     * @throws NullPointerException if a value is present and {@code action} is
-     * null, or a value is not present and {@code emptyAction} is null.
-     * @since 1.9
+     * @param action the action to be performed, if a value is present
+     * @param emptyAction the empty-based action to be performed, if no value is
+     *        present
+     * @throws NullPointerException if a value is present and the given action
+     *         is {@code null}, or no value is present and the given empty-based
+     *         action is {@code null}.
+     * @since 9
      */
     public void ifPresentOrElse(IntConsumer action, Runnable emptyAction) {
         if (isPresent) {
@@ -164,19 +165,19 @@
     }
 
     /**
-     * If a value is present return a sequential {@link IntStream} containing
-     * only that value, otherwise return an empty {@code IntStream}.
+     * If a value is present, returns a sequential {@link IntStream} containing
+     * only that value, otherwise returns an empty {@code IntStream}.
      *
-     * @apiNote This method can be used to transform a {@code Stream} of
-     * optional integers to an {@code IntStream} of present integers:
-     *
+     * @apiNote
+     * This method can be used to transform a {@code Stream} of optional
+     * integers to an {@code IntStream} of present integers:
      * <pre>{@code
      *     Stream<OptionalInt> os = ..
      *     IntStream s = os.flatMapToInt(OptionalInt::stream)
      * }</pre>
      *
      * @return the optional value as an {@code IntStream}
-     * @since 1.9
+     * @since 9
      */
     public IntStream stream() {
         if (isPresent) {
@@ -187,9 +188,10 @@
     }
 
     /**
-     * Return the value if present, otherwise return {@code other}.
+     * If a value is present, returns the value, otherwise returns
+     * {@code other}.
      *
-     * @param other the value to be returned if there is no value present
+     * @param other the value to be returned, if no value is present
      * @return the value, if present, otherwise {@code other}
      */
     public int orElse(int other) {
@@ -197,34 +199,35 @@
     }
 
     /**
-     * Return the value if present, otherwise invoke {@code other} and return
-     * the result of that invocation.
+     * If a value is present, returns the value, otherwise returns the result
+     * produced by the supplying function.
      *
-     * @param other a {@code IntSupplier} whose result is returned if no value
-     * is present
-     * @return the value if present otherwise the result of {@code other.getAsInt()}
-     * @throws NullPointerException if value is not present and {@code other} is
-     * null
+     * @param supplier the supplying function that produces a value to be returned
+     * @return the value, if present, otherwise the result produced by the
+     *         supplying function
+     * @throws NullPointerException if no value is present and the supplying
+     *         function is {@code null}
      */
-    public int orElseGet(IntSupplier other) {
-        return isPresent ? value : other.getAsInt();
+    public int orElseGet(IntSupplier supplier) {
+        return isPresent ? value : supplier.getAsInt();
     }
 
     /**
-     * Return the contained value, if present, otherwise throw an exception
-     * to be created by the provided supplier.
+     * If a value is present, returns the value, otherwise throws an exception
+     * produced by the exception supplying function.
      *
-     * @apiNote A method reference to the exception constructor with an empty
-     * argument list can be used as the supplier. For example,
+     * @apiNote
+     * A method reference to the exception constructor with an empty argument
+     * list can be used as the supplier. For example,
      * {@code IllegalStateException::new}
      *
      * @param <X> Type of the exception to be thrown
-     * @param exceptionSupplier The supplier which will return the exception to
-     * be thrown
-     * @return the present value
-     * @throws X if there is no value present
-     * @throws NullPointerException if no value is present and
-     * {@code exceptionSupplier} is null
+     * @param exceptionSupplier the supplying function that produces an
+     *        exception to be thrown
+     * @return the value, if present
+     * @throws X if no value is present
+     * @throws NullPointerException if no value is present and the exception
+     *         supplying function is {@code null}
      */
     public<X extends Throwable> int orElseThrow(Supplier<? extends X> exceptionSupplier) throws X {
         if (isPresent) {
@@ -235,8 +238,8 @@
     }
 
     /**
-     * Indicates whether some other object is "equal to" this OptionalInt. The
-     * other object is considered equal if:
+     * Indicates whether some other object is "equal to" this
+     * {@code OptionalInt}.  The other object is considered equal if:
      * <ul>
      * <li>it is also an {@code OptionalInt} and;
      * <li>both instances have no value present or;
@@ -245,7 +248,7 @@
      *
      * @param obj an object to be tested for equality
      * @return {@code true} if the other object is "equal to" this object
-     * otherwise {@code false}
+     *         otherwise {@code false}
      */
     @Override
     public boolean equals(Object obj) {
@@ -264,10 +267,11 @@
     }
 
     /**
-     * Returns the hash code value of the present value, if any, or 0 (zero) if
-     * no value is present.
+     * Returns the hash code of the value, if present, otherwise {@code 0}
+     * (zero) if no value is present.
      *
-     * @return hash code value of the present value or 0 if no value is present
+     * @return hash code value of the present value or {@code 0} if no value is
+     *         present
      */
     @Override
     public int hashCode() {
@@ -275,14 +279,13 @@
     }
 
     /**
-     * {@inheritDoc}
+     * Returns a non-empty string representation of this {@code OptionalInt}
+     * suitable for debugging.  The exact presentation format is unspecified and
+     * may vary between implementations and versions.
      *
-     * Returns a non-empty string representation of this object suitable for
-     * debugging. The exact presentation format is unspecified and may vary
-     * between implementations and versions.
-     *
-     * @implSpec If a value is present the result must include its string
-     * representation in the result. Empty and present instances must be
+     * @implSpec
+     * If a value is present the result must include its string representation
+     * in the result.  Empty and present {@code OptionalInt}s must be
      * unambiguously differentiable.
      *
      * @return the string representation of this instance
--- a/jdk/src/java.base/share/classes/java/util/OptionalLong.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/OptionalLong.java	Tue Oct 27 01:45:03 2015 -0400
@@ -30,15 +30,15 @@
 import java.util.stream.LongStream;
 
 /**
- * A container object which may or may not contain a {@code long} value.
- * If a value is present, {@code isPresent()} will return {@code true} and
- * {@code getAsLong()} will return the value.
+ * A container object which may or may not contain a {@code long} value.  If a
+ * value is present, {@code isPresent()} returns {@code true} and
+ * {@code getAsLong()} returns the value.
  *
  * <p>Additional methods that depend on the presence or absence of a contained
  * value are provided, such as {@link #orElse(long) orElse()}
- * (return a default value if value not present) and
- * {@link #ifPresent(java.util.function.LongConsumer) ifPresent()} (perform an
- * action if the value is present).
+ * (returns a default value if no value is present) and
+ * {@link #ifPresent(java.util.function.LongConsumer) ifPresent()} (performs an
+ * action if a value is present).
  *
  * <p>This is a <a href="../lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
@@ -71,24 +71,25 @@
     }
 
     /**
-     * Returns an empty {@code OptionalLong} instance.  No value is present for this
-     * OptionalLong.
+     * Returns an empty {@code OptionalLong} instance.  No value is present for
+     * this {@code OptionalLong}.
      *
-     * @apiNote Though it may be tempting to do so, avoid testing if an object
-     * is empty by comparing with {@code ==} against instances returned by
-     * {@code Option.empty()}. There is no guarantee that it is a singleton.
+     * @apiNote
+     * Though it may be tempting to do so, avoid testing if an object is empty
+     * by comparing with {@code ==} against instances returned by
+     * {@code OptionalLong.empty()}.  There is no guarantee that it is a singleton.
      * Instead, use {@link #isPresent()}.
      *
-     *  @return an empty {@code OptionalLong}.
+     * @return an empty {@code OptionalLong}.
      */
     public static OptionalLong empty() {
         return EMPTY;
     }
 
     /**
-     * Construct an instance with the value present.
+     * Construct an instance with the described value.
      *
-     * @param value the long value to be present
+     * @param value the long value to describe
      */
     private OptionalLong(long value) {
         this.isPresent = true;
@@ -96,9 +97,9 @@
     }
 
     /**
-     * Return an {@code OptionalLong} with the specified value present.
+     * Returns an {@code OptionalLong} describing the given value.
      *
-     * @param value the value to be present
+     * @param value the value to describe
      * @return an {@code OptionalLong} with the value present
      */
     public static OptionalLong of(long value) {
@@ -106,12 +107,11 @@
     }
 
     /**
-     * If a value is present in this {@code OptionalLong}, returns the value,
-     * otherwise throws {@code NoSuchElementException}.
+     * If a value is present, returns the value, otherwise throws
+     * {@code NoSuchElementException}.
      *
-     * @return the value held by this {@code OptionalLong}
-     * @throws NoSuchElementException if there is no value present
-     *
+     * @return the value described by this {@code OptionalLong}
+     * @throws NoSuchElementException if no value is present
      * @see OptionalLong#isPresent()
      */
     public long getAsLong() {
@@ -122,21 +122,21 @@
     }
 
     /**
-     * Return {@code true} if there is a value present, otherwise {@code false}.
+     * If a value is present, returns {@code true}, otherwise {@code false}.
      *
-     * @return {@code true} if there is a value present, otherwise {@code false}
+     * @return {@code true} if a value is present, otherwise {@code false}
      */
     public boolean isPresent() {
         return isPresent;
     }
 
     /**
-     * If a value is present, perform the given action with the value,
-     * otherwise do nothing.
+     * If a value is present, performs the given action with the value,
+     * otherwise does nothing.
      *
-     * @param action the action to be performed if a value is present
-     * @throws NullPointerException if a value is present and {@code action} is
-     * null
+     * @param action the action to be performed, if a value is present
+     * @throws NullPointerException if value is present and the given action is
+     *         {@code null}
      */
     public void ifPresent(LongConsumer action) {
         if (isPresent) {
@@ -145,15 +145,16 @@
     }
 
     /**
-     * If a value is present, perform the given action with the value,
-     * otherwise perform the given empty-based action.
+     * If a value is present, performs the given action with the value,
+     * otherwise performs the given empty-based action.
      *
-     * @param action the action to be performed if a value is present
-     * @param emptyAction the empty-based action to be performed if a value is
-     * not present
-     * @throws NullPointerException if a value is present and {@code action} is
-     * null, or a value is not present and {@code emptyAction} is null.
-     * @since 1.9
+     * @param action the action to be performed, if a value is present
+     * @param emptyAction the empty-based action to be performed, if no value is
+     *        present
+     * @throws NullPointerException if a value is present and the given action
+     *         is {@code null}, or no value is present and the given empty-based
+     *         action is {@code null}.
+     * @since 9
      */
     public void ifPresentOrElse(LongConsumer action, Runnable emptyAction) {
         if (isPresent) {
@@ -164,19 +165,19 @@
     }
 
     /**
-     * If a value is present return a sequential {@link LongStream} containing
-     * only that value, otherwise return an empty {@code LongStream}.
+     * If a value is present, returns a sequential {@link LongStream} containing
+     * only that value, otherwise returns an empty {@code LongStream}.
      *
-     * @apiNote This method can be used to transform a {@code Stream} of
-     * optional longs to a {@code LongStream} of present longs:
-     *
+     * @apiNote
+     * This method can be used to transform a {@code Stream} of optional longs
+     * to an {@code LongStream} of present longs:
      * <pre>{@code
      *     Stream<OptionalLong> os = ..
      *     LongStream s = os.flatMapToLong(OptionalLong::stream)
      * }</pre>
      *
-     * @return the optional value as a {@code LongStream}
-     * @since 1.9
+     * @return the optional value as an {@code LongStream}
+     * @since 9
      */
     public LongStream stream() {
         if (isPresent) {
@@ -187,9 +188,10 @@
     }
 
     /**
-     * Return the value if present, otherwise return {@code other}.
+     * If a value is present, returns the value, otherwise returns
+     * {@code other}.
      *
-     * @param other the value to be returned if there is no value present
+     * @param other the value to be returned, if no value is present
      * @return the value, if present, otherwise {@code other}
      */
     public long orElse(long other) {
@@ -197,34 +199,35 @@
     }
 
     /**
-     * Return the value if present, otherwise invoke {@code other} and return
-     * the result of that invocation.
+     * If a value is present, returns the value, otherwise returns the result
+     * produced by the supplying function.
      *
-     * @param other a {@code LongSupplier} whose result is returned if no value
-     * is present
-     * @return the value if present otherwise the result of {@code other.getAsLong()}
-     * @throws NullPointerException if value is not present and {@code other} is
-     * null
+     * @param supplier the supplying function that produces a value to be returned
+     * @return the value, if present, otherwise the result produced by the
+     *         supplying function
+     * @throws NullPointerException if no value is present and the supplying
+     *         function is {@code null}
      */
-    public long orElseGet(LongSupplier other) {
-        return isPresent ? value : other.getAsLong();
+    public long orElseGet(LongSupplier supplier) {
+        return isPresent ? value : supplier.getAsLong();
     }
 
     /**
-     * Return the contained value, if present, otherwise throw an exception
-     * to be created by the provided supplier.
+     * If a value is present, returns the value, otherwise throws an exception
+     * produced by the exception supplying function.
      *
-     * @apiNote A method reference to the exception constructor with an empty
-     * argument list can be used as the supplier. For example,
+     * @apiNote
+     * A method reference to the exception constructor with an empty argument
+     * list can be used as the supplier. For example,
      * {@code IllegalStateException::new}
      *
      * @param <X> Type of the exception to be thrown
-     * @param exceptionSupplier The supplier which will return the exception to
-     * be thrown
-     * @return the present value
-     * @throws X if there is no value present
-     * @throws NullPointerException if no value is present and
-     * {@code exceptionSupplier} is null
+     * @param exceptionSupplier the supplying function that produces an
+     *        exception to be thrown
+     * @return the value, if present
+     * @throws X if no value is present
+     * @throws NullPointerException if no value is present and the exception
+     *         supplying function is {@code null}
      */
     public<X extends Throwable> long orElseThrow(Supplier<? extends X> exceptionSupplier) throws X {
         if (isPresent) {
@@ -235,8 +238,8 @@
     }
 
     /**
-     * Indicates whether some other object is "equal to" this OptionalLong. The
-     * other object is considered equal if:
+     * Indicates whether some other object is "equal to" this
+     * {@code OptionalLong}.  The other object is considered equal if:
      * <ul>
      * <li>it is also an {@code OptionalLong} and;
      * <li>both instances have no value present or;
@@ -245,7 +248,7 @@
      *
      * @param obj an object to be tested for equality
      * @return {@code true} if the other object is "equal to" this object
-     * otherwise {@code false}
+     *         otherwise {@code false}
      */
     @Override
     public boolean equals(Object obj) {
@@ -264,10 +267,11 @@
     }
 
     /**
-     * Returns the hash code value of the present value, if any, or 0 (zero) if
-     * no value is present.
+     * Returns the hash code of the value, if present, otherwise {@code 0}
+     * (zero) if no value is present.
      *
-     * @return hash code value of the present value or 0 if no value is present
+     * @return hash code value of the present value or {@code 0} if no value is
+     *         present
      */
     @Override
     public int hashCode() {
@@ -275,14 +279,13 @@
     }
 
     /**
-     * {@inheritDoc}
+     * Returns a non-empty string representation of this {@code OptionalLong}
+     * suitable for debugging.  The exact presentation format is unspecified and
+     * may vary between implementations and versions.
      *
-     * Returns a non-empty string representation of this object suitable for
-     * debugging. The exact presentation format is unspecified and may vary
-     * between implementations and versions.
-     *
-     * @implSpec If a value is present the result must include its string
-     * representation in the result. Empty and present instances must be
+     * @implSpec
+     * If a value is present the result must include its string representation
+     * in the result.  Empty and present {@code OptionalLong}s must be
      * unambiguously differentiable.
      *
      * @return the string representation of this instance
--- a/jdk/src/java.base/share/classes/java/util/PriorityQueue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/PriorityQueue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -77,7 +77,7 @@
  *
  * @since 1.5
  * @author Josh Bloch, Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this queue
  */
 public class PriorityQueue<E> extends AbstractQueue<E>
     implements java.io.Serializable {
@@ -99,7 +99,7 @@
     /**
      * The number of elements in the priority queue.
      */
-    private int size = 0;
+    int size;
 
     /**
      * The comparator, or null if priority queue uses elements'
@@ -111,7 +111,7 @@
      * The number of times this priority queue has been
      * <i>structurally modified</i>.  See AbstractList for gory details.
      */
-    transient int modCount = 0; // non-private to simplify nested class access
+    transient int modCount;     // non-private to simplify nested class access
 
     /**
      * Creates a {@code PriorityQueue} with the default initial
@@ -448,7 +448,7 @@
      * The following code can be used to dump the queue into a newly
      * allocated array of {@code String}:
      *
-     *  <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
+     * <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
      *
      * Note that {@code toArray(new Object[0])} is identical in function to
      * {@code toArray()}.
@@ -489,7 +489,7 @@
          * Index (into queue array) of element to be returned by
          * subsequent call to next.
          */
-        private int cursor = 0;
+        private int cursor;
 
         /**
          * Index of element returned by most recent call to next,
@@ -509,13 +509,13 @@
          * We expect that most iterations, even those involving removals,
          * will not need to store elements in this field.
          */
-        private ArrayDeque<E> forgetMeNot = null;
+        private ArrayDeque<E> forgetMeNot;
 
         /**
          * Element returned by the most recent call to next iff that
          * element was drawn from the forgetMeNot list.
          */
-        private E lastRetElt = null;
+        private E lastRetElt;
 
         /**
          * The modCount value that the iterator believes that the backing
@@ -609,7 +609,7 @@
      * avoid missing traversing elements.
      */
     @SuppressWarnings("unchecked")
-    private E removeAt(int i) {
+    E removeAt(int i) {
         // assert i >= 0 && i < size;
         modCount++;
         int s = --size;
@@ -756,6 +756,7 @@
      *             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 {
@@ -775,6 +776,9 @@
      * (that is, deserializes it).
      *
      * @param s the stream
+     * @throws ClassNotFoundException if the class of a serialized object
+     *         could not be found
+     * @throws java.io.IOException if an I/O error occurs
      */
     private void readObject(java.io.ObjectInputStream s)
         throws java.io.IOException, ClassNotFoundException {
@@ -822,9 +826,9 @@
         private int fence;            // -1 until first use
         private int expectedModCount; // initialized when fence set
 
-        /** Creates new spliterator covering the given range */
+        /** Creates new spliterator covering the given range. */
         PriorityQueueSpliterator(PriorityQueue<E> pq, int origin, int fence,
-                             int expectedModCount) {
+                                 int expectedModCount) {
             this.pq = pq;
             this.index = origin;
             this.fence = fence;
--- a/jdk/src/java.base/share/classes/java/util/Queue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/Queue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -139,7 +139,7 @@
  * @see java.util.concurrent.PriorityBlockingQueue
  * @since 1.5
  * @author Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this queue
  */
 public interface Queue<E> extends Collection<E> {
     /**
--- a/jdk/src/java.base/share/classes/java/util/SplittableRandom.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/SplittableRandom.java	Tue Oct 27 01:45:03 2015 -0400
@@ -26,13 +26,13 @@
 package java.util;
 
 import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.DoubleConsumer;
 import java.util.function.IntConsumer;
 import java.util.function.LongConsumer;
-import java.util.function.DoubleConsumer;
-import java.util.stream.StreamSupport;
+import java.util.stream.DoubleStream;
 import java.util.stream.IntStream;
 import java.util.stream.LongStream;
-import java.util.stream.DoubleStream;
+import java.util.stream.StreamSupport;
 
 /**
  * A generator of uniform pseudorandom values applicable for use in
@@ -52,15 +52,15 @@
  * types and ranges, but similar properties are expected to hold, at
  * least approximately, for others as well. The <em>period</em>
  * (length of any series of generated values before it repeats) is at
- * least 2<sup>64</sup>. </li>
+ * least 2<sup>64</sup>.
  *
- * <li> Method {@link #split} constructs and returns a new
+ * <li>Method {@link #split} constructs and returns a new
  * SplittableRandom instance that shares no mutable state with the
  * current instance. However, with very high probability, the
  * values collectively generated by the two objects have the same
  * statistical properties as if the same quantity of values were
  * generated by a single thread using a single {@code
- * SplittableRandom} object.  </li>
+ * SplittableRandom} object.
  *
  * <li>Instances of SplittableRandom are <em>not</em> thread-safe.
  * They are designed to be split, not shared, across threads. For
@@ -71,7 +71,7 @@
  *
  * <li>This class provides additional methods for generating random
  * streams, that employ the above techniques when used in {@code
- * stream.parallel()} mode.</li>
+ * stream.parallel()} mode.
  *
  * </ul>
  *
@@ -240,9 +240,9 @@
     }
 
     // IllegalArgumentException messages
-    static final String BadBound = "bound must be positive";
-    static final String BadRange = "bound must be greater than origin";
-    static final String BadSize  = "size must be non-negative";
+    static final String BAD_BOUND = "bound must be positive";
+    static final String BAD_RANGE = "bound must be greater than origin";
+    static final String BAD_SIZE  = "size must be non-negative";
 
     /*
      * Internal versions of nextX methods used by streams, as well as
@@ -416,7 +416,7 @@
      */
     public int nextInt(int bound) {
         if (bound <= 0)
-            throw new IllegalArgumentException(BadBound);
+            throw new IllegalArgumentException(BAD_BOUND);
         // Specialize internalNextInt for origin 0
         int r = mix32(nextSeed());
         int m = bound - 1;
@@ -444,7 +444,7 @@
      */
     public int nextInt(int origin, int bound) {
         if (origin >= bound)
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return internalNextInt(origin, bound);
     }
 
@@ -468,7 +468,7 @@
      */
     public long nextLong(long bound) {
         if (bound <= 0)
-            throw new IllegalArgumentException(BadBound);
+            throw new IllegalArgumentException(BAD_BOUND);
         // Specialize internalNextLong for origin 0
         long r = mix64(nextSeed());
         long m = bound - 1;
@@ -496,7 +496,7 @@
      */
     public long nextLong(long origin, long bound) {
         if (origin >= bound)
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return internalNextLong(origin, bound);
     }
 
@@ -522,7 +522,7 @@
      */
     public double nextDouble(double bound) {
         if (!(bound > 0.0))
-            throw new IllegalArgumentException(BadBound);
+            throw new IllegalArgumentException(BAD_BOUND);
         double result = (mix64(nextSeed()) >>> 11) * DOUBLE_UNIT * bound;
         return (result < bound) ?  result : // correct for rounding
             Double.longBitsToDouble(Double.doubleToLongBits(bound) - 1);
@@ -541,7 +541,7 @@
      */
     public double nextDouble(double origin, double bound) {
         if (!(origin < bound))
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return internalNextDouble(origin, bound);
     }
 
@@ -569,7 +569,7 @@
      */
     public IntStream ints(long streamSize) {
         if (streamSize < 0L)
-            throw new IllegalArgumentException(BadSize);
+            throw new IllegalArgumentException(BAD_SIZE);
         return StreamSupport.intStream
             (new RandomIntsSpliterator
              (this, 0L, streamSize, Integer.MAX_VALUE, 0),
@@ -610,9 +610,9 @@
     public IntStream ints(long streamSize, int randomNumberOrigin,
                           int randomNumberBound) {
         if (streamSize < 0L)
-            throw new IllegalArgumentException(BadSize);
+            throw new IllegalArgumentException(BAD_SIZE);
         if (randomNumberOrigin >= randomNumberBound)
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return StreamSupport.intStream
             (new RandomIntsSpliterator
              (this, 0L, streamSize, randomNumberOrigin, randomNumberBound),
@@ -636,7 +636,7 @@
      */
     public IntStream ints(int randomNumberOrigin, int randomNumberBound) {
         if (randomNumberOrigin >= randomNumberBound)
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return StreamSupport.intStream
             (new RandomIntsSpliterator
              (this, 0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
@@ -655,7 +655,7 @@
      */
     public LongStream longs(long streamSize) {
         if (streamSize < 0L)
-            throw new IllegalArgumentException(BadSize);
+            throw new IllegalArgumentException(BAD_SIZE);
         return StreamSupport.longStream
             (new RandomLongsSpliterator
              (this, 0L, streamSize, Long.MAX_VALUE, 0L),
@@ -696,9 +696,9 @@
     public LongStream longs(long streamSize, long randomNumberOrigin,
                             long randomNumberBound) {
         if (streamSize < 0L)
-            throw new IllegalArgumentException(BadSize);
+            throw new IllegalArgumentException(BAD_SIZE);
         if (randomNumberOrigin >= randomNumberBound)
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return StreamSupport.longStream
             (new RandomLongsSpliterator
              (this, 0L, streamSize, randomNumberOrigin, randomNumberBound),
@@ -722,7 +722,7 @@
      */
     public LongStream longs(long randomNumberOrigin, long randomNumberBound) {
         if (randomNumberOrigin >= randomNumberBound)
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return StreamSupport.longStream
             (new RandomLongsSpliterator
              (this, 0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
@@ -741,7 +741,7 @@
      */
     public DoubleStream doubles(long streamSize) {
         if (streamSize < 0L)
-            throw new IllegalArgumentException(BadSize);
+            throw new IllegalArgumentException(BAD_SIZE);
         return StreamSupport.doubleStream
             (new RandomDoublesSpliterator
              (this, 0L, streamSize, Double.MAX_VALUE, 0.0),
@@ -784,9 +784,9 @@
     public DoubleStream doubles(long streamSize, double randomNumberOrigin,
                                 double randomNumberBound) {
         if (streamSize < 0L)
-            throw new IllegalArgumentException(BadSize);
+            throw new IllegalArgumentException(BAD_SIZE);
         if (!(randomNumberOrigin < randomNumberBound))
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return StreamSupport.doubleStream
             (new RandomDoublesSpliterator
              (this, 0L, streamSize, randomNumberOrigin, randomNumberBound),
@@ -810,7 +810,7 @@
      */
     public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound) {
         if (!(randomNumberOrigin < randomNumberBound))
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return StreamSupport.doubleStream
             (new RandomDoublesSpliterator
              (this, 0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
@@ -825,7 +825,8 @@
      * approach. The long and double versions of this class are
      * identical except for types.
      */
-    static final class RandomIntsSpliterator implements Spliterator.OfInt {
+    private static final class RandomIntsSpliterator
+            implements Spliterator.OfInt {
         final SplittableRandom rng;
         long index;
         final long fence;
@@ -880,7 +881,8 @@
     /**
      * Spliterator for long streams.
      */
-    static final class RandomLongsSpliterator implements Spliterator.OfLong {
+    private static final class RandomLongsSpliterator
+            implements Spliterator.OfLong {
         final SplittableRandom rng;
         long index;
         final long fence;
@@ -936,7 +938,8 @@
     /**
      * Spliterator for double streams.
      */
-    static final class RandomDoublesSpliterator implements Spliterator.OfDouble {
+    private static final class RandomDoublesSpliterator
+            implements Spliterator.OfDouble {
         final SplittableRandom rng;
         long index;
         final long fence;
--- a/jdk/src/java.base/share/classes/java/util/concurrent/AbstractExecutorService.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/AbstractExecutorService.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,7 +34,13 @@
  */
 
 package java.util.concurrent;
-import java.util.*;
+
+import static java.util.concurrent.TimeUnit.NANOSECONDS;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
 
 /**
  * Provides default implementations of {@link ExecutorService}
@@ -51,7 +57,7 @@
  * <p><b>Extension example</b>. Here is a sketch of a class
  * that customizes {@link ThreadPoolExecutor} to use
  * a {@code CustomTask} class instead of the default {@code FutureTask}:
- *  <pre> {@code
+ * <pre> {@code
  * public class CustomThreadPoolExecutor extends ThreadPoolExecutor {
  *
  *   static class CustomTask<V> implements RunnableFuture<V> {...}
@@ -146,7 +152,7 @@
         int ntasks = tasks.size();
         if (ntasks == 0)
             throw new IllegalArgumentException();
-        ArrayList<Future<T>> futures = new ArrayList<Future<T>>(ntasks);
+        ArrayList<Future<T>> futures = new ArrayList<>(ntasks);
         ExecutorCompletionService<T> ecs =
             new ExecutorCompletionService<T>(this);
 
@@ -179,7 +185,7 @@
                     else if (active == 0)
                         break;
                     else if (timed) {
-                        f = ecs.poll(nanos, TimeUnit.NANOSECONDS);
+                        f = ecs.poll(nanos, NANOSECONDS);
                         if (f == null)
                             throw new TimeoutException();
                         nanos = deadline - System.nanoTime();
@@ -204,8 +210,7 @@
             throw ee;
 
         } finally {
-            for (int i = 0, size = futures.size(); i < size; i++)
-                futures.get(i).cancel(true);
+            cancelAll(futures);
         }
     }
 
@@ -229,8 +234,7 @@
         throws InterruptedException {
         if (tasks == null)
             throw new NullPointerException();
-        ArrayList<Future<T>> futures = new ArrayList<Future<T>>(tasks.size());
-        boolean done = false;
+        ArrayList<Future<T>> futures = new ArrayList<>(tasks.size());
         try {
             for (Callable<T> t : tasks) {
                 RunnableFuture<T> f = newTaskFor(t);
@@ -240,19 +244,15 @@
             for (int i = 0, size = futures.size(); i < size; i++) {
                 Future<T> f = futures.get(i);
                 if (!f.isDone()) {
-                    try {
-                        f.get();
-                    } catch (CancellationException ignore) {
-                    } catch (ExecutionException ignore) {
-                    }
+                    try { f.get(); }
+                    catch (CancellationException ignore) {}
+                    catch (ExecutionException ignore) {}
                 }
             }
-            done = true;
             return futures;
-        } finally {
-            if (!done)
-                for (int i = 0, size = futures.size(); i < size; i++)
-                    futures.get(i).cancel(true);
+        } catch (Throwable t) {
+            cancelAll(futures);
+            throw t;
         }
     }
 
@@ -261,47 +261,52 @@
         throws InterruptedException {
         if (tasks == null)
             throw new NullPointerException();
-        long nanos = unit.toNanos(timeout);
-        ArrayList<Future<T>> futures = new ArrayList<Future<T>>(tasks.size());
-        boolean done = false;
-        try {
+        final long nanos = unit.toNanos(timeout);
+        final long deadline = System.nanoTime() + nanos;
+        ArrayList<Future<T>> futures = new ArrayList<>(tasks.size());
+        int j = 0;
+        timedOut: try {
             for (Callable<T> t : tasks)
                 futures.add(newTaskFor(t));
 
-            final long deadline = System.nanoTime() + nanos;
             final int size = futures.size();
 
             // Interleave time checks and calls to execute in case
             // executor doesn't have any/much parallelism.
             for (int i = 0; i < size; i++) {
+                if (((i == 0) ? nanos : deadline - System.nanoTime()) <= 0L)
+                    break timedOut;
                 execute((Runnable)futures.get(i));
-                nanos = deadline - System.nanoTime();
-                if (nanos <= 0L)
-                    return futures;
             }
 
-            for (int i = 0; i < size; i++) {
-                Future<T> f = futures.get(i);
+            for (; j < size; j++) {
+                Future<T> f = futures.get(j);
                 if (!f.isDone()) {
-                    if (nanos <= 0L)
-                        return futures;
-                    try {
-                        f.get(nanos, TimeUnit.NANOSECONDS);
-                    } catch (CancellationException ignore) {
-                    } catch (ExecutionException ignore) {
-                    } catch (TimeoutException toe) {
-                        return futures;
+                    try { f.get(deadline - System.nanoTime(), NANOSECONDS); }
+                    catch (CancellationException ignore) {}
+                    catch (ExecutionException ignore) {}
+                    catch (TimeoutException timedOut) {
+                        break timedOut;
                     }
-                    nanos = deadline - System.nanoTime();
                 }
             }
-            done = true;
             return futures;
-        } finally {
-            if (!done)
-                for (int i = 0, size = futures.size(); i < size; i++)
-                    futures.get(i).cancel(true);
+        } catch (Throwable t) {
+            cancelAll(futures);
+            throw t;
         }
+        // Timed out before all the tasks could be completed; cancel remaining
+        cancelAll(futures, j);
+        return futures;
     }
 
+    private static <T> void cancelAll(ArrayList<Future<T>> futures) {
+        cancelAll(futures, 0);
+    }
+
+    /** Cancels all futures with index at least j. */
+    private static <T> void cancelAll(ArrayList<Future<T>> futures, int j) {
+        for (int size = futures.size(); j < size; j++)
+            futures.get(j).cancel(true);
+    }
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,15 +34,18 @@
  */
 
 package java.util.concurrent;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.ReentrantLock;
+
+import java.lang.ref.WeakReference;
 import java.util.AbstractQueue;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
-import java.lang.ref.WeakReference;
+import java.util.Objects;
+import java.util.Spliterator;
 import java.util.Spliterators;
-import java.util.Spliterator;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.ReentrantLock;
 
 /**
  * A bounded {@linkplain BlockingQueue blocking queue} backed by an
@@ -77,7 +80,7 @@
  *
  * @since 1.5
  * @author Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this queue
  */
 public class ArrayBlockingQueue<E> extends AbstractQueue<E>
         implements BlockingQueue<E>, java.io.Serializable {
@@ -121,12 +124,12 @@
      * are known not to be any.  Allows queue operations to update
      * iterator state.
      */
-    transient Itrs itrs = null;
+    transient Itrs itrs;
 
     // Internal helper methods
 
     /**
-     * Circularly decrement i.
+     * Circularly decrements array index i.
      */
     final int dec(int i) {
         return ((i == 0) ? items.length : i) - 1;
@@ -141,16 +144,6 @@
     }
 
     /**
-     * Throws NullPointerException if argument is null.
-     *
-     * @param v the element
-     */
-    private static void checkNotNull(Object v) {
-        if (v == null)
-            throw new NullPointerException();
-    }
-
-    /**
      * Inserts element at current put position, advances, and signals.
      * Call only when holding lock.
      */
@@ -159,8 +152,7 @@
         // assert items[putIndex] == null;
         final Object[] items = this.items;
         items[putIndex] = x;
-        if (++putIndex == items.length)
-            putIndex = 0;
+        if (++putIndex == items.length) putIndex = 0;
         count++;
         notEmpty.signal();
     }
@@ -176,8 +168,7 @@
         @SuppressWarnings("unchecked")
         E x = (E) items[takeIndex];
         items[takeIndex] = null;
-        if (++takeIndex == items.length)
-            takeIndex = 0;
+        if (++takeIndex == items.length) takeIndex = 0;
         count--;
         if (itrs != null)
             itrs.elementDequeued();
@@ -198,8 +189,7 @@
         if (removeIndex == takeIndex) {
             // removing front item; just advance
             items[takeIndex] = null;
-            if (++takeIndex == items.length)
-                takeIndex = 0;
+            if (++takeIndex == items.length) takeIndex = 0;
             count--;
             if (itrs != null)
                 itrs.elementDequeued();
@@ -207,19 +197,15 @@
             // an "interior" remove
 
             // slide over all others up through putIndex.
-            final int putIndex = this.putIndex;
-            for (int i = removeIndex;;) {
-                int next = i + 1;
-                if (next == items.length)
-                    next = 0;
-                if (next != putIndex) {
-                    items[i] = items[next];
-                    i = next;
-                } else {
-                    items[i] = null;
-                    this.putIndex = i;
+            for (int i = removeIndex, putIndex = this.putIndex;;) {
+                int pred = i;
+                if (++i == items.length) i = 0;
+                if (i == putIndex) {
+                    items[pred] = null;
+                    this.putIndex = pred;
                     break;
                 }
+                items[pred] = items[i];
             }
             count--;
             if (itrs != null)
@@ -283,10 +269,8 @@
         try {
             int i = 0;
             try {
-                for (E e : c) {
-                    checkNotNull(e);
-                    items[i++] = e;
-                }
+                for (E e : c)
+                    items[i++] = Objects.requireNonNull(e);
             } catch (ArrayIndexOutOfBoundsException ex) {
                 throw new IllegalArgumentException();
             }
@@ -322,7 +306,7 @@
      * @throws NullPointerException if the specified element is null
      */
     public boolean offer(E e) {
-        checkNotNull(e);
+        Objects.requireNonNull(e);
         final ReentrantLock lock = this.lock;
         lock.lock();
         try {
@@ -345,7 +329,7 @@
      * @throws NullPointerException {@inheritDoc}
      */
     public void put(E e) throws InterruptedException {
-        checkNotNull(e);
+        Objects.requireNonNull(e);
         final ReentrantLock lock = this.lock;
         lock.lockInterruptibly();
         try {
@@ -368,13 +352,13 @@
     public boolean offer(E e, long timeout, TimeUnit unit)
         throws InterruptedException {
 
-        checkNotNull(e);
+        Objects.requireNonNull(e);
         long nanos = unit.toNanos(timeout);
         final ReentrantLock lock = this.lock;
         lock.lockInterruptibly();
         try {
             while (count == items.length) {
-                if (nanos <= 0)
+                if (nanos <= 0L)
                     return false;
                 nanos = notFull.awaitNanos(nanos);
             }
@@ -413,7 +397,7 @@
         lock.lockInterruptibly();
         try {
             while (count == 0) {
-                if (nanos <= 0)
+                if (nanos <= 0L)
                     return null;
                 nanos = notEmpty.awaitNanos(nanos);
             }
@@ -492,11 +476,11 @@
      */
     public boolean remove(Object o) {
         if (o == null) return false;
-        final Object[] items = this.items;
         final ReentrantLock lock = this.lock;
         lock.lock();
         try {
             if (count > 0) {
+                final Object[] items = this.items;
                 final int putIndex = this.putIndex;
                 int i = takeIndex;
                 do {
@@ -504,8 +488,7 @@
                         removeAt(i);
                         return true;
                     }
-                    if (++i == items.length)
-                        i = 0;
+                    if (++i == items.length) i = 0;
                 } while (i != putIndex);
             }
             return false;
@@ -524,18 +507,17 @@
      */
     public boolean contains(Object o) {
         if (o == null) return false;
-        final Object[] items = this.items;
         final ReentrantLock lock = this.lock;
         lock.lock();
         try {
             if (count > 0) {
+                final Object[] items = this.items;
                 final int putIndex = this.putIndex;
                 int i = takeIndex;
                 do {
                     if (o.equals(items[i]))
                         return true;
-                    if (++i == items.length)
-                        i = 0;
+                    if (++i == items.length) i = 0;
                 } while (i != putIndex);
             }
             return false;
@@ -558,23 +540,18 @@
      * @return an array containing all of the elements in this queue
      */
     public Object[] toArray() {
-        Object[] a;
         final ReentrantLock lock = this.lock;
         lock.lock();
         try {
-            final int count = this.count;
-            a = new Object[count];
-            int n = items.length - takeIndex;
-            if (count <= n)
-                System.arraycopy(items, takeIndex, a, 0, count);
-            else {
-                System.arraycopy(items, takeIndex, a, 0, n);
-                System.arraycopy(items, 0, a, n, count - n);
-            }
+            final Object[] items = this.items;
+            final int end = takeIndex + count;
+            final Object[] a = Arrays.copyOfRange(items, takeIndex, end);
+            if (end != putIndex)
+                System.arraycopy(items, 0, a, items.length - takeIndex, putIndex);
+            return a;
         } finally {
             lock.unlock();
         }
-        return a;
     }
 
     /**
@@ -598,7 +575,7 @@
      * The following code can be used to dump the queue into a newly
      * allocated array of {@code String}:
      *
-     *  <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
+     * <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
      *
      * Note that {@code toArray(new Object[0])} is identical in function to
      * {@code toArray()}.
@@ -614,53 +591,30 @@
      */
     @SuppressWarnings("unchecked")
     public <T> T[] toArray(T[] a) {
-        final Object[] items = this.items;
         final ReentrantLock lock = this.lock;
         lock.lock();
         try {
+            final Object[] items = this.items;
             final int count = this.count;
-            final int len = a.length;
-            if (len < count)
-                a = (T[])java.lang.reflect.Array.newInstance(
-                    a.getClass().getComponentType(), count);
-            int n = items.length - takeIndex;
-            if (count <= n)
-                System.arraycopy(items, takeIndex, a, 0, count);
-            else {
-                System.arraycopy(items, takeIndex, a, 0, n);
-                System.arraycopy(items, 0, a, n, count - n);
+            final int firstLeg = Math.min(items.length - takeIndex, count);
+            if (a.length < count) {
+                a = (T[]) Arrays.copyOfRange(items, takeIndex, takeIndex + count,
+                                             a.getClass());
+            } else {
+                System.arraycopy(items, takeIndex, a, 0, firstLeg);
+                if (a.length > count)
+                    a[count] = null;
             }
-            if (len > count)
-                a[count] = null;
+            if (firstLeg < count)
+                System.arraycopy(items, 0, a, firstLeg, putIndex);
+            return a;
         } finally {
             lock.unlock();
         }
-        return a;
     }
 
     public String toString() {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
-            int k = count;
-            if (k == 0)
-                return "[]";
-
-            final Object[] items = this.items;
-            StringBuilder sb = new StringBuilder();
-            sb.append('[');
-            for (int i = takeIndex; ; ) {
-                Object e = items[i];
-                sb.append(e == this ? "(this Collection)" : e);
-                if (--k == 0)
-                    return sb.append(']').toString();
-                sb.append(',').append(' ');
-                if (++i == items.length)
-                    i = 0;
-            }
-        } finally {
-            lock.unlock();
-        }
+        return Helpers.collectionToString(this);
     }
 
     /**
@@ -668,18 +622,17 @@
      * The queue will be empty after this call returns.
      */
     public void clear() {
-        final Object[] items = this.items;
         final ReentrantLock lock = this.lock;
         lock.lock();
         try {
             int k = count;
             if (k > 0) {
+                final Object[] items = this.items;
                 final int putIndex = this.putIndex;
                 int i = takeIndex;
                 do {
                     items[i] = null;
-                    if (++i == items.length)
-                        i = 0;
+                    if (++i == items.length) i = 0;
                 } while (i != putIndex);
                 takeIndex = putIndex;
                 count = 0;
@@ -710,7 +663,7 @@
      * @throws IllegalArgumentException      {@inheritDoc}
      */
     public int drainTo(Collection<? super E> c, int maxElements) {
-        checkNotNull(c);
+        Objects.requireNonNull(c);
         if (c == this)
             throw new IllegalArgumentException();
         if (maxElements <= 0)
@@ -728,8 +681,7 @@
                     E x = (E) items[take];
                     c.add(x);
                     items[take] = null;
-                    if (++take == items.length)
-                        take = 0;
+                    if (++take == items.length) take = 0;
                     i++;
                 }
                 return n;
@@ -832,13 +784,13 @@
         }
 
         /** Incremented whenever takeIndex wraps around to 0 */
-        int cycles = 0;
+        int cycles;
 
         /** Linked list of weak iterator references */
         private Node head;
 
         /** Used to expunge stale iterators */
-        private Node sweeper = null;
+        private Node sweeper;
 
         private static final int SHORT_SWEEP_PROBES = 4;
         private static final int LONG_SWEEP_PROBES = 16;
@@ -1095,10 +1047,8 @@
 
         private int incCursor(int index) {
             // assert lock.getHoldCount() == 1;
-            if (++index == items.length)
-                index = 0;
-            if (index == putIndex)
-                index = NONE;
+            if (++index == items.length) index = 0;
+            if (index == putIndex) index = NONE;
             return index;
         }
 
@@ -1314,17 +1264,18 @@
             if (isDetached())
                 return true;
 
-            final int cycles = itrs.cycles;
             final int takeIndex = ArrayBlockingQueue.this.takeIndex;
-            final int prevCycles = this.prevCycles;
             final int prevTakeIndex = this.prevTakeIndex;
             final int len = items.length;
-            int cycleDiff = cycles - prevCycles;
-            if (removedIndex < takeIndex)
-                cycleDiff++;
+            // distance from prevTakeIndex to removedIndex
             final int removedDistance =
-                (cycleDiff * len) + (removedIndex - prevTakeIndex);
-            // assert removedDistance >= 0;
+                len * (itrs.cycles - this.prevCycles
+                       + ((removedIndex < takeIndex) ? 1 : 0))
+                + (removedIndex - prevTakeIndex);
+            // assert itrs.cycles - this.prevCycles >= 0;
+            // assert itrs.cycles - this.prevCycles <= 1;
+            // assert removedDistance > 0;
+            // assert removedIndex != takeIndex;
             int cursor = this.cursor;
             if (cursor >= 0) {
                 int x = distance(cursor, prevTakeIndex, len);
@@ -1353,7 +1304,7 @@
                 else if (x > removedDistance)
                     this.nextIndex = nextIndex = dec(nextIndex);
             }
-            else if (cursor < 0 && nextIndex < 0 && lastRet < 0) {
+            if (cursor < 0 && nextIndex < 0 && lastRet < 0) {
                 this.prevTakeIndex = DETACHED;
                 return true;
             }
@@ -1410,8 +1361,9 @@
      */
     public Spliterator<E> spliterator() {
         return Spliterators.spliterator
-            (this, Spliterator.ORDERED | Spliterator.NONNULL |
-             Spliterator.CONCURRENT);
+            (this, (Spliterator.ORDERED |
+                    Spliterator.NONNULL |
+                    Spliterator.CONCURRENT));
     }
 
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,7 +34,10 @@
  */
 
 package java.util.concurrent;
-import java.util.*;
+
+import java.util.Deque;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
 
 /**
  * A {@link Deque} that additionally supports blocking operations that wait
@@ -195,7 +198,7 @@
  *
  * @since 1.6
  * @author Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this deque
  */
 public interface BlockingDeque<E> extends BlockingQueue<E>, Deque<E> {
     /*
@@ -401,9 +404,9 @@
      * @return {@code true} if an element was removed as a result of this call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean removeFirstOccurrence(Object o);
 
@@ -419,9 +422,9 @@
      * @return {@code true} if an element was removed as a result of this call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean removeLastOccurrence(Object o);
 
@@ -596,9 +599,9 @@
      * @return {@code true} if this deque changed as a result of the call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean remove(Object o);
 
@@ -611,18 +614,18 @@
      * @return {@code true} if this deque contains the specified element
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      */
-    public boolean contains(Object o);
+    boolean contains(Object o);
 
     /**
      * Returns the number of elements in this deque.
      *
      * @return the number of elements in this deque
      */
-    public int size();
+    int size();
 
     /**
      * Returns an iterator over the elements in this deque in proper sequence.
--- a/jdk/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -127,7 +127,7 @@
  * Usage example, based on a typical producer-consumer scenario.
  * Note that a {@code BlockingQueue} can safely be used with multiple
  * producers and multiple consumers.
- *  <pre> {@code
+ * <pre> {@code
  * class Producer implements Runnable {
  *   private final BlockingQueue queue;
  *   Producer(BlockingQueue q) { queue = q; }
@@ -175,7 +175,7 @@
  *
  * @since 1.5
  * @author Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this queue
  */
 public interface BlockingQueue<E> extends Queue<E> {
     /**
@@ -303,9 +303,9 @@
      * @return {@code true} if this queue changed as a result of the call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this queue
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean remove(Object o);
 
@@ -318,11 +318,11 @@
      * @return {@code true} if this queue contains the specified element
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this queue
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      */
-    public boolean contains(Object o);
+    boolean contains(Object o);
 
     /**
      * Removes all available elements from this queue and adds them
--- a/jdk/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,23 +34,13 @@
  */
 
 package java.util.concurrent;
-import java.util.function.Supplier;
-import java.util.function.Consumer;
+
+import java.util.concurrent.locks.LockSupport;
 import java.util.function.BiConsumer;
-import java.util.function.Function;
 import java.util.function.BiFunction;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.ForkJoinPool;
-import java.util.concurrent.ForkJoinTask;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ThreadLocalRandom;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.CompletionException;
-import java.util.concurrent.CompletionStage;
-import java.util.concurrent.locks.LockSupport;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Supplier;
 
 /**
  * A {@link Future} that may be explicitly completed (setting its
@@ -71,19 +61,32 @@
  * <li>Actions supplied for dependent completions of
  * <em>non-async</em> methods may be performed by the thread that
  * completes the current CompletableFuture, or by any other caller of
- * a completion method.</li>
+ * a completion method.
  *
  * <li>All <em>async</em> methods without an explicit Executor
  * argument are performed using the {@link ForkJoinPool#commonPool()}
  * (unless it does not support a parallelism level of at least two, in
- * which case, a new Thread is created to run each task).  To simplify
- * monitoring, debugging, and tracking, all generated asynchronous
- * tasks are instances of the marker interface {@link
- * AsynchronousCompletionTask}. </li>
+ * which case, a new Thread is created to run each task).  This may be
+ * overridden for non-static methods in subclasses by defining method
+ * {@link #defaultExecutor()}. To simplify monitoring, debugging,
+ * and tracking, all generated asynchronous tasks are instances of the
+ * marker interface {@link AsynchronousCompletionTask}.  Operations
+ * with time-delays can use adapter methods defined in this class, for
+ * example: {@code supplyAsync(supplier, delayedExecutor(timeout,
+ * timeUnit))}.  To support methods with delays and timeouts, this
+ * class maintains at most one daemon thread for triggering and
+ * cancelling actions, not for running them.
  *
  * <li>All CompletionStage methods are implemented independently of
  * other public methods, so the behavior of one method is not impacted
- * by overrides of others in subclasses.  </li> </ul>
+ * by overrides of others in subclasses.
+ *
+ * <li>All CompletionStage methods return CompletableFutures.  To
+ * restrict usages to only those methods defined in interface
+ * CompletionStage, use method {@link #minimalCompletionStage}. Or to
+ * ensure only that clients do not themselves modify a future, use
+ * method {@link #copy}.
+ * </ul>
  *
  * <p>CompletableFuture also implements {@link Future} with the following
  * policies: <ul>
@@ -94,7 +97,7 @@
  * completion.  Method {@link #cancel cancel} has the same effect as
  * {@code completeExceptionally(new CancellationException())}. Method
  * {@link #isCompletedExceptionally} can be used to determine if a
- * CompletableFuture completed in any exceptional fashion.</li>
+ * CompletableFuture completed in any exceptional fashion.
  *
  * <li>In case of exceptional completion with a CompletionException,
  * methods {@link #get()} and {@link #get(long, TimeUnit)} throw an
@@ -102,10 +105,38 @@
  * corresponding CompletionException.  To simplify usage in most
  * contexts, this class also defines methods {@link #join()} and
  * {@link #getNow} that instead throw the CompletionException directly
- * in these cases.</li> </ul>
+ * in these cases.
+ * </ul>
+ *
+ * <p>Arguments used to pass a completion result (that is, for
+ * parameters of type {@code T}) for methods accepting them may be
+ * null, but passing a null value for any other parameter will result
+ * in a {@link NullPointerException} being thrown.
+ *
+ * <p>Subclasses of this class should normally override the "virtual
+ * constructor" method {@link #newIncompleteFuture}, which establishes
+ * the concrete type returned by CompletionStage methods. For example,
+ * here is a class that substitutes a different default Executor and
+ * disables the {@code obtrude} methods:
+ *
+ * <pre> {@code
+ * class MyCompletableFuture<T> extends CompletableFuture<T> {
+ *   static final Executor myExecutor = ...;
+ *   public MyCompletableFuture() { }
+ *   public <U> CompletableFuture<U> newIncompleteFuture() {
+ *     return new MyCompletableFuture<U>(); }
+ *   public Executor defaultExecutor() {
+ *     return myExecutor; }
+ *   public void obtrudeValue(T value) {
+ *     throw new UnsupportedOperationException(); }
+ *   public void obtrudeException(Throwable ex) {
+ *     throw new UnsupportedOperationException(); }
+ * }}</pre>
  *
  * @author Doug Lea
  * @since 1.8
+ * @param <T> The result type returned by this future's {@code join}
+ * and {@code get} methods
  */
 public class CompletableFuture<T> implements Future<T>, CompletionStage<T> {
 
@@ -150,9 +181,7 @@
      *   fields for source(s), actions, and dependent. They are
      *   boringly similar, differing from others only with respect to
      *   underlying functional forms. We do this so that users don't
-     *   encounter layers of adaptors in common usages. We also
-     *   include "Relay" classes/methods that don't correspond to user
-     *   methods; they copy results from one stage to another.
+     *   encounter layers of adapters in common usages.
      *
      * * Boolean CompletableFuture method x(...) (for example
      *   uniApply) takes all of the arguments needed to check that an
@@ -219,18 +248,18 @@
     volatile Completion stack;    // Top of Treiber stack of dependent actions
 
     final boolean internalComplete(Object r) { // CAS from null to r
-        return UNSAFE.compareAndSwapObject(this, RESULT, null, r);
+        return U.compareAndSwapObject(this, RESULT, null, r);
     }
 
     final boolean casStack(Completion cmp, Completion val) {
-        return UNSAFE.compareAndSwapObject(this, STACK, cmp, val);
+        return U.compareAndSwapObject(this, STACK, cmp, val);
     }
 
     /** Returns true if successfully pushed c onto stack. */
     final boolean tryPushStack(Completion c) {
         Completion h = stack;
         lazySetNext(c, h);
-        return UNSAFE.compareAndSwapObject(this, STACK, h, c);
+        return U.compareAndSwapObject(this, STACK, h, c);
     }
 
     /** Unconditionally pushes c onto stack, retrying if necessary. */
@@ -250,8 +279,8 @@
 
     /** Completes with the null value, unless already completed. */
     final boolean completeNull() {
-        return UNSAFE.compareAndSwapObject(this, RESULT, null,
-                                           NIL);
+        return U.compareAndSwapObject(this, RESULT, null,
+                                      NIL);
     }
 
     /** Returns the encoding of the given non-exceptional value. */
@@ -261,8 +290,8 @@
 
     /** Completes with a non-exceptional result, unless already completed. */
     final boolean completeValue(T t) {
-        return UNSAFE.compareAndSwapObject(this, RESULT, null,
-                                           (t == null) ? NIL : t);
+        return U.compareAndSwapObject(this, RESULT, null,
+                                      (t == null) ? NIL : t);
     }
 
     /**
@@ -276,8 +305,8 @@
 
     /** Completes with an exceptional result, unless already completed. */
     final boolean completeThrowable(Throwable x) {
-        return UNSAFE.compareAndSwapObject(this, RESULT, null,
-                                           encodeThrowable(x));
+        return U.compareAndSwapObject(this, RESULT, null,
+                                      encodeThrowable(x));
     }
 
     /**
@@ -304,8 +333,8 @@
      * existing CompletionException.
      */
     final boolean completeThrowable(Throwable x, Object r) {
-        return UNSAFE.compareAndSwapObject(this, RESULT, null,
-                                           encodeThrowable(x, r));
+        return U.compareAndSwapObject(this, RESULT, null,
+                                      encodeThrowable(x, r));
     }
 
     /**
@@ -334,8 +363,8 @@
      * If exceptional, r is first coerced to a CompletionException.
      */
     final boolean completeRelay(Object r) {
-        return UNSAFE.compareAndSwapObject(this, RESULT, null,
-                                           encodeRelay(r));
+        return U.compareAndSwapObject(this, RESULT, null,
+                                      encodeRelay(r));
     }
 
     /**
@@ -390,14 +419,14 @@
     public static interface AsynchronousCompletionTask {
     }
 
-    private static final boolean useCommonPool =
+    private static final boolean USE_COMMON_POOL =
         (ForkJoinPool.getCommonPoolParallelism() > 1);
 
     /**
      * Default executor -- ForkJoinPool.commonPool() unless it cannot
      * support parallelism.
      */
-    private static final Executor asyncPool = useCommonPool ?
+    private static final Executor ASYNC_POOL = USE_COMMON_POOL ?
         ForkJoinPool.commonPool() : new ThreadPerTaskExecutor();
 
     /** Fallback if ForkJoinPool.commonPool() cannot support parallelism */
@@ -407,11 +436,11 @@
 
     /**
      * Null-checks user executor argument, and translates uses of
-     * commonPool to asyncPool in case parallelism disabled.
+     * commonPool to ASYNC_POOL in case parallelism disabled.
      */
     static Executor screenExecutor(Executor e) {
-        if (!useCommonPool && e == ForkJoinPool.commonPool())
-            return asyncPool;
+        if (!USE_COMMON_POOL && e == ForkJoinPool.commonPool())
+            return ASYNC_POOL;
         if (e == null) throw new NullPointerException();
         return e;
     }
@@ -421,6 +450,12 @@
     static final int ASYNC  =  1;
     static final int NESTED = -1;
 
+    /**
+     * Spins before blocking in waitingGet
+     */
+    static final int SPINS = (Runtime.getRuntime().availableProcessors() > 1 ?
+                              1 << 8 : 0);
+
     /* ------------- Base Completion classes and operations -------------- */
 
     @SuppressWarnings("serial")
@@ -440,13 +475,13 @@
         abstract boolean isLive();
 
         public final void run()                { tryFire(ASYNC); }
-        public final boolean exec()            { tryFire(ASYNC); return true; }
+        public final boolean exec()            { tryFire(ASYNC); return false; }
         public final Void getRawResult()       { return null; }
         public final void setRawResult(Void v) {}
     }
 
     static void lazySetNext(Completion c, Completion next) {
-        UNSAFE.putOrderedObject(c, NEXT, next);
+        U.putOrderedObject(c, NEXT, next);
     }
 
     /**
@@ -610,7 +645,7 @@
     private <V> CompletableFuture<V> uniApplyStage(
         Executor e, Function<? super T,? extends V> f) {
         if (f == null) throw new NullPointerException();
-        CompletableFuture<V> d =  new CompletableFuture<V>();
+        CompletableFuture<V> d = newIncompleteFuture();
         if (e != null || !d.uniApply(this, f, null)) {
             UniApply<T,V> c = new UniApply<T,V>(e, d, this, f);
             push(c);
@@ -665,7 +700,7 @@
     private CompletableFuture<Void> uniAcceptStage(Executor e,
                                                    Consumer<? super T> f) {
         if (f == null) throw new NullPointerException();
-        CompletableFuture<Void> d = new CompletableFuture<Void>();
+        CompletableFuture<Void> d = newIncompleteFuture();
         if (e != null || !d.uniAccept(this, f, null)) {
             UniAccept<T> c = new UniAccept<T>(e, d, this, f);
             push(c);
@@ -713,7 +748,7 @@
 
     private CompletableFuture<Void> uniRunStage(Executor e, Runnable f) {
         if (f == null) throw new NullPointerException();
-        CompletableFuture<Void> d = new CompletableFuture<Void>();
+        CompletableFuture<Void> d = newIncompleteFuture();
         if (e != null || !d.uniRun(this, f, null)) {
             UniRun<T> c = new UniRun<T>(e, d, this, f);
             push(c);
@@ -774,7 +809,7 @@
     private CompletableFuture<T> uniWhenCompleteStage(
         Executor e, BiConsumer<? super T, ? super Throwable> f) {
         if (f == null) throw new NullPointerException();
-        CompletableFuture<T> d = new CompletableFuture<T>();
+        CompletableFuture<T> d = newIncompleteFuture();
         if (e != null || !d.uniWhenComplete(this, f, null)) {
             UniWhenComplete<T> c = new UniWhenComplete<T>(e, d, this, f);
             push(c);
@@ -830,7 +865,7 @@
     private <V> CompletableFuture<V> uniHandleStage(
         Executor e, BiFunction<? super T, Throwable, ? extends V> f) {
         if (f == null) throw new NullPointerException();
-        CompletableFuture<V> d = new CompletableFuture<V>();
+        CompletableFuture<V> d = newIncompleteFuture();
         if (e != null || !d.uniHandle(this, f, null)) {
             UniHandle<T,V> c = new UniHandle<T,V>(e, d, this, f);
             push(c);
@@ -880,7 +915,7 @@
     private CompletableFuture<T> uniExceptionallyStage(
         Function<Throwable, ? extends T> f) {
         if (f == null) throw new NullPointerException();
-        CompletableFuture<T> d = new CompletableFuture<T>();
+        CompletableFuture<T> d = newIncompleteFuture();
         if (!d.uniExceptionally(this, f, null)) {
             UniExceptionally<T> c = new UniExceptionally<T>(d, this, f);
             push(c);
@@ -912,6 +947,30 @@
         return true;
     }
 
+    private CompletableFuture<T> uniCopyStage() {
+        Object r;
+        CompletableFuture<T> d = newIncompleteFuture();
+        if ((r = result) != null)
+            d.completeRelay(r);
+        else {
+            UniRelay<T> c = new UniRelay<T>(d, this);
+            push(c);
+            c.tryFire(SYNC);
+        }
+        return d;
+    }
+
+    private MinimalStage<T> uniAsMinimalStage() {
+        Object r;
+        if ((r = result) != null)
+            return new MinimalStage<T>(encodeRelay(r));
+        MinimalStage<T> d = new MinimalStage<T>();
+        UniRelay<T> c = new UniRelay<T>(d, this);
+        push(c);
+        c.tryFire(SYNC);
+        return d;
+    }
+
     @SuppressWarnings("serial")
     static final class UniCompose<T,V> extends UniCompletion<T,V> {
         Function<? super T, ? extends CompletionStage<V>> fn;
@@ -967,31 +1026,32 @@
     private <V> CompletableFuture<V> uniComposeStage(
         Executor e, Function<? super T, ? extends CompletionStage<V>> f) {
         if (f == null) throw new NullPointerException();
-        Object r; Throwable x;
+        Object r, s; Throwable x;
+        CompletableFuture<V> d = newIncompleteFuture();
         if (e == null && (r = result) != null) {
-            // try to return function result directly
             if (r instanceof AltResult) {
                 if ((x = ((AltResult)r).ex) != null) {
-                    return new CompletableFuture<V>(encodeThrowable(x, r));
+                    d.result = encodeThrowable(x, r);
+                    return d;
                 }
                 r = null;
             }
             try {
                 @SuppressWarnings("unchecked") T t = (T) r;
                 CompletableFuture<V> g = f.apply(t).toCompletableFuture();
-                Object s = g.result;
-                if (s != null)
-                    return new CompletableFuture<V>(encodeRelay(s));
-                CompletableFuture<V> d = new CompletableFuture<V>();
-                UniRelay<V> copy = new UniRelay<V>(d, g);
-                g.push(copy);
-                copy.tryFire(SYNC);
+                if ((s = g.result) != null)
+                    d.completeRelay(s);
+                else {
+                    UniRelay<V> c = new UniRelay<V>(d, g);
+                    g.push(c);
+                    c.tryFire(SYNC);
+                }
                 return d;
             } catch (Throwable ex) {
-                return new CompletableFuture<V>(encodeThrowable(ex));
+                d.result = encodeThrowable(ex);
+                return d;
             }
         }
-        CompletableFuture<V> d = new CompletableFuture<V>();
         UniCompose<T,V> c = new UniCompose<T,V>(e, d, this, f);
         push(c);
         c.tryFire(SYNC);
@@ -1116,7 +1176,7 @@
         CompletableFuture<U> b;
         if (f == null || (b = o.toCompletableFuture()) == null)
             throw new NullPointerException();
-        CompletableFuture<V> d = new CompletableFuture<V>();
+        CompletableFuture<V> d = newIncompleteFuture();
         if (e != null || !d.biApply(this, b, f, null)) {
             BiApply<T,U,V> c = new BiApply<T,U,V>(e, d, this, b, f);
             bipush(b, c);
@@ -1188,7 +1248,7 @@
         CompletableFuture<U> b;
         if (f == null || (b = o.toCompletableFuture()) == null)
             throw new NullPointerException();
-        CompletableFuture<Void> d = new CompletableFuture<Void>();
+        CompletableFuture<Void> d = newIncompleteFuture();
         if (e != null || !d.biAccept(this, b, f, null)) {
             BiAccept<T,U> c = new BiAccept<T,U>(e, d, this, b, f);
             bipush(b, c);
@@ -1247,7 +1307,7 @@
         CompletableFuture<?> b;
         if (f == null || (b = o.toCompletableFuture()) == null)
             throw new NullPointerException();
-        CompletableFuture<Void> d = new CompletableFuture<Void>();
+        CompletableFuture<Void> d = newIncompleteFuture();
         if (e != null || !d.biRun(this, b, f, null)) {
             BiRun<T,?> c = new BiRun<>(e, d, this, b, f);
             bipush(b, c);
@@ -1302,7 +1362,7 @@
             if ((a = (lo == mid ? cfs[lo] :
                       andTree(cfs, lo, mid))) == null ||
                 (b = (lo == hi ? a : (hi == mid+1) ? cfs[hi] :
-                      andTree(cfs, mid+1, hi)))  == null)
+                      andTree(cfs, mid+1, hi))) == null)
                 throw new NullPointerException();
             if (!d.biRelay(a, b)) {
                 BiRelay<?,?> c = new BiRelay<>(d, a, b);
@@ -1388,7 +1448,7 @@
         CompletableFuture<U> b;
         if (f == null || (b = o.toCompletableFuture()) == null)
             throw new NullPointerException();
-        CompletableFuture<V> d = new CompletableFuture<V>();
+        CompletableFuture<V> d = newIncompleteFuture();
         if (e != null || !d.orApply(this, b, f, null)) {
             OrApply<T,U,V> c = new OrApply<T,U,V>(e, d, this, b, f);
             orpush(b, c);
@@ -1452,7 +1512,7 @@
         CompletableFuture<U> b;
         if (f == null || (b = o.toCompletableFuture()) == null)
             throw new NullPointerException();
-        CompletableFuture<Void> d = new CompletableFuture<Void>();
+        CompletableFuture<Void> d = newIncompleteFuture();
         if (e != null || !d.orAccept(this, b, f, null)) {
             OrAccept<T,U> c = new OrAccept<T,U>(e, d, this, b, f);
             orpush(b, c);
@@ -1510,7 +1570,7 @@
         CompletableFuture<?> b;
         if (f == null || (b = o.toCompletableFuture()) == null)
             throw new NullPointerException();
-        CompletableFuture<Void> d = new CompletableFuture<Void>();
+        CompletableFuture<Void> d = newIncompleteFuture();
         if (e != null || !d.orRun(this, b, f, null)) {
             OrRun<T,?> c = new OrRun<>(e, d, this, b, f);
             orpush(b, c);
@@ -1556,7 +1616,7 @@
             if ((a = (lo == mid ? cfs[lo] :
                       orTree(cfs, lo, mid))) == null ||
                 (b = (lo == hi ? a : (hi == mid+1) ? cfs[hi] :
-                      orTree(cfs, mid+1, hi)))  == null)
+                      orTree(cfs, mid+1, hi))) == null)
                 throw new NullPointerException();
             if (!d.orRelay(a, b)) {
                 OrRelay<?,?> c = new OrRelay<>(d, a, b);
@@ -1571,9 +1631,9 @@
 
     @SuppressWarnings("serial")
     static final class AsyncSupply<T> extends ForkJoinTask<Void>
-            implements Runnable, AsynchronousCompletionTask {
-        CompletableFuture<T> dep; Supplier<T> fn;
-        AsyncSupply(CompletableFuture<T> dep, Supplier<T> fn) {
+        implements Runnable, AsynchronousCompletionTask {
+        CompletableFuture<T> dep; Supplier<? extends T> fn;
+        AsyncSupply(CompletableFuture<T> dep, Supplier<? extends T> fn) {
             this.dep = dep; this.fn = fn;
         }
 
@@ -1582,7 +1642,7 @@
         public final boolean exec() { run(); return true; }
 
         public void run() {
-            CompletableFuture<T> d; Supplier<T> f;
+            CompletableFuture<T> d; Supplier<? extends T> f;
             if ((d = dep) != null && (f = fn) != null) {
                 dep = null; fn = null;
                 if (d.result == null) {
@@ -1607,7 +1667,7 @@
 
     @SuppressWarnings("serial")
     static final class AsyncRun extends ForkJoinTask<Void>
-            implements Runnable, AsynchronousCompletionTask {
+        implements Runnable, AsynchronousCompletionTask {
         CompletableFuture<Void> dep; Runnable fn;
         AsyncRun(CompletableFuture<Void> dep, Runnable fn) {
             this.dep = dep; this.fn = fn;
@@ -1651,14 +1711,15 @@
     @SuppressWarnings("serial")
     static final class Signaller extends Completion
         implements ForkJoinPool.ManagedBlocker {
-        long nanos;                    // wait time if timed
+        long nanos;                    // remaining wait time if timed
         final long deadline;           // non-zero if timed
-        volatile int interruptControl; // > 0: interruptible, < 0: interrupted
+        final boolean interruptible;
+        boolean interrupted;
         volatile Thread thread;
 
         Signaller(boolean interruptible, long nanos, long deadline) {
             this.thread = Thread.currentThread();
-            this.interruptControl = interruptible ? 1 : 0;
+            this.interruptible = interruptible;
             this.nanos = nanos;
             this.deadline = deadline;
         }
@@ -1671,29 +1732,22 @@
             return null;
         }
         public boolean isReleasable() {
-            if (thread == null)
-                return true;
-            if (Thread.interrupted()) {
-                int i = interruptControl;
-                interruptControl = -1;
-                if (i > 0)
-                    return true;
-            }
-            if (deadline != 0L &&
-                (nanos <= 0L || (nanos = deadline - System.nanoTime()) <= 0L)) {
-                thread = null;
-                return true;
-            }
-            return false;
+            if (Thread.interrupted())
+                interrupted = true;
+            return ((interrupted && interruptible) ||
+                    (deadline != 0L &&
+                     (nanos <= 0L ||
+                      (nanos = deadline - System.nanoTime()) <= 0L)) ||
+                    thread == null);
         }
         public boolean block() {
-            if (isReleasable())
-                return true;
-            else if (deadline == 0L)
-                LockSupport.park(this);
-            else if (nanos > 0L)
-                LockSupport.parkNanos(this, nanos);
-            return isReleasable();
+            while (!isReleasable()) {
+                if (deadline == 0L)
+                    LockSupport.park(this);
+                else
+                    LockSupport.parkNanos(this, nanos);
+            }
+            return true;
         }
         final boolean isLive() { return thread != null; }
     }
@@ -1705,13 +1759,10 @@
     private Object waitingGet(boolean interruptible) {
         Signaller q = null;
         boolean queued = false;
-        int spins = -1;
+        int spins = SPINS;
         Object r;
         while ((r = result) == null) {
-            if (spins < 0)
-                spins = (Runtime.getRuntime().availableProcessors() > 1) ?
-                    1 << 8 : 0; // Use brief spin-wait on multiprocessors
-            else if (spins > 0) {
+            if (spins > 0) {
                 if (ThreadLocalRandom.nextSecondarySeed() >= 0)
                     --spins;
             }
@@ -1719,29 +1770,27 @@
                 q = new Signaller(interruptible, 0L, 0L);
             else if (!queued)
                 queued = tryPushStack(q);
-            else if (interruptible && q.interruptControl < 0) {
-                q.thread = null;
-                cleanStack();
-                return null;
-            }
-            else if (q.thread != null && result == null) {
+            else {
                 try {
                     ForkJoinPool.managedBlock(q);
-                } catch (InterruptedException ie) {
-                    q.interruptControl = -1;
+                } catch (InterruptedException ie) { // currently cannot happen
+                    q.interrupted = true;
                 }
+                if (q.interrupted && interruptible)
+                    break;
             }
         }
         if (q != null) {
             q.thread = null;
-            if (q.interruptControl < 0) {
+            if (q.interrupted) {
                 if (interruptible)
-                    r = null; // report interruption
+                    cleanStack();
                 else
                     Thread.currentThread().interrupt();
             }
         }
-        postComplete();
+        if (r != null)
+            postComplete();
         return r;
     }
 
@@ -1752,37 +1801,39 @@
     private Object timedGet(long nanos) throws TimeoutException {
         if (Thread.interrupted())
             return null;
-        if (nanos <= 0L)
-            throw new TimeoutException();
-        long d = System.nanoTime() + nanos;
-        Signaller q = new Signaller(true, nanos, d == 0L ? 1L : d); // avoid 0
-        boolean queued = false;
-        Object r;
-        // We intentionally don't spin here (as waitingGet does) because
-        // the call to nanoTime() above acts much like a spin.
-        while ((r = result) == null) {
-            if (!queued)
-                queued = tryPushStack(q);
-            else if (q.interruptControl < 0 || q.nanos <= 0L) {
-                q.thread = null;
-                cleanStack();
-                if (q.interruptControl < 0)
-                    return null;
-                throw new TimeoutException();
-            }
-            else if (q.thread != null && result == null) {
-                try {
-                    ForkJoinPool.managedBlock(q);
-                } catch (InterruptedException ie) {
-                    q.interruptControl = -1;
+        if (nanos > 0L) {
+            long d = System.nanoTime() + nanos;
+            long deadline = (d == 0L) ? 1L : d; // avoid 0
+            Signaller q = null;
+            boolean queued = false;
+            Object r;
+            while ((r = result) == null) { // similar to untimed, without spins
+                if (q == null)
+                    q = new Signaller(true, nanos, deadline);
+                else if (!queued)
+                    queued = tryPushStack(q);
+                else if (q.nanos <= 0L)
+                    break;
+                else {
+                    try {
+                        ForkJoinPool.managedBlock(q);
+                    } catch (InterruptedException ie) {
+                        q.interrupted = true;
+                    }
+                    if (q.interrupted)
+                        break;
                 }
             }
+            if (q != null)
+                q.thread = null;
+            if (r != null)
+                postComplete();
+            else
+                cleanStack();
+            if (r != null || (q != null && q.interrupted))
+                return r;
         }
-        if (q.interruptControl < 0)
-            r = null;
-        q.thread = null;
-        postComplete();
-        return r;
+        throw new TimeoutException();
     }
 
     /* ------------- public methods -------------- */
@@ -1796,7 +1847,7 @@
     /**
      * Creates a new complete CompletableFuture with given encoded result.
      */
-    private CompletableFuture(Object r) {
+    CompletableFuture(Object r) {
         this.result = r;
     }
 
@@ -1811,7 +1862,7 @@
      * @return the new CompletableFuture
      */
     public static <U> CompletableFuture<U> supplyAsync(Supplier<U> supplier) {
-        return asyncSupplyStage(asyncPool, supplier);
+        return asyncSupplyStage(ASYNC_POOL, supplier);
     }
 
     /**
@@ -1840,7 +1891,7 @@
      * @return the new CompletableFuture
      */
     public static CompletableFuture<Void> runAsync(Runnable runnable) {
-        return asyncRunStage(asyncPool, runnable);
+        return asyncRunStage(ASYNC_POOL, runnable);
     }
 
     /**
@@ -1985,7 +2036,7 @@
 
     public <U> CompletableFuture<U> thenApplyAsync(
         Function<? super T,? extends U> fn) {
-        return uniApplyStage(asyncPool, fn);
+        return uniApplyStage(defaultExecutor(), fn);
     }
 
     public <U> CompletableFuture<U> thenApplyAsync(
@@ -1998,7 +2049,7 @@
     }
 
     public CompletableFuture<Void> thenAcceptAsync(Consumer<? super T> action) {
-        return uniAcceptStage(asyncPool, action);
+        return uniAcceptStage(defaultExecutor(), action);
     }
 
     public CompletableFuture<Void> thenAcceptAsync(Consumer<? super T> action,
@@ -2011,7 +2062,7 @@
     }
 
     public CompletableFuture<Void> thenRunAsync(Runnable action) {
-        return uniRunStage(asyncPool, action);
+        return uniRunStage(defaultExecutor(), action);
     }
 
     public CompletableFuture<Void> thenRunAsync(Runnable action,
@@ -2028,7 +2079,7 @@
     public <U,V> CompletableFuture<V> thenCombineAsync(
         CompletionStage<? extends U> other,
         BiFunction<? super T,? super U,? extends V> fn) {
-        return biApplyStage(asyncPool, other, fn);
+        return biApplyStage(defaultExecutor(), other, fn);
     }
 
     public <U,V> CompletableFuture<V> thenCombineAsync(
@@ -2046,7 +2097,7 @@
     public <U> CompletableFuture<Void> thenAcceptBothAsync(
         CompletionStage<? extends U> other,
         BiConsumer<? super T, ? super U> action) {
-        return biAcceptStage(asyncPool, other, action);
+        return biAcceptStage(defaultExecutor(), other, action);
     }
 
     public <U> CompletableFuture<Void> thenAcceptBothAsync(
@@ -2062,7 +2113,7 @@
 
     public CompletableFuture<Void> runAfterBothAsync(CompletionStage<?> other,
                                                      Runnable action) {
-        return biRunStage(asyncPool, other, action);
+        return biRunStage(defaultExecutor(), other, action);
     }
 
     public CompletableFuture<Void> runAfterBothAsync(CompletionStage<?> other,
@@ -2078,7 +2129,7 @@
 
     public <U> CompletableFuture<U> applyToEitherAsync(
         CompletionStage<? extends T> other, Function<? super T, U> fn) {
-        return orApplyStage(asyncPool, other, fn);
+        return orApplyStage(defaultExecutor(), other, fn);
     }
 
     public <U> CompletableFuture<U> applyToEitherAsync(
@@ -2094,7 +2145,7 @@
 
     public CompletableFuture<Void> acceptEitherAsync(
         CompletionStage<? extends T> other, Consumer<? super T> action) {
-        return orAcceptStage(asyncPool, other, action);
+        return orAcceptStage(defaultExecutor(), other, action);
     }
 
     public CompletableFuture<Void> acceptEitherAsync(
@@ -2110,7 +2161,7 @@
 
     public CompletableFuture<Void> runAfterEitherAsync(CompletionStage<?> other,
                                                        Runnable action) {
-        return orRunStage(asyncPool, other, action);
+        return orRunStage(defaultExecutor(), other, action);
     }
 
     public CompletableFuture<Void> runAfterEitherAsync(CompletionStage<?> other,
@@ -2126,7 +2177,7 @@
 
     public <U> CompletableFuture<U> thenComposeAsync(
         Function<? super T, ? extends CompletionStage<U>> fn) {
-        return uniComposeStage(asyncPool, fn);
+        return uniComposeStage(defaultExecutor(), fn);
     }
 
     public <U> CompletableFuture<U> thenComposeAsync(
@@ -2142,7 +2193,7 @@
 
     public CompletableFuture<T> whenCompleteAsync(
         BiConsumer<? super T, ? super Throwable> action) {
-        return uniWhenCompleteStage(asyncPool, action);
+        return uniWhenCompleteStage(defaultExecutor(), action);
     }
 
     public CompletableFuture<T> whenCompleteAsync(
@@ -2157,7 +2208,7 @@
 
     public <U> CompletableFuture<U> handleAsync(
         BiFunction<? super T, Throwable, ? extends U> fn) {
-        return uniHandleStage(asyncPool, fn);
+        return uniHandleStage(defaultExecutor(), fn);
     }
 
     public <U> CompletableFuture<U> handleAsync(
@@ -2196,6 +2247,7 @@
         return uniExceptionallyStage(fn);
     }
 
+
     /* ------------- Arbitrary-arity constructions -------------- */
 
     /**
@@ -2353,10 +2405,12 @@
      */
     public String toString() {
         Object r = result;
-        int count;
+        int count = 0; // avoid call to getNumberOfDependents in case disabled
+        for (Completion p = stack; p != null; p = p.next)
+            ++count;
         return super.toString() +
             ((r == null) ?
-             (((count = getNumberOfDependents()) == 0) ?
+             ((count == 0) ?
               "[Not completed]" :
               "[Not completed, " + count + " dependents]") :
              (((r instanceof AltResult) && ((AltResult)r).ex != null) ?
@@ -2364,22 +2418,381 @@
               "[Completed normally]"));
     }
 
+    // jdk9 additions
+
+    /**
+     * Returns a new incomplete CompletableFuture of the type to be
+     * returned by a CompletionStage method. Subclasses should
+     * normally override this method to return an instance of the same
+     * class as this CompletableFuture. The default implementation
+     * returns an instance of class CompletableFuture.
+     *
+     * @param <U> the type of the value
+     * @return a new CompletableFuture
+     * @since 1.9
+     */
+    public <U> CompletableFuture<U> newIncompleteFuture() {
+        return new CompletableFuture<U>();
+    }
+
+    /**
+     * Returns the default Executor used for async methods that do not
+     * specify an Executor. This class uses the {@link
+     * ForkJoinPool#commonPool()} if it supports more than one
+     * parallel thread, or else an Executor using one thread per async
+     * task.  This method may be overridden in subclasses to return
+     * an Executor that provides at least one independent thread.
+     *
+     * @return the executor
+     * @since 1.9
+     */
+    public Executor defaultExecutor() {
+        return ASYNC_POOL;
+    }
+
+    /**
+     * Returns a new CompletableFuture that is completed normally with
+     * the same value as this CompletableFuture when it completes
+     * normally. If this CompletableFuture completes exceptionally,
+     * then the returned CompletableFuture completes exceptionally
+     * with a CompletionException with this exception as cause. The
+     * behavior is equivalent to {@code thenApply(x -> x)}. This
+     * method may be useful as a form of "defensive copying", to
+     * prevent clients from completing, while still being able to
+     * arrange dependent actions.
+     *
+     * @return the new CompletableFuture
+     * @since 1.9
+     */
+    public CompletableFuture<T> copy() {
+        return uniCopyStage();
+    }
+
+    /**
+     * Returns a new CompletionStage that is completed normally with
+     * the same value as this CompletableFuture when it completes
+     * normally, and cannot be independently completed or otherwise
+     * used in ways not defined by the methods of interface {@link
+     * CompletionStage}.  If this CompletableFuture completes
+     * exceptionally, then the returned CompletionStage completes
+     * exceptionally with a CompletionException with this exception as
+     * cause.
+     *
+     * @return the new CompletionStage
+     * @since 1.9
+     */
+    public CompletionStage<T> minimalCompletionStage() {
+        return uniAsMinimalStage();
+    }
+
+    /**
+     * Completes this CompletableFuture with the result of
+     * the given Supplier function invoked from an asynchronous
+     * task using the given executor.
+     *
+     * @param supplier a function returning the value to be used
+     * to complete this CompletableFuture
+     * @param executor the executor to use for asynchronous execution
+     * @return this CompletableFuture
+     * @since 1.9
+     */
+    public CompletableFuture<T> completeAsync(Supplier<? extends T> supplier,
+                                              Executor executor) {
+        if (supplier == null || executor == null)
+            throw new NullPointerException();
+        executor.execute(new AsyncSupply<T>(this, supplier));
+        return this;
+    }
+
+    /**
+     * Completes this CompletableFuture with the result of the given
+     * Supplier function invoked from an asynchronous task using the
+     * default executor.
+     *
+     * @param supplier a function returning the value to be used
+     * to complete this CompletableFuture
+     * @return this CompletableFuture
+     * @since 1.9
+     */
+    public CompletableFuture<T> completeAsync(Supplier<? extends T> supplier) {
+        return completeAsync(supplier, defaultExecutor());
+    }
+
+    /**
+     * Exceptionally completes this CompletableFuture with
+     * a {@link TimeoutException} if not otherwise completed
+     * before the given timeout.
+     *
+     * @param timeout how long to wait before completing exceptionally
+     *        with a TimeoutException, in units of {@code unit}
+     * @param unit a {@code TimeUnit} determining how to interpret the
+     *        {@code timeout} parameter
+     * @return this CompletableFuture
+     * @since 1.9
+     */
+    public CompletableFuture<T> orTimeout(long timeout, TimeUnit unit) {
+        if (unit == null)
+            throw new NullPointerException();
+        if (result == null)
+            whenComplete(new Canceller(Delayer.delay(new Timeout(this),
+                                                     timeout, unit)));
+        return this;
+    }
+
+    /**
+     * Completes this CompletableFuture with the given value if not
+     * otherwise completed before the given timeout.
+     *
+     * @param value the value to use upon timeout
+     * @param timeout how long to wait before completing normally
+     *        with the given value, in units of {@code unit}
+     * @param unit a {@code TimeUnit} determining how to interpret the
+     *        {@code timeout} parameter
+     * @return this CompletableFuture
+     * @since 1.9
+     */
+    public CompletableFuture<T> completeOnTimeout(T value, long timeout,
+                                                  TimeUnit unit) {
+        if (unit == null)
+            throw new NullPointerException();
+        if (result == null)
+            whenComplete(new Canceller(Delayer.delay(
+                                           new DelayedCompleter<T>(this, value),
+                                           timeout, unit)));
+        return this;
+    }
+
+    /**
+     * Returns a new Executor that submits a task to the given base
+     * executor after the given delay (or no delay if non-positive).
+     * Each delay commences upon invocation of the returned executor's
+     * {@code execute} method.
+     *
+     * @param delay how long to delay, in units of {@code unit}
+     * @param unit a {@code TimeUnit} determining how to interpret the
+     *        {@code delay} parameter
+     * @param executor the base executor
+     * @return the new delayed executor
+     * @since 1.9
+     */
+    public static Executor delayedExecutor(long delay, TimeUnit unit,
+                                           Executor executor) {
+        if (unit == null || executor == null)
+            throw new NullPointerException();
+        return new DelayedExecutor(delay, unit, executor);
+    }
+
+    /**
+     * Returns a new Executor that submits a task to the default
+     * executor after the given delay (or no delay if non-positive).
+     * Each delay commences upon invocation of the returned executor's
+     * {@code execute} method.
+     *
+     * @param delay how long to delay, in units of {@code unit}
+     * @param unit a {@code TimeUnit} determining how to interpret the
+     *        {@code delay} parameter
+     * @return the new delayed executor
+     * @since 1.9
+     */
+    public static Executor delayedExecutor(long delay, TimeUnit unit) {
+        if (unit == null)
+            throw new NullPointerException();
+        return new DelayedExecutor(delay, unit, ASYNC_POOL);
+    }
+
+    /**
+     * Returns a new CompletionStage that is already completed with
+     * the given value and supports only those methods in
+     * interface {@link CompletionStage}.
+     *
+     * @param value the value
+     * @param <U> the type of the value
+     * @return the completed CompletionStage
+     * @since 1.9
+     */
+    public static <U> CompletionStage<U> completedStage(U value) {
+        return new MinimalStage<U>((value == null) ? NIL : value);
+    }
+
+    /**
+     * Returns a new CompletableFuture that is already completed
+     * exceptionally with the given exception.
+     *
+     * @param ex the exception
+     * @param <U> the type of the value
+     * @return the exceptionally completed CompletableFuture
+     * @since 1.9
+     */
+    public static <U> CompletableFuture<U> failedFuture(Throwable ex) {
+        if (ex == null) throw new NullPointerException();
+        return new CompletableFuture<U>(new AltResult(ex));
+    }
+
+    /**
+     * Returns a new CompletionStage that is already completed
+     * exceptionally with the given exception and supports only those
+     * methods in interface {@link CompletionStage}.
+     *
+     * @param ex the exception
+     * @param <U> the type of the value
+     * @return the exceptionally completed CompletionStage
+     * @since 1.9
+     */
+    public static <U> CompletionStage<U> failedStage(Throwable ex) {
+        if (ex == null) throw new NullPointerException();
+        return new MinimalStage<U>(new AltResult(ex));
+    }
+
+    /**
+     * Singleton delay scheduler, used only for starting and
+     * cancelling tasks.
+     */
+    static final class Delayer {
+        static ScheduledFuture<?> delay(Runnable command, long delay,
+                                        TimeUnit unit) {
+            return delayer.schedule(command, delay, unit);
+        }
+
+        static final class DaemonThreadFactory implements ThreadFactory {
+            public Thread newThread(Runnable r) {
+                Thread t = new Thread(r);
+                t.setDaemon(true);
+                t.setName("CompletableFutureDelayScheduler");
+                return t;
+            }
+        }
+
+        static final ScheduledThreadPoolExecutor delayer;
+        static {
+            (delayer = new ScheduledThreadPoolExecutor(
+                1, new DaemonThreadFactory())).
+                setRemoveOnCancelPolicy(true);
+        }
+    }
+
+    // Little class-ified lambdas to better support monitoring
+
+    static final class DelayedExecutor implements Executor {
+        final long delay;
+        final TimeUnit unit;
+        final Executor executor;
+        DelayedExecutor(long delay, TimeUnit unit, Executor executor) {
+            this.delay = delay; this.unit = unit; this.executor = executor;
+        }
+        public void execute(Runnable r) {
+            Delayer.delay(new TaskSubmitter(executor, r), delay, unit);
+        }
+    }
+
+    /** Action to submit user task */
+    static final class TaskSubmitter implements Runnable {
+        final Executor executor;
+        final Runnable action;
+        TaskSubmitter(Executor executor, Runnable action) {
+            this.executor = executor;
+            this.action = action;
+        }
+        public void run() { executor.execute(action); }
+    }
+
+    /** Action to completeExceptionally on timeout */
+    static final class Timeout implements Runnable {
+        final CompletableFuture<?> f;
+        Timeout(CompletableFuture<?> f) { this.f = f; }
+        public void run() {
+            if (f != null && !f.isDone())
+                f.completeExceptionally(new TimeoutException());
+        }
+    }
+
+    /** Action to complete on timeout */
+    static final class DelayedCompleter<U> implements Runnable {
+        final CompletableFuture<U> f;
+        final U u;
+        DelayedCompleter(CompletableFuture<U> f, U u) { this.f = f; this.u = u; }
+        public void run() {
+            if (f != null)
+                f.complete(u);
+        }
+    }
+
+    /** Action to cancel unneeded timeouts */
+    static final class Canceller implements BiConsumer<Object, Throwable> {
+        final Future<?> f;
+        Canceller(Future<?> f) { this.f = f; }
+        public void accept(Object ignore, Throwable ex) {
+            if (ex == null && f != null && !f.isDone())
+                f.cancel(false);
+        }
+    }
+
+    /**
+     * A subclass that just throws UOE for most non-CompletionStage methods.
+     */
+    static final class MinimalStage<T> extends CompletableFuture<T> {
+        MinimalStage() { }
+        MinimalStage(Object r) { super(r); }
+        @Override public <U> CompletableFuture<U> newIncompleteFuture() {
+            return new MinimalStage<U>(); }
+        @Override public T get() {
+            throw new UnsupportedOperationException(); }
+        @Override public T get(long timeout, TimeUnit unit) {
+            throw new UnsupportedOperationException(); }
+        @Override public T getNow(T valueIfAbsent) {
+            throw new UnsupportedOperationException(); }
+        @Override public T join() {
+            throw new UnsupportedOperationException(); }
+        @Override public boolean complete(T value) {
+            throw new UnsupportedOperationException(); }
+        @Override public boolean completeExceptionally(Throwable ex) {
+            throw new UnsupportedOperationException(); }
+        @Override public boolean cancel(boolean mayInterruptIfRunning) {
+            throw new UnsupportedOperationException(); }
+        @Override public void obtrudeValue(T value) {
+            throw new UnsupportedOperationException(); }
+        @Override public void obtrudeException(Throwable ex) {
+            throw new UnsupportedOperationException(); }
+        @Override public boolean isDone() {
+            throw new UnsupportedOperationException(); }
+        @Override public boolean isCancelled() {
+            throw new UnsupportedOperationException(); }
+        @Override public boolean isCompletedExceptionally() {
+            throw new UnsupportedOperationException(); }
+        @Override public int getNumberOfDependents() {
+            throw new UnsupportedOperationException(); }
+        @Override public CompletableFuture<T> completeAsync
+            (Supplier<? extends T> supplier, Executor executor) {
+            throw new UnsupportedOperationException(); }
+        @Override public CompletableFuture<T> completeAsync
+            (Supplier<? extends T> supplier) {
+            throw new UnsupportedOperationException(); }
+        @Override public CompletableFuture<T> orTimeout
+            (long timeout, TimeUnit unit) {
+            throw new UnsupportedOperationException(); }
+        @Override public CompletableFuture<T> completeOnTimeout
+            (T value, long timeout, TimeUnit unit) {
+            throw new UnsupportedOperationException(); }
+    }
+
     // Unsafe mechanics
-    private static final sun.misc.Unsafe UNSAFE;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
     private static final long RESULT;
     private static final long STACK;
     private static final long NEXT;
     static {
         try {
-            final sun.misc.Unsafe u;
-            UNSAFE = u = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = CompletableFuture.class;
-            RESULT = u.objectFieldOffset(k.getDeclaredField("result"));
-            STACK = u.objectFieldOffset(k.getDeclaredField("stack"));
-            NEXT = u.objectFieldOffset
+            RESULT = U.objectFieldOffset
+                (CompletableFuture.class.getDeclaredField("result"));
+            STACK = U.objectFieldOffset
+                (CompletableFuture.class.getDeclaredField("stack"));
+            NEXT = U.objectFieldOffset
                 (Completion.class.getDeclaredField("next"));
-        } catch (Exception x) {
-            throw new Error(x);
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
         }
+
+        // Reduce the risk of rare disastrous classloading in first call to
+        // LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
+        Class<?> ensureLoaded = LockSupport.class;
     }
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/CompletionStage.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/CompletionStage.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,12 +34,11 @@
  */
 
 package java.util.concurrent;
-import java.util.function.Supplier;
-import java.util.function.Consumer;
+
 import java.util.function.BiConsumer;
+import java.util.function.BiFunction;
+import java.util.function.Consumer;
 import java.util.function.Function;
-import java.util.function.BiFunction;
-import java.util.concurrent.Executor;
 
 /**
  * A stage of a possibly asynchronous computation, that performs an
@@ -56,9 +55,9 @@
  * For example, {@code stage.thenApply(x -> square(x)).thenAccept(x ->
  * System.out.print(x)).thenRun(() -> System.out.println())}. An
  * additional form (<em>compose</em>) applies functions of stages
- * themselves, rather than their results. </li>
+ * themselves, rather than their results.
  *
- * <li> One stage's execution may be triggered by completion of a
+ * <li>One stage's execution may be triggered by completion of a
  * single stage, or both of two stages, or either of two stages.
  * Dependencies on a single stage are arranged using methods with
  * prefix <em>then</em>. Those triggered by completion of
@@ -66,9 +65,9 @@
  * effects, using correspondingly named methods. Those triggered by
  * <em>either</em> of two stages make no guarantees about which of the
  * results or effects are used for the dependent stage's
- * computation.</li>
+ * computation.
  *
- * <li> Dependencies among stages control the triggering of
+ * <li>Dependencies among stages control the triggering of
  * computations, but do not otherwise guarantee any particular
  * ordering. Additionally, execution of a new stage's computations may
  * be arranged in any of three ways: default execution, default
@@ -81,7 +80,7 @@
  * properties, and might not even support concurrent execution, but
  * are arranged for processing in a way that accommodates asynchrony.
  *
- * <li> Two method forms support processing whether the triggering
+ * <li>Two method forms support processing whether the triggering
  * stage completed normally or exceptionally: Method {@link
  * #whenComplete whenComplete} allows injection of an action
  * regardless of outcome, otherwise preserving the outcome in its
@@ -100,7 +99,7 @@
  * stage completes normally or exceptionally. In the case of method
  * {@code whenComplete}, when the supplied action itself encounters an
  * exception, then the stage exceptionally completes with this
- * exception if not already completed exceptionally.</li>
+ * exception if not already completed exceptionally.
  *
  * </ul>
  *
@@ -587,7 +586,7 @@
 
     /**
      * Returns a new CompletionStage that, when this stage completes
-     * normally, is executed with this stage as the argument
+     * normally, is executed with this stage's result as the argument
      * to the supplied function.
      *
      * See the {@link CompletionStage} documentation for rules
@@ -603,7 +602,7 @@
     /**
      * Returns a new CompletionStage that, when this stage completes
      * normally, is executed using this stage's default asynchronous
-     * execution facility, with this stage as the argument to the
+     * execution facility, with this stage's result as the argument to the
      * supplied function.
      *
      * See the {@link CompletionStage} documentation for rules
@@ -652,12 +651,14 @@
      * Returns a new CompletionStage with the same result or exception as
      * this stage, that executes the given action when this stage completes.
      *
-     * <p>When this stage is complete, the given action is invoked with the
-     * result (or {@code null} if none) and the exception (or {@code null}
-     * if none) of this stage as arguments.  The returned stage is completed
-     * when the action returns.  If the supplied action itself encounters an
-     * exception, then the returned stage exceptionally completes with this
-     * exception unless this stage also completed exceptionally.
+     * <p>When this stage is complete, the given action is invoked
+     * with the result (or {@code null} if none) and the exception (or
+     * {@code null} if none) of this stage as arguments.  The returned
+     * stage is completed when the action returns.  If the supplied
+     * action itself encounters an exception, then the returned stage
+     * exceptionally completes with this exception unless this stage
+     * also completed exceptionally (in which case, the returned stage
+     * exceptionally completes with the original exception).
      *
      * @param action the action to perform
      * @return the new CompletionStage
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java	Tue Oct 27 01:45:03 2015 -0400
@@ -42,7 +42,6 @@
 import java.util.AbstractMap;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.Comparator;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Hashtable;
@@ -51,14 +50,11 @@
 import java.util.NoSuchElementException;
 import java.util.Set;
 import java.util.Spliterator;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ForkJoinPool;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.concurrent.locks.LockSupport;
 import java.util.concurrent.locks.ReentrantLock;
 import java.util.function.BiConsumer;
 import java.util.function.BiFunction;
-import java.util.function.BinaryOperator;
 import java.util.function.Consumer;
 import java.util.function.DoubleBinaryOperator;
 import java.util.function.Function;
@@ -154,43 +150,43 @@
  * being concurrently updated by other threads; for example, when
  * computing a snapshot summary of the values in a shared registry.
  * There are three kinds of operation, each with four forms, accepting
- * functions with Keys, Values, Entries, and (Key, Value) arguments
- * and/or return values. Because the elements of a ConcurrentHashMap
- * are not ordered in any particular way, and may be processed in
- * different orders in different parallel executions, the correctness
- * of supplied functions should not depend on any ordering, or on any
- * other objects or values that may transiently change while
- * computation is in progress; and except for forEach actions, should
- * ideally be side-effect-free. Bulk operations on {@link java.util.Map.Entry}
- * objects do not support method {@code setValue}.
+ * functions with keys, values, entries, and (key, value) pairs as
+ * arguments and/or return values. Because the elements of a
+ * ConcurrentHashMap are not ordered in any particular way, and may be
+ * processed in different orders in different parallel executions, the
+ * correctness of supplied functions should not depend on any
+ * ordering, or on any other objects or values that may transiently
+ * change while computation is in progress; and except for forEach
+ * actions, should ideally be side-effect-free. Bulk operations on
+ * {@link java.util.Map.Entry} objects do not support method {@code
+ * setValue}.
  *
  * <ul>
- * <li> forEach: Perform a given action on each element.
+ * <li>forEach: Performs a given action on each element.
  * A variant form applies a given transformation on each element
- * before performing the action.</li>
+ * before performing the action.
  *
- * <li> search: Return the first available non-null result of
+ * <li>search: Returns the first available non-null result of
  * applying a given function on each element; skipping further
- * search when a result is found.</li>
+ * search when a result is found.
  *
- * <li> reduce: Accumulate each element.  The supplied reduction
+ * <li>reduce: Accumulates each element.  The supplied reduction
  * function cannot rely on ordering (more formally, it should be
  * both associative and commutative).  There are five variants:
  *
  * <ul>
  *
- * <li> Plain reductions. (There is not a form of this method for
+ * <li>Plain reductions. (There is not a form of this method for
  * (key, value) function arguments since there is no corresponding
- * return type.)</li>
+ * return type.)
  *
- * <li> Mapped reductions that accumulate the results of a given
- * function applied to each element.</li>
+ * <li>Mapped reductions that accumulate the results of a given
+ * function applied to each element.
  *
- * <li> Reductions to scalar doubles, longs, and ints, using a
- * given basis value.</li>
+ * <li>Reductions to scalar doubles, longs, and ints, using a
+ * given basis value.
  *
  * </ul>
- * </li>
  * </ul>
  *
  * <p>These bulk operations accept a {@code parallelismThreshold}
@@ -576,7 +572,7 @@
      * The number of bits used for generation stamp in sizeCtl.
      * Must be at least 6 for 32bit arrays.
      */
-    private static int RESIZE_STAMP_BITS = 16;
+    private static final int RESIZE_STAMP_BITS = 16;
 
     /**
      * The maximum number of threads that can help resize.
@@ -604,7 +600,7 @@
     private static final ObjectStreamField[] serialPersistentFields = {
         new ObjectStreamField("segments", Segment[].class),
         new ObjectStreamField("segmentMask", Integer.TYPE),
-        new ObjectStreamField("segmentShift", Integer.TYPE)
+        new ObjectStreamField("segmentShift", Integer.TYPE),
     };
 
     /* ---------------- Nodes -------------- */
@@ -630,10 +626,12 @@
             this.next = next;
         }
 
-        public final K getKey()       { return key; }
-        public final V getValue()     { return val; }
-        public final int hashCode()   { return key.hashCode() ^ val.hashCode(); }
-        public final String toString(){ return key + "=" + val; }
+        public final K getKey()     { return key; }
+        public final V getValue()   { return val; }
+        public final int hashCode() { return key.hashCode() ^ val.hashCode(); }
+        public final String toString() {
+            return Helpers.mapEntryToString(key, val);
+        }
         public final V setValue(V value) {
             throw new UnsupportedOperationException();
         }
@@ -1057,6 +1055,8 @@
                                     p.val = value;
                             }
                         }
+                        else if (f instanceof ReservationNode)
+                            throw new IllegalStateException("Recursive update");
                     }
                 }
                 if (binCount != 0) {
@@ -1159,6 +1159,8 @@
                                 }
                             }
                         }
+                        else if (f instanceof ReservationNode)
+                            throw new IllegalStateException("Recursive update");
                     }
                 }
                 if (validated) {
@@ -1366,7 +1368,7 @@
 
     /**
      * Stripped-down version of helper class used in previous version,
-     * declared for the sake of serialization compatibility
+     * declared for the sake of serialization compatibility.
      */
     static class Segment<K,V> extends ReentrantLock implements Serializable {
         private static final long serialVersionUID = 2249069246763182397L;
@@ -1401,9 +1403,10 @@
             new Segment<?,?>[DEFAULT_CONCURRENCY_LEVEL];
         for (int i = 0; i < segments.length; ++i)
             segments[i] = new Segment<K,V>(LOAD_FACTOR);
-        s.putFields().put("segments", segments);
-        s.putFields().put("segmentShift", segmentShift);
-        s.putFields().put("segmentMask", segmentMask);
+        java.io.ObjectOutputStream.PutField streamFields = s.putFields();
+        streamFields.put("segments", segments);
+        streamFields.put("segmentShift", segmentShift);
+        streamFields.put("segmentMask", segmentMask);
         s.writeFields();
 
         Node<K,V>[] t;
@@ -1620,9 +1623,9 @@
     }
 
     /**
-     * Helper method for EntrySet.removeIf
+     * Helper method for EntrySetView.removeIf.
      */
-    boolean removeEntryIf(Predicate<? super Entry<K, V>> function) {
+    boolean removeEntryIf(Predicate<? super Entry<K,V>> function) {
         if (function == null) throw new NullPointerException();
         Node<K,V>[] t;
         boolean removed = false;
@@ -1640,9 +1643,9 @@
     }
 
     /**
-     * Helper method for Values.removeIf
+     * Helper method for ValuesView.removeIf.
      */
-    boolean removeValueIf(Predicate<? super  V> function) {
+    boolean removeValueIf(Predicate<? super V> function) {
         if (function == null) throw new NullPointerException();
         Node<K,V>[] t;
         boolean removed = false;
@@ -1716,7 +1719,7 @@
                         if (fh >= 0) {
                             binCount = 1;
                             for (Node<K,V> e = f;; ++binCount) {
-                                K ek; V ev;
+                                K ek;
                                 if (e.hash == h &&
                                     ((ek = e.key) == key ||
                                      (ek != null && key.equals(ek)))) {
@@ -1726,6 +1729,8 @@
                                 Node<K,V> pred = e;
                                 if ((e = e.next) == null) {
                                     if ((val = mappingFunction.apply(key)) != null) {
+                                        if (pred.next != null)
+                                            throw new IllegalStateException("Recursive update");
                                         added = true;
                                         pred.next = new Node<K,V>(h, key, val, null);
                                     }
@@ -1745,6 +1750,8 @@
                                 t.putTreeVal(h, key, val);
                             }
                         }
+                        else if (f instanceof ReservationNode)
+                            throw new IllegalStateException("Recursive update");
                     }
                 }
                 if (binCount != 0) {
@@ -1840,6 +1847,8 @@
                                 }
                             }
                         }
+                        else if (f instanceof ReservationNode)
+                            throw new IllegalStateException("Recursive update");
                     }
                 }
                 if (binCount != 0)
@@ -1931,6 +1940,8 @@
                                 if ((e = e.next) == null) {
                                     val = remappingFunction.apply(key, null);
                                     if (val != null) {
+                                        if (pred.next != null)
+                                            throw new IllegalStateException("Recursive update");
                                         delta = 1;
                                         pred.next =
                                             new Node<K,V>(h, key, val, null);
@@ -1963,6 +1974,8 @@
                                     setTabAt(tab, i, untreeify(t.first));
                             }
                         }
+                        else if (f instanceof ReservationNode)
+                            throw new IllegalStateException("Recursive update");
                     }
                 }
                 if (binCount != 0) {
@@ -2072,6 +2085,8 @@
                                     setTabAt(tab, i, untreeify(t.first));
                             }
                         }
+                        else if (f instanceof ReservationNode)
+                            throw new IllegalStateException("Recursive update");
                     }
                 }
                 if (binCount != 0) {
@@ -2089,12 +2104,13 @@
     // Hashtable legacy methods
 
     /**
-     * Legacy method testing if some key maps into the specified value
-     * in this table.  This method is identical in functionality to
+     * Tests if some key maps into the specified value in this table.
+     *
+     * <p>Note that this method is identical in functionality to
      * {@link #containsValue(Object)}, and exists solely to ensure
      * full compatibility with class {@link java.util.Hashtable},
      * which supported this method prior to introduction of the
-     * Java Collections framework.
+     * Java Collections Framework.
      *
      * @param  value a value to search for
      * @return {@code true} if and only if some key maps to the
@@ -2235,7 +2251,7 @@
     }
 
     /**
-     * A place-holder node used in computeIfAbsent and compute
+     * A place-holder node used in computeIfAbsent and compute.
      */
     static final class ReservationNode<K,V> extends Node<K,V> {
         ReservationNode() {
@@ -2384,17 +2400,8 @@
                 break;
             else if (tab == table) {
                 int rs = resizeStamp(n);
-                if (sc < 0) {
-                    Node<K,V>[] nt;
-                    if ((sc >>> RESIZE_STAMP_SHIFT) != rs || sc == rs + 1 ||
-                        sc == rs + MAX_RESIZERS || (nt = nextTable) == null ||
-                        transferIndex <= 0)
-                        break;
-                    if (U.compareAndSwapInt(this, SIZECTL, sc, sc + 1))
-                        transfer(tab, nt);
-                }
-                else if (U.compareAndSwapInt(this, SIZECTL, sc,
-                                             (rs << RESIZE_STAMP_SHIFT) + 2))
+                if (U.compareAndSwapInt(this, SIZECTL, sc,
+                                        (rs << RESIZE_STAMP_SHIFT) + 2))
                     transfer(tab, null);
             }
         }
@@ -2649,7 +2656,7 @@
      * too small, in which case resizes instead.
      */
     private final void treeifyBin(Node<K,V>[] tab, int index) {
-        Node<K,V> b; int n, sc;
+        Node<K,V> b; int n;
         if (tab != null) {
             if ((n = tab.length) < MIN_TREEIFY_CAPACITY)
                 tryPresize(n << 1);
@@ -2693,7 +2700,7 @@
     /* ---------------- TreeNodes -------------- */
 
     /**
-     * Nodes for use in TreeBins
+     * Nodes for use in TreeBins.
      */
     static final class TreeNode<K,V> extends Node<K,V> {
         TreeNode<K,V> parent;  // red-black tree links
@@ -2719,7 +2726,7 @@
         final TreeNode<K,V> findTreeNode(int h, Object k, Class<?> kc) {
             if (k != null) {
                 TreeNode<K,V> p = this;
-                do  {
+                do {
                     int ph, dir; K pk; TreeNode<K,V> q;
                     TreeNode<K,V> pl = p.left, pr = p.right;
                     if ((ph = p.hash) > h)
@@ -2812,7 +2819,7 @@
                                   (kc = comparableClassFor(k)) == null) ||
                                  (dir = compareComparables(kc, k, pk)) == 0)
                             dir = tieBreakOrder(k, pk);
-                            TreeNode<K,V> xp = p;
+                        TreeNode<K,V> xp = p;
                         if ((p = (dir <= 0) ? p.left : p.right) == null) {
                             x.parent = xp;
                             if (dir <= 0)
@@ -3165,7 +3172,7 @@
 
         static <K,V> TreeNode<K,V> balanceDeletion(TreeNode<K,V> root,
                                                    TreeNode<K,V> x) {
-            for (TreeNode<K,V> xp, xpl, xpr;;)  {
+            for (TreeNode<K,V> xp, xpl, xpr;;) {
                 if (x == null || x == root)
                     return root;
                 else if ((xp = x.parent) == null) {
@@ -3256,7 +3263,7 @@
         }
 
         /**
-         * Recursive invariant check
+         * Checks invariants recursively for the tree of Nodes rooted at t.
          */
         static <K,V> boolean checkInvariants(TreeNode<K,V> t) {
             TreeNode<K,V> tp = t.parent, tl = t.left, tr = t.right,
@@ -3280,15 +3287,13 @@
             return true;
         }
 
-        private static final sun.misc.Unsafe U;
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
         private static final long LOCKSTATE;
         static {
             try {
-                U = sun.misc.Unsafe.getUnsafe();
-                Class<?> k = TreeBin.class;
                 LOCKSTATE = U.objectFieldOffset
-                    (k.getDeclaredField("lockState"));
-            } catch (Exception e) {
+                    (TreeBin.class.getDeclaredField("lockState"));
+            } catch (ReflectiveOperationException e) {
                 throw new Error(e);
             }
         }
@@ -3503,7 +3508,7 @@
     }
 
     /**
-     * Exported Entry for EntryIterator
+     * Exported Entry for EntryIterator.
      */
     static final class MapEntry<K,V> implements Map.Entry<K,V> {
         final K key; // non-null
@@ -3517,7 +3522,9 @@
         public K getKey()        { return key; }
         public V getValue()      { return val; }
         public int hashCode()    { return key.hashCode() ^ val.hashCode(); }
-        public String toString() { return key + "=" + val; }
+        public String toString() {
+            return Helpers.mapEntryToString(key, val);
+        }
 
         public boolean equals(Object o) {
             Object k, v; Map.Entry<?,?> e;
@@ -3554,7 +3561,7 @@
             this.est = est;
         }
 
-        public Spliterator<K> trySplit() {
+        public KeySpliterator<K,V> trySplit() {
             int i, f, h;
             return (h = ((i = baseIndex) + (f = baseLimit)) >>> 1) <= i ? null :
                 new KeySpliterator<K,V>(tab, baseSize, baseLimit = h,
@@ -3593,7 +3600,7 @@
             this.est = est;
         }
 
-        public Spliterator<V> trySplit() {
+        public ValueSpliterator<K,V> trySplit() {
             int i, f, h;
             return (h = ((i = baseIndex) + (f = baseLimit)) >>> 1) <= i ? null :
                 new ValueSpliterator<K,V>(tab, baseSize, baseLimit = h,
@@ -3633,7 +3640,7 @@
             this.est = est;
         }
 
-        public Spliterator<Map.Entry<K,V>> trySplit() {
+        public EntrySpliterator<K,V> trySplit() {
             int i, f, h;
             return (h = ((i = baseIndex) + (f = baseLimit)) >>> 1) <= i ? null :
                 new EntrySpliterator<K,V>(tab, baseSize, baseLimit = h,
@@ -4445,19 +4452,19 @@
         public abstract boolean contains(Object o);
         public abstract boolean remove(Object o);
 
-        private static final String oomeMsg = "Required array size too large";
+        private static final String OOME_MSG = "Required array size too large";
 
         public final Object[] toArray() {
             long sz = map.mappingCount();
             if (sz > MAX_ARRAY_SIZE)
-                throw new OutOfMemoryError(oomeMsg);
+                throw new OutOfMemoryError(OOME_MSG);
             int n = (int)sz;
             Object[] r = new Object[n];
             int i = 0;
             for (E e : this) {
                 if (i == n) {
                     if (n >= MAX_ARRAY_SIZE)
-                        throw new OutOfMemoryError(oomeMsg);
+                        throw new OutOfMemoryError(OOME_MSG);
                     if (n >= MAX_ARRAY_SIZE - (MAX_ARRAY_SIZE >>> 1) - 1)
                         n = MAX_ARRAY_SIZE;
                     else
@@ -4473,7 +4480,7 @@
         public final <T> T[] toArray(T[] a) {
             long sz = map.mappingCount();
             if (sz > MAX_ARRAY_SIZE)
-                throw new OutOfMemoryError(oomeMsg);
+                throw new OutOfMemoryError(OOME_MSG);
             int m = (int)sz;
             T[] r = (a.length >= m) ? a :
                 (T[])java.lang.reflect.Array
@@ -4483,7 +4490,7 @@
             for (E e : this) {
                 if (i == n) {
                     if (n >= MAX_ARRAY_SIZE)
-                        throw new OutOfMemoryError(oomeMsg);
+                        throw new OutOfMemoryError(OOME_MSG);
                     if (n >= MAX_ARRAY_SIZE - (MAX_ARRAY_SIZE >>> 1) - 1)
                         n = MAX_ARRAY_SIZE;
                     else
@@ -4803,7 +4810,7 @@
             return added;
         }
 
-        public boolean removeIf(Predicate<? super Entry<K, V>> filter) {
+        public boolean removeIf(Predicate<? super Entry<K,V>> filter) {
             return map.removeEntryIf(filter);
         }
 
@@ -4878,7 +4885,7 @@
         }
 
         /**
-         * Same as Traverser version
+         * Same as Traverser version.
          */
         final Node<K,V> advance() {
             Node<K,V> e;
@@ -6323,38 +6330,40 @@
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe U;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
     private static final long SIZECTL;
     private static final long TRANSFERINDEX;
     private static final long BASECOUNT;
     private static final long CELLSBUSY;
     private static final long CELLVALUE;
-    private static final long ABASE;
+    private static final int ABASE;
     private static final int ASHIFT;
 
     static {
         try {
-            U = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = ConcurrentHashMap.class;
             SIZECTL = U.objectFieldOffset
-                (k.getDeclaredField("sizeCtl"));
+                (ConcurrentHashMap.class.getDeclaredField("sizeCtl"));
             TRANSFERINDEX = U.objectFieldOffset
-                (k.getDeclaredField("transferIndex"));
+                (ConcurrentHashMap.class.getDeclaredField("transferIndex"));
             BASECOUNT = U.objectFieldOffset
-                (k.getDeclaredField("baseCount"));
+                (ConcurrentHashMap.class.getDeclaredField("baseCount"));
             CELLSBUSY = U.objectFieldOffset
-                (k.getDeclaredField("cellsBusy"));
-            Class<?> ck = CounterCell.class;
+                (ConcurrentHashMap.class.getDeclaredField("cellsBusy"));
+
             CELLVALUE = U.objectFieldOffset
-                (ck.getDeclaredField("value"));
-            Class<?> ak = Node[].class;
-            ABASE = U.arrayBaseOffset(ak);
-            int scale = U.arrayIndexScale(ak);
+                (CounterCell.class.getDeclaredField("value"));
+
+            ABASE = U.arrayBaseOffset(Node[].class);
+            int scale = U.arrayIndexScale(Node[].class);
             if ((scale & (scale - 1)) != 0)
-                throw new Error("data type scale not a power of two");
+                throw new Error("array index scale not a power of two");
             ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
-        } catch (Exception e) {
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
+
+        // Reduce the risk of rare disastrous classloading in first call to
+        // LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
+        Class<?> ensureLoaded = LockSupport.class;
     }
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Tue Oct 27 01:45:03 2015 -0400
@@ -36,11 +36,12 @@
 package java.util.concurrent;
 
 import java.util.AbstractCollection;
-import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Deque;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
+import java.util.Objects;
 import java.util.Queue;
 import java.util.Spliterator;
 import java.util.Spliterators;
@@ -87,7 +88,7 @@
  * @since 1.7
  * @author Doug Lea
  * @author Martin Buchholz
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this deque
  */
 public class ConcurrentLinkedDeque<E>
     extends AbstractCollection<E>
@@ -300,47 +301,45 @@
          * only be seen after publication via casNext or casPrev.
          */
         Node(E item) {
-            UNSAFE.putObject(this, itemOffset, item);
+            U.putObject(this, ITEM, item);
         }
 
         boolean casItem(E cmp, E val) {
-            return UNSAFE.compareAndSwapObject(this, itemOffset, cmp, val);
+            return U.compareAndSwapObject(this, ITEM, cmp, val);
         }
 
         void lazySetNext(Node<E> val) {
-            UNSAFE.putOrderedObject(this, nextOffset, val);
+            U.putOrderedObject(this, NEXT, val);
         }
 
         boolean casNext(Node<E> cmp, Node<E> val) {
-            return UNSAFE.compareAndSwapObject(this, nextOffset, cmp, val);
+            return U.compareAndSwapObject(this, NEXT, cmp, val);
         }
 
         void lazySetPrev(Node<E> val) {
-            UNSAFE.putOrderedObject(this, prevOffset, val);
+            U.putOrderedObject(this, PREV, val);
         }
 
         boolean casPrev(Node<E> cmp, Node<E> val) {
-            return UNSAFE.compareAndSwapObject(this, prevOffset, cmp, val);
+            return U.compareAndSwapObject(this, PREV, cmp, val);
         }
 
         // Unsafe mechanics
 
-        private static final sun.misc.Unsafe UNSAFE;
-        private static final long prevOffset;
-        private static final long itemOffset;
-        private static final long nextOffset;
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+        private static final long PREV;
+        private static final long ITEM;
+        private static final long NEXT;
 
         static {
             try {
-                UNSAFE = sun.misc.Unsafe.getUnsafe();
-                Class<?> k = Node.class;
-                prevOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("prev"));
-                itemOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("item"));
-                nextOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("next"));
-            } catch (Exception e) {
+                PREV = U.objectFieldOffset
+                    (Node.class.getDeclaredField("prev"));
+                ITEM = U.objectFieldOffset
+                    (Node.class.getDeclaredField("item"));
+                NEXT = U.objectFieldOffset
+                    (Node.class.getDeclaredField("next"));
+            } catch (ReflectiveOperationException e) {
                 throw new Error(e);
             }
         }
@@ -350,8 +349,7 @@
      * Links e as first element.
      */
     private void linkFirst(E e) {
-        checkNotNull(e);
-        final Node<E> newNode = new Node<E>(e);
+        final Node<E> newNode = new Node<E>(Objects.requireNonNull(e));
 
         restartFromHead:
         for (;;)
@@ -383,8 +381,7 @@
      * Links e as last element.
      */
     private void linkLast(E e) {
-        checkNotNull(e);
-        final Node<E> newNode = new Node<E>(e);
+        final Node<E> newNode = new Node<E>(Objects.requireNonNull(e));
 
         restartFromTail:
         for (;;)
@@ -789,16 +786,6 @@
     // Minor convenience utilities
 
     /**
-     * Throws NullPointerException if argument is null.
-     *
-     * @param v the element
-     */
-    private static void checkNotNull(Object v) {
-        if (v == null)
-            throw new NullPointerException();
-    }
-
-    /**
      * Returns element unless it is null, in which case throws
      * NoSuchElementException.
      *
@@ -812,22 +799,6 @@
     }
 
     /**
-     * Creates an array list and fills it with elements of this list.
-     * Used by toArray.
-     *
-     * @return the array list
-     */
-    private ArrayList<E> toArrayList() {
-        ArrayList<E> list = new ArrayList<E>();
-        for (Node<E> p = first(); p != null; p = succ(p)) {
-            E item = p.item;
-            if (item != null)
-                list.add(item);
-        }
-        return list;
-    }
-
-    /**
      * Constructs an empty deque.
      */
     public ConcurrentLinkedDeque() {
@@ -847,8 +818,7 @@
         // Copy c into a private chain of Nodes
         Node<E> h = null, t = null;
         for (E e : c) {
-            checkNotNull(e);
-            Node<E> newNode = new Node<E>(e);
+            Node<E> newNode = new Node<E>(Objects.requireNonNull(e));
             if (h == null)
                 h = t = newNode;
             else {
@@ -1046,16 +1016,19 @@
     public void push(E e)     { addFirst(e); }
 
     /**
-     * Removes the first element {@code e} such that
-     * {@code o.equals(e)}, if such an element exists in this deque.
+     * Removes the first occurrence of the specified element from this deque.
      * If the deque does not contain the element, it is unchanged.
+     * More formally, removes the first element {@code e} such that
+     * {@code o.equals(e)} (if such an element exists).
+     * Returns {@code true} if this deque contained the specified element
+     * (or equivalently, if this deque changed as a result of the call).
      *
      * @param o element to be removed from this deque, if present
      * @return {@code true} if the deque contained the specified element
      * @throws NullPointerException if the specified element is null
      */
     public boolean removeFirstOccurrence(Object o) {
-        checkNotNull(o);
+        Objects.requireNonNull(o);
         for (Node<E> p = first(); p != null; p = succ(p)) {
             E item = p.item;
             if (item != null && o.equals(item) && p.casItem(item, null)) {
@@ -1067,16 +1040,19 @@
     }
 
     /**
-     * Removes the last element {@code e} such that
-     * {@code o.equals(e)}, if such an element exists in this deque.
+     * Removes the last occurrence of the specified element from this deque.
      * If the deque does not contain the element, it is unchanged.
+     * More formally, removes the last element {@code e} such that
+     * {@code o.equals(e)} (if such an element exists).
+     * Returns {@code true} if this deque contained the specified element
+     * (or equivalently, if this deque changed as a result of the call).
      *
      * @param o element to be removed from this deque, if present
      * @return {@code true} if the deque contained the specified element
      * @throws NullPointerException if the specified element is null
      */
     public boolean removeLastOccurrence(Object o) {
-        checkNotNull(o);
+        Objects.requireNonNull(o);
         for (Node<E> p = last(); p != null; p = pred(p)) {
             E item = p.item;
             if (item != null && o.equals(item) && p.casItem(item, null)) {
@@ -1088,18 +1064,20 @@
     }
 
     /**
-     * Returns {@code true} if this deque contains at least one
-     * element {@code e} such that {@code o.equals(e)}.
+     * Returns {@code true} if this deque contains the specified element.
+     * More formally, returns {@code true} if and only if this deque contains
+     * at least one element {@code e} such that {@code o.equals(e)}.
      *
      * @param o element whose presence in this deque is to be tested
      * @return {@code true} if this deque contains the specified element
      */
     public boolean contains(Object o) {
-        if (o == null) return false;
-        for (Node<E> p = first(); p != null; p = succ(p)) {
-            E item = p.item;
-            if (item != null && o.equals(item))
-                return true;
+        if (o != null) {
+            for (Node<E> p = first(); p != null; p = succ(p)) {
+                E item = p.item;
+                if (item != null && o.equals(item))
+                    return true;
+            }
         }
         return false;
     }
@@ -1130,19 +1108,28 @@
      * @return the number of elements in this deque
      */
     public int size() {
-        int count = 0;
-        for (Node<E> p = first(); p != null; p = succ(p))
-            if (p.item != null)
-                // Collection.size() spec says to max out
-                if (++count == Integer.MAX_VALUE)
-                    break;
-        return count;
+        restartFromHead: for (;;) {
+            int count = 0;
+            for (Node<E> p = first(); p != null;) {
+                if (p.item != null)
+                    if (++count == Integer.MAX_VALUE)
+                        break;  // @see Collection.size()
+                if (p == (p = p.next))
+                    continue restartFromHead;
+            }
+            return count;
+        }
     }
 
     /**
-     * Removes the first element {@code e} such that
-     * {@code o.equals(e)}, if such an element exists in this deque.
+     * Removes the first occurrence of the specified element from this deque.
      * If the deque does not contain the element, it is unchanged.
+     * More formally, removes the first element {@code e} such that
+     * {@code o.equals(e)} (if such an element exists).
+     * Returns {@code true} if this deque contained the specified element
+     * (or equivalently, if this deque changed as a result of the call).
+     *
+     * <p>This method is equivalent to {@link #removeFirstOccurrence(Object)}.
      *
      * @param o element to be removed from this deque, if present
      * @return {@code true} if the deque contained the specified element
@@ -1172,8 +1159,7 @@
         // Copy c into a private chain of Nodes
         Node<E> beginningOfTheEnd = null, last = null;
         for (E e : c) {
-            checkNotNull(e);
-            Node<E> newNode = new Node<E>(e);
+            Node<E> newNode = new Node<E>(Objects.requireNonNull(e));
             if (beginningOfTheEnd == null)
                 beginningOfTheEnd = last = newNode;
             else {
@@ -1224,6 +1210,62 @@
             ;
     }
 
+    public String toString() {
+        String[] a = null;
+        restartFromHead: for (;;) {
+            int charLength = 0;
+            int size = 0;
+            for (Node<E> p = first(); p != null;) {
+                E item = p.item;
+                if (item != null) {
+                    if (a == null)
+                        a = new String[4];
+                    else if (size == a.length)
+                        a = Arrays.copyOf(a, 2 * size);
+                    String s = item.toString();
+                    a[size++] = s;
+                    charLength += s.length();
+                }
+                if (p == (p = p.next))
+                    continue restartFromHead;
+            }
+
+            if (size == 0)
+                return "[]";
+
+            return Helpers.toString(a, size, charLength);
+        }
+    }
+
+    private Object[] toArrayInternal(Object[] a) {
+        Object[] x = a;
+        restartFromHead: for (;;) {
+            int size = 0;
+            for (Node<E> p = first(); p != null;) {
+                E item = p.item;
+                if (item != null) {
+                    if (x == null)
+                        x = new Object[4];
+                    else if (size == x.length)
+                        x = Arrays.copyOf(x, 2 * (size + 4));
+                    x[size++] = item;
+                }
+                if (p == (p = p.next))
+                    continue restartFromHead;
+            }
+            if (x == null)
+                return new Object[0];
+            else if (a != null && size <= a.length) {
+                if (a != x)
+                    System.arraycopy(x, 0, a, 0, size);
+                if (size < a.length)
+                    a[size] = null;
+                return a;
+            }
+            return (size == x.length) ? x : Arrays.copyOf(x, size);
+        }
+    }
+
     /**
      * Returns an array containing all of the elements in this deque, in
      * proper sequence (from first to last element).
@@ -1238,7 +1280,7 @@
      * @return an array containing all of the elements in this deque
      */
     public Object[] toArray() {
-        return toArrayList().toArray();
+        return toArrayInternal(null);
     }
 
     /**
@@ -1264,7 +1306,7 @@
      * The following code can be used to dump the deque into a newly
      * allocated array of {@code String}:
      *
-     *  <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
+     * <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
      *
      * Note that {@code toArray(new Object[0])} is identical in function to
      * {@code toArray()}.
@@ -1278,8 +1320,10 @@
      *         this deque
      * @throws NullPointerException if the specified array is null
      */
+    @SuppressWarnings("unchecked")
     public <T> T[] toArray(T[] a) {
-        return toArrayList().toArray(a);
+        if (a == null) throw new NullPointerException();
+        return (T[]) toArrayInternal(a);
     }
 
     /**
@@ -1346,7 +1390,7 @@
             Node<E> p = (nextNode == null) ? startNode() : nextNode(nextNode);
             for (;; p = nextNode(p)) {
                 if (p == null) {
-                    // p might be active end or TERMINATOR node; both are OK
+                    // might be at active end or TERMINATOR node; both are OK
                     nextNode = null;
                     nextItem = null;
                     break;
@@ -1426,8 +1470,9 @@
                     if (i > 0) {
                         batch = i;
                         return Spliterators.spliterator
-                            (a, 0, i, Spliterator.ORDERED | Spliterator.NONNULL |
-                             Spliterator.CONCURRENT);
+                            (a, 0, i, (Spliterator.ORDERED |
+                                       Spliterator.NONNULL |
+                                       Spliterator.CONCURRENT));
                     }
                 }
             }
@@ -1539,8 +1584,7 @@
 
         // Read in elements until trailing null sentinel found
         Node<E> h = null, t = null;
-        Object item;
-        while ((item = s.readObject()) != null) {
+        for (Object item; (item = s.readObject()) != null; ) {
             @SuppressWarnings("unchecked")
             Node<E> newNode = new Node<E>((E) item);
             if (h == null)
@@ -1555,31 +1599,29 @@
     }
 
     private boolean casHead(Node<E> cmp, Node<E> val) {
-        return UNSAFE.compareAndSwapObject(this, headOffset, cmp, val);
+        return U.compareAndSwapObject(this, HEAD, cmp, val);
     }
 
     private boolean casTail(Node<E> cmp, Node<E> val) {
-        return UNSAFE.compareAndSwapObject(this, tailOffset, cmp, val);
+        return U.compareAndSwapObject(this, TAIL, cmp, val);
     }
 
     // Unsafe mechanics
 
-    private static final sun.misc.Unsafe UNSAFE;
-    private static final long headOffset;
-    private static final long tailOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long HEAD;
+    private static final long TAIL;
     static {
         PREV_TERMINATOR = new Node<Object>();
         PREV_TERMINATOR.next = PREV_TERMINATOR;
         NEXT_TERMINATOR = new Node<Object>();
         NEXT_TERMINATOR.prev = NEXT_TERMINATOR;
         try {
-            UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = ConcurrentLinkedDeque.class;
-            headOffset = UNSAFE.objectFieldOffset
-                (k.getDeclaredField("head"));
-            tailOffset = UNSAFE.objectFieldOffset
-                (k.getDeclaredField("tail"));
-        } catch (Exception e) {
+            HEAD = U.objectFieldOffset
+                (ConcurrentLinkedDeque.class.getDeclaredField("head"));
+            TAIL = U.objectFieldOffset
+                (ConcurrentLinkedDeque.class.getDeclaredField("tail"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -36,10 +36,11 @@
 package java.util.concurrent;
 
 import java.util.AbstractQueue;
-import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
+import java.util.Objects;
 import java.util.Queue;
 import java.util.Spliterator;
 import java.util.Spliterators;
@@ -60,9 +61,9 @@
  * does not permit the use of {@code null} elements.
  *
  * <p>This implementation employs an efficient <em>non-blocking</em>
- * algorithm based on one described in <a
- * href="http://www.cs.rochester.edu/u/michael/PODC96.html"> Simple,
- * Fast, and Practical Non-Blocking and Blocking Concurrent Queue
+ * algorithm based on one described in
+ * <a href="http://www.cs.rochester.edu/~scott/papers/1996_PODC_queues.pdf">
+ * Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue
  * Algorithms</a> by Maged M. Michael and Michael L. Scott.
  *
  * <p>Iterators are <i>weakly consistent</i>, returning elements
@@ -100,7 +101,7 @@
  *
  * @since 1.5
  * @author Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this queue
  */
 public class ConcurrentLinkedQueue<E> extends AbstractQueue<E>
         implements Queue<E>, java.io.Serializable {
@@ -180,45 +181,28 @@
     private static class Node<E> {
         volatile E item;
         volatile Node<E> next;
-
-        /**
-         * Constructs a new node.  Uses relaxed write because item can
-         * only be seen after publication via casNext.
-         */
-        Node(E item) {
-            UNSAFE.putObject(this, itemOffset, item);
-        }
-
-        boolean casItem(E cmp, E val) {
-            return UNSAFE.compareAndSwapObject(this, itemOffset, cmp, val);
-        }
-
-        void lazySetNext(Node<E> val) {
-            UNSAFE.putOrderedObject(this, nextOffset, val);
-        }
+    }
 
-        boolean casNext(Node<E> cmp, Node<E> val) {
-            return UNSAFE.compareAndSwapObject(this, nextOffset, cmp, val);
-        }
-
-        // Unsafe mechanics
-
-        private static final sun.misc.Unsafe UNSAFE;
-        private static final long itemOffset;
-        private static final long nextOffset;
+    /**
+     * Returns a new node holding item.  Uses relaxed write because item
+     * can only be seen after piggy-backing publication via casNext.
+     */
+    static <E> Node<E> newNode(E item) {
+        Node<E> node = new Node<E>();
+        U.putObject(node, ITEM, item);
+        return node;
+    }
 
-        static {
-            try {
-                UNSAFE = sun.misc.Unsafe.getUnsafe();
-                Class<?> k = Node.class;
-                itemOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("item"));
-                nextOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("next"));
-            } catch (Exception e) {
-                throw new Error(e);
-            }
-        }
+    static <E> boolean casItem(Node<E> node, E cmp, E val) {
+        return U.compareAndSwapObject(node, ITEM, cmp, val);
+    }
+
+    static <E> void lazySetNext(Node<E> node, Node<E> val) {
+        U.putOrderedObject(node, NEXT, val);
+    }
+
+    static <E> boolean casNext(Node<E> node, Node<E> cmp, Node<E> val) {
+        return U.compareAndSwapObject(node, NEXT, cmp, val);
     }
 
     /**
@@ -233,7 +217,7 @@
      * - it is permitted for tail to lag behind head, that is, for tail
      *   to not be reachable from head!
      */
-    private transient volatile Node<E> head;
+    transient volatile Node<E> head;
 
     /**
      * A node from which the last node on list (that is, the unique
@@ -253,7 +237,7 @@
      * Creates a {@code ConcurrentLinkedQueue} that is initially empty.
      */
     public ConcurrentLinkedQueue() {
-        head = tail = new Node<E>(null);
+        head = tail = newNode(null);
     }
 
     /**
@@ -268,17 +252,16 @@
     public ConcurrentLinkedQueue(Collection<? extends E> c) {
         Node<E> h = null, t = null;
         for (E e : c) {
-            checkNotNull(e);
-            Node<E> newNode = new Node<E>(e);
+            Node<E> newNode = newNode(Objects.requireNonNull(e));
             if (h == null)
                 h = t = newNode;
             else {
-                t.lazySetNext(newNode);
+                lazySetNext(t, newNode);
                 t = newNode;
             }
         }
         if (h == null)
-            h = t = new Node<E>(null);
+            h = t = newNode(null);
         head = h;
         tail = t;
     }
@@ -302,8 +285,9 @@
      * as sentinel for succ(), below.
      */
     final void updateHead(Node<E> h, Node<E> p) {
+        // assert h != null && p != null && (h == p || h.item == null);
         if (h != p && casHead(h, p))
-            h.lazySetNext(h);
+            lazySetNext(h, h);
     }
 
     /**
@@ -324,14 +308,13 @@
      * @throws NullPointerException if the specified element is null
      */
     public boolean offer(E e) {
-        checkNotNull(e);
-        final Node<E> newNode = new Node<E>(e);
+        final Node<E> newNode = newNode(Objects.requireNonNull(e));
 
         for (Node<E> t = tail, p = t;;) {
             Node<E> q = p.next;
             if (q == null) {
                 // p is last node
-                if (p.casNext(null, newNode)) {
+                if (casNext(p, null, newNode)) {
                     // Successful CAS is the linearization point
                     // for e to become an element of this queue,
                     // and for newNode to become "live".
@@ -359,7 +342,7 @@
             for (Node<E> h = head, p = h, q;;) {
                 E item = p.item;
 
-                if (item != null && p.casItem(item, null)) {
+                if (item != null && casItem(p, item, null)) {
                     // Successful CAS is the linearization point
                     // for item to be removed from this queue.
                     if (p != h) // hop two nodes at a time
@@ -446,13 +429,17 @@
      * @return the number of elements in this queue
      */
     public int size() {
-        int count = 0;
-        for (Node<E> p = first(); p != null; p = succ(p))
-            if (p.item != null)
-                // Collection.size() spec says to max out
-                if (++count == Integer.MAX_VALUE)
-                    break;
-        return count;
+        restartFromHead: for (;;) {
+            int count = 0;
+            for (Node<E> p = first(); p != null;) {
+                if (p.item != null)
+                    if (++count == Integer.MAX_VALUE)
+                        break;  // @see Collection.size()
+                if (p == (p = p.next))
+                    continue restartFromHead;
+            }
+            return count;
+        }
     }
 
     /**
@@ -464,11 +451,12 @@
      * @return {@code true} if this queue contains the specified element
      */
     public boolean contains(Object o) {
-        if (o == null) return false;
-        for (Node<E> p = first(); p != null; p = succ(p)) {
-            E item = p.item;
-            if (item != null && o.equals(item))
-                return true;
+        if (o != null) {
+            for (Node<E> p = first(); p != null; p = succ(p)) {
+                E item = p.item;
+                if (item != null && o.equals(item))
+                    return true;
+            }
         }
         return false;
     }
@@ -485,19 +473,25 @@
      * @return {@code true} if this queue changed as a result of the call
      */
     public boolean remove(Object o) {
-        if (o == null) return false;
-        Node<E> pred = null;
-        for (Node<E> p = first(); p != null; p = succ(p)) {
-            E item = p.item;
-            if (item != null &&
-                o.equals(item) &&
-                p.casItem(item, null)) {
-                Node<E> next = succ(p);
-                if (pred != null && next != null)
-                    pred.casNext(p, next);
-                return true;
+        if (o != null) {
+            Node<E> next, pred = null;
+            for (Node<E> p = first(); p != null; pred = p, p = next) {
+                boolean removed = false;
+                E item = p.item;
+                if (item != null) {
+                    if (!o.equals(item)) {
+                        next = succ(p);
+                        continue;
+                    }
+                    removed = casItem(p, item, null);
+                }
+
+                next = succ(p);
+                if (pred != null && next != null) // unlink
+                    casNext(pred, p, next);
+                if (removed)
+                    return true;
             }
-            pred = p;
         }
         return false;
     }
@@ -522,12 +516,11 @@
         // Copy c into a private chain of Nodes
         Node<E> beginningOfTheEnd = null, last = null;
         for (E e : c) {
-            checkNotNull(e);
-            Node<E> newNode = new Node<E>(e);
+            Node<E> newNode = newNode(Objects.requireNonNull(e));
             if (beginningOfTheEnd == null)
                 beginningOfTheEnd = last = newNode;
             else {
-                last.lazySetNext(newNode);
+                lazySetNext(last, newNode);
                 last = newNode;
             }
         }
@@ -539,7 +532,7 @@
             Node<E> q = p.next;
             if (q == null) {
                 // p is last node
-                if (p.casNext(null, beginningOfTheEnd)) {
+                if (casNext(p, null, beginningOfTheEnd)) {
                     // Successful CAS is the linearization point
                     // for all elements to be added to this queue.
                     if (!casTail(t, last)) {
@@ -565,6 +558,62 @@
         }
     }
 
+    public String toString() {
+        String[] a = null;
+        restartFromHead: for (;;) {
+            int charLength = 0;
+            int size = 0;
+            for (Node<E> p = first(); p != null;) {
+                E item = p.item;
+                if (item != null) {
+                    if (a == null)
+                        a = new String[4];
+                    else if (size == a.length)
+                        a = Arrays.copyOf(a, 2 * size);
+                    String s = item.toString();
+                    a[size++] = s;
+                    charLength += s.length();
+                }
+                if (p == (p = p.next))
+                    continue restartFromHead;
+            }
+
+            if (size == 0)
+                return "[]";
+
+            return Helpers.toString(a, size, charLength);
+        }
+    }
+
+    private Object[] toArrayInternal(Object[] a) {
+        Object[] x = a;
+        restartFromHead: for (;;) {
+            int size = 0;
+            for (Node<E> p = first(); p != null;) {
+                E item = p.item;
+                if (item != null) {
+                    if (x == null)
+                        x = new Object[4];
+                    else if (size == x.length)
+                        x = Arrays.copyOf(x, 2 * (size + 4));
+                    x[size++] = item;
+                }
+                if (p == (p = p.next))
+                    continue restartFromHead;
+            }
+            if (x == null)
+                return new Object[0];
+            else if (a != null && size <= a.length) {
+                if (a != x)
+                    System.arraycopy(x, 0, a, 0, size);
+                if (size < a.length)
+                    a[size] = null;
+                return a;
+            }
+            return (size == x.length) ? x : Arrays.copyOf(x, size);
+        }
+    }
+
     /**
      * Returns an array containing all of the elements in this queue, in
      * proper sequence.
@@ -579,14 +628,7 @@
      * @return an array containing all of the elements in this queue
      */
     public Object[] toArray() {
-        // Use ArrayList to deal with resizing.
-        ArrayList<E> al = new ArrayList<E>();
-        for (Node<E> p = first(); p != null; p = succ(p)) {
-            E item = p.item;
-            if (item != null)
-                al.add(item);
-        }
-        return al.toArray();
+        return toArrayInternal(null);
     }
 
     /**
@@ -610,7 +652,7 @@
      * The following code can be used to dump the queue into a newly
      * allocated array of {@code String}:
      *
-     *  <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
+     * <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
      *
      * Note that {@code toArray(new Object[0])} is identical in function to
      * {@code toArray()}.
@@ -626,28 +668,8 @@
      */
     @SuppressWarnings("unchecked")
     public <T> T[] toArray(T[] a) {
-        // try to use sent-in array
-        int k = 0;
-        Node<E> p;
-        for (p = first(); p != null && k < a.length; p = succ(p)) {
-            E item = p.item;
-            if (item != null)
-                a[k++] = (T)item;
-        }
-        if (p == null) {
-            if (k < a.length)
-                a[k] = null;
-            return a;
-        }
-
-        // If won't fit, use ArrayList version
-        ArrayList<E> al = new ArrayList<E>();
-        for (Node<E> q = first(); q != null; q = succ(q)) {
-            E item = q.item;
-            if (item != null)
-                al.add(item);
-        }
-        return al.toArray(a);
+        if (a == null) throw new NullPointerException();
+        return (T[]) toArrayInternal(a);
     }
 
     /**
@@ -683,54 +705,47 @@
         private Node<E> lastRet;
 
         Itr() {
-            advance();
-        }
-
-        /**
-         * Moves to next valid node and returns item to return for
-         * next(), or null if no such.
-         */
-        private E advance() {
-            lastRet = nextNode;
-            E x = nextItem;
-
-            Node<E> pred, p;
-            if (nextNode == null) {
-                p = first();
-                pred = null;
-            } else {
-                pred = nextNode;
-                p = succ(nextNode);
-            }
-
-            for (;;) {
-                if (p == null) {
-                    nextNode = null;
-                    nextItem = null;
-                    return x;
+            restartFromHead: for (;;) {
+                Node<E> h, p, q;
+                for (p = h = head;; p = q) {
+                    E item;
+                    if ((item = p.item) != null) {
+                        nextNode = p;
+                        nextItem = item;
+                        break;
+                    }
+                    else if ((q = p.next) == null)
+                        break;
+                    else if (p == q)
+                        continue restartFromHead;
                 }
-                E item = p.item;
-                if (item != null) {
-                    nextNode = p;
-                    nextItem = item;
-                    return x;
-                } else {
-                    // skip over nulls
-                    Node<E> next = succ(p);
-                    if (pred != null && next != null)
-                        pred.casNext(p, next);
-                    p = next;
-                }
+                updateHead(h, p);
+                return;
             }
         }
 
         public boolean hasNext() {
-            return nextNode != null;
+            return nextItem != null;
         }
 
         public E next() {
-            if (nextNode == null) throw new NoSuchElementException();
-            return advance();
+            final Node<E> pred = nextNode;
+            if (pred == null) throw new NoSuchElementException();
+            // assert nextItem != null;
+            lastRet = pred;
+            E item = null;
+
+            for (Node<E> p = succ(pred), q;; p = q) {
+                if (p == null || (item = p.item) != null) {
+                    nextNode = p;
+                    E x = nextItem;
+                    nextItem = item;
+                    return x;
+                }
+                // unlink deleted nodes
+                if ((q = succ(p)) != null)
+                    casNext(pred, p, q);
+            }
         }
 
         public void remove() {
@@ -780,19 +795,18 @@
 
         // Read in elements until trailing null sentinel found
         Node<E> h = null, t = null;
-        Object item;
-        while ((item = s.readObject()) != null) {
+        for (Object item; (item = s.readObject()) != null; ) {
             @SuppressWarnings("unchecked")
-            Node<E> newNode = new Node<E>((E) item);
+            Node<E> newNode = newNode((E) item);
             if (h == null)
                 h = t = newNode;
             else {
-                t.lazySetNext(newNode);
+                lazySetNext(t, newNode);
                 t = newNode;
             }
         }
         if (h == null)
-            h = t = new Node<E>(null);
+            h = t = newNode(null);
         head = h;
         tail = t;
     }
@@ -829,8 +843,9 @@
                 if (i > 0) {
                     batch = i;
                     return Spliterators.spliterator
-                        (a, 0, i, Spliterator.ORDERED | Spliterator.NONNULL |
-                         Spliterator.CONCURRENT);
+                        (a, 0, i, (Spliterator.ORDERED |
+                                   Spliterator.NONNULL |
+                                   Spliterator.CONCURRENT));
                 }
             }
             return null;
@@ -904,38 +919,32 @@
         return new CLQSpliterator<E>(this);
     }
 
-    /**
-     * Throws NullPointerException if argument is null.
-     *
-     * @param v the element
-     */
-    private static void checkNotNull(Object v) {
-        if (v == null)
-            throw new NullPointerException();
-    }
-
     private boolean casTail(Node<E> cmp, Node<E> val) {
-        return UNSAFE.compareAndSwapObject(this, tailOffset, cmp, val);
+        return U.compareAndSwapObject(this, TAIL, cmp, val);
     }
 
     private boolean casHead(Node<E> cmp, Node<E> val) {
-        return UNSAFE.compareAndSwapObject(this, headOffset, cmp, val);
+        return U.compareAndSwapObject(this, HEAD, cmp, val);
     }
 
     // Unsafe mechanics
 
-    private static final sun.misc.Unsafe UNSAFE;
-    private static final long headOffset;
-    private static final long tailOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long HEAD;
+    private static final long TAIL;
+    private static final long ITEM;
+    private static final long NEXT;
     static {
         try {
-            UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = ConcurrentLinkedQueue.class;
-            headOffset = UNSAFE.objectFieldOffset
-                (k.getDeclaredField("head"));
-            tailOffset = UNSAFE.objectFieldOffset
-                (k.getDeclaredField("tail"));
-        } catch (Exception e) {
+            HEAD = U.objectFieldOffset
+                (ConcurrentLinkedQueue.class.getDeclaredField("head"));
+            TAIL = U.objectFieldOffset
+                (ConcurrentLinkedQueue.class.getDeclaredField("tail"));
+            ITEM = U.objectFieldOffset
+                (Node.class.getDeclaredField("item"));
+            NEXT = U.objectFieldOffset
+                (Node.class.getDeclaredField("next"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentMap.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentMap.java	Tue Oct 27 01:45:03 2015 -0400
@@ -89,7 +89,7 @@
         return ((v = get(key)) != null) ? v : defaultValue;
     }
 
-   /**
+    /**
      * {@inheritDoc}
      *
      * @implSpec The default implementation is equivalent to, for this
@@ -181,10 +181,10 @@
      *         is not supported by this map
      * @throws ClassCastException if the key or value is of an inappropriate
      *         type for this map
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified key or value is null,
      *         and this map does not permit null keys or values
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean remove(Object key, Object value);
 
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentNavigableMap.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentNavigableMap.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,7 +34,9 @@
  */
 
 package java.util.concurrent;
-import java.util.*;
+
+import java.util.NavigableMap;
+import java.util.NavigableSet;
 
 /**
  * A {@link ConcurrentMap} supporting {@link NavigableMap} operations,
@@ -101,7 +103,7 @@
      * reflected in the descending map, and vice-versa.
      *
      * <p>The returned map has an ordering equivalent to
-     * {@link Collections#reverseOrder(Comparator) Collections.reverseOrder}{@code (comparator())}.
+     * {@link java.util.Collections#reverseOrder(Comparator) Collections.reverseOrder}{@code (comparator())}.
      * The expression {@code m.descendingMap().descendingMap()} returns a
      * view of {@code m} essentially equivalent to {@code m}.
      *
@@ -125,7 +127,7 @@
      *
      * @return a navigable set view of the keys in this map
      */
-    public NavigableSet<K> navigableKeySet();
+    NavigableSet<K> navigableKeySet();
 
     /**
      * Returns a {@link NavigableSet} view of the keys contained in this map.
@@ -163,5 +165,5 @@
      *
      * @return a reverse order navigable set view of the keys in this map
      */
-    public NavigableSet<K> descendingKeySet();
+    NavigableSet<K> descendingKeySet();
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent;
+
 import java.io.Serializable;
 import java.util.AbstractCollection;
 import java.util.AbstractMap;
@@ -50,13 +51,10 @@
 import java.util.NoSuchElementException;
 import java.util.Set;
 import java.util.SortedMap;
-import java.util.SortedSet;
 import java.util.Spliterator;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ConcurrentNavigableMap;
+import java.util.function.BiConsumer;
 import java.util.function.BiFunction;
 import java.util.function.Consumer;
-import java.util.function.BiConsumer;
 import java.util.function.Function;
 import java.util.function.Predicate;
 
@@ -359,9 +357,9 @@
     private static final long serialVersionUID = -8627078645895051609L;
 
     /**
-     * Special value used to identify base-level header
+     * Special value used to identify base-level header.
      */
-    private static final Object BASE_HEADER = new Object();
+    static final Object BASE_HEADER = new Object();
 
     /**
      * The topmost head index of the skiplist.
@@ -377,11 +375,11 @@
     final Comparator<? super K> comparator;
 
     /** Lazily initialized key set */
-    private transient KeySet<K> keySet;
+    private transient KeySet<K,V> keySet;
     /** Lazily initialized entry set */
     private transient EntrySet<K,V> entrySet;
     /** Lazily initialized values collection */
-    private transient Values<V> values;
+    private transient Values<K,V> values;
     /** Lazily initialized descending key set */
     private transient ConcurrentNavigableMap<K,V> descendingMap;
 
@@ -400,10 +398,10 @@
     }
 
     /**
-     * compareAndSet head node
+     * compareAndSet head node.
      */
     private boolean casHead(HeadIndex<K,V> cmp, HeadIndex<K,V> val) {
-        return UNSAFE.compareAndSwapObject(this, headOffset, cmp, val);
+        return U.compareAndSwapObject(this, HEAD, cmp, val);
     }
 
     /* ---------------- Nodes -------------- */
@@ -443,17 +441,17 @@
         }
 
         /**
-         * compareAndSet value field
+         * compareAndSet value field.
          */
         boolean casValue(Object cmp, Object val) {
-            return UNSAFE.compareAndSwapObject(this, valueOffset, cmp, val);
+            return U.compareAndSwapObject(this, VALUE, cmp, val);
         }
 
         /**
-         * compareAndSet next field
+         * compareAndSet next field.
          */
         boolean casNext(Node<K,V> cmp, Node<K,V> val) {
-            return UNSAFE.compareAndSwapObject(this, nextOffset, cmp, val);
+            return U.compareAndSwapObject(this, NEXT, cmp, val);
         }
 
         /**
@@ -534,21 +532,19 @@
             return new AbstractMap.SimpleImmutableEntry<K,V>(key, vv);
         }
 
-        // UNSAFE mechanics
+        // Unsafe mechanics
 
-        private static final sun.misc.Unsafe UNSAFE;
-        private static final long valueOffset;
-        private static final long nextOffset;
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+        private static final long VALUE;
+        private static final long NEXT;
 
         static {
             try {
-                UNSAFE = sun.misc.Unsafe.getUnsafe();
-                Class<?> k = Node.class;
-                valueOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("value"));
-                nextOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("next"));
-            } catch (Exception e) {
+                VALUE = U.objectFieldOffset
+                    (Node.class.getDeclaredField("value"));
+                NEXT = U.objectFieldOffset
+                    (Node.class.getDeclaredField("next"));
+            } catch (ReflectiveOperationException e) {
                 throw new Error(e);
             }
         }
@@ -578,10 +574,10 @@
         }
 
         /**
-         * compareAndSet right field
+         * compareAndSet right field.
          */
         final boolean casRight(Index<K,V> cmp, Index<K,V> val) {
-            return UNSAFE.compareAndSwapObject(this, rightOffset, cmp, val);
+            return U.compareAndSwapObject(this, RIGHT, cmp, val);
         }
 
         /**
@@ -618,15 +614,13 @@
         }
 
         // Unsafe mechanics
-        private static final sun.misc.Unsafe UNSAFE;
-        private static final long rightOffset;
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+        private static final long RIGHT;
         static {
             try {
-                UNSAFE = sun.misc.Unsafe.getUnsafe();
-                Class<?> k = Index.class;
-                rightOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("right"));
-            } catch (Exception e) {
+                RIGHT = U.objectFieldOffset
+                    (Index.class.getDeclaredField("right"));
+            } catch (ReflectiveOperationException e) {
                 throw new Error(e);
             }
         }
@@ -730,10 +724,10 @@
      *
      * The traversal loops in doPut, doRemove, and findNear all
      * include the same three kinds of checks. And specialized
-     * versions appear in findFirst, and findLast and their
-     * variants. They can't easily share code because each uses the
-     * reads of fields held in locals occurring in the orders they
-     * were performed.
+     * versions appear in findFirst, and findLast and their variants.
+     * They can't easily share code because each uses the reads of
+     * fields held in locals occurring in the orders they were
+     * performed.
      *
      * @param key the key
      * @return node holding key, or null if no such
@@ -1364,7 +1358,7 @@
 
         // Track the current rightmost node at each level. Uses an
         // ArrayList to avoid committing to initial or maximum level.
-        ArrayList<Index<K,V>> preds = new ArrayList<Index<K,V>>();
+        ArrayList<Index<K,V>> preds = new ArrayList<>();
 
         // initialize
         for (int i = 0; i <= h.level; ++i)
@@ -1461,12 +1455,12 @@
          * distinct because readObject calls can't be nicely adapted
          * as the kind of iterator needed by buildFromSorted. (They
          * can be, but doing so requires type cheats and/or creation
-         * of adaptor classes.) It is simpler to just adapt the code.
+         * of adapter classes.) It is simpler to just adapt the code.
          */
 
         HeadIndex<K,V> h = head;
         Node<K,V> basepred = h.node;
-        ArrayList<Index<K,V>> preds = new ArrayList<Index<K,V>>();
+        ArrayList<Index<K,V>> preds = new ArrayList<>();
         for (int i = 0; i <= h.level; ++i)
             preds.add(null);
         Index<K,V> q = h;
@@ -1833,13 +1827,13 @@
      * @return a navigable set view of the keys in this map
      */
     public NavigableSet<K> keySet() {
-        KeySet<K> ks = keySet;
-        return (ks != null) ? ks : (keySet = new KeySet<K>(this));
+        KeySet<K,V> ks = keySet;
+        return (ks != null) ? ks : (keySet = new KeySet<>(this));
     }
 
     public NavigableSet<K> navigableKeySet() {
-        KeySet<K> ks = keySet;
-        return (ks != null) ? ks : (keySet = new KeySet<K>(this));
+        KeySet<K,V> ks = keySet;
+        return (ks != null) ? ks : (keySet = new KeySet<>(this));
     }
 
     /**
@@ -1862,8 +1856,8 @@
      * <a href="package-summary.html#Weakly"><i>weakly consistent</i></a>.
      */
     public Collection<V> values() {
-        Values<V> vs = values;
-        return (vs != null) ? vs : (values = new Values<V>(this));
+        Values<K,V> vs = values;
+        return (vs != null) ? vs : (values = new Values<>(this));
     }
 
     /**
@@ -2346,20 +2340,6 @@
         }
     }
 
-    // Factory methods for iterators needed by ConcurrentSkipListSet etc
-
-    Iterator<K> keyIterator() {
-        return new KeyIterator();
-    }
-
-    Iterator<V> valueIterator() {
-        return new ValueIterator();
-    }
-
-    Iterator<Map.Entry<K,V>> entryIterator() {
-        return new EntryIterator();
-    }
-
     /* ---------------- View Classes -------------- */
 
     /*
@@ -2376,36 +2356,34 @@
         return list;
     }
 
-    static final class KeySet<E>
-            extends AbstractSet<E> implements NavigableSet<E> {
-        final ConcurrentNavigableMap<E,?> m;
-        KeySet(ConcurrentNavigableMap<E,?> map) { m = map; }
+    static final class KeySet<K,V>
+            extends AbstractSet<K> implements NavigableSet<K> {
+        final ConcurrentNavigableMap<K,V> m;
+        KeySet(ConcurrentNavigableMap<K,V> map) { m = map; }
         public int size() { return m.size(); }
         public boolean isEmpty() { return m.isEmpty(); }
         public boolean contains(Object o) { return m.containsKey(o); }
         public boolean remove(Object o) { return m.remove(o) != null; }
         public void clear() { m.clear(); }
-        public E lower(E e) { return m.lowerKey(e); }
-        public E floor(E e) { return m.floorKey(e); }
-        public E ceiling(E e) { return m.ceilingKey(e); }
-        public E higher(E e) { return m.higherKey(e); }
-        public Comparator<? super E> comparator() { return m.comparator(); }
-        public E first() { return m.firstKey(); }
-        public E last() { return m.lastKey(); }
-        public E pollFirst() {
-            Map.Entry<E,?> e = m.pollFirstEntry();
+        public K lower(K e) { return m.lowerKey(e); }
+        public K floor(K e) { return m.floorKey(e); }
+        public K ceiling(K e) { return m.ceilingKey(e); }
+        public K higher(K e) { return m.higherKey(e); }
+        public Comparator<? super K> comparator() { return m.comparator(); }
+        public K first() { return m.firstKey(); }
+        public K last() { return m.lastKey(); }
+        public K pollFirst() {
+            Map.Entry<K,V> e = m.pollFirstEntry();
             return (e == null) ? null : e.getKey();
         }
-        public E pollLast() {
-            Map.Entry<E,?> e = m.pollLastEntry();
+        public K pollLast() {
+            Map.Entry<K,V> e = m.pollLastEntry();
             return (e == null) ? null : e.getKey();
         }
-        @SuppressWarnings("unchecked")
-        public Iterator<E> iterator() {
-            if (m instanceof ConcurrentSkipListMap)
-                return ((ConcurrentSkipListMap<E,Object>)m).keyIterator();
-            else
-                return ((ConcurrentSkipListMap.SubMap<E,Object>)m).keyIterator();
+        public Iterator<K> iterator() {
+            return (m instanceof ConcurrentSkipListMap)
+                ? ((ConcurrentSkipListMap<K,V>)m).new KeyIterator()
+                : ((SubMap<K,V>)m).new SubMapKeyIterator();
         }
         public boolean equals(Object o) {
             if (o == this)
@@ -2423,87 +2401,76 @@
         }
         public Object[] toArray()     { return toList(this).toArray();  }
         public <T> T[] toArray(T[] a) { return toList(this).toArray(a); }
-        public Iterator<E> descendingIterator() {
+        public Iterator<K> descendingIterator() {
             return descendingSet().iterator();
         }
-        public NavigableSet<E> subSet(E fromElement,
+        public NavigableSet<K> subSet(K fromElement,
                                       boolean fromInclusive,
-                                      E toElement,
+                                      K toElement,
                                       boolean toInclusive) {
-            return new KeySet<E>(m.subMap(fromElement, fromInclusive,
-                                          toElement,   toInclusive));
+            return new KeySet<>(m.subMap(fromElement, fromInclusive,
+                                         toElement,   toInclusive));
         }
-        public NavigableSet<E> headSet(E toElement, boolean inclusive) {
-            return new KeySet<E>(m.headMap(toElement, inclusive));
+        public NavigableSet<K> headSet(K toElement, boolean inclusive) {
+            return new KeySet<>(m.headMap(toElement, inclusive));
         }
-        public NavigableSet<E> tailSet(E fromElement, boolean inclusive) {
-            return new KeySet<E>(m.tailMap(fromElement, inclusive));
+        public NavigableSet<K> tailSet(K fromElement, boolean inclusive) {
+            return new KeySet<>(m.tailMap(fromElement, inclusive));
         }
-        public NavigableSet<E> subSet(E fromElement, E toElement) {
+        public NavigableSet<K> subSet(K fromElement, K toElement) {
             return subSet(fromElement, true, toElement, false);
         }
-        public NavigableSet<E> headSet(E toElement) {
+        public NavigableSet<K> headSet(K toElement) {
             return headSet(toElement, false);
         }
-        public NavigableSet<E> tailSet(E fromElement) {
+        public NavigableSet<K> tailSet(K fromElement) {
             return tailSet(fromElement, true);
         }
-        public NavigableSet<E> descendingSet() {
-            return new KeySet<E>(m.descendingMap());
+        public NavigableSet<K> descendingSet() {
+            return new KeySet<>(m.descendingMap());
         }
-        @SuppressWarnings("unchecked")
-        public Spliterator<E> spliterator() {
-            if (m instanceof ConcurrentSkipListMap)
-                return ((ConcurrentSkipListMap<E,?>)m).keySpliterator();
-            else
-                return (Spliterator<E>)((SubMap<E,?>)m).keyIterator();
+
+        public Spliterator<K> spliterator() {
+            return (m instanceof ConcurrentSkipListMap)
+                ? ((ConcurrentSkipListMap<K,V>)m).keySpliterator()
+                : ((SubMap<K,V>)m).new SubMapKeyIterator();
         }
     }
 
-    static final class Values<E> extends AbstractCollection<E> {
-        final ConcurrentNavigableMap<?, E> m;
-        Values(ConcurrentNavigableMap<?, E> map) {
+    static final class Values<K,V> extends AbstractCollection<V> {
+        final ConcurrentNavigableMap<K,V> m;
+        Values(ConcurrentNavigableMap<K,V> map) {
             m = map;
         }
-        @SuppressWarnings("unchecked")
-        public Iterator<E> iterator() {
-            if (m instanceof ConcurrentSkipListMap)
-                return ((ConcurrentSkipListMap<?,E>)m).valueIterator();
-            else
-                return ((SubMap<?,E>)m).valueIterator();
-        }
-        public boolean isEmpty() {
-            return m.isEmpty();
+        public Iterator<V> iterator() {
+            return (m instanceof ConcurrentSkipListMap)
+                ? ((ConcurrentSkipListMap<K,V>)m).new ValueIterator()
+                : ((SubMap<K,V>)m).new SubMapValueIterator();
         }
-        public int size() {
-            return m.size();
-        }
-        public boolean contains(Object o) {
-            return m.containsValue(o);
-        }
-        public void clear() {
-            m.clear();
-        }
+        public int size() { return m.size(); }
+        public boolean isEmpty() { return m.isEmpty(); }
+        public boolean contains(Object o) { return m.containsValue(o); }
+        public void clear() { m.clear(); }
         public Object[] toArray()     { return toList(this).toArray();  }
         public <T> T[] toArray(T[] a) { return toList(this).toArray(a); }
-        @SuppressWarnings("unchecked")
-        public Spliterator<E> spliterator() {
-            if (m instanceof ConcurrentSkipListMap)
-                return ((ConcurrentSkipListMap<?,E>)m).valueSpliterator();
-            else
-                return (Spliterator<E>)((SubMap<?,E>)m).valueIterator();
+
+        public Spliterator<V> spliterator() {
+            return (m instanceof ConcurrentSkipListMap)
+                ? ((ConcurrentSkipListMap<K,V>)m).valueSpliterator()
+                : ((SubMap<K,V>)m).new SubMapValueIterator();
         }
-        public boolean removeIf(Predicate<? super E> filter) {
+
+        public boolean removeIf(Predicate<? super V> filter) {
             if (filter == null) throw new NullPointerException();
             if (m instanceof ConcurrentSkipListMap)
-                return ((ConcurrentSkipListMap<?,E>)m).removeValueIf(filter);
+                return ((ConcurrentSkipListMap<K,V>)m).removeValueIf(filter);
             // else use iterator
-            @SuppressWarnings("unchecked") Iterator<Map.Entry<Object,E>> it =
-                    ((SubMap<Object,E>)m).entryIterator();
+            Iterator<Map.Entry<K,V>> it =
+                ((SubMap<K,V>)m).new SubMapEntryIterator();
             boolean removed = false;
             while (it.hasNext()) {
-                Map.Entry<Object,E> e = it.next();
-                E v = e.getValue();
+                Map.Entry<K,V> e = it.next();
+                V v = e.getValue();
                 if (filter.test(v) && m.remove(e.getKey(), v))
                     removed = true;
             }
@@ -2511,24 +2478,22 @@
         }
     }
 
-    static final class EntrySet<K1,V1> extends AbstractSet<Map.Entry<K1,V1>> {
-        final ConcurrentNavigableMap<K1, V1> m;
-        EntrySet(ConcurrentNavigableMap<K1, V1> map) {
+    static final class EntrySet<K,V> extends AbstractSet<Map.Entry<K,V>> {
+        final ConcurrentNavigableMap<K,V> m;
+        EntrySet(ConcurrentNavigableMap<K,V> map) {
             m = map;
         }
-        @SuppressWarnings("unchecked")
-        public Iterator<Map.Entry<K1,V1>> iterator() {
-            if (m instanceof ConcurrentSkipListMap)
-                return ((ConcurrentSkipListMap<K1,V1>)m).entryIterator();
-            else
-                return ((SubMap<K1,V1>)m).entryIterator();
+        public Iterator<Map.Entry<K,V>> iterator() {
+            return (m instanceof ConcurrentSkipListMap)
+                ? ((ConcurrentSkipListMap<K,V>)m).new EntryIterator()
+                : ((SubMap<K,V>)m).new SubMapEntryIterator();
         }
 
         public boolean contains(Object o) {
             if (!(o instanceof Map.Entry))
                 return false;
             Map.Entry<?,?> e = (Map.Entry<?,?>)o;
-            V1 v = m.get(e.getKey());
+            V v = m.get(e.getKey());
             return v != null && v.equals(e.getValue());
         }
         public boolean remove(Object o) {
@@ -2563,23 +2528,22 @@
         }
         public Object[] toArray()     { return toList(this).toArray();  }
         public <T> T[] toArray(T[] a) { return toList(this).toArray(a); }
-        @SuppressWarnings("unchecked")
-        public Spliterator<Map.Entry<K1,V1>> spliterator() {
-            if (m instanceof ConcurrentSkipListMap)
-                return ((ConcurrentSkipListMap<K1,V1>)m).entrySpliterator();
-            else
-                return (Spliterator<Map.Entry<K1,V1>>)
-                    ((SubMap<K1,V1>)m).entryIterator();
+
+        public Spliterator<Map.Entry<K,V>> spliterator() {
+            return (m instanceof ConcurrentSkipListMap)
+                ? ((ConcurrentSkipListMap<K,V>)m).entrySpliterator()
+                : ((SubMap<K,V>)m).new SubMapEntryIterator();
         }
-        public boolean removeIf(Predicate<? super Entry<K1, V1>> filter) {
+        public boolean removeIf(Predicate<? super Entry<K,V>> filter) {
             if (filter == null) throw new NullPointerException();
             if (m instanceof ConcurrentSkipListMap)
-                return ((ConcurrentSkipListMap<K1,V1>)m).removeEntryIf(filter);
+                return ((ConcurrentSkipListMap<K,V>)m).removeEntryIf(filter);
             // else use iterator
-            Iterator<Map.Entry<K1,V1>> it = ((SubMap<K1,V1>)m).entryIterator();
+            Iterator<Map.Entry<K,V>> it =
+                ((SubMap<K,V>)m).new SubMapEntryIterator();
             boolean removed = false;
             while (it.hasNext()) {
-                Map.Entry<K1,V1> e = it.next();
+                Map.Entry<K,V> e = it.next();
                 if (filter.test(e) && m.remove(e.getKey(), e.getValue()))
                     removed = true;
             }
@@ -2589,13 +2553,13 @@
 
     /**
      * Submaps returned by {@link ConcurrentSkipListMap} submap operations
-     * represent a subrange of mappings of their underlying
-     * maps. Instances of this class support all methods of their
-     * underlying maps, differing in that mappings outside their range are
-     * ignored, and attempts to add mappings outside their ranges result
-     * in {@link IllegalArgumentException}.  Instances of this class are
-     * constructed only using the {@code subMap}, {@code headMap}, and
-     * {@code tailMap} methods of their underlying maps.
+     * represent a subrange of mappings of their underlying maps.
+     * Instances of this class support all methods of their underlying
+     * maps, differing in that mappings outside their range are ignored,
+     * and attempts to add mappings outside their ranges result in {@link
+     * IllegalArgumentException}.  Instances of this class are constructed
+     * only using the {@code subMap}, {@code headMap}, and {@code tailMap}
+     * methods of their underlying maps.
      *
      * @serial include
      */
@@ -2604,7 +2568,7 @@
         private static final long serialVersionUID = -7647078645895051609L;
 
         /** Underlying map */
-        private final ConcurrentSkipListMap<K,V> m;
+        final ConcurrentSkipListMap<K,V> m;
         /** lower bound key, or null if from start */
         private final K lo;
         /** upper bound key, or null if to end */
@@ -2614,10 +2578,10 @@
         /** inclusion flag for hi */
         private final boolean hiInclusive;
         /** direction */
-        private final boolean isDescending;
+        final boolean isDescending;
 
         // Lazily initialized view holders
-        private transient KeySet<K> keySetView;
+        private transient KeySet<K,V> keySetView;
         private transient Set<Map.Entry<K,V>> entrySetView;
         private transient Collection<V> valuesView;
 
@@ -2790,7 +2754,7 @@
         }
 
         /**
-         * Submap version of ConcurrentSkipListMap.getNearEntry
+         * Submap version of ConcurrentSkipListMap.getNearEntry.
          */
         Map.Entry<K,V> getNearEntry(K key, int rel) {
             Comparator<? super K> cmp = m.comparator;
@@ -3085,18 +3049,18 @@
         /* ---------------- Submap Views -------------- */
 
         public NavigableSet<K> keySet() {
-            KeySet<K> ks = keySetView;
-            return (ks != null) ? ks : (keySetView = new KeySet<K>(this));
+            KeySet<K,V> ks = keySetView;
+            return (ks != null) ? ks : (keySetView = new KeySet<>(this));
         }
 
         public NavigableSet<K> navigableKeySet() {
-            KeySet<K> ks = keySetView;
-            return (ks != null) ? ks : (keySetView = new KeySet<K>(this));
+            KeySet<K,V> ks = keySetView;
+            return (ks != null) ? ks : (keySetView = new KeySet<>(this));
         }
 
         public Collection<V> values() {
             Collection<V> vs = valuesView;
-            return (vs != null) ? vs : (valuesView = new Values<V>(this));
+            return (vs != null) ? vs : (valuesView = new Values<>(this));
         }
 
         public Set<Map.Entry<K,V>> entrySet() {
@@ -3108,21 +3072,9 @@
             return descendingMap().navigableKeySet();
         }
 
-        Iterator<K> keyIterator() {
-            return new SubMapKeyIterator();
-        }
-
-        Iterator<V> valueIterator() {
-            return new SubMapValueIterator();
-        }
-
-        Iterator<Map.Entry<K,V>> entryIterator() {
-            return new SubMapEntryIterator();
-        }
-
         /**
          * Variant of main Iter class to traverse through submaps.
-         * Also serves as back-up Spliterator for views
+         * Also serves as back-up Spliterator for views.
          */
         abstract class SubMapIter<T> implements Iterator<T>, Spliterator<T> {
             /** the last node returned by next() */
@@ -3298,9 +3250,9 @@
     }
 
     /**
-     * Helper method for EntrySet.removeIf
+     * Helper method for EntrySet.removeIf.
      */
-    boolean removeEntryIf(Predicate<? super Entry<K, V>> function) {
+    boolean removeEntryIf(Predicate<? super Entry<K,V>> function) {
         if (function == null) throw new NullPointerException();
         boolean removed = false;
         for (Node<K,V> n = findFirst(); n != null; n = n.next) {
@@ -3316,7 +3268,7 @@
     }
 
     /**
-     * Helper method for Values.removeIf
+     * Helper method for Values.removeIf.
      */
     boolean removeValueIf(Predicate<? super V> function) {
         if (function == null) throw new NullPointerException();
@@ -3371,7 +3323,7 @@
             super(comparator, row, origin, fence, est);
         }
 
-        public Spliterator<K> trySplit() {
+        public KeySpliterator<K,V> trySplit() {
             Node<K,V> e; K ek;
             Comparator<? super K> cmp = comparator;
             K f = fence;
@@ -3459,7 +3411,7 @@
             super(comparator, row, origin, fence, est);
         }
 
-        public Spliterator<V> trySplit() {
+        public ValueSpliterator<K,V> trySplit() {
             Node<K,V> e; K ek;
             Comparator<? super K> cmp = comparator;
             K f = fence;
@@ -3546,7 +3498,7 @@
             super(comparator, row, origin, fence, est);
         }
 
-        public Spliterator<Map.Entry<K,V>> trySplit() {
+        public EntrySpliterator<K,V> trySplit() {
             Node<K,V> e; K ek;
             Comparator<? super K> cmp = comparator;
             K f = fence;
@@ -3644,20 +3596,13 @@
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe UNSAFE;
-    private static final long headOffset;
-    private static final long SECONDARY;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long HEAD;
     static {
         try {
-            UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = ConcurrentSkipListMap.class;
-            headOffset = UNSAFE.objectFieldOffset
-                (k.getDeclaredField("head"));
-            Class<?> tk = Thread.class;
-            SECONDARY = UNSAFE.objectFieldOffset
-                (tk.getDeclaredField("threadLocalRandomSecondarySeed"));
-
-        } catch (Exception e) {
+            HEAD = U.objectFieldOffset
+                (ConcurrentSkipListMap.class.getDeclaredField("head"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent;
+
 import java.util.AbstractSet;
 import java.util.Collection;
 import java.util.Collections;
@@ -323,8 +324,9 @@
      *
      * @param  c collection containing elements to be removed from this set
      * @return {@code true} if this set changed as a result of the call
-     * @throws ClassCastException if the types of one or more elements in this
-     *         set are incompatible with the specified collection
+     * @throws ClassCastException if the class of an element of this set
+     *         is incompatible with the specified collection
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified collection or any
      *         of its elements are null
      */
@@ -384,7 +386,6 @@
 
     /* ---------------- SortedSet operations -------------- */
 
-
     public Comparator<? super E> comparator() {
         return m.comparator();
     }
@@ -498,28 +499,24 @@
      * @return a {@code Spliterator} over the elements in this set
      * @since 1.8
      */
-    @SuppressWarnings("unchecked")
     public Spliterator<E> spliterator() {
-        if (m instanceof ConcurrentSkipListMap)
-            return ((ConcurrentSkipListMap<E,?>)m).keySpliterator();
-        else
-            return (Spliterator<E>)((ConcurrentSkipListMap.SubMap<E,?>)m).keyIterator();
+        return (m instanceof ConcurrentSkipListMap)
+            ? ((ConcurrentSkipListMap<E,?>)m).keySpliterator()
+            : ((ConcurrentSkipListMap.SubMap<E,?>)m).new SubMapKeyIterator();
     }
 
     // Support for resetting map in clone
     private void setMap(ConcurrentNavigableMap<E,Object> map) {
-        UNSAFE.putObjectVolatile(this, mapOffset, map);
+        U.putObjectVolatile(this, MAP, map);
     }
 
-    private static final sun.misc.Unsafe UNSAFE;
-    private static final long mapOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long MAP;
     static {
         try {
-            UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = ConcurrentSkipListSet.class;
-            mapOffset = UNSAFE.objectFieldOffset
-                (k.getDeclaredField("m"));
-        } catch (Exception e) {
+            MAP = U.objectFieldOffset
+                (ConcurrentSkipListSet.class.getDeclaredField("m"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java	Tue Oct 27 01:45:03 2015 -0400
@@ -33,6 +33,7 @@
  */
 
 package java.util.concurrent;
+
 import java.util.AbstractList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -46,7 +47,6 @@
 import java.util.RandomAccess;
 import java.util.Spliterator;
 import java.util.Spliterators;
-import java.util.concurrent.locks.ReentrantLock;
 import java.util.function.Consumer;
 import java.util.function.Predicate;
 import java.util.function.UnaryOperator;
@@ -86,14 +86,17 @@
  *
  * @since 1.5
  * @author Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this list
  */
 public class CopyOnWriteArrayList<E>
     implements List<E>, RandomAccess, Cloneable, java.io.Serializable {
     private static final long serialVersionUID = 8673264195747942595L;
 
-    /** The lock protecting all mutators */
-    final transient ReentrantLock lock = new ReentrantLock();
+    /**
+     * The lock protecting all mutators.  (We have a mild preference
+     * for builtin monitors over ReentrantLock when either will do.)
+     */
+    final transient Object lock = new Object();
 
     /** The array, accessed only via getArray/setArray. */
     private transient volatile Object[] array;
@@ -172,13 +175,6 @@
     }
 
     /**
-     * Tests for equality, coping with nulls.
-     */
-    private static boolean eq(Object o1, Object o2) {
-        return (o1 == null) ? o2 == null : o1.equals(o2);
-    }
-
-    /**
      * static version of indexOf, to allow repeated calls without
      * needing to re-acquire array each time.
      * @param o element to search for
@@ -224,8 +220,7 @@
     /**
      * Returns {@code true} if this list contains the specified element.
      * More formally, returns {@code true} if and only if this list contains
-     * at least one element {@code e} such that
-     * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.
+     * at least one element {@code e} such that {@code Objects.equals(o, e)}.
      *
      * @param o element whose presence in this list is to be tested
      * @return {@code true} if this list contains the specified element
@@ -248,7 +243,7 @@
      * this list, searching forwards from {@code index}, or returns -1 if
      * the element is not found.
      * More formally, returns the lowest index {@code i} such that
-     * <tt>(i&nbsp;&gt;=&nbsp;index&nbsp;&amp;&amp;&nbsp;(e==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;e.equals(get(i))))</tt>,
+     * {@code i >= index && Objects.equals(get(i), e)},
      * or -1 if there is no such index.
      *
      * @param e element to search for
@@ -276,7 +271,7 @@
      * this list, searching backwards from {@code index}, or returns -1 if
      * the element is not found.
      * More formally, returns the highest index {@code i} such that
-     * <tt>(i&nbsp;&lt;=&nbsp;index&nbsp;&amp;&amp;&nbsp;(e==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;e.equals(get(i))))</tt>,
+     * {@code i <= index && Objects.equals(get(i), e)},
      * or -1 if there is no such index.
      *
      * @param e element to search for
@@ -353,7 +348,7 @@
      * The following code can be used to dump the list into a newly
      * allocated array of {@code String}:
      *
-     *  <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
+     * <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
      *
      * Note that {@code toArray(new Object[0])} is identical in function to
      * {@code toArray()}.
@@ -368,7 +363,7 @@
      * @throws NullPointerException if the specified array is null
      */
     @SuppressWarnings("unchecked")
-    public <T> T[] toArray(T a[]) {
+    public <T> T[] toArray(T[] a) {
         Object[] elements = getArray();
         int len = elements.length;
         if (a.length < len)
@@ -388,6 +383,10 @@
         return (E) a[index];
     }
 
+    static String outOfBounds(int index, int size) {
+        return "Index: " + index + ", Size: " + size;
+    }
+
     /**
      * {@inheritDoc}
      *
@@ -404,9 +403,7 @@
      * @throws IndexOutOfBoundsException {@inheritDoc}
      */
     public E set(int index, E element) {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] elements = getArray();
             E oldValue = get(elements, index);
 
@@ -420,8 +417,6 @@
                 setArray(elements);
             }
             return oldValue;
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -432,17 +427,13 @@
      * @return {@code true} (as specified by {@link Collection#add})
      */
     public boolean add(E e) {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] elements = getArray();
             int len = elements.length;
             Object[] newElements = Arrays.copyOf(elements, len + 1);
             newElements[len] = e;
             setArray(newElements);
             return true;
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -454,14 +445,11 @@
      * @throws IndexOutOfBoundsException {@inheritDoc}
      */
     public void add(int index, E element) {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] elements = getArray();
             int len = elements.length;
             if (index > len || index < 0)
-                throw new IndexOutOfBoundsException("Index: "+index+
-                                                    ", Size: "+len);
+                throw new IndexOutOfBoundsException(outOfBounds(index, len));
             Object[] newElements;
             int numMoved = len - index;
             if (numMoved == 0)
@@ -474,8 +462,6 @@
             }
             newElements[index] = element;
             setArray(newElements);
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -487,9 +473,7 @@
      * @throws IndexOutOfBoundsException {@inheritDoc}
      */
     public E remove(int index) {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] elements = getArray();
             int len = elements.length;
             E oldValue = get(elements, index);
@@ -504,8 +488,6 @@
                 setArray(newElements);
             }
             return oldValue;
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -513,8 +495,7 @@
      * Removes the first occurrence of the specified element from this list,
      * if it is present.  If this list does not contain the element, it is
      * unchanged.  More formally, removes the element with the lowest index
-     * {@code i} such that
-     * <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>
+     * {@code i} such that {@code Objects.equals(o, get(i))}
      * (if such an element exists).  Returns {@code true} if this list
      * contained the specified element (or equivalently, if this list
      * changed as a result of the call).
@@ -533,15 +514,14 @@
      * recent snapshot contains o at the given index.
      */
     private boolean remove(Object o, Object[] snapshot, int index) {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] current = getArray();
             int len = current.length;
             if (snapshot != current) findIndex: {
                 int prefix = Math.min(index, len);
                 for (int i = 0; i < prefix; i++) {
-                    if (current[i] != snapshot[i] && eq(o, current[i])) {
+                    if (current[i] != snapshot[i]
+                        && Objects.equals(o, current[i])) {
                         index = i;
                         break findIndex;
                     }
@@ -561,8 +541,6 @@
                              len - index - 1);
             setArray(newElements);
             return true;
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -579,9 +557,7 @@
      *         ({@code fromIndex < 0 || toIndex > size() || toIndex < fromIndex})
      */
     void removeRange(int fromIndex, int toIndex) {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] elements = getArray();
             int len = elements.length;
 
@@ -598,8 +574,6 @@
                                  fromIndex, numMoved);
                 setArray(newElements);
             }
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -620,16 +594,15 @@
      * recent snapshot does not contain e.
      */
     private boolean addIfAbsent(E e, Object[] snapshot) {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] current = getArray();
             int len = current.length;
             if (snapshot != current) {
                 // Optimize for lost race to another addXXX operation
                 int common = Math.min(snapshot.length, len);
                 for (int i = 0; i < common; i++)
-                    if (current[i] != snapshot[i] && eq(e, current[i]))
+                    if (current[i] != snapshot[i]
+                        && Objects.equals(e, current[i]))
                         return false;
                 if (indexOf(e, current, common, len) >= 0)
                         return false;
@@ -638,8 +611,6 @@
             newElements[len] = e;
             setArray(newElements);
             return true;
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -672,18 +643,16 @@
      * @return {@code true} if this list changed as a result of the call
      * @throws ClassCastException if the class of an element of this list
      *         is incompatible with the specified collection
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if this list contains a null element and the
      *         specified collection does not permit null elements
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>),
+     * (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>),
      *         or if the specified collection is null
      * @see #remove(Object)
      */
     public boolean removeAll(Collection<?> c) {
         if (c == null) throw new NullPointerException();
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] elements = getArray();
             int len = elements.length;
             if (len != 0) {
@@ -701,8 +670,6 @@
                 }
             }
             return false;
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -715,18 +682,16 @@
      * @return {@code true} if this list changed as a result of the call
      * @throws ClassCastException if the class of an element of this list
      *         is incompatible with the specified collection
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if this list contains a null element and the
      *         specified collection does not permit null elements
-     *         (<a href="../Collection.html#optional-restrictions">optional</a>),
+     * (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>),
      *         or if the specified collection is null
      * @see #remove(Object)
      */
     public boolean retainAll(Collection<?> c) {
         if (c == null) throw new NullPointerException();
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] elements = getArray();
             int len = elements.length;
             if (len != 0) {
@@ -744,8 +709,6 @@
                 }
             }
             return false;
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -764,9 +727,7 @@
         Object[] cs = c.toArray();
         if (cs.length == 0)
             return 0;
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] elements = getArray();
             int len = elements.length;
             int added = 0;
@@ -783,8 +744,6 @@
                 setArray(newElements);
             }
             return added;
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -793,12 +752,8 @@
      * The list will be empty after this call returns.
      */
     public void clear() {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             setArray(new Object[0]);
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -817,9 +772,7 @@
             ((CopyOnWriteArrayList<?>)c).getArray() : c.toArray();
         if (cs.length == 0)
             return false;
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] elements = getArray();
             int len = elements.length;
             if (len == 0 && cs.getClass() == Object[].class)
@@ -830,8 +783,6 @@
                 setArray(newElements);
             }
             return true;
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -853,14 +804,11 @@
      */
     public boolean addAll(int index, Collection<? extends E> c) {
         Object[] cs = c.toArray();
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] elements = getArray();
             int len = elements.length;
             if (index > len || index < 0)
-                throw new IndexOutOfBoundsException("Index: "+index+
-                                                    ", Size: "+len);
+                throw new IndexOutOfBoundsException(outOfBounds(index, len));
             if (cs.length == 0)
                 return false;
             int numMoved = len - index;
@@ -877,52 +825,47 @@
             System.arraycopy(cs, 0, newElements, index, cs.length);
             setArray(newElements);
             return true;
-        } finally {
-            lock.unlock();
         }
     }
 
     public void forEach(Consumer<? super E> action) {
         if (action == null) throw new NullPointerException();
-        Object[] elements = getArray();
-        int len = elements.length;
-        for (int i = 0; i < len; ++i) {
-            @SuppressWarnings("unchecked") E e = (E) elements[i];
+        for (Object x : getArray()) {
+            @SuppressWarnings("unchecked") E e = (E) x;
             action.accept(e);
         }
     }
 
     public boolean removeIf(Predicate<? super E> filter) {
         if (filter == null) throw new NullPointerException();
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
-            Object[] elements = getArray();
-            int len = elements.length;
-            if (len != 0) {
-                int newlen = 0;
-                Object[] temp = new Object[len];
-                for (int i = 0; i < len; ++i) {
-                    @SuppressWarnings("unchecked") E e = (E) elements[i];
-                    if (!filter.test(e))
-                        temp[newlen++] = e;
-                }
-                if (newlen != len) {
-                    setArray(Arrays.copyOf(temp, newlen));
+        synchronized (lock) {
+            final Object[] elements = getArray();
+            final int len = elements.length;
+            int i;
+            for (i = 0; i < len; i++) {
+                @SuppressWarnings("unchecked") E e = (E) elements[i];
+                if (filter.test(e)) {
+                    int newlen = i;
+                    final Object[] newElements = new Object[len - 1];
+                    System.arraycopy(elements, 0, newElements, 0, newlen);
+                    for (i++; i < len; i++) {
+                        @SuppressWarnings("unchecked") E x = (E) elements[i];
+                        if (!filter.test(x))
+                            newElements[newlen++] = x;
+                    }
+                    setArray((newlen == len - 1)
+                             ? newElements // one match => one copy
+                             : Arrays.copyOf(newElements, newlen));
                     return true;
                 }
             }
-            return false;
-        } finally {
-            lock.unlock();
+            return false;       // zero matches => zero copies
         }
     }
 
     public void replaceAll(UnaryOperator<E> operator) {
         if (operator == null) throw new NullPointerException();
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] elements = getArray();
             int len = elements.length;
             Object[] newElements = Arrays.copyOf(elements, len);
@@ -931,22 +874,16 @@
                 newElements[i] = operator.apply(e);
             }
             setArray(newElements);
-        } finally {
-            lock.unlock();
         }
     }
 
     public void sort(Comparator<? super E> c) {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] elements = getArray();
             Object[] newElements = Arrays.copyOf(elements, elements.length);
             @SuppressWarnings("unchecked") E[] es = (E[])newElements;
             Arrays.sort(es, c);
             setArray(newElements);
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -1022,7 +959,7 @@
      * be the same if they have the same length and corresponding
      * elements at the same position in the sequence are <em>equal</em>.
      * Two elements {@code e1} and {@code e2} are considered
-     * <em>equal</em> if {@code (e1==null ? e2==null : e1.equals(e2))}.
+     * <em>equal</em> if {@code Objects.equals(e1, e2)}.
      *
      * @param o the object to be compared for equality with this list
      * @return {@code true} if the specified object is equal to this list
@@ -1033,12 +970,11 @@
         if (!(o instanceof List))
             return false;
 
-        List<?> list = (List<?>)(o);
+        List<?> list = (List<?>)o;
         Iterator<?> it = list.iterator();
         Object[] elements = getArray();
-        int len = elements.length;
-        for (int i = 0; i < len; ++i)
-            if (!it.hasNext() || !eq(elements[i], it.next()))
+        for (int i = 0, len = elements.length; i < len; i++)
+            if (!it.hasNext() || !Objects.equals(elements[i], it.next()))
                 return false;
         if (it.hasNext())
             return false;
@@ -1054,12 +990,8 @@
      */
     public int hashCode() {
         int hashCode = 1;
-        Object[] elements = getArray();
-        int len = elements.length;
-        for (int i = 0; i < len; ++i) {
-            Object obj = elements[i];
-            hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode());
-        }
+        for (Object x : getArray())
+            hashCode = 31 * hashCode + (x == null ? 0 : x.hashCode());
         return hashCode;
     }
 
@@ -1103,7 +1035,7 @@
         Object[] elements = getArray();
         int len = elements.length;
         if (index < 0 || index > len)
-            throw new IndexOutOfBoundsException("Index: "+index);
+            throw new IndexOutOfBoundsException(outOfBounds(index, len));
 
         return new COWIterator<E>(elements, index);
     }
@@ -1133,7 +1065,7 @@
         /** Index of element to be returned by subsequent call to next.  */
         private int cursor;
 
-        private COWIterator(Object[] elements, int initialCursor) {
+        COWIterator(Object[] elements, int initialCursor) {
             cursor = initialCursor;
             snapshot = elements;
         }
@@ -1196,13 +1128,12 @@
         }
 
         @Override
+        @SuppressWarnings("unchecked")
         public void forEachRemaining(Consumer<? super E> action) {
             Objects.requireNonNull(action);
-            Object[] elements = snapshot;
-            final int size = elements.length;
+            final int size = snapshot.length;
             for (int i = cursor; i < size; i++) {
-                @SuppressWarnings("unchecked") E e = (E) elements[i];
-                action.accept(e);
+                action.accept((E) snapshot[i]);
             }
             cursor = size;
         }
@@ -1224,16 +1155,12 @@
      * @throws IndexOutOfBoundsException {@inheritDoc}
      */
     public List<E> subList(int fromIndex, int toIndex) {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
+        synchronized (lock) {
             Object[] elements = getArray();
             int len = elements.length;
             if (fromIndex < 0 || toIndex > len || fromIndex > toIndex)
                 throw new IndexOutOfBoundsException();
             return new COWSubList<E>(this, fromIndex, toIndex);
-        } finally {
-            lock.unlock();
         }
     }
 
@@ -1264,6 +1191,7 @@
         // only call this holding l's lock
         COWSubList(CopyOnWriteArrayList<E> list,
                    int fromIndex, int toIndex) {
+            // assert Thread.holdsLock(list.lock);
             l = list;
             expectedArray = l.getArray();
             offset = fromIndex;
@@ -1272,94 +1200,72 @@
 
         // only call this holding l's lock
         private void checkForComodification() {
+            // assert Thread.holdsLock(l.lock);
             if (l.getArray() != expectedArray)
                 throw new ConcurrentModificationException();
         }
 
         // only call this holding l's lock
         private void rangeCheck(int index) {
+            // assert Thread.holdsLock(l.lock);
             if (index < 0 || index >= size)
-                throw new IndexOutOfBoundsException("Index: "+index+
-                                                    ",Size: "+size);
+                throw new IndexOutOfBoundsException(outOfBounds(index, size));
         }
 
         public E set(int index, E element) {
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 rangeCheck(index);
                 checkForComodification();
                 E x = l.set(index+offset, element);
                 expectedArray = l.getArray();
                 return x;
-            } finally {
-                lock.unlock();
             }
         }
 
         public E get(int index) {
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 rangeCheck(index);
                 checkForComodification();
                 return l.get(index+offset);
-            } finally {
-                lock.unlock();
             }
         }
 
         public int size() {
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 checkForComodification();
                 return size;
-            } finally {
-                lock.unlock();
             }
         }
 
         public void add(int index, E element) {
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 checkForComodification();
                 if (index < 0 || index > size)
-                    throw new IndexOutOfBoundsException();
+                    throw new IndexOutOfBoundsException
+                        (outOfBounds(index, size));
                 l.add(index+offset, element);
                 expectedArray = l.getArray();
                 size++;
-            } finally {
-                lock.unlock();
             }
         }
 
         public void clear() {
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 checkForComodification();
                 l.removeRange(offset, offset+size);
                 expectedArray = l.getArray();
                 size = 0;
-            } finally {
-                lock.unlock();
             }
         }
 
         public E remove(int index) {
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 rangeCheck(index);
                 checkForComodification();
                 E result = l.remove(index+offset);
                 expectedArray = l.getArray();
                 size--;
                 return result;
-            } finally {
-                lock.unlock();
             }
         }
 
@@ -1372,41 +1278,29 @@
         }
 
         public Iterator<E> iterator() {
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 checkForComodification();
                 return new COWSubListIterator<E>(l, 0, offset, size);
-            } finally {
-                lock.unlock();
             }
         }
 
         public ListIterator<E> listIterator(int index) {
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 checkForComodification();
                 if (index < 0 || index > size)
-                    throw new IndexOutOfBoundsException("Index: "+index+
-                                                        ", Size: "+size);
+                    throw new IndexOutOfBoundsException
+                        (outOfBounds(index, size));
                 return new COWSubListIterator<E>(l, index, offset, size);
-            } finally {
-                lock.unlock();
             }
         }
 
         public List<E> subList(int fromIndex, int toIndex) {
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 checkForComodification();
                 if (fromIndex < 0 || toIndex > size || fromIndex > toIndex)
                     throw new IndexOutOfBoundsException();
                 return new COWSubList<E>(l, fromIndex + offset,
                                          toIndex + offset);
-            } finally {
-                lock.unlock();
             }
         }
 
@@ -1427,9 +1321,7 @@
 
         public void replaceAll(UnaryOperator<E> operator) {
             if (operator == null) throw new NullPointerException();
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 int lo = offset;
                 int hi = offset + size;
                 Object[] elements = expectedArray;
@@ -1444,15 +1336,11 @@
                     newElements[i] = operator.apply(e);
                 }
                 l.setArray(expectedArray = newElements);
-            } finally {
-                lock.unlock();
             }
         }
 
         public void sort(Comparator<? super E> c) {
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 int lo = offset;
                 int hi = offset + size;
                 Object[] elements = expectedArray;
@@ -1465,17 +1353,13 @@
                 @SuppressWarnings("unchecked") E[] es = (E[])newElements;
                 Arrays.sort(es, lo, hi, c);
                 l.setArray(expectedArray = newElements);
-            } finally {
-                lock.unlock();
             }
         }
 
         public boolean removeAll(Collection<?> c) {
             if (c == null) throw new NullPointerException();
             boolean removed = false;
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 int n = size;
                 if (n > 0) {
                     int lo = offset;
@@ -1504,8 +1388,6 @@
                         l.setArray(expectedArray = newElements);
                     }
                 }
-            } finally {
-                lock.unlock();
             }
             return removed;
         }
@@ -1513,9 +1395,7 @@
         public boolean retainAll(Collection<?> c) {
             if (c == null) throw new NullPointerException();
             boolean removed = false;
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 int n = size;
                 if (n > 0) {
                     int lo = offset;
@@ -1544,8 +1424,6 @@
                         l.setArray(expectedArray = newElements);
                     }
                 }
-            } finally {
-                lock.unlock();
             }
             return removed;
         }
@@ -1553,9 +1431,7 @@
         public boolean removeIf(Predicate<? super E> filter) {
             if (filter == null) throw new NullPointerException();
             boolean removed = false;
-            final ReentrantLock lock = l.lock;
-            lock.lock();
-            try {
+            synchronized (l.lock) {
                 int n = size;
                 if (n > 0) {
                     int lo = offset;
@@ -1584,8 +1460,6 @@
                         l.setArray(expectedArray = newElements);
                     }
                 }
-            } finally {
-                lock.unlock();
             }
             return removed;
         }
@@ -1658,29 +1532,26 @@
         }
 
         @Override
+        @SuppressWarnings("unchecked")
         public void forEachRemaining(Consumer<? super E> action) {
             Objects.requireNonNull(action);
-            int s = size;
-            ListIterator<E> i = it;
-            while (nextIndex() < s) {
-                action.accept(i.next());
+            while (nextIndex() < size) {
+                action.accept(it.next());
             }
         }
     }
 
     // Support for resetting lock while deserializing
     private void resetLock() {
-        UNSAFE.putObjectVolatile(this, lockOffset, new ReentrantLock());
+        U.putObjectVolatile(this, LOCK, new Object());
     }
-    private static final sun.misc.Unsafe UNSAFE;
-    private static final long lockOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long LOCK;
     static {
         try {
-            UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = CopyOnWriteArrayList.class;
-            lockOffset = UNSAFE.objectFieldOffset
-                (k.getDeclaredField("lock"));
-        } catch (Exception e) {
+            LOCK = U.objectFieldOffset
+                (CopyOnWriteArrayList.class.getDeclaredField("lock"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,14 +34,16 @@
  */
 
 package java.util.concurrent;
+
+import java.util.AbstractSet;
 import java.util.Collection;
+import java.util.Iterator;
+import java.util.Objects;
 import java.util.Set;
-import java.util.AbstractSet;
-import java.util.Iterator;
 import java.util.Spliterator;
 import java.util.Spliterators;
+import java.util.function.Consumer;
 import java.util.function.Predicate;
-import java.util.function.Consumer;
 
 /**
  * A {@link java.util.Set} that uses an internal {@link CopyOnWriteArrayList}
@@ -66,12 +68,12 @@
  * copy-on-write set to maintain a set of Handler objects that
  * perform some action upon state updates.
  *
- *  <pre> {@code
+ * <pre> {@code
  * class Handler { void handle(); ... }
  *
  * class X {
  *   private final CopyOnWriteArraySet<Handler> handlers
- *     = new CopyOnWriteArraySet<Handler>();
+ *     = new CopyOnWriteArraySet<>();
  *   public void addHandler(Handler h) { handlers.add(h); }
  *
  *   private long internalState;
@@ -91,7 +93,7 @@
  * @see CopyOnWriteArrayList
  * @since 1.5
  * @author Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this set
  */
 public class CopyOnWriteArraySet<E> extends AbstractSet<E>
         implements java.io.Serializable {
@@ -146,8 +148,7 @@
     /**
      * Returns {@code true} if this set contains the specified element.
      * More formally, returns {@code true} if and only if this set
-     * contains an element {@code e} such that
-     * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.
+     * contains an element {@code e} such that {@code Objects.equals(o, e)}.
      *
      * @param o element whose presence in this set is to be tested
      * @return {@code true} if this set contains the specified element
@@ -203,7 +204,7 @@
      * The following code can be used to dump the set into a newly allocated
      * array of {@code String}:
      *
-     *  <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
+     * <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
      *
      * Note that {@code toArray(new Object[0])} is identical in function to
      * {@code toArray()}.
@@ -232,11 +233,10 @@
     /**
      * Removes the specified element from this set if it is present.
      * More formally, removes an element {@code e} such that
-     * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>,
-     * if this set contains such an element.  Returns {@code true} if
-     * this set contained the element (or equivalently, if this set
-     * changed as a result of the call).  (This set will not contain the
-     * element once the call returns.)
+     * {@code Objects.equals(o, e)}, if this set contains such an element.
+     * Returns {@code true} if this set contained the element (or
+     * equivalently, if this set changed as a result of the call).
+     * (This set will not contain the element once the call returns.)
      *
      * @param o object to be removed from this set, if present
      * @return {@code true} if this set contained the specified element
@@ -249,7 +249,7 @@
      * Adds the specified element to this set if it is not already present.
      * More formally, adds the specified element {@code e} to this set if
      * the set contains no element {@code e2} such that
-     * <tt>(e==null&nbsp;?&nbsp;e2==null&nbsp;:&nbsp;e.equals(e2))</tt>.
+     * {@code Objects.equals(e, e2)}.
      * If this set already contains the element, the call leaves the set
      * unchanged and returns {@code false}.
      *
@@ -273,7 +273,44 @@
      * @see #contains(Object)
      */
     public boolean containsAll(Collection<?> c) {
-        return al.containsAll(c);
+        return (c instanceof Set)
+            ? compareSets(al.getArray(), (Set<?>) c) >= 0
+            : al.containsAll(c);
+    }
+
+    /**
+     * Tells whether the objects in snapshot (regarded as a set) are a
+     * superset of the given set.
+     *
+     * @return -1 if snapshot is not a superset, 0 if the two sets
+     * contain precisely the same elements, and 1 if snapshot is a
+     * proper superset of the given set
+     */
+    private static int compareSets(Object[] snapshot, Set<?> set) {
+        // Uses O(n^2) algorithm, that is only appropriate for small
+        // sets, which CopyOnWriteArraySets should be.
+        //
+        // Optimize up to O(n) if the two sets share a long common prefix,
+        // as might happen if one set was created as a copy of the other set.
+
+        final int len = snapshot.length;
+        // Mark matched elements to avoid re-checking
+        final boolean[] matched = new boolean[len];
+
+        // j is the largest int with matched[i] true for { i | 0 <= i < j }
+        int j = 0;
+        outer: for (Object x : set) {
+            for (int i = j; i < len; i++) {
+                if (!matched[i] && Objects.equals(x, snapshot[i])) {
+                    matched[i] = true;
+                    if (i == j)
+                        do { j++; } while (j < len && matched[j]);
+                    continue outer;
+                }
+            }
+            return -1;
+        }
+        return (j == len) ? 0 : 1;
     }
 
     /**
@@ -302,9 +339,11 @@
      * @param  c collection containing elements to be removed from this set
      * @return {@code true} if this set changed as a result of the call
      * @throws ClassCastException if the class of an element of this set
-     *         is incompatible with the specified collection (optional)
+     *         is incompatible with the specified collection
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if this set contains a null element and the
-     *         specified collection does not permit null elements (optional),
+     *         specified collection does not permit null elements
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
      *         or if the specified collection is null
      * @see #remove(Object)
      */
@@ -323,9 +362,11 @@
      * @param  c collection containing elements to be retained in this set
      * @return {@code true} if this set changed as a result of the call
      * @throws ClassCastException if the class of an element of this set
-     *         is incompatible with the specified collection (optional)
+     *         is incompatible with the specified collection
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if this set contains a null element and the
-     *         specified collection does not permit null elements (optional),
+     *         specified collection does not permit null elements
+     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
      *         or if the specified collection is null
      * @see #remove(Object)
      */
@@ -359,41 +400,15 @@
      * number of elements and for every element {@code e1} returned by
      * the iterator over the specified set, there is an element
      * {@code e2} returned by the iterator over this set such that
-     * {@code (e1==null ? e2==null : e1.equals(e2))}.
+     * {@code Objects.equals(e1, e2)}.
      *
      * @param o object to be compared for equality with this set
      * @return {@code true} if the specified object is equal to this set
      */
     public boolean equals(Object o) {
-        if (o == this)
-            return true;
-        if (!(o instanceof Set))
-            return false;
-        Set<?> set = (Set<?>)(o);
-        Iterator<?> it = set.iterator();
-
-        // Uses O(n^2) algorithm that is only appropriate
-        // for small sets, which CopyOnWriteArraySets should be.
-
-        //  Use a single snapshot of underlying array
-        Object[] elements = al.getArray();
-        int len = elements.length;
-        // Mark matched elements to avoid re-checking
-        boolean[] matched = new boolean[len];
-        int k = 0;
-        outer: while (it.hasNext()) {
-            if (++k > len)
-                return false;
-            Object x = it.next();
-            for (int i = 0; i < len; ++i) {
-                if (!matched[i] && eq(x, elements[i])) {
-                    matched[i] = true;
-                    continue outer;
-                }
-            }
-            return false;
-        }
-        return k == len;
+        return (o == this)
+            || ((o instanceof Set)
+                && compareSets(al.getArray(), (Set<?>) o) == 0);
     }
 
     public boolean removeIf(Predicate<? super E> filter) {
@@ -423,11 +438,4 @@
         return Spliterators.spliterator
             (al.getArray(), Spliterator.IMMUTABLE | Spliterator.DISTINCT);
     }
-
-    /**
-     * Tests for equality, coping with nulls.
-     */
-    private static boolean eq(Object o1, Object o2) {
-        return (o1 == null) ? o2 == null : o1.equals(o2);
-    }
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/CountDownLatch.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/CountDownLatch.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent;
+
 import java.util.concurrent.locks.AbstractQueuedSynchronizer;
 
 /**
@@ -72,7 +73,7 @@
  * until all workers have completed.
  * </ul>
  *
- *  <pre> {@code
+ * <pre> {@code
  * class Driver { // ...
  *   void main() throws InterruptedException {
  *     CountDownLatch startSignal = new CountDownLatch(1);
@@ -113,7 +114,7 @@
  * will be able to pass through await. (When threads must repeatedly
  * count down in this way, instead use a {@link CyclicBarrier}.)
  *
- *  <pre> {@code
+ * <pre> {@code
  * class Driver2 { // ...
  *   void main() throws InterruptedException {
  *     CountDownLatch doneSignal = new CountDownLatch(N);
@@ -179,7 +180,7 @@
                 int c = getState();
                 if (c == 0)
                     return false;
-                int nextc = c-1;
+                int nextc = c - 1;
                 if (compareAndSetState(c, nextc))
                     return nextc == 0;
             }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java	Tue Oct 27 01:45:03 2015 -0400
@@ -168,7 +168,8 @@
  * {@code tryComplete}) the pending count is set to one:
  *
  * <pre> {@code
- * class ForEach<E> ...
+ * class ForEach<E> ... {
+ *   ...
  *   public void compute() { // version 2
  *     if (hi - lo >= 2) {
  *       int mid = (lo + hi) >>> 1;
@@ -182,7 +183,7 @@
  *       tryComplete();
  *     }
  *   }
- * }</pre>
+ * }}</pre>
  *
  * As a further improvement, notice that the left task need not even exist.
  * Instead of creating a new one, we can iterate using the original task,
@@ -191,9 +192,10 @@
  * {@code tryComplete()} can be replaced with {@link #propagateCompletion}.
  *
  * <pre> {@code
- * class ForEach<E> ...
+ * class ForEach<E> ... {
+ *   ...
  *   public void compute() { // version 3
- *     int l = lo,  h = hi;
+ *     int l = lo, h = hi;
  *     while (h - l >= 2) {
  *       int mid = (l + h) >>> 1;
  *       addToPendingCount(1);
@@ -204,7 +206,7 @@
  *       op.apply(array[l]);
  *     propagateCompletion();
  *   }
- * }</pre>
+ * }}</pre>
  *
  * Additional improvements of such classes might entail precomputing
  * pending counts so that they can be established in constructors,
@@ -233,7 +235,7 @@
  *   }
  *   public E getRawResult() { return result.get(); }
  *   public void compute() { // similar to ForEach version 3
- *     int l = lo,  h = hi;
+ *     int l = lo, h = hi;
  *     while (result.get() == null && h >= l) {
  *       if (h - l >= 2) {
  *         int mid = (l + h) >>> 1;
@@ -363,7 +365,7 @@
  *     this.next = next;
  *   }
  *   public void compute() {
- *     int l = lo,  h = hi;
+ *     int l = lo, h = hi;
  *     while (h - l >= 2) {
  *       int mid = (l + h) >>> 1;
  *       addToPendingCount(1);
@@ -374,7 +376,7 @@
  *       result = mapper.apply(array[l]);
  *     // process completions by reducing along and advancing subtask links
  *     for (CountedCompleter<?> c = firstComplete(); c != null; c = c.nextComplete()) {
- *       for (MapReducer t = (MapReducer)c, s = t.forks;  s != null; s = t.forks = s.next)
+ *       for (MapReducer t = (MapReducer)c, s = t.forks; s != null; s = t.forks = s.next)
  *         t.result = reducer.apply(t.result, s.result);
  *     }
  *   }
@@ -402,8 +404,7 @@
  * // sample use:
  * PacketSender p = new PacketSender();
  * new HeaderBuilder(p, ...).fork();
- * new BodyBuilder(p, ...).fork();
- * }</pre>
+ * new BodyBuilder(p, ...).fork();}</pre>
  *
  * @since 1.8
  * @author Doug Lea
@@ -733,7 +734,7 @@
     }
 
     /**
-     * Returns the result of the computation. By default
+     * Returns the result of the computation.  By default,
      * returns {@code null}, which is appropriate for {@code Void}
      * actions, but in other cases should be overridden, almost
      * always to return a field or function of a field that
@@ -753,14 +754,13 @@
     protected void setRawResult(T t) { }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe U;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
     private static final long PENDING;
     static {
         try {
-            U = sun.misc.Unsafe.getUnsafe();
             PENDING = U.objectFieldOffset
                 (CountedCompleter.class.getDeclaredField("pending"));
-        } catch (Exception e) {
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/CyclicBarrier.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/CyclicBarrier.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent;
+
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;
 
@@ -54,7 +55,7 @@
  * <p><b>Sample usage:</b> Here is an example of using a barrier in a
  * parallel decomposition design:
  *
- *  <pre> {@code
+ * <pre> {@code
  * class Solver {
  *   final int N;
  *   final float[][] data;
@@ -85,7 +86,7 @@
  *       new Runnable() { public void run() { mergeRows(...); }};
  *     barrier = new CyclicBarrier(N, barrierAction);
  *
- *     List<Thread> threads = new ArrayList<Thread>(N);
+ *     List<Thread> threads = new ArrayList<>(N);
  *     for (int i = 0; i < N; i++) {
  *       Thread thread = new Thread(new Worker(i));
  *       threads.add(thread);
@@ -111,7 +112,7 @@
  * {@link #await} returns the arrival index of that thread at the barrier.
  * You can then choose which thread should execute the barrier action, for
  * example:
- *  <pre> {@code
+ * <pre> {@code
  * if (barrier.await() == 0) {
  *   // log the completion of this iteration
  * }}</pre>
@@ -149,7 +150,7 @@
      * but no subsequent reset.
      */
     private static class Generation {
-        boolean broken = false;
+        boolean broken;         // initially false
     }
 
     /** The lock for guarding barrier entry */
@@ -158,7 +159,7 @@
     private final Condition trip = lock.newCondition();
     /** The number of parties */
     private final int parties;
-    /* The command to run when tripped */
+    /** The command to run when tripped */
     private final Runnable barrierCommand;
     /** The current generation */
     private Generation generation = new Generation();
--- a/jdk/src/java.base/share/classes/java/util/concurrent/DelayQueue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/DelayQueue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,10 +34,16 @@
  */
 
 package java.util.concurrent;
+
 import static java.util.concurrent.TimeUnit.NANOSECONDS;
+
+import java.util.AbstractQueue;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+import java.util.PriorityQueue;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;
-import java.util.*;
 
 /**
  * An unbounded {@linkplain BlockingQueue blocking queue} of
@@ -65,7 +71,7 @@
  *
  * @since 1.5
  * @author Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this queue
  */
 public class DelayQueue<E extends Delayed> extends AbstractQueue<E>
     implements BlockingQueue<E> {
@@ -89,7 +95,7 @@
      * signalled.  So waiting threads must be prepared to acquire
      * and lose leadership while waiting.
      */
-    private Thread leader = null;
+    private Thread leader;
 
     /**
      * Condition signalled when a newer element becomes available
@@ -185,10 +191,9 @@
         lock.lock();
         try {
             E first = q.peek();
-            if (first == null || first.getDelay(NANOSECONDS) > 0)
-                return null;
-            else
-                return q.poll();
+            return (first == null || first.getDelay(NANOSECONDS) > 0)
+                ? null
+                : q.poll();
         } finally {
             lock.unlock();
         }
@@ -211,7 +216,7 @@
                     available.await();
                 else {
                     long delay = first.getDelay(NANOSECONDS);
-                    if (delay <= 0)
+                    if (delay <= 0L)
                         return q.poll();
                     first = null; // don't retain ref while waiting
                     if (leader != null)
@@ -253,15 +258,15 @@
             for (;;) {
                 E first = q.peek();
                 if (first == null) {
-                    if (nanos <= 0)
+                    if (nanos <= 0L)
                         return null;
                     else
                         nanos = available.awaitNanos(nanos);
                 } else {
                     long delay = first.getDelay(NANOSECONDS);
-                    if (delay <= 0)
+                    if (delay <= 0L)
                         return q.poll();
-                    if (nanos <= 0)
+                    if (nanos <= 0L)
                         return null;
                     first = null; // don't retain ref while waiting
                     if (nanos < delay || leader != null)
@@ -490,7 +495,7 @@
     }
 
     /**
-     * Identity-based version for use in Itr.remove
+     * Identity-based version for use in Itr.remove.
      */
     void removeEQ(Object o) {
         final ReentrantLock lock = this.lock;
--- a/jdk/src/java.base/share/classes/java/util/concurrent/Exchanger.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/Exchanger.java	Tue Oct 27 01:45:03 2015 -0400
@@ -35,9 +35,6 @@
  */
 
 package java.util.concurrent;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.LockSupport;
 
 /**
  * A synchronization point at which threads can pair and swap elements
@@ -53,9 +50,9 @@
  * to swap buffers between threads so that the thread filling the
  * buffer gets a freshly emptied one when it needs it, handing off the
  * filled one to the thread emptying the buffer.
- *  <pre> {@code
+ * <pre> {@code
  * class FillAndEmpty {
- *   Exchanger<DataBuffer> exchanger = new Exchanger<DataBuffer>();
+ *   Exchanger<DataBuffer> exchanger = new Exchanger<>();
  *   DataBuffer initialEmptyBuffer = ... a made-up type
  *   DataBuffer initialFullBuffer = ...
  *
@@ -326,7 +323,7 @@
     }
 
     /**
-     * Per-thread state
+     * Per-thread state.
      */
     private final Participant participant;
 
@@ -628,37 +625,33 @@
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe U;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
     private static final long BOUND;
     private static final long SLOT;
     private static final long MATCH;
     private static final long BLOCKER;
     private static final int ABASE;
     static {
-        int s;
         try {
-            U = sun.misc.Unsafe.getUnsafe();
-            Class<?> ek = Exchanger.class;
-            Class<?> nk = Node.class;
-            Class<?> ak = Node[].class;
-            Class<?> tk = Thread.class;
             BOUND = U.objectFieldOffset
-                (ek.getDeclaredField("bound"));
+                (Exchanger.class.getDeclaredField("bound"));
             SLOT = U.objectFieldOffset
-                (ek.getDeclaredField("slot"));
+                (Exchanger.class.getDeclaredField("slot"));
+
             MATCH = U.objectFieldOffset
-                (nk.getDeclaredField("match"));
+                (Node.class.getDeclaredField("match"));
+
             BLOCKER = U.objectFieldOffset
-                (tk.getDeclaredField("parkBlocker"));
-            s = U.arrayIndexScale(ak);
+                (Thread.class.getDeclaredField("parkBlocker"));
+
+            int scale = U.arrayIndexScale(Node[].class);
+            if ((scale & (scale - 1)) != 0 || scale > (1 << ASHIFT))
+                throw new Error("Unsupported array scale");
             // ABASE absorbs padding in front of element 0
-            ABASE = U.arrayBaseOffset(ak) + (1 << ASHIFT);
-
-        } catch (Exception e) {
+            ABASE = U.arrayBaseOffset(Node[].class) + (1 << ASHIFT);
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
-        if ((s & (s-1)) != 0 || s > (1 << ASHIFT))
-            throw new Error("Unsupported array scale");
     }
 
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/Executor.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/Executor.java	Tue Oct 27 01:45:03 2015 -0400
@@ -41,33 +41,31 @@
  * mechanics of how each task will be run, including details of thread
  * use, scheduling, etc.  An {@code Executor} is normally used
  * instead of explicitly creating threads. For example, rather than
- * invoking {@code new Thread(new(RunnableTask())).start()} for each
+ * invoking {@code new Thread(new RunnableTask()).start()} for each
  * of a set of tasks, you might use:
  *
- * <pre>
- * Executor executor = <em>anExecutor</em>;
+ * <pre> {@code
+ * Executor executor = anExecutor();
  * executor.execute(new RunnableTask1());
  * executor.execute(new RunnableTask2());
- * ...
- * </pre>
+ * ...}</pre>
  *
- * However, the {@code Executor} interface does not strictly
- * require that execution be asynchronous. In the simplest case, an
- * executor can run the submitted task immediately in the caller's
- * thread:
+ * However, the {@code Executor} interface does not strictly require
+ * that execution be asynchronous. In the simplest case, an executor
+ * can run the submitted task immediately in the caller's thread:
  *
- *  <pre> {@code
+ * <pre> {@code
  * class DirectExecutor implements Executor {
  *   public void execute(Runnable r) {
  *     r.run();
  *   }
  * }}</pre>
  *
- * More typically, tasks are executed in some thread other
- * than the caller's thread.  The executor below spawns a new thread
- * for each task.
+ * More typically, tasks are executed in some thread other than the
+ * caller's thread.  The executor below spawns a new thread for each
+ * task.
  *
- *  <pre> {@code
+ * <pre> {@code
  * class ThreadPerTaskExecutor implements Executor {
  *   public void execute(Runnable r) {
  *     new Thread(r).start();
@@ -79,9 +77,9 @@
  * serializes the submission of tasks to a second executor,
  * illustrating a composite executor.
  *
- *  <pre> {@code
+ * <pre> {@code
  * class SerialExecutor implements Executor {
- *   final Queue<Runnable> tasks = new ArrayDeque<Runnable>();
+ *   final Queue<Runnable> tasks = new ArrayDeque<>();
  *   final Executor executor;
  *   Runnable active;
  *
@@ -90,7 +88,7 @@
  *   }
  *
  *   public synchronized void execute(final Runnable r) {
- *     tasks.offer(new Runnable() {
+ *     tasks.add(new Runnable() {
  *       public void run() {
  *         try {
  *           r.run();
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorCompletionService.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorCompletionService.java	Tue Oct 27 01:45:03 2015 -0400
@@ -56,16 +56,16 @@
  * void solve(Executor e,
  *            Collection<Callable<Result>> solvers)
  *     throws InterruptedException, ExecutionException {
- *     CompletionService<Result> ecs
- *         = new ExecutorCompletionService<Result>(e);
- *     for (Callable<Result> s : solvers)
- *         ecs.submit(s);
- *     int n = solvers.size();
- *     for (int i = 0; i < n; ++i) {
- *         Result r = ecs.take().get();
- *         if (r != null)
- *             use(r);
- *     }
+ *   CompletionService<Result> ecs
+ *       = new ExecutorCompletionService<Result>(e);
+ *   for (Callable<Result> s : solvers)
+ *     ecs.submit(s);
+ *   int n = solvers.size();
+ *   for (int i = 0; i < n; ++i) {
+ *     Result r = ecs.take().get();
+ *     if (r != null)
+ *       use(r);
+ *   }
  * }}</pre>
  *
  * Suppose instead that you would like to use the first non-null result
@@ -76,32 +76,31 @@
  * void solve(Executor e,
  *            Collection<Callable<Result>> solvers)
  *     throws InterruptedException {
- *     CompletionService<Result> ecs
- *         = new ExecutorCompletionService<Result>(e);
- *     int n = solvers.size();
- *     List<Future<Result>> futures
- *         = new ArrayList<Future<Result>>(n);
- *     Result result = null;
- *     try {
- *         for (Callable<Result> s : solvers)
- *             futures.add(ecs.submit(s));
- *         for (int i = 0; i < n; ++i) {
- *             try {
- *                 Result r = ecs.take().get();
- *                 if (r != null) {
- *                     result = r;
- *                     break;
- *                 }
- *             } catch (ExecutionException ignore) {}
+ *   CompletionService<Result> ecs
+ *       = new ExecutorCompletionService<Result>(e);
+ *   int n = solvers.size();
+ *   List<Future<Result>> futures = new ArrayList<>(n);
+ *   Result result = null;
+ *   try {
+ *     for (Callable<Result> s : solvers)
+ *       futures.add(ecs.submit(s));
+ *     for (int i = 0; i < n; ++i) {
+ *       try {
+ *         Result r = ecs.take().get();
+ *         if (r != null) {
+ *           result = r;
+ *           break;
  *         }
+ *       } catch (ExecutionException ignore) {}
  *     }
- *     finally {
- *         for (Future<Result> f : futures)
- *             f.cancel(true);
- *     }
+ *   }
+ *   finally {
+ *     for (Future<Result> f : futures)
+ *       f.cancel(true);
+ *   }
  *
- *     if (result != null)
- *         use(result);
+ *   if (result != null)
+ *     use(result);
  * }}</pre>
  */
 public class ExecutorCompletionService<V> implements CompletionService<V> {
@@ -110,15 +109,18 @@
     private final BlockingQueue<Future<V>> completionQueue;
 
     /**
-     * FutureTask extension to enqueue upon completion
+     * FutureTask extension to enqueue upon completion.
      */
-    private class QueueingFuture extends FutureTask<Void> {
-        QueueingFuture(RunnableFuture<V> task) {
+    private static class QueueingFuture<V> extends FutureTask<Void> {
+        QueueingFuture(RunnableFuture<V> task,
+                       BlockingQueue<Future<V>> completionQueue) {
             super(task, null);
             this.task = task;
+            this.completionQueue = completionQueue;
         }
+        private final Future<V> task;
+        private final BlockingQueue<Future<V>> completionQueue;
         protected void done() { completionQueue.add(task); }
-        private final Future<V> task;
     }
 
     private RunnableFuture<V> newTaskFor(Callable<V> task) {
@@ -178,14 +180,14 @@
     public Future<V> submit(Callable<V> task) {
         if (task == null) throw new NullPointerException();
         RunnableFuture<V> f = newTaskFor(task);
-        executor.execute(new QueueingFuture(f));
+        executor.execute(new QueueingFuture<V>(f, completionQueue));
         return f;
     }
 
     public Future<V> submit(Runnable task, V result) {
         if (task == null) throw new NullPointerException();
         RunnableFuture<V> f = newTaskFor(task, result);
-        executor.execute(new QueueingFuture(f));
+        executor.execute(new QueueingFuture<V>(f, completionQueue));
         return f;
     }
 
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorService.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorService.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,8 +34,9 @@
  */
 
 package java.util.concurrent;
+
+import java.util.Collection;
 import java.util.List;
-import java.util.Collection;
 
 /**
  * An {@link Executor} that provides methods to manage termination and
@@ -71,7 +72,7 @@
  * pool service incoming requests. It uses the preconfigured {@link
  * Executors#newFixedThreadPool} factory method:
  *
- *  <pre> {@code
+ * <pre> {@code
  * class NetworkService implements Runnable {
  *   private final ServerSocket serverSocket;
  *   private final ExecutorService pool;
@@ -105,7 +106,7 @@
  * first by calling {@code shutdown} to reject incoming tasks, and then
  * calling {@code shutdownNow}, if necessary, to cancel any lingering tasks:
  *
- *  <pre> {@code
+ * <pre> {@code
  * void shutdownAndAwaitTermination(ExecutorService pool) {
  *   pool.shutdown(); // Disable new tasks from being submitted
  *   try {
--- a/jdk/src/java.base/share/classes/java/util/concurrent/Executors.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/Executors.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,14 +34,16 @@
  */
 
 package java.util.concurrent;
-import java.util.*;
-import java.util.concurrent.atomic.AtomicInteger;
+
 import java.security.AccessControlContext;
+import java.security.AccessControlException;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
-import java.security.AccessControlException;
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
 import sun.security.util.SecurityConstants;
 
 /**
@@ -51,18 +53,18 @@
  * package. This class supports the following kinds of methods:
  *
  * <ul>
- *   <li> Methods that create and return an {@link ExecutorService}
- *        set up with commonly useful configuration settings.
- *   <li> Methods that create and return a {@link ScheduledExecutorService}
- *        set up with commonly useful configuration settings.
- *   <li> Methods that create and return a "wrapped" ExecutorService, that
- *        disables reconfiguration by making implementation-specific methods
- *        inaccessible.
- *   <li> Methods that create and return a {@link ThreadFactory}
- *        that sets newly created threads to a known state.
- *   <li> Methods that create and return a {@link Callable}
- *        out of other closure-like forms, so they can be used
- *        in execution methods requiring {@code Callable}.
+ *   <li>Methods that create and return an {@link ExecutorService}
+ *       set up with commonly useful configuration settings.
+ *   <li>Methods that create and return a {@link ScheduledExecutorService}
+ *       set up with commonly useful configuration settings.
+ *   <li>Methods that create and return a "wrapped" ExecutorService, that
+ *       disables reconfiguration by making implementation-specific methods
+ *       inaccessible.
+ *   <li>Methods that create and return a {@link ThreadFactory}
+ *       that sets newly created threads to a known state.
+ *   <li>Methods that create and return a {@link Callable}
+ *       out of other closure-like forms, so they can be used
+ *       in execution methods requiring {@code Callable}.
  * </ul>
  *
  * @since 1.5
@@ -114,9 +116,10 @@
     }
 
     /**
-     * Creates a work-stealing thread pool using all
-     * {@link Runtime#availableProcessors available processors}
+     * Creates a work-stealing thread pool using the number of
+     * {@linkplain Runtime#availableProcessors available processors}
      * as its target parallelism level.
+     *
      * @return the newly created thread pool
      * @see #newWorkStealingPool(int)
      * @since 1.8
@@ -498,11 +501,11 @@
     // Non-public classes supporting the public methods
 
     /**
-     * A callable that runs given task and returns given result
+     * A callable that runs given task and returns given result.
      */
-    static final class RunnableAdapter<T> implements Callable<T> {
-        final Runnable task;
-        final T result;
+    private static final class RunnableAdapter<T> implements Callable<T> {
+        private final Runnable task;
+        private final T result;
         RunnableAdapter(Runnable task, T result) {
             this.task = task;
             this.result = result;
@@ -514,11 +517,11 @@
     }
 
     /**
-     * A callable that runs under established access control settings
+     * A callable that runs under established access control settings.
      */
-    static final class PrivilegedCallable<T> implements Callable<T> {
-        private final Callable<T> task;
-        private final AccessControlContext acc;
+    private static final class PrivilegedCallable<T> implements Callable<T> {
+        final Callable<T> task;
+        final AccessControlContext acc;
 
         PrivilegedCallable(Callable<T> task) {
             this.task = task;
@@ -541,12 +544,13 @@
 
     /**
      * A callable that runs under established access control settings and
-     * current ClassLoader
+     * current ClassLoader.
      */
-    static final class PrivilegedCallableUsingCurrentClassLoader<T> implements Callable<T> {
-        private final Callable<T> task;
-        private final AccessControlContext acc;
-        private final ClassLoader ccl;
+    private static final class PrivilegedCallableUsingCurrentClassLoader<T>
+            implements Callable<T> {
+        final Callable<T> task;
+        final AccessControlContext acc;
+        final ClassLoader ccl;
 
         PrivilegedCallableUsingCurrentClassLoader(Callable<T> task) {
             SecurityManager sm = System.getSecurityManager();
@@ -591,9 +595,9 @@
     }
 
     /**
-     * The default thread factory
+     * The default thread factory.
      */
-    static class DefaultThreadFactory implements ThreadFactory {
+    private static class DefaultThreadFactory implements ThreadFactory {
         private static final AtomicInteger poolNumber = new AtomicInteger(1);
         private final ThreadGroup group;
         private final AtomicInteger threadNumber = new AtomicInteger(1);
@@ -621,11 +625,11 @@
     }
 
     /**
-     * Thread factory capturing access control context and class loader
+     * Thread factory capturing access control context and class loader.
      */
-    static class PrivilegedThreadFactory extends DefaultThreadFactory {
-        private final AccessControlContext acc;
-        private final ClassLoader ccl;
+    private static class PrivilegedThreadFactory extends DefaultThreadFactory {
+        final AccessControlContext acc;
+        final ClassLoader ccl;
 
         PrivilegedThreadFactory() {
             super();
@@ -662,7 +666,8 @@
      * A wrapper class that exposes only the ExecutorService methods
      * of an ExecutorService implementation.
      */
-    static class DelegatedExecutorService extends AbstractExecutorService {
+    private static class DelegatedExecutorService
+            extends AbstractExecutorService {
         private final ExecutorService e;
         DelegatedExecutorService(ExecutorService executor) { e = executor; }
         public void execute(Runnable command) { e.execute(command); }
@@ -703,8 +708,8 @@
         }
     }
 
-    static class FinalizableDelegatedExecutorService
-        extends DelegatedExecutorService {
+    private static class FinalizableDelegatedExecutorService
+            extends DelegatedExecutorService {
         FinalizableDelegatedExecutorService(ExecutorService executor) {
             super(executor);
         }
@@ -717,7 +722,7 @@
      * A wrapper class that exposes only the ScheduledExecutorService
      * methods of a ScheduledExecutorService implementation.
      */
-    static class DelegatedScheduledExecutorService
+    private static class DelegatedScheduledExecutorService
             extends DelegatedExecutorService
             implements ScheduledExecutorService {
         private final ScheduledExecutorService e;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/Flow.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,319 @@
+/*
+ * 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.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Doug Lea with assistance from members of JCP JSR-166
+ * Expert Group and released to the public domain, as explained at
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+package java.util.concurrent;
+
+/**
+ * Interrelated interfaces and static methods for establishing
+ * flow-controlled components in which {@link Publisher Publishers}
+ * produce items consumed by one or more {@link Subscriber
+ * Subscribers}, each managed by a {@link Subscription
+ * Subscription}.
+ *
+ * <p>These interfaces correspond to the <a
+ * href="http://www.reactive-streams.org/"> reactive-streams</a>
+ * specification.  They apply in both concurrent and distributed
+ * asynchronous settings: All (seven) methods are defined in {@code
+ * void} "one-way" message style. Communication relies on a simple form
+ * of flow control (method {@link Subscription#request}) that can be
+ * used to avoid resource management problems that may otherwise occur
+ * in "push" based systems.
+ *
+ * <p><b>Examples.</b> A {@link Publisher} usually defines its own
+ * {@link Subscription} implementation; constructing one in method
+ * {@code subscribe} and issuing it to the calling {@link
+ * Subscriber}. It publishes items to the subscriber asynchronously,
+ * normally using an {@link Executor}.  For example, here is a very
+ * simple publisher that only issues (when requested) a single {@code
+ * TRUE} item to a single subscriber.  Because the subscriber receives
+ * only a single item, this class does not use buffering and ordering
+ * control required in most implementations (for example {@link
+ * SubmissionPublisher}).
+ *
+ * <pre> {@code
+ * class OneShotPublisher implements Publisher<Boolean> {
+ *   private final ExecutorService executor = ForkJoinPool.commonPool(); // daemon-based
+ *   private boolean subscribed; // true after first subscribe
+ *   public synchronized void subscribe(Subscriber<? super Boolean> subscriber) {
+ *     if (subscribed)
+ *        subscriber.onError(new IllegalStateException()); // only one allowed
+ *     else {
+ *       subscribed = true;
+ *       subscriber.onSubscribe(new OneShotSubscription(subscriber, executor));
+ *     }
+ *   }
+ *   static class OneShotSubscription implements Subscription {
+ *     private final Subscriber<? super Boolean> subscriber;
+ *     private final ExecutorService executor;
+ *     private Future<?> future; // to allow cancellation
+ *     private boolean completed;
+ *     OneShotSubscription(Subscriber<? super Boolean> subscriber,
+ *                         ExecutorService executor) {
+ *       this.subscriber = subscriber;
+ *       this.executor = executor;
+ *     }
+ *     public synchronized void request(long n) {
+ *       if (n != 0 && !completed) {
+ *         completed = true;
+ *         if (n < 0) {
+ *           IllegalArgumentException ex = new IllegalArgumentException();
+ *           executor.execute(() -> subscriber.onError(ex));
+ *         } else {
+ *           future = executor.submit(() -> {
+ *             subscriber.onNext(Boolean.TRUE);
+ *             subscriber.onComplete();
+ *           });
+ *         }
+ *       }
+ *     }
+ *     public synchronized void cancel() {
+ *       completed = true;
+ *       if (future != null) future.cancel(false);
+ *     }
+ *   }
+ * }}</pre>
+ *
+ * <p>A {@link Subscriber} arranges that items be requested and
+ * processed.  Items (invocations of {@link Subscriber#onNext}) are
+ * not issued unless requested, but multiple items may be requested.
+ * Many Subscriber implementations can arrange this in the style of
+ * the following example, where a buffer size of 1 single-steps, and
+ * larger sizes usually allow for more efficient overlapped processing
+ * with less communication; for example with a value of 64, this keeps
+ * total outstanding requests between 32 and 64.
+ * Because Subscriber method invocations for a given {@link
+ * Subscription} are strictly ordered, there is no need for these
+ * methods to use locks or volatiles unless a Subscriber maintains
+ * multiple Subscriptions (in which case it is better to instead
+ * define multiple Subscribers, each with its own Subscription).
+ *
+ * <pre> {@code
+ * class SampleSubscriber<T> implements Subscriber<T> {
+ *   final Consumer<? super T> consumer;
+ *   Subscription subscription;
+ *   final long bufferSize;
+ *   long count;
+ *   SampleSubscriber(long bufferSize, Consumer<? super T> consumer) {
+ *     this.bufferSize = bufferSize;
+ *     this.consumer = consumer;
+ *   }
+ *   public void onSubscribe(Subscription subscription) {
+ *     long initialRequestSize = bufferSize;
+ *     count = bufferSize - bufferSize / 2; // re-request when half consumed
+ *     (this.subscription = subscription).request(initialRequestSize);
+ *   }
+ *   public void onNext(T item) {
+ *     if (--count <= 0)
+ *       subscription.request(count = bufferSize - bufferSize / 2);
+ *     consumer.accept(item);
+ *   }
+ *   public void onError(Throwable ex) { ex.printStackTrace(); }
+ *   public void onComplete() {}
+ * }}</pre>
+ *
+ * <p>The default value of {@link #defaultBufferSize} may provide a
+ * useful starting point for choosing request sizes and capacities in
+ * Flow components based on expected rates, resources, and usages.
+ * Or, when flow control is never needed, a subscriber may initially
+ * request an effectively unbounded number of items, as in:
+ *
+ * <pre> {@code
+ * class UnboundedSubscriber<T> implements Subscriber<T> {
+ *   public void onSubscribe(Subscription subscription) {
+ *     subscription.request(Long.MAX_VALUE); // effectively unbounded
+ *   }
+ *   public void onNext(T item) { use(item); }
+ *   public void onError(Throwable ex) { ex.printStackTrace(); }
+ *   public void onComplete() {}
+ *   void use(T item) { ... }
+ * }}</pre>
+ *
+ * @author Doug Lea
+ * @since 1.9
+ */
+public final class Flow {
+
+    private Flow() {} // uninstantiable
+
+    /**
+     * A producer of items (and related control messages) received by
+     * Subscribers.  Each current {@link Subscriber} receives the same
+     * items (via method {@code onNext}) in the same order, unless
+     * drops or errors are encountered. If a Publisher encounters an
+     * error that does not allow items to be issued to a Subscriber,
+     * that Subscriber receives {@code onError}, and then receives no
+     * further messages.  Otherwise, when it is known that no further
+     * messages will be issued to it, a subscriber receives {@code
+     * onComplete}.  Publishers ensure that Subscriber method
+     * invocations for each subscription are strictly ordered in <a
+     * href="package-summary.html#MemoryVisibility"><i>happens-before</i></a>
+     * order.
+     *
+     * <p>Publishers may vary in policy about whether drops (failures
+     * to issue an item because of resource limitations) are treated
+     * as unrecoverable errors.  Publishers may also vary about
+     * whether Subscribers receive items that were produced or
+     * available before they subscribed.
+     *
+     * @param <T> the published item type
+     */
+    @FunctionalInterface
+    public static interface Publisher<T> {
+        /**
+         * Adds the given Subscriber if possible.  If already
+         * subscribed, or the attempt to subscribe fails due to policy
+         * violations or errors, the Subscriber's {@code onError}
+         * method is invoked with an {@link IllegalStateException}.
+         * Otherwise, the Subscriber's {@code onSubscribe} method is
+         * invoked with a new {@link Subscription}.  Subscribers may
+         * enable receiving items by invoking the {@code request}
+         * method of this Subscription, and may unsubscribe by
+         * invoking its {@code cancel} method.
+         *
+         * @param subscriber the subscriber
+         * @throws NullPointerException if subscriber is null
+         */
+        public void subscribe(Subscriber<? super T> subscriber);
+    }
+
+    /**
+     * A receiver of messages.  The methods in this interface are
+     * invoked in strict sequential order for each {@link
+     * Subscription}.
+     *
+     * @param <T> the subscribed item type
+     */
+    public static interface Subscriber<T> {
+        /**
+         * Method invoked prior to invoking any other Subscriber
+         * methods for the given Subscription. If this method throws
+         * an exception, resulting behavior is not guaranteed, but may
+         * cause the Subscription not to be established or to be cancelled.
+         *
+         * <p>Typically, implementations of this method invoke {@code
+         * subscription.request} to enable receiving items.
+         *
+         * @param subscription a new subscription
+         */
+        public void onSubscribe(Subscription subscription);
+
+        /**
+         * Method invoked with a Subscription's next item.  If this
+         * method throws an exception, resulting behavior is not
+         * guaranteed, but may cause the Subscription to be cancelled.
+         *
+         * @param item the item
+         */
+        public void onNext(T item);
+
+        /**
+         * Method invoked upon an unrecoverable error encountered by a
+         * Publisher or Subscription, after which no other Subscriber
+         * methods are invoked by the Subscription.  If this method
+         * itself throws an exception, resulting behavior is
+         * undefined.
+         *
+         * @param throwable the exception
+         */
+        public void onError(Throwable throwable);
+
+        /**
+         * Method invoked when it is known that no additional
+         * Subscriber method invocations will occur for a Subscription
+         * that is not already terminated by error, after which no
+         * other Subscriber methods are invoked by the Subscription.
+         * If this method throws an exception, resulting behavior is
+         * undefined.
+         */
+        public void onComplete();
+    }
+
+    /**
+     * Message control linking a {@link Publisher} and {@link
+     * Subscriber}.  Subscribers receive items only when requested,
+     * and may cancel at any time. The methods in this interface are
+     * intended to be invoked only by their Subscribers; usages in
+     * other contexts have undefined effects.
+     */
+    public static interface Subscription {
+        /**
+         * Adds the given number {@code n} of items to the current
+         * unfulfilled demand for this subscription.  If {@code n} is
+         * negative, the Subscriber will receive an {@code onError}
+         * signal with an {@link IllegalArgumentException} argument.
+         * Otherwise, the Subscriber will receive up to {@code n}
+         * additional {@code onNext} invocations (or fewer if
+         * terminated).
+         *
+         * @param n the increment of demand; a value of {@code
+         * Long.MAX_VALUE} may be considered as effectively unbounded
+         */
+        public void request(long n);
+
+        /**
+         * Causes the Subscriber to (eventually) stop receiving
+         * messages.  Implementation is best-effort -- additional
+         * messages may be received after invoking this method.
+         * A cancelled subscription need not ever receive an
+         * {@code onComplete} or {@code onError} signal.
+         */
+        public void cancel();
+    }
+
+    /**
+     * A component that acts as both a Subscriber and Publisher.
+     *
+     * @param <T> the subscribed item type
+     * @param <R> the published item type
+     */
+    public static interface Processor<T,R> extends Subscriber<T>, Publisher<R> {
+    }
+
+    static final int DEFAULT_BUFFER_SIZE = 256;
+
+    /**
+     * Returns a default value for Publisher or Subscriber buffering,
+     * that may be used in the absence of other constraints.
+     *
+     * @implNote
+     * The current value returned is 256.
+     *
+     * @return the buffer size value
+     */
+    public static int defaultBufferSize() {
+        return DEFAULT_BUFFER_SIZE;
+    }
+
+}
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Tue Oct 27 01:45:03 2015 -0400
@@ -36,23 +36,16 @@
 package java.util.concurrent;
 
 import java.lang.Thread.UncaughtExceptionHandler;
+import java.security.AccessControlContext;
+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.concurrent.AbstractExecutorService;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.RunnableFuture;
-import java.util.concurrent.ThreadLocalRandom;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-import java.security.AccessControlContext;
-import java.security.ProtectionDomain;
-import java.security.Permissions;
+import java.util.concurrent.locks.ReentrantLock;
+import java.util.concurrent.locks.LockSupport;
 
 /**
  * An {@link ExecutorService} for running {@link ForkJoinTask}s.
@@ -216,42 +209,60 @@
      * arbitrating pop vs poll (steal) from being on the indices
      * ("base" and "top") to the slots themselves.
      *
-     * Adding tasks then takes the form of a classic array push(task):
-     *    q.array[q.top] = task; ++q.top;
+     * Adding tasks then takes the form of a classic array push(task)
+     * in a circular buffer:
+     *    q.array[q.top++ % length] = task;
      *
      * (The actual code needs to null-check and size-check the array,
-     * properly fence the accesses, and possibly signal waiting
-     * workers to start scanning -- see below.)  Both a successful pop
-     * and poll mainly entail a CAS of a slot from non-null to null.
+     * uses masking, not mod, for indexing a power-of-two-sized array,
+     * properly fences accesses, and possibly signals waiting workers
+     * to start scanning -- see below.)  Both a successful pop and
+     * poll mainly entail a CAS of a slot from non-null to null.
      *
      * The pop operation (always performed by owner) is:
-     *   if ((base != top) and
-     *        (the task at top slot is not null) and
+     *   if ((the task at top slot is not null) and
      *        (CAS slot to null))
      *           decrement top and return task;
      *
      * And the poll operation (usually by a stealer) is
-     *    if ((base != top) and
-     *        (the task at base slot is not null) and
-     *        (base has not changed) and
+     *    if ((the task at base slot is not null) and
      *        (CAS slot to null))
      *           increment base and return task;
      *
-     * Because we rely on CASes of references, we do not need tag bits
-     * on base or top.  They are simple ints as used in any circular
-     * array-based queue (see for example ArrayDeque).  Updates to the
-     * indices guarantee that top == base means the queue is empty,
-     * but otherwise may err on the side of possibly making the queue
-     * appear nonempty when a push, pop, or poll have not fully
-     * committed. (Method isEmpty() checks the case of a partially
+     * There are several variants of each of these; for example most
+     * versions of poll pre-screen the CAS by rechecking that the base
+     * has not changed since reading the slot, and most methods only
+     * attempt the CAS if base appears not to be equal to top.
+     *
+     * Memory ordering.  See "Correct and Efficient Work-Stealing for
+     * Weak Memory Models" by Le, Pop, Cohen, and Nardelli, PPoPP 2013
+     * (http://www.di.ens.fr/~zappa/readings/ppopp13.pdf) for an
+     * analysis of memory ordering requirements in work-stealing
+     * algorithms similar to (but different than) the one used here.
+     * Extracting tasks in array slots via (fully fenced) CAS provides
+     * primary synchronization. The base and top indices imprecisely
+     * guide where to extract from. We do not always require strict
+     * orderings of array and index updates, so sometimes let them be
+     * subject to compiler and processor reorderings. However, the
+     * volatile "base" index also serves as a basis for memory
+     * ordering: Slot accesses are preceded by a read of base,
+     * ensuring happens-before ordering with respect to stealers (so
+     * the slots themselves can be read via plain array reads.)  The
+     * only other memory orderings relied on are maintained in the
+     * course of signalling and activation (see below).  A check that
+     * base == top indicates (momentary) emptiness, but otherwise may
+     * err on the side of possibly making the queue appear nonempty
+     * when a push, pop, or poll have not fully committed, or making
+     * it appear empty when an update of top has not yet been visibly
+     * written.  (Method isEmpty() checks the case of a partially
      * completed removal of the last element.)  Because of this, the
      * poll operation, considered individually, is not wait-free. One
      * thief cannot successfully continue until another in-progress
-     * one (or, if previously empty, a push) completes.  However, in
-     * the aggregate, we ensure at least probabilistic
-     * non-blockingness.  If an attempted steal fails, a thief always
-     * chooses a different random victim target to try next. So, in
-     * order for one thief to progress, it suffices for any
+     * one (or, if previously empty, a push) visibly completes.
+     * However, in the aggregate, we ensure at least probabilistic
+     * non-blockingness.  If an attempted steal fails, a scanning
+     * thief chooses a different random victim target to try next. So,
+     * in order for one thief to progress, it suffices for any
      * in-progress poll or new push on any empty queue to
      * complete. (This is why we normally use method pollAt and its
      * variants that try once at the apparent base index, else
@@ -262,19 +273,6 @@
      * local task processing is in FIFO, not LIFO order, simply by
      * using poll rather than pop.  This can be useful in
      * message-passing frameworks in which tasks are never joined.
-     * However neither mode considers affinities, loads, cache
-     * localities, etc, so rarely provide the best possible
-     * performance on a given machine, but portably provide good
-     * throughput by averaging over these factors.  Further, even if
-     * we did try to use such information, we do not usually have a
-     * basis for exploiting it.  For example, some sets of tasks
-     * profit from cache affinities, but others are harmed by cache
-     * pollution effects. Additionally, even though it requires
-     * scanning, long-term throughput is often best using random
-     * selection rather than directed selection policies, so cheap
-     * randomization of sufficient quality is used whenever
-     * applicable.  Various Marsaglia XorShifts (some with different
-     * shift constants) are inlined at use points.
      *
      * WorkQueues are also used in a similar way for tasks submitted
      * to the pool. We cannot mix these tasks in the same queues used
@@ -286,14 +284,14 @@
      * like workers except that they are restricted to executing local
      * tasks that they submitted (or in the case of CountedCompleters,
      * others with the same root task).  Insertion of tasks in shared
-     * mode requires a lock (mainly to protect in the case of
-     * resizing) but we use only a simple spinlock (using field
-     * qlock), because submitters encountering a busy queue move on to
-     * try or create other queues -- they block only when creating and
-     * registering new queues. Additionally, "qlock" saturates to an
-     * unlockable value (-1) at shutdown. Unlocking still can be and
-     * is performed by cheaper ordered writes of "qlock" in successful
-     * cases, but uses CAS in unsuccessful cases.
+     * mode requires a lock but we use only a simple spinlock (using
+     * field qlock), because submitters encountering a busy queue move
+     * on to try or create other queues -- they block only when
+     * creating and registering new queues. Because it is used only as
+     * a spinlock, unlocking requires only a "releasing" store (using
+     * putOrderedInt).  The qlock is also used during termination
+     * detection, in which case it is forced to a negative
+     * non-lockable value.
      *
      * Management
      * ==========
@@ -320,46 +318,36 @@
      * and their negations (used for thresholding) to fit into 16bit
      * subfields.
      *
-     * Field "runState" holds lockable state bits (STARTED, STOP, etc)
-     * also protecting updates to the workQueues array.  When used as
-     * a lock, it is normally held only for a few instructions (the
-     * only exceptions are one-time array initialization and uncommon
-     * resizing), so is nearly always available after at most a brief
-     * spin. But to be extra-cautious, after spinning, method
-     * awaitRunStateLock (called only if an initial CAS fails), uses a
-     * wait/notify mechanics on a builtin monitor to block when
-     * (rarely) needed. This would be a terrible idea for a highly
-     * contended lock, but most pools run without the lock ever
-     * contending after the spin limit, so this works fine as a more
-     * conservative alternative. Because we don't otherwise have an
-     * internal Object to use as a monitor, the "stealCounter" (an
-     * AtomicLong) is used when available (it too must be lazily
-     * initialized; see externalSubmit).
+     * Field "runState" holds lifetime status, atomically and
+     * monotonically setting STARTED, SHUTDOWN, STOP, and finally
+     * TERMINATED bits.
+     *
+     * Field "auxState" is a ReentrantLock subclass that also
+     * opportunistically holds some other bookkeeping fields accessed
+     * only when locked.  It is mainly used to lock (infrequent)
+     * updates to workQueues.  The auxState instance is itself lazily
+     * constructed (see tryInitialize), requiring a double-check-style
+     * bootstrapping use of field runState, and locking a private
+     * static.
      *
-     * Usages of "runState" vs "ctl" interact in only one case:
-     * deciding to add a worker thread (see tryAddWorker), in which
-     * case the ctl CAS is performed while the lock is held.
-     *
-     * Recording WorkQueues.  WorkQueues are recorded in the
-     * "workQueues" array. The array is created upon first use (see
-     * externalSubmit) and expanded if necessary.  Updates to the
-     * array while recording new workers and unrecording terminated
-     * ones are protected from each other by the runState lock, but
-     * the array is otherwise concurrently readable, and accessed
+     * Field "workQueues" holds references to WorkQueues.  It is
+     * updated (only during worker creation and termination) under the
+     * lock, but is otherwise concurrently readable, and accessed
      * directly. We also ensure that reads of the array reference
-     * itself never become too stale. To simplify index-based
-     * operations, the array size is always a power of two, and all
-     * readers must tolerate null slots. Worker queues are at odd
-     * indices. Shared (submission) queues are at even indices, up to
-     * a maximum of 64 slots, to limit growth even if array needs to
-     * expand to add more workers. Grouping them together in this way
-     * simplifies and speeds up task scanning.
+     * itself never become too stale (for example, re-reading before
+     * each scan). To simplify index-based operations, the array size
+     * is always a power of two, and all readers must tolerate null
+     * slots. Worker queues are at odd indices. Shared (submission)
+     * queues are at even indices, up to a maximum of 64 slots, to
+     * limit growth even if array needs to expand to add more
+     * workers. Grouping them together in this way simplifies and
+     * speeds up task scanning.
      *
      * All worker thread creation is on-demand, triggered by task
      * submissions, replacement of terminated workers, and/or
      * compensation for blocked workers. However, all other support
      * code is set up to work with other policies.  To ensure that we
-     * do not hold on to worker references that would prevent GC, All
+     * do not hold on to worker references that would prevent GC, all
      * accesses to workQueues are via indices into the workQueues
      * array (which is one source of some of the messy code
      * constructions here). In essence, the workQueues array serves as
@@ -386,7 +374,7 @@
      * activating threads in most-recently used order. This improves
      * performance and locality, outweighing the disadvantages of
      * being prone to contention and inability to release a worker
-     * unless it is topmost on stack.  We park/unpark workers after
+     * unless it is topmost on stack.  We block/unblock workers after
      * pushing on the idle worker stack (represented by the lower
      * 32bit subfield of ctl) when they cannot find work.  The top
      * stack state holds the value of the "scanState" field of the
@@ -394,48 +382,14 @@
      * addition to the count subfields (also serving as version
      * stamps) provide protection against Treiber stack ABA effects.
      *
-     * Field scanState is used by both workers and the pool to manage
-     * and track whether a worker is INACTIVE (possibly blocked
-     * waiting for a signal), or SCANNING for tasks (when neither hold
-     * it is busy running tasks).  When a worker is inactivated, its
-     * scanState field is set, and is prevented from executing tasks,
-     * even though it must scan once for them to avoid queuing
-     * races. Note that scanState updates lag queue CAS releases so
-     * usage requires care. When queued, the lower 16 bits of
-     * scanState must hold its pool index. So we place the index there
-     * upon initialization (see registerWorker) and otherwise keep it
-     * there or restore it when necessary.
-     *
-     * Memory ordering.  See "Correct and Efficient Work-Stealing for
-     * Weak Memory Models" by Le, Pop, Cohen, and Nardelli, PPoPP 2013
-     * (http://www.di.ens.fr/~zappa/readings/ppopp13.pdf) for an
-     * analysis of memory ordering requirements in work-stealing
-     * algorithms similar to the one used here.  We usually need
-     * stronger than minimal ordering because we must sometimes signal
-     * workers, requiring Dekker-like full-fences to avoid lost
-     * signals.  Arranging for enough ordering without expensive
-     * over-fencing requires tradeoffs among the supported means of
-     * expressing access constraints. The most central operations,
-     * taking from queues and updating ctl state, require full-fence
-     * CAS.  Array slots are read using the emulation of volatiles
-     * provided by Unsafe.  Access from other threads to WorkQueue
-     * base, top, and array requires a volatile load of the first of
-     * any of these read.  We use the convention of declaring the
-     * "base" index volatile, and always read it before other fields.
-     * The owner thread must ensure ordered updates, so writes use
-     * ordered intrinsics unless they can piggyback on those for other
-     * writes.  Similar conventions and rationales hold for other
-     * WorkQueue fields (such as "currentSteal") that are only written
-     * by owners but observed by others.
-     *
      * Creating workers. To create a worker, we pre-increment total
      * count (serving as a reservation), and attempt to construct a
      * ForkJoinWorkerThread via its factory. Upon construction, the
      * new thread invokes registerWorker, where it constructs a
      * WorkQueue and is assigned an index in the workQueues array
-     * (expanding the array if necessary). The thread is then
-     * started. Upon any exception across these steps, or null return
-     * from factory, deregisterWorker adjusts counts and records
+     * (expanding the array if necessary). The thread is then started.
+     * Upon any exception across these steps, or null return from
+     * factory, deregisterWorker adjusts counts and records
      * accordingly.  If a null return, the pool continues running with
      * fewer than the target number workers. If exceptional, the
      * exception is propagated, generally to some external caller.
@@ -448,80 +402,106 @@
      * probability of collision low. We cannot use
      * ThreadLocalRandom.getProbe() for similar purposes here because
      * the thread has not started yet, but do so for creating
-     * submission queues for existing external threads.
+     * submission queues for existing external threads (see
+     * externalPush).
+     *
+     * WorkQueue field scanState is used by both workers and the pool
+     * to manage and track whether a worker is UNSIGNALLED (possibly
+     * blocked waiting for a signal).  When a worker is inactivated,
+     * its scanState field is set, and is prevented from executing
+     * tasks, even though it must scan once for them to avoid queuing
+     * races. Note that scanState updates lag queue CAS releases so
+     * usage requires care. When queued, the lower 16 bits of
+     * scanState must hold its pool index. So we place the index there
+     * upon initialization (see registerWorker) and otherwise keep it
+     * there or restore it when necessary.
+     *
+     * The ctl field also serves as the basis for memory
+     * synchronization surrounding activation. This uses a more
+     * efficient version of a Dekker-like rule that task producers and
+     * consumers sync with each other by both writing/CASing ctl (even
+     * if to its current value).  This would be extremely costly. So
+     * we relax it in several ways: (1) Producers only signal when
+     * their queue is empty. Other workers propagate this signal (in
+     * method scan) when they find tasks. (2) Workers only enqueue
+     * after scanning (see below) and not finding any tasks.  (3)
+     * Rather than CASing ctl to its current value in the common case
+     * where no action is required, we reduce write contention by
+     * equivalently prefacing signalWork when called by an external
+     * task producer using a memory access with full-volatile
+     * semantics or a "fullFence". (4) For internal task producers we
+     * rely on the fact that even if no other workers awaken, the
+     * producer itself will eventually see the task and execute it.
+     *
+     * Almost always, too many signals are issued. A task producer
+     * cannot in general tell if some existing worker is in the midst
+     * of finishing one task (or already scanning) and ready to take
+     * another without being signalled. So the producer might instead
+     * activate a different worker that does not find any work, and
+     * then inactivates. This scarcely matters in steady-state
+     * computations involving all workers, but can create contention
+     * and bookkeeping bottlenecks during ramp-up, ramp-down, and small
+     * computations involving only a few workers.
+     *
+     * Scanning. Method scan() performs top-level scanning for tasks.
+     * Each scan traverses (and tries to poll from) each queue in
+     * pseudorandom permutation order by randomly selecting an origin
+     * index and a step value.  (The pseudorandom generator need not
+     * have high-quality statistical properties in the long term, but
+     * just within computations; We use 64bit and 32bit Marsaglia
+     * XorShifts, which are cheap and suffice here.)  Scanning also
+     * employs contention reduction: When scanning workers fail a CAS
+     * polling for work, they soon restart with a different
+     * pseudorandom scan order (thus likely retrying at different
+     * intervals). This improves throughput when many threads are
+     * trying to take tasks from few queues.  Scans do not otherwise
+     * explicitly take into account core affinities, loads, cache
+     * localities, etc, However, they do exploit temporal locality
+     * (which usually approximates these) by preferring to re-poll (up
+     * to POLL_LIMIT times) from the same queue after a successful
+     * poll before trying others.  Restricted forms of scanning occur
+     * in methods helpComplete and findNonEmptyStealQueue, and take
+     * similar but simpler forms.
      *
      * Deactivation and waiting. Queuing encounters several intrinsic
-     * races; most notably that a task-producing thread can miss
-     * seeing (and signalling) another thread that gave up looking for
-     * work but has not yet entered the wait queue.  When a worker
-     * cannot find a task to steal, it deactivates and enqueues. Very
-     * often, the lack of tasks is transient due to GC or OS
-     * scheduling. To reduce false-alarm deactivation, scanners
-     * compute checksums of queue states during sweeps.  (The
-     * stability checks used here and elsewhere are probabilistic
-     * variants of snapshot techniques -- see Herlihy & Shavit.)
-     * Workers give up and try to deactivate only after the sum is
-     * stable across scans. Further, to avoid missed signals, they
-     * repeat this scanning process after successful enqueuing until
-     * again stable.  In this state, the worker cannot take/run a task
-     * it sees until it is released from the queue, so the worker
-     * itself eventually tries to release itself or any successor (see
-     * tryRelease).  Otherwise, upon an empty scan, a deactivated
-     * worker uses an adaptive local spin construction (see awaitWork)
-     * before blocking (via park). Note the unusual conventions about
-     * Thread.interrupts surrounding parking and other blocking:
-     * Because interrupts are used solely to alert threads to check
-     * termination, which is checked anyway upon blocking, we clear
-     * status (using Thread.interrupted) before any call to park, so
-     * that park does not immediately return due to status being set
-     * via some other unrelated call to interrupt in user code.
+     * races; most notably that an inactivating scanning worker can
+     * miss seeing a task produced during a scan.  So when a worker
+     * cannot find a task to steal, it inactivates and enqueues, and
+     * then rescans to ensure that it didn't miss one, reactivating
+     * upon seeing one with probability approximately proportional to
+     * probability of a miss.  (In most cases, the worker will be
+     * signalled before self-signalling, avoiding cascades of multiple
+     * signals for the same task).
      *
-     * Signalling and activation.  Workers are created or activated
-     * only when there appears to be at least one task they might be
-     * able to find and execute.  Upon push (either by a worker or an
-     * external submission) to a previously (possibly) empty queue,
-     * workers are signalled if idle, or created if fewer exist than
-     * the given parallelism level.  These primary signals are
-     * buttressed by others whenever other threads remove a task from
-     * a queue and notice that there are other tasks there as well.
-     * On most platforms, signalling (unpark) overhead time is
-     * noticeably long, and the time between signalling a thread and
-     * it actually making progress can be very noticeably long, so it
-     * is worth offloading these delays from critical paths as much as
-     * possible. Also, because inactive workers are often rescanning
-     * or spinning rather than blocking, we set and clear the "parker"
-     * field of WorkQueues to reduce unnecessary calls to unpark.
-     * (This requires a secondary recheck to avoid missed signals.)
+     * Workers block (in method awaitWork) using park/unpark;
+     * advertising the need for signallers to unpark by setting their
+     * "parker" fields.
      *
      * Trimming workers. To release resources after periods of lack of
      * use, a worker starting to wait when the pool is quiescent will
      * time out and terminate (see awaitWork) if the pool has remained
-     * quiescent for period IDLE_TIMEOUT, increasing the period as the
-     * number of threads decreases, eventually removing all workers.
-     * Also, when more than two spare threads exist, excess threads
-     * are immediately terminated at the next quiescent point.
-     * (Padding by two avoids hysteresis.)
+     * quiescent for period given by IDLE_TIMEOUT_MS, increasing the
+     * period as the number of threads decreases, eventually removing
+     * all workers.
      *
      * Shutdown and Termination. A call to shutdownNow invokes
      * tryTerminate to atomically set a runState bit. The calling
      * thread, as well as every other worker thereafter terminating,
      * helps terminate others by setting their (qlock) status,
      * cancelling their unprocessed tasks, and waking them up, doing
-     * so repeatedly until stable (but with a loop bounded by the
-     * number of workers).  Calls to non-abrupt shutdown() preface
-     * this by checking whether termination should commence. This
-     * relies primarily on the active count bits of "ctl" maintaining
-     * consensus -- tryTerminate is called from awaitWork whenever
-     * quiescent. However, external submitters do not take part in
-     * this consensus.  So, tryTerminate sweeps through queues (until
-     * stable) to ensure lack of in-flight submissions and workers
-     * about to process them before triggering the "STOP" phase of
-     * termination. (Note: there is an intrinsic conflict if
+     * so repeatedly until stable. Calls to non-abrupt shutdown()
+     * preface this by checking whether termination should commence.
+     * This relies primarily on the active count bits of "ctl"
+     * maintaining consensus -- tryTerminate is called from awaitWork
+     * whenever quiescent. However, external submitters do not take
+     * part in this consensus.  So, tryTerminate sweeps through queues
+     * (until stable) to ensure lack of in-flight submissions and
+     * workers about to process them before triggering the "STOP"
+     * phase of termination. (Note: there is an intrinsic conflict if
      * helpQuiescePool is called when shutdown is enabled. Both wait
      * for quiescence, but tryTerminate is biased to not trigger until
      * helpQuiescePool completes.)
      *
-     *
      * Joining Tasks
      * =============
      *
@@ -605,8 +585,13 @@
      * continuation tasks) blocks on a join and there still remain
      * enough threads to ensure liveness.
      *
+     * Spare threads are removed as soon as they notice that the
+     * target parallelism level has been exceeded, in method
+     * tryDropSpare. (Method scan arranges returns for rechecks upon
+     * each probe via the "bound" parameter.)
+     *
      * The compensation mechanism may be bounded.  Bounds for the
-     * commonPool (see commonMaxSpares) better enable JVMs to cope
+     * commonPool (see COMMON_MAX_SPARES) better enable JVMs to cope
      * with programming errors and abuse before running out of
      * resources to do so. In other cases, users may supply factories
      * that limit thread construction. The effects of bounding in this
@@ -728,7 +713,7 @@
      * Default ForkJoinWorkerThreadFactory implementation; creates a
      * new ForkJoinWorkerThread.
      */
-    static final class DefaultForkJoinWorkerThreadFactory
+    private static final class DefaultForkJoinWorkerThreadFactory
         implements ForkJoinWorkerThreadFactory {
         public final ForkJoinWorkerThread newThread(ForkJoinPool pool) {
             return new ForkJoinWorkerThread(pool);
@@ -741,7 +726,7 @@
      * in WorkQueue.tryRemoveAndExec. We don't need the proxy to
      * actually do anything beyond having a unique identity.
      */
-    static final class EmptyTask extends ForkJoinTask<Void> {
+    private static final class EmptyTask extends ForkJoinTask<Void> {
         private static final long serialVersionUID = -7721805057305804111L;
         EmptyTask() { status = ForkJoinTask.NORMAL; } // force done
         public final Void getRawResult() { return null; }
@@ -749,6 +734,16 @@
         public final boolean exec() { return true; }
     }
 
+    /**
+     * Additional fields and lock created upon initialization.
+     */
+    private static final class AuxState extends ReentrantLock {
+        private static final long serialVersionUID = -6001602636862214147L;
+        volatile long stealCount;     // cumulative steal count
+        long indexSeed;               // index bits for registerWorker
+        AuxState() {}
+    }
+
     // Constants shared across ForkJoinPool and WorkQueue
 
     // Bounds
@@ -758,15 +753,23 @@
     static final int SQMASK       = 0x007e;        // max 64 (even) slots
 
     // Masks and units for WorkQueue.scanState and ctl sp subfield
-    static final int SCANNING     = 1;             // false when running tasks
-    static final int INACTIVE     = 1 << 31;       // must be negative
+    static final int UNSIGNALLED  = 1 << 31;       // must be negative
     static final int SS_SEQ       = 1 << 16;       // version count
 
     // Mode bits for ForkJoinPool.config and WorkQueue.config
     static final int MODE_MASK    = 0xffff << 16;  // top half of int
-    static final int LIFO_QUEUE   = 0;
-    static final int FIFO_QUEUE   = 1 << 16;
-    static final int SHARED_QUEUE = 1 << 31;       // must be negative
+    static final int SPARE_WORKER = 1 << 17;       // set if tc > 0 on creation
+    static final int UNREGISTERED = 1 << 18;       // to skip some of deregister
+    static final int FIFO_QUEUE   = 1 << 31;       // must be negative
+    static final int LIFO_QUEUE   = 0;             // for clarity
+    static final int IS_OWNED     = 1;             // low bit 0 if shared
+
+    /**
+     * The maximum number of task executions from the same queue
+     * before checking other queues, bounding unfairness and impact of
+     * infinite user task recursion.  Must be a power of two minus 1.
+     */
+    static final int POLL_LIMIT = (1 << 10) - 1;
 
     /**
      * Queues supporting work-stealing as well as external task
@@ -801,7 +804,8 @@
         static final int MAXIMUM_QUEUE_CAPACITY = 1 << 26; // 64M
 
         // Instance fields
-        volatile int scanState;    // versioned, <0: inactive; odd:scanning
+
+        volatile int scanState;    // versioned, negative if inactive
         int stackPred;             // pool stack (ctl) predecessor
         int nsteals;               // number of steals
         int hint;                  // randomization and stealer index hint
@@ -814,7 +818,8 @@
         final ForkJoinWorkerThread owner; // owning thread or null if shared
         volatile Thread parker;    // == owner during call to park; else null
         volatile ForkJoinTask<?> currentJoin;  // task being joined in awaitJoin
-        volatile ForkJoinTask<?> currentSteal; // mainly used by helpStealer
+        @sun.misc.Contended("group2") // separate from other fields
+        volatile ForkJoinTask<?> currentSteal; // nonnull when running some task
 
         WorkQueue(ForkJoinPool pool, ForkJoinWorkerThread owner) {
             this.pool = pool;
@@ -834,7 +839,7 @@
          * Returns the approximate number of tasks in the queue.
          */
         final int queueSize() {
-            int n = base - top;       // non-owner callers must read base first
+            int n = base - top;       // read base first
             return (n >= 0) ? 0 : -n; // ignore transient negative
         }
 
@@ -844,33 +849,31 @@
          * near-empty queue has at least one unclaimed task.
          */
         final boolean isEmpty() {
-            ForkJoinTask<?>[] a; int n, m, s;
-            return ((n = base - (s = top)) >= 0 ||
-                    (n == -1 &&           // possibly one task
-                     ((a = array) == null || (m = a.length - 1) < 0 ||
-                      U.getObject
-                      (a, (long)((m & (s - 1)) << ASHIFT) + ABASE) == null)));
+            ForkJoinTask<?>[] a; int n, al, s;
+            return ((n = base - (s = top)) >= 0 || // possibly one task
+                    (n == -1 && ((a = array) == null ||
+                                 (al = a.length) == 0 ||
+                                 a[(al - 1) & (s - 1)] == null)));
         }
 
         /**
-         * Pushes a task. Call only by owner in unshared queues.  (The
-         * shared-queue version is embedded in method externalPush.)
+         * Pushes a task. Call only by owner in unshared queues.
          *
          * @param task the task. Caller must ensure non-null.
          * @throws RejectedExecutionException if array cannot be resized
          */
         final void push(ForkJoinTask<?> task) {
-            ForkJoinTask<?>[] a; ForkJoinPool p;
-            int b = base, s = top, n;
-            if ((a = array) != null) {    // ignore if queue removed
-                int m = a.length - 1;     // fenced write for task visibility
-                U.putOrderedObject(a, ((m & s) << ASHIFT) + ABASE, task);
-                U.putOrderedInt(this, QTOP, s + 1);
-                if ((n = s - b) <= 1) {
-                    if ((p = pool) != null)
-                        p.signalWork(p.workQueues, this);
+            U.storeFence();              // ensure safe publication
+            int s = top, al, d; ForkJoinTask<?>[] a;
+            if ((a = array) != null && (al = a.length) > 0) {
+                a[(al - 1) & s] = task;  // relaxed writes OK
+                top = s + 1;
+                ForkJoinPool p = pool;
+                if ((d = base - s) == 0 && p != null) {
+                    U.fullFence();
+                    p.signalWork();
                 }
-                else if (n >= m)
+                else if (al + d == 1)
                     growArray();
             }
         }
@@ -883,22 +886,23 @@
         final ForkJoinTask<?>[] growArray() {
             ForkJoinTask<?>[] oldA = array;
             int size = oldA != null ? oldA.length << 1 : INITIAL_QUEUE_CAPACITY;
-            if (size > MAXIMUM_QUEUE_CAPACITY)
+            if (size < INITIAL_QUEUE_CAPACITY || size > MAXIMUM_QUEUE_CAPACITY)
                 throw new RejectedExecutionException("Queue capacity exceeded");
             int oldMask, t, b;
             ForkJoinTask<?>[] a = array = new ForkJoinTask<?>[size];
-            if (oldA != null && (oldMask = oldA.length - 1) >= 0 &&
+            if (oldA != null && (oldMask = oldA.length - 1) > 0 &&
                 (t = top) - (b = base) > 0) {
                 int mask = size - 1;
                 do { // emulate poll from old array, push to new array
-                    ForkJoinTask<?> x;
-                    int oldj = ((b & oldMask) << ASHIFT) + ABASE;
-                    int j    = ((b &    mask) << ASHIFT) + ABASE;
-                    x = (ForkJoinTask<?>)U.getObjectVolatile(oldA, oldj);
+                    int index = b & oldMask;
+                    long offset = ((long)index << ASHIFT) + ABASE;
+                    ForkJoinTask<?> x = (ForkJoinTask<?>)
+                        U.getObjectVolatile(oldA, offset);
                     if (x != null &&
-                        U.compareAndSwapObject(oldA, oldj, x, null))
-                        U.putObjectVolatile(a, j, x);
+                        U.compareAndSwapObject(oldA, offset, x, null))
+                        a[b & mask] = x;
                 } while (++b != t);
+                U.storeFence();
             }
             return a;
         }
@@ -908,16 +912,16 @@
          * by owner in unshared queues.
          */
         final ForkJoinTask<?> pop() {
-            ForkJoinTask<?>[] a; ForkJoinTask<?> t; int m;
-            if ((a = array) != null && (m = a.length - 1) >= 0) {
-                for (int s; (s = top - 1) - base >= 0;) {
-                    long j = ((m & s) << ASHIFT) + ABASE;
-                    if ((t = (ForkJoinTask<?>)U.getObject(a, j)) == null)
-                        break;
-                    if (U.compareAndSwapObject(a, j, t, null)) {
-                        U.putOrderedInt(this, QTOP, s);
-                        return t;
-                    }
+            int b = base, s = top, al, i; ForkJoinTask<?>[] a;
+            if ((a = array) != null && b != s && (al = a.length) > 0) {
+                int index = (al - 1) & --s;
+                long offset = ((long)index << ASHIFT) + ABASE;
+                ForkJoinTask<?> t = (ForkJoinTask<?>)
+                    U.getObject(a, offset);
+                if (t != null &&
+                    U.compareAndSwapObject(a, offset, t, null)) {
+                    top = s;
+                    return t;
                 }
             }
             return null;
@@ -929,12 +933,15 @@
          * appear in ForkJoinPool methods scan and helpStealer.
          */
         final ForkJoinTask<?> pollAt(int b) {
-            ForkJoinTask<?> t; ForkJoinTask<?>[] a;
-            if ((a = array) != null) {
-                int j = (((a.length - 1) & b) << ASHIFT) + ABASE;
-                if ((t = (ForkJoinTask<?>)U.getObjectVolatile(a, j)) != null &&
-                    base == b && U.compareAndSwapObject(a, j, t, null)) {
-                    base = b + 1;
+            ForkJoinTask<?>[] a; int al;
+            if ((a = array) != null && (al = a.length) > 0) {
+                int index = (al - 1) & b;
+                long offset = ((long)index << ASHIFT) + ABASE;
+                ForkJoinTask<?> t = (ForkJoinTask<?>)
+                    U.getObjectVolatile(a, offset);
+                if (t != null && b++ == base &&
+                    U.compareAndSwapObject(a, offset, t, null)) {
+                    base = b;
                     return t;
                 }
             }
@@ -945,20 +952,27 @@
          * Takes next task, if one exists, in FIFO order.
          */
         final ForkJoinTask<?> poll() {
-            ForkJoinTask<?>[] a; int b; ForkJoinTask<?> t;
-            while ((b = base) - top < 0 && (a = array) != null) {
-                int j = (((a.length - 1) & b) << ASHIFT) + ABASE;
-                t = (ForkJoinTask<?>)U.getObjectVolatile(a, j);
-                if (base == b) {
-                    if (t != null) {
-                        if (U.compareAndSwapObject(a, j, t, null)) {
-                            base = b + 1;
-                            return t;
+            for (;;) {
+                int b = base, s = top, d, al; ForkJoinTask<?>[] a;
+                if ((a = array) != null && (d = b - s) < 0 &&
+                    (al = a.length) > 0) {
+                    int index = (al - 1) & b;
+                    long offset = ((long)index << ASHIFT) + ABASE;
+                    ForkJoinTask<?> t = (ForkJoinTask<?>)
+                        U.getObjectVolatile(a, offset);
+                    if (b++ == base) {
+                        if (t != null) {
+                            if (U.compareAndSwapObject(a, offset, t, null)) {
+                                base = b;
+                                return t;
+                            }
                         }
+                        else if (d == -1)
+                            break; // now empty
                     }
-                    else if (b + 1 == top) // now empty
-                        break;
                 }
+                else
+                    break;
             }
             return null;
         }
@@ -967,37 +981,100 @@
          * Takes next task, if one exists, in order specified by mode.
          */
         final ForkJoinTask<?> nextLocalTask() {
-            return (config & FIFO_QUEUE) == 0 ? pop() : poll();
+            return (config < 0) ? poll() : pop();
         }
 
         /**
          * Returns next task, if one exists, in order specified by mode.
          */
         final ForkJoinTask<?> peek() {
-            ForkJoinTask<?>[] a = array; int m;
-            if (a == null || (m = a.length - 1) < 0)
-                return null;
-            int i = (config & FIFO_QUEUE) == 0 ? top - 1 : base;
-            int j = ((i & m) << ASHIFT) + ABASE;
-            return (ForkJoinTask<?>)U.getObjectVolatile(a, j);
+            int al; ForkJoinTask<?>[] a;
+            return ((a = array) != null && (al = a.length) > 0) ?
+                a[(al - 1) & (config < 0 ? base : top - 1)] : null;
         }
 
         /**
          * Pops the given task only if it is at the current top.
-         * (A shared version is available only via FJP.tryExternalUnpush)
-        */
-        final boolean tryUnpush(ForkJoinTask<?> t) {
-            ForkJoinTask<?>[] a; int s;
-            if ((a = array) != null && (s = top) != base &&
-                U.compareAndSwapObject
-                (a, (((a.length - 1) & --s) << ASHIFT) + ABASE, t, null)) {
-                U.putOrderedInt(this, QTOP, s);
-                return true;
+         */
+        final boolean tryUnpush(ForkJoinTask<?> task) {
+            int b = base, s = top, al; ForkJoinTask<?>[] a;
+            if ((a = array) != null && b != s && (al = a.length) > 0) {
+                int index = (al - 1) & --s;
+                long offset = ((long)index << ASHIFT) + ABASE;
+                if (U.compareAndSwapObject(a, offset, task, null)) {
+                    top = s;
+                    return true;
+                }
             }
             return false;
         }
 
         /**
+         * Shared version of push. Fails if already locked.
+         *
+         * @return status: > 0 locked, 0 possibly was empty, < 0 was nonempty
+         */
+        final int sharedPush(ForkJoinTask<?> task) {
+            int stat;
+            if (U.compareAndSwapInt(this, QLOCK, 0, 1)) {
+                int b = base, s = top, al, d; ForkJoinTask<?>[] a;
+                if ((a = array) != null && (al = a.length) > 0 &&
+                    al - 1 + (d = b - s) > 0) {
+                    a[(al - 1) & s] = task;
+                    top = s + 1;                 // relaxed writes OK here
+                    qlock = 0;
+                    stat = (d < 0 && b == base) ? d : 0;
+                }
+                else {
+                    growAndSharedPush(task);
+                    stat = 0;
+                }
+            }
+            else
+                stat = 1;
+            return stat;
+        }
+
+        /**
+         * Helper for sharedPush; called only when locked and resize
+         * needed.
+         */
+        private void growAndSharedPush(ForkJoinTask<?> task) {
+            try {
+                growArray();
+                int s = top, al; ForkJoinTask<?>[] a;
+                if ((a = array) != null && (al = a.length) > 0) {
+                    a[(al - 1) & s] = task;
+                    top = s + 1;
+                }
+            } finally {
+                qlock = 0;
+            }
+        }
+
+        /**
+         * Shared version of pop.
+         */
+        final boolean trySharedUnpush(ForkJoinTask<?> task) {
+            boolean popped = false;
+            int s = top - 1, al; ForkJoinTask<?>[] a;
+            if ((a = array) != null && (al = a.length) > 0) {
+                int index = (al - 1) & s;
+                long offset = ((long)index << ASHIFT) + ABASE;
+                ForkJoinTask<?> t = (ForkJoinTask<?>) U.getObject(a, offset);
+                if (t == task &&
+                    U.compareAndSwapInt(this, QLOCK, 0, 1)) {
+                    if (U.compareAndSwapObject(a, offset, task, null)) {
+                        popped = true;
+                        top = s;
+                    }
+                    U.putOrderedInt(this, QLOCK, 0);
+                }
+            }
+            return popped;
+        }
+
+        /**
          * Removes and cancels all known tasks, ignoring any exceptions.
          */
         final void cancelAll() {
@@ -1017,66 +1094,88 @@
         // Specialized execution methods
 
         /**
-         * Polls and runs tasks until empty.
+         * Pops and executes up to POLL_LIMIT tasks or until empty.
          */
-        final void pollAndExecAll() {
-            for (ForkJoinTask<?> t; (t = poll()) != null;)
-                t.doExec();
+        final void localPopAndExec() {
+            for (int nexec = 0;;) {
+                int b = base, s = top, al; ForkJoinTask<?>[] a;
+                if ((a = array) != null && b != s && (al = a.length) > 0) {
+                    int index = (al - 1) & --s;
+                    long offset = ((long)index << ASHIFT) + ABASE;
+                    ForkJoinTask<?> t = (ForkJoinTask<?>)
+                        U.getAndSetObject(a, offset, null);
+                    if (t != null) {
+                        top = s;
+                        (currentSteal = t).doExec();
+                        if (++nexec > POLL_LIMIT)
+                            break;
+                    }
+                    else
+                        break;
+                }
+                else
+                    break;
+            }
         }
 
         /**
-         * Removes and executes all local tasks. If LIFO, invokes
-         * pollAndExecAll. Otherwise implements a specialized pop loop
-         * to exec until empty.
+         * Polls and executes up to POLL_LIMIT tasks or until empty.
          */
-        final void execLocalTasks() {
-            int b = base, m, s;
-            ForkJoinTask<?>[] a = array;
-            if (b - (s = top - 1) <= 0 && a != null &&
-                (m = a.length - 1) >= 0) {
-                if ((config & FIFO_QUEUE) == 0) {
-                    for (ForkJoinTask<?> t;;) {
-                        if ((t = (ForkJoinTask<?>)U.getAndSetObject
-                             (a, ((m & s) << ASHIFT) + ABASE, null)) == null)
-                            break;
-                        U.putOrderedInt(this, QTOP, s);
+        final void localPollAndExec() {
+            for (int nexec = 0;;) {
+                int b = base, s = top, al; ForkJoinTask<?>[] a;
+                if ((a = array) != null && b != s && (al = a.length) > 0) {
+                    int index = (al - 1) & b++;
+                    long offset = ((long)index << ASHIFT) + ABASE;
+                    ForkJoinTask<?> t = (ForkJoinTask<?>)
+                        U.getAndSetObject(a, offset, null);
+                    if (t != null) {
+                        base = b;
                         t.doExec();
-                        if (base - (s = top - 1) > 0)
+                        if (++nexec > POLL_LIMIT)
                             break;
                     }
                 }
                 else
-                    pollAndExecAll();
+                    break;
             }
         }
 
         /**
-         * Executes the given task and any remaining local tasks.
+         * Executes the given task and (some) remaining local tasks.
          */
         final void runTask(ForkJoinTask<?> task) {
             if (task != null) {
-                scanState &= ~SCANNING; // mark as busy
-                (currentSteal = task).doExec();
-                U.putOrderedObject(this, QCURRENTSTEAL, null); // release for GC
-                execLocalTasks();
+                task.doExec();
+                if (config < 0)
+                    localPollAndExec();
+                else
+                    localPopAndExec();
+                int ns = ++nsteals;
                 ForkJoinWorkerThread thread = owner;
-                if (++nsteals < 0)      // collect on overflow
+                currentSteal = null;
+                if (ns < 0)           // collect on overflow
                     transferStealCount(pool);
-                scanState |= SCANNING;
                 if (thread != null)
                     thread.afterTopLevelExec();
             }
         }
 
         /**
-         * Adds steal count to pool stealCounter if it exists, and resets.
+         * Adds steal count to pool steal count if it exists, and resets.
          */
         final void transferStealCount(ForkJoinPool p) {
-            AtomicLong sc;
-            if (p != null && (sc = p.stealCounter) != null) {
-                int s = nsteals;
+            AuxState aux;
+            if (p != null && (aux = p.auxState) != null) {
+                long s = nsteals;
                 nsteals = 0;            // if negative, correct for overflow
-                sc.getAndAdd((long)(s < 0 ? Integer.MAX_VALUE : s));
+                if (s < 0) s = Integer.MAX_VALUE;
+                aux.lock();
+                try {
+                    aux.stealCount += s;
+                } finally {
+                    aux.unlock();
+                }
             }
         }
 
@@ -1087,36 +1186,46 @@
          * @return true if queue empty and task not known to be done
          */
         final boolean tryRemoveAndExec(ForkJoinTask<?> task) {
-            ForkJoinTask<?>[] a; int m, s, b, n;
-            if ((a = array) != null && (m = a.length - 1) >= 0 &&
-                task != null) {
-                while ((n = (s = top) - (b = base)) > 0) {
-                    for (ForkJoinTask<?> t;;) {      // traverse from s to b
-                        long j = ((--s & m) << ASHIFT) + ABASE;
-                        if ((t = (ForkJoinTask<?>)U.getObject(a, j)) == null)
-                            return s + 1 == top;     // shorter than expected
+            if (task != null && task.status >= 0) {
+                int b, s, d, al; ForkJoinTask<?>[] a;
+                while ((d = (b = base) - (s = top)) < 0 &&
+                       (a = array) != null && (al = a.length) > 0) {
+                    for (;;) {      // traverse from s to b
+                        int index = --s & (al - 1);
+                        long offset = (index << ASHIFT) + ABASE;
+                        ForkJoinTask<?> t = (ForkJoinTask<?>)
+                            U.getObjectVolatile(a, offset);
+                        if (t == null)
+                            break;                   // restart
                         else if (t == task) {
                             boolean removed = false;
                             if (s + 1 == top) {      // pop
-                                if (U.compareAndSwapObject(a, j, task, null)) {
-                                    U.putOrderedInt(this, QTOP, s);
+                                if (U.compareAndSwapObject(a, offset, t, null)) {
+                                    top = s;
                                     removed = true;
                                 }
                             }
                             else if (base == b)      // replace with proxy
-                                removed = U.compareAndSwapObject(
-                                    a, j, task, new EmptyTask());
-                            if (removed)
-                                task.doExec();
+                                removed = U.compareAndSwapObject(a, offset, t,
+                                                                 new EmptyTask());
+                            if (removed) {
+                                ForkJoinTask<?> ps = currentSteal;
+                                (currentSteal = task).doExec();
+                                currentSteal = ps;
+                            }
                             break;
                         }
                         else if (t.status < 0 && s + 1 == top) {
-                            if (U.compareAndSwapObject(a, j, t, null))
-                                U.putOrderedInt(this, QTOP, s);
+                            if (U.compareAndSwapObject(a, offset, t, null)) {
+                                top = s;
+                            }
                             break;                  // was cancelled
                         }
-                        if (--n == 0)
+                        else if (++d == 0) {
+                            if (base != b)          // rescan
+                                break;
                             return false;
+                        }
                     }
                     if (task.status < 0)
                         return false;
@@ -1130,27 +1239,31 @@
          * in either shared or owned mode. Used only by helpComplete.
          */
         final CountedCompleter<?> popCC(CountedCompleter<?> task, int mode) {
-            int s; ForkJoinTask<?>[] a; Object o;
-            if (base - (s = top) < 0 && (a = array) != null) {
-                long j = (((a.length - 1) & (s - 1)) << ASHIFT) + ABASE;
-                if ((o = U.getObjectVolatile(a, j)) != null &&
-                    (o instanceof CountedCompleter)) {
+            int b = base, s = top, al; ForkJoinTask<?>[] a;
+            if ((a = array) != null && b != s && (al = a.length) > 0) {
+                int index = (al - 1) & (s - 1);
+                long offset = ((long)index << ASHIFT) + ABASE;
+                ForkJoinTask<?> o = (ForkJoinTask<?>)
+                    U.getObjectVolatile(a, offset);
+                if (o instanceof CountedCompleter) {
                     CountedCompleter<?> t = (CountedCompleter<?>)o;
                     for (CountedCompleter<?> r = t;;) {
                         if (r == task) {
-                            if (mode < 0) { // must lock
+                            if ((mode & IS_OWNED) == 0) {
+                                boolean popped;
                                 if (U.compareAndSwapInt(this, QLOCK, 0, 1)) {
-                                    if (top == s && array == a &&
-                                        U.compareAndSwapObject(a, j, t, null)) {
-                                        U.putOrderedInt(this, QTOP, s - 1);
-                                        U.putOrderedInt(this, QLOCK, 0);
+                                    if (popped =
+                                        U.compareAndSwapObject(a, offset,
+                                                               t, null))
+                                        top = s - 1;
+                                    U.putOrderedInt(this, QLOCK, 0);
+                                    if (popped)
                                         return t;
-                                    }
-                                    U.compareAndSwapInt(this, QLOCK, 1, 0);
                                 }
                             }
-                            else if (U.compareAndSwapObject(a, j, t, null)) {
-                                U.putOrderedInt(this, QTOP, s - 1);
+                            else if (U.compareAndSwapObject(a, offset,
+                                                            t, null)) {
+                                top = s - 1;
                                 return t;
                             }
                             break;
@@ -1174,36 +1287,40 @@
          * the base index, forced negative.
          */
         final int pollAndExecCC(CountedCompleter<?> task) {
-            int b, h; ForkJoinTask<?>[] a; Object o;
-            if ((b = base) - top >= 0 || (a = array) == null)
-                h = b | Integer.MIN_VALUE;  // to sense movement on re-poll
-            else {
-                long j = (((a.length - 1) & b) << ASHIFT) + ABASE;
-                if ((o = U.getObjectVolatile(a, j)) == null)
-                    h = 2;                  // retryable
+            ForkJoinTask<?>[] a;
+            int b = base, s = top, al, h;
+            if ((a = array) != null && b != s && (al = a.length) > 0) {
+                int index = (al - 1) & b;
+                long offset = ((long)index << ASHIFT) + ABASE;
+                ForkJoinTask<?> o = (ForkJoinTask<?>)
+                    U.getObjectVolatile(a, offset);
+                if (o == null)
+                    h = 2;                      // retryable
                 else if (!(o instanceof CountedCompleter))
-                    h = -1;                 // unmatchable
+                    h = -1;                     // unmatchable
                 else {
                     CountedCompleter<?> t = (CountedCompleter<?>)o;
                     for (CountedCompleter<?> r = t;;) {
                         if (r == task) {
-                            if (base == b &&
-                                U.compareAndSwapObject(a, j, t, null)) {
-                                base = b + 1;
+                            if (b++ == base &&
+                                U.compareAndSwapObject(a, offset, t, null)) {
+                                base = b;
                                 t.doExec();
-                                h = 1;      // success
+                                h = 1;          // success
                             }
                             else
-                                h = 2;      // lost CAS
+                                h = 2;          // lost CAS
                             break;
                         }
                         else if ((r = r.completer) == null) {
-                            h = -1;         // unmatched
+                            h = -1;             // unmatched
                             break;
                         }
                     }
                 }
             }
+            else
+                h = b | Integer.MIN_VALUE;      // to sense movement on re-poll
             return h;
         }
 
@@ -1220,29 +1337,20 @@
         }
 
         // Unsafe mechanics. Note that some are (and must be) the same as in FJP
-        private static final sun.misc.Unsafe U;
-        private static final int  ABASE;
-        private static final int  ASHIFT;
-        private static final long QTOP;
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
         private static final long QLOCK;
-        private static final long QCURRENTSTEAL;
+        private static final int ABASE;
+        private static final int ASHIFT;
         static {
             try {
-                U = sun.misc.Unsafe.getUnsafe();
-                Class<?> wk = WorkQueue.class;
-                Class<?> ak = ForkJoinTask[].class;
-                QTOP = U.objectFieldOffset
-                    (wk.getDeclaredField("top"));
                 QLOCK = U.objectFieldOffset
-                    (wk.getDeclaredField("qlock"));
-                QCURRENTSTEAL = U.objectFieldOffset
-                    (wk.getDeclaredField("currentSteal"));
-                ABASE = U.arrayBaseOffset(ak);
-                int scale = U.arrayIndexScale(ak);
+                    (WorkQueue.class.getDeclaredField("qlock"));
+                ABASE = U.arrayBaseOffset(ForkJoinTask[].class);
+                int scale = U.arrayIndexScale(ForkJoinTask[].class);
                 if ((scale & (scale - 1)) != 0)
-                    throw new Error("data type scale not a power of two");
+                    throw new Error("array index scale not a power of two");
                 ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
-            } catch (Exception e) {
+            } catch (ReflectiveOperationException e) {
                 throw new Error(e);
             }
         }
@@ -1259,9 +1367,9 @@
 
     /**
      * Permission required for callers of methods that may start or
-     * kill threads.
+     * kill threads.  Also used as a static lock in tryInitialize.
      */
-    private static final RuntimePermission modifyThreadPermission;
+    static final RuntimePermission modifyThreadPermission;
 
     /**
      * Common (static) pool. Non-null for public use unless a static
@@ -1277,12 +1385,12 @@
      * common.parallelism field to be zero, but in that case still report
      * parallelism as 1 to reflect resulting caller-runs mechanics.
      */
-    static final int commonParallelism;
+    static final int COMMON_PARALLELISM;
 
     /**
      * Limit on spare thread construction in tryCompensate.
      */
-    private static int commonMaxSpares;
+    private static final int COMMON_MAX_SPARES;
 
     /**
      * Sequence number for creating workerNamePrefix.
@@ -1300,44 +1408,28 @@
     // static configuration constants
 
     /**
-     * Initial timeout value (in nanoseconds) for the thread
+     * Initial timeout value (in milliseconds) for the thread
      * triggering quiescence to park waiting for new work. On timeout,
-     * the thread will instead try to shrink the number of
-     * workers. The value should be large enough to avoid overly
-     * aggressive shrinkage during most transient stalls (long GCs
-     * etc).
+     * the thread will instead try to shrink the number of workers.
+     * The value should be large enough to avoid overly aggressive
+     * shrinkage during most transient stalls (long GCs etc).
      */
-    private static final long IDLE_TIMEOUT = 2000L * 1000L * 1000L; // 2sec
-
-    /**
-     * Tolerance for idle timeouts, to cope with timer undershoots
-     */
-    private static final long TIMEOUT_SLOP = 20L * 1000L * 1000L;  // 20ms
+    private static final long IDLE_TIMEOUT_MS = 2000L; // 2sec
 
     /**
-     * The initial value for commonMaxSpares during static
-     * initialization unless overridden using System property
-     * "java.util.concurrent.ForkJoinPool.common.maximumSpares".  The
-     * default value is far in excess of normal requirements, but also
-     * far short of MAX_CAP and typical OS thread limits, so allows
-     * JVMs to catch misuse/abuse before running out of resources
-     * needed to do so.
+     * Tolerance for idle timeouts, to cope with timer undershoots.
      */
-    private static final int DEFAULT_COMMON_MAX_SPARES = 256;
+    private static final long TIMEOUT_SLOP_MS =   20L; // 20ms
 
     /**
-     * Number of times to spin-wait before blocking. The spins (in
-     * awaitRunStateLock and awaitWork) currently use randomized
-     * spins. Currently set to zero to reduce CPU usage.
-     *
-     * If greater than zero the value of SPINS must be a power
-     * of two, at least 4.  A value of 2048 causes spinning for a
-     * small fraction of typical context-switch times.
-     *
-     * If/when MWAIT-like intrinsics becomes available, they
-     * may allow quieter spinning.
+     * The default value for COMMON_MAX_SPARES.  Overridable using the
+     * "java.util.concurrent.ForkJoinPool.common.maximumSpares" system
+     * property.  The default value is far in excess of normal
+     * requirements, but also far short of MAX_CAP and typical OS
+     * thread limits, so allows JVMs to catch misuse/abuse before
+     * running out of resources needed to do so.
      */
-    private static final int SPINS  = 0;
+    private static final int DEFAULT_COMMON_MAX_SPARES = 256;
 
     /**
      * Increment for seed generators. See class ThreadLocal for
@@ -1384,92 +1476,49 @@
     private static final long ADD_WORKER = 0x0001L << (TC_SHIFT + 15); // sign
 
     // runState bits: SHUTDOWN must be negative, others arbitrary powers of two
-    private static final int  RSLOCK     = 1;
-    private static final int  RSIGNAL    = 1 << 1;
-    private static final int  STARTED    = 1 << 2;
-    private static final int  STOP       = 1 << 29;
-    private static final int  TERMINATED = 1 << 30;
+    private static final int  STARTED    = 1;
+    private static final int  STOP       = 1 << 1;
+    private static final int  TERMINATED = 1 << 2;
     private static final int  SHUTDOWN   = 1 << 31;
 
     // Instance fields
     volatile long ctl;                   // main pool control
-    volatile int runState;               // lockable status
+    volatile int runState;
     final int config;                    // parallelism, mode
-    int indexSeed;                       // to generate worker index
+    AuxState auxState;                   // lock, steal counts
     volatile WorkQueue[] workQueues;     // main registry
+    final String workerNamePrefix;       // to create worker name string
     final ForkJoinWorkerThreadFactory factory;
     final UncaughtExceptionHandler ueh;  // per-worker UEH
-    final String workerNamePrefix;       // to create worker name string
-    volatile AtomicLong stealCounter;    // also used as sync monitor
-
-    /**
-     * Acquires the runState lock; returns current (locked) runState.
-     */
-    private int lockRunState() {
-        int rs;
-        return ((((rs = runState) & RSLOCK) != 0 ||
-                 !U.compareAndSwapInt(this, RUNSTATE, rs, rs |= RSLOCK)) ?
-                awaitRunStateLock() : rs);
-    }
 
     /**
-     * Spins and/or blocks until runstate lock is available.  See
-     * above for explanation.
+     * Instantiates fields upon first submission, or upon shutdown if
+     * no submissions. If checkTermination true, also responds to
+     * termination by external calls submitting tasks.
      */
-    private int awaitRunStateLock() {
-        Object lock;
-        boolean wasInterrupted = false;
-        for (int spins = SPINS, r = 0, rs, ns;;) {
-            if (((rs = runState) & RSLOCK) == 0) {
-                if (U.compareAndSwapInt(this, RUNSTATE, rs, ns = rs | RSLOCK)) {
-                    if (wasInterrupted) {
-                        try {
-                            Thread.currentThread().interrupt();
-                        } catch (SecurityException ignore) {
-                        }
-                    }
-                    return ns;
-                }
-            }
-            else if (r == 0)
-                r = ThreadLocalRandom.nextSecondarySeed();
-            else if (spins > 0) {
-                r ^= r << 6; r ^= r >>> 21; r ^= r << 7; // xorshift
-                if (r >= 0)
-                    --spins;
-            }
-            else if ((rs & STARTED) == 0 || (lock = stealCounter) == null)
-                Thread.yield();   // initialization race
-            else if (U.compareAndSwapInt(this, RUNSTATE, rs, rs | RSIGNAL)) {
-                synchronized (lock) {
-                    if ((runState & RSIGNAL) != 0) {
-                        try {
-                            lock.wait();
-                        } catch (InterruptedException ie) {
-                            if (!(Thread.currentThread() instanceof
-                                  ForkJoinWorkerThread))
-                                wasInterrupted = true;
-                        }
-                    }
-                    else
-                        lock.notifyAll();
+    private void tryInitialize(boolean checkTermination) {
+        if (runState == 0) { // bootstrap by locking static field
+            int p = config & SMASK;
+            int n = (p > 1) ? p - 1 : 1; // ensure at least 2 slots
+            n |= n >>> 1;    // create workQueues array with size a power of two
+            n |= n >>> 2;
+            n |= n >>> 4;
+            n |= n >>> 8;
+            n |= n >>> 16;
+            n = ((n + 1) << 1) & SMASK;
+            AuxState aux = new AuxState();
+            WorkQueue[] ws = new WorkQueue[n];
+            synchronized (modifyThreadPermission) { // double-check
+                if (runState == 0) {
+                    workQueues = ws;
+                    auxState = aux;
+                    runState = STARTED;
                 }
             }
         }
-    }
-
-    /**
-     * Unlocks and sets runState to newRunState.
-     *
-     * @param oldRunState a value returned from lockRunState
-     * @param newRunState the next value (must have lock bit clear).
-     */
-    private void unlockRunState(int oldRunState, int newRunState) {
-        if (!U.compareAndSwapInt(this, RUNSTATE, oldRunState, newRunState)) {
-            Object lock = stealCounter;
-            runState = newRunState;              // clears RSIGNAL bit
-            if (lock != null)
-                synchronized (lock) { lock.notifyAll(); }
+        if (checkTermination && runState < 0) {
+            tryTerminate(false, false); // help terminate
+            throw new RejectedExecutionException();
         }
     }
 
@@ -1480,14 +1529,18 @@
      * count has already been incremented as a reservation.  Invokes
      * deregisterWorker on any failure.
      *
+     * @param isSpare true if this is a spare thread
      * @return true if successful
      */
-    private boolean createWorker() {
+    private boolean createWorker(boolean isSpare) {
         ForkJoinWorkerThreadFactory fac = factory;
         Throwable ex = null;
         ForkJoinWorkerThread wt = null;
+        WorkQueue q;
         try {
             if (fac != null && (wt = fac.newThread(this)) != null) {
+                if (isSpare && (q = wt.workQueue) != null)
+                    q.config |= SPARE_WORKER;
                 wt.start();
                 return true;
             }
@@ -1507,21 +1560,12 @@
      * this holds (otherwise, a new worker is not needed).
      */
     private void tryAddWorker(long c) {
-        boolean add = false;
         do {
             long nc = ((AC_MASK & (c + AC_UNIT)) |
                        (TC_MASK & (c + TC_UNIT)));
-            if (ctl == c) {
-                int rs, stop;                 // check if terminating
-                if ((stop = (rs = lockRunState()) & STOP) == 0)
-                    add = U.compareAndSwapLong(this, CTL, c, nc);
-                unlockRunState(rs, rs & ~RSLOCK);
-                if (stop != 0)
-                    break;
-                if (add) {
-                    createWorker();
-                    break;
-                }
+            if (ctl == c && U.compareAndSwapLong(this, CTL, c, nc)) {
+                createWorker(false);
+                break;
             }
         } while (((c = ctl) & ADD_WORKER) != 0L && (int)c == 0);
     }
@@ -1535,37 +1579,39 @@
      */
     final WorkQueue registerWorker(ForkJoinWorkerThread wt) {
         UncaughtExceptionHandler handler;
+        AuxState aux;
         wt.setDaemon(true);                           // configure thread
         if ((handler = ueh) != null)
             wt.setUncaughtExceptionHandler(handler);
         WorkQueue w = new WorkQueue(this, wt);
         int i = 0;                                    // assign a pool index
         int mode = config & MODE_MASK;
-        int rs = lockRunState();
-        try {
-            WorkQueue[] ws; int n;                    // skip if no array
-            if ((ws = workQueues) != null && (n = ws.length) > 0) {
-                int s = indexSeed += SEED_INCREMENT;  // unlikely to collide
-                int m = n - 1;
-                i = ((s << 1) | 1) & m;               // odd-numbered indices
-                if (ws[i] != null) {                  // collision
-                    int probes = 0;                   // step by approx half n
-                    int step = (n <= 4) ? 2 : ((n >>> 1) & EVENMASK) + 2;
-                    while (ws[i = (i + step) & m] != null) {
-                        if (++probes >= n) {
-                            workQueues = ws = Arrays.copyOf(ws, n <<= 1);
-                            m = n - 1;
-                            probes = 0;
+        if ((aux = auxState) != null) {
+            aux.lock();
+            try {
+                int s = (int)(aux.indexSeed += SEED_INCREMENT), n, m;
+                WorkQueue[] ws = workQueues;
+                if (ws != null && (n = ws.length) > 0) {
+                    i = (m = n - 1) & ((s << 1) | 1); // odd-numbered indices
+                    if (ws[i] != null) {              // collision
+                        int probes = 0;               // step by approx half n
+                        int step = (n <= 4) ? 2 : ((n >>> 1) & EVENMASK) + 2;
+                        while (ws[i = (i + step) & m] != null) {
+                            if (++probes >= n) {
+                                workQueues = ws = Arrays.copyOf(ws, n <<= 1);
+                                m = n - 1;
+                                probes = 0;
+                            }
                         }
                     }
+                    w.hint = s;                       // use as random seed
+                    w.config = i | mode;
+                    w.scanState = i | (s & 0x7fff0000); // random seq bits
+                    ws[i] = w;
                 }
-                w.hint = s;                           // use as random seed
-                w.config = i | mode;
-                w.scanState = i;                      // publication fence
-                ws[i] = w;
+            } finally {
+                aux.unlock();
             }
-        } finally {
-            unlockRunState(rs, rs & ~RSLOCK);
         }
         wt.setName(workerNamePrefix.concat(Integer.toString(i >>> 1)));
         return w;
@@ -1583,31 +1629,40 @@
     final void deregisterWorker(ForkJoinWorkerThread wt, Throwable ex) {
         WorkQueue w = null;
         if (wt != null && (w = wt.workQueue) != null) {
-            WorkQueue[] ws;                           // remove index from array
+            AuxState aux; WorkQueue[] ws;          // remove index from array
             int idx = w.config & SMASK;
-            int rs = lockRunState();
-            if ((ws = workQueues) != null && ws.length > idx && ws[idx] == w)
-                ws[idx] = null;
-            unlockRunState(rs, rs & ~RSLOCK);
+            int ns = w.nsteals;
+            if ((aux = auxState) != null) {
+                aux.lock();
+                try {
+                    if ((ws = workQueues) != null && ws.length > idx &&
+                        ws[idx] == w)
+                        ws[idx] = null;
+                    aux.stealCount += ns;
+                } finally {
+                    aux.unlock();
+                }
+            }
         }
-        long c;                                       // decrement counts
-        do {} while (!U.compareAndSwapLong
-                     (this, CTL, c = ctl, ((AC_MASK & (c - AC_UNIT)) |
-                                           (TC_MASK & (c - TC_UNIT)) |
-                                           (SP_MASK & c))));
+        if (w == null || (w.config & UNREGISTERED) == 0) { // else pre-adjusted
+            long c;                                   // decrement counts
+            do {} while (!U.compareAndSwapLong
+                         (this, CTL, c = ctl, ((AC_MASK & (c - AC_UNIT)) |
+                                               (TC_MASK & (c - TC_UNIT)) |
+                                               (SP_MASK & c))));
+        }
         if (w != null) {
+            w.currentSteal = null;
             w.qlock = -1;                             // ensure set
-            w.transferStealCount(this);
             w.cancelAll();                            // cancel remaining tasks
         }
-        for (;;) {                                    // possibly replace
-            WorkQueue[] ws; int m, sp;
-            if (tryTerminate(false, false) || w == null || w.array == null ||
-                (runState & STOP) != 0 || (ws = workQueues) == null ||
-                (m = ws.length - 1) < 0)              // already terminating
+        while (tryTerminate(false, false) >= 0) {     // possibly replace
+            WorkQueue[] ws; int wl, sp; long c;
+            if (w == null || w.array == null ||
+                (ws = workQueues) == null || (wl = ws.length) <= 0)
                 break;
-            if ((sp = (int)(c = ctl)) != 0) {         // wake up replacement
-                if (tryRelease(c, ws[sp & m], AC_UNIT))
+            else if ((sp = (int)(c = ctl)) != 0) {    // wake up replacement
+                if (tryRelease(c, ws[(wl - 1) & sp], AC_UNIT))
                     break;
             }
             else if (ex != null && (c & ADD_WORKER) != 0L) {
@@ -1627,35 +1682,33 @@
 
     /**
      * Tries to create or activate a worker if too few are active.
-     *
-     * @param ws the worker array to use to find signallees
-     * @param q a WorkQueue --if non-null, don't retry if now empty
      */
-    final void signalWork(WorkQueue[] ws, WorkQueue q) {
-        long c; int sp, i; WorkQueue v; Thread p;
-        while ((c = ctl) < 0L) {                       // too few active
-            if ((sp = (int)c) == 0) {                  // no idle workers
-                if ((c & ADD_WORKER) != 0L)            // too few workers
+    final void signalWork() {
+        for (;;) {
+            long c; int sp, i; WorkQueue v; WorkQueue[] ws;
+            if ((c = ctl) >= 0L)                      // enough workers
+                break;
+            else if ((sp = (int)c) == 0) {            // no idle workers
+                if ((c & ADD_WORKER) != 0L)           // too few workers
                     tryAddWorker(c);
                 break;
             }
-            if (ws == null)                            // unstarted/terminated
-                break;
-            if (ws.length <= (i = sp & SMASK))         // terminated
-                break;
-            if ((v = ws[i]) == null)                   // terminating
-                break;
-            int vs = (sp + SS_SEQ) & ~INACTIVE;        // next scanState
-            int d = sp - v.scanState;                  // screen CAS
-            long nc = (UC_MASK & (c + AC_UNIT)) | (SP_MASK & v.stackPred);
-            if (d == 0 && U.compareAndSwapLong(this, CTL, c, nc)) {
-                v.scanState = vs;                      // activate v
-                if ((p = v.parker) != null)
-                    U.unpark(p);
-                break;
+            else if ((ws = workQueues) == null)
+                break;                                // unstarted/terminated
+            else if (ws.length <= (i = sp & SMASK))
+                break;                                // terminated
+            else if ((v = ws[i]) == null)
+                break;                                // terminating
+            else {
+                int ns = sp & ~UNSIGNALLED;
+                int vs = v.scanState;
+                long nc = (v.stackPred & SP_MASK) | (UC_MASK & (c + AC_UNIT));
+                if (sp == vs && U.compareAndSwapLong(this, CTL, c, nc)) {
+                    v.scanState = ns;
+                    LockSupport.unpark(v.parker);
+                    break;
+                }
             }
-            if (q != null && q.base == q.top)          // no more work
-                break;
         }
     }
 
@@ -1670,174 +1723,287 @@
      * @return true if successful
      */
     private boolean tryRelease(long c, WorkQueue v, long inc) {
-        int sp = (int)c, vs = (sp + SS_SEQ) & ~INACTIVE; Thread p;
-        if (v != null && v.scanState == sp) {          // v is at top of stack
-            long nc = (UC_MASK & (c + inc)) | (SP_MASK & v.stackPred);
-            if (U.compareAndSwapLong(this, CTL, c, nc)) {
-                v.scanState = vs;
-                if ((p = v.parker) != null)
-                    U.unpark(p);
+        int sp = (int)c, ns = sp & ~UNSIGNALLED;
+        if (v != null) {
+            int vs = v.scanState;
+            long nc = (v.stackPred & SP_MASK) | (UC_MASK & (c + inc));
+            if (sp == vs && U.compareAndSwapLong(this, CTL, c, nc)) {
+                v.scanState = ns;
+                LockSupport.unpark(v.parker);
                 return true;
             }
         }
         return false;
     }
 
-    // Scanning for tasks
+    /**
+     * With approx probability of a missed signal, tries (once) to
+     * reactivate worker w (or some other worker), failing if stale or
+     * known to be already active.
+     *
+     * @param w the worker
+     * @param ws the workQueue array to use
+     * @param r random seed
+     */
+    private void tryReactivate(WorkQueue w, WorkQueue[] ws, int r) {
+        long c; int sp, wl; WorkQueue v;
+        if ((sp = (int)(c = ctl)) != 0 && w != null &&
+            ws != null && (wl = ws.length) > 0 &&
+            ((sp ^ r) & SS_SEQ) == 0 &&
+            (v = ws[(wl - 1) & sp]) != null) {
+            long nc = (v.stackPred & SP_MASK) | (UC_MASK & (c + AC_UNIT));
+            int ns = sp & ~UNSIGNALLED;
+            if (w.scanState < 0 &&
+                v.scanState == sp &&
+                U.compareAndSwapLong(this, CTL, c, nc)) {
+                v.scanState = ns;
+                LockSupport.unpark(v.parker);
+            }
+        }
+    }
+
+    /**
+     * If worker w exists and is active, enqueues and sets status to inactive.
+     *
+     * @param w the worker
+     * @param ss current (non-negative) scanState
+     */
+    private void inactivate(WorkQueue w, int ss) {
+        int ns = (ss + SS_SEQ) | UNSIGNALLED;
+        long lc = ns & SP_MASK, nc, c;
+        if (w != null) {
+            w.scanState = ns;
+            do {
+                nc = lc | (UC_MASK & ((c = ctl) - AC_UNIT));
+                w.stackPred = (int)c;
+            } while (!U.compareAndSwapLong(this, CTL, c, nc));
+        }
+    }
+
+    /**
+     * Possibly blocks worker w waiting for signal, or returns
+     * negative status if the worker should terminate. May return
+     * without status change if multiple stale unparks and/or
+     * interrupts occur.
+     *
+     * @param w the calling worker
+     * @return negative if w should terminate
+     */
+    private int awaitWork(WorkQueue w) {
+        int stat = 0;
+        if (w != null && w.scanState < 0) {
+            long c = ctl;
+            if ((int)(c >> AC_SHIFT) + (config & SMASK) <= 0)
+                stat = timedAwaitWork(w, c);     // possibly quiescent
+            else if ((runState & STOP) != 0)
+                stat = w.qlock = -1;             // pool terminating
+            else if (w.scanState < 0) {
+                w.parker = Thread.currentThread();
+                if (w.scanState < 0)             // recheck after write
+                    LockSupport.park(this);
+                w.parker = null;
+                if ((runState & STOP) != 0)
+                    stat = w.qlock = -1;         // recheck
+                else if (w.scanState < 0)
+                    Thread.interrupted();        // clear status
+            }
+        }
+        return stat;
+    }
+
+    /**
+     * Possibly triggers shutdown and tries (once) to block worker
+     * when pool is (or may be) quiescent. Waits up to a duration
+     * determined by number of workers.  On timeout, if ctl has not
+     * changed, terminates the worker, which will in turn wake up
+     * another worker to possibly repeat this process.
+     *
+     * @param w the calling worker
+     * @return negative if w should terminate
+     */
+    private int timedAwaitWork(WorkQueue w, long c) {
+        int stat = 0;
+        int scale = 1 - (short)(c >>> TC_SHIFT);
+        long deadline = (((scale <= 0) ? 1 : scale) * IDLE_TIMEOUT_MS +
+                         System.currentTimeMillis());
+        if ((runState >= 0 || (stat = tryTerminate(false, false)) > 0) &&
+            w != null && w.scanState < 0) {
+            int ss; AuxState aux;
+            w.parker = Thread.currentThread();
+            if (w.scanState < 0)
+                LockSupport.parkUntil(this, deadline);
+            w.parker = null;
+            if ((runState & STOP) != 0)
+                stat = w.qlock = -1;         // pool terminating
+            else if ((ss = w.scanState) < 0 && !Thread.interrupted() &&
+                     (int)c == ss && (aux = auxState) != null && ctl == c &&
+                     deadline - System.currentTimeMillis() <= TIMEOUT_SLOP_MS) {
+                aux.lock();
+                try {                        // pre-deregister
+                    WorkQueue[] ws;
+                    int cfg = w.config, idx = cfg & SMASK;
+                    long nc = ((UC_MASK & (c - TC_UNIT)) |
+                               (SP_MASK & w.stackPred));
+                    if ((runState & STOP) == 0 &&
+                        (ws = workQueues) != null &&
+                        idx < ws.length && idx >= 0 && ws[idx] == w &&
+                        U.compareAndSwapLong(this, CTL, c, nc)) {
+                        ws[idx] = null;
+                        w.config = cfg | UNREGISTERED;
+                        stat = w.qlock = -1;
+                    }
+                } finally {
+                    aux.unlock();
+                }
+            }
+        }
+        return stat;
+    }
+
+    /**
+     * If the given worker is a spare with no queued tasks, and there
+     * are enough existing workers, drops it from ctl counts and sets
+     * its state to terminated.
+     *
+     * @param w the calling worker -- must be a spare
+     * @return true if dropped (in which case it must not process more tasks)
+     */
+    private boolean tryDropSpare(WorkQueue w) {
+        if (w != null && w.isEmpty()) {           // no local tasks
+            long c; int sp, wl; WorkQueue[] ws; WorkQueue v;
+            while ((short)((c = ctl) >> TC_SHIFT) > 0 &&
+                   ((sp = (int)c) != 0 || (int)(c >> AC_SHIFT) > 0) &&
+                   (ws = workQueues) != null && (wl = ws.length) > 0) {
+                boolean dropped, canDrop;
+                if (sp == 0) {                    // no queued workers
+                    long nc = ((AC_MASK & (c - AC_UNIT)) |
+                               (TC_MASK & (c - TC_UNIT)) | (SP_MASK & c));
+                    dropped = U.compareAndSwapLong(this, CTL, c, nc);
+                }
+                else if (
+                    (v = ws[(wl - 1) & sp]) == null || v.scanState != sp)
+                    dropped = false;              // stale; retry
+                else {
+                    long nc = v.stackPred & SP_MASK;
+                    if (w == v || w.scanState >= 0) {
+                        canDrop = true;           // w unqueued or topmost
+                        nc |= ((AC_MASK & c) |    // ensure replacement
+                               (TC_MASK & (c - TC_UNIT)));
+                    }
+                    else {                        // w may be queued
+                        canDrop = false;          // help uncover
+                        nc |= ((AC_MASK & (c + AC_UNIT)) |
+                               (TC_MASK & c));
+                    }
+                    if (U.compareAndSwapLong(this, CTL, c, nc)) {
+                        v.scanState = sp & ~UNSIGNALLED;
+                        LockSupport.unpark(v.parker);
+                        dropped = canDrop;
+                    }
+                    else
+                        dropped = false;
+                }
+                if (dropped) {                    // pre-deregister
+                    int cfg = w.config, idx = cfg & SMASK;
+                    if (idx >= 0 && idx < ws.length && ws[idx] == w)
+                        ws[idx] = null;
+                    w.config = cfg | UNREGISTERED;
+                    w.qlock = -1;
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
 
     /**
      * Top-level runloop for workers, called by ForkJoinWorkerThread.run.
      */
     final void runWorker(WorkQueue w) {
-        w.growArray();                   // allocate queue
-        int seed = w.hint;               // initially holds randomization hint
-        int r = (seed == 0) ? 1 : seed;  // avoid 0 for xorShift
-        for (ForkJoinTask<?> t;;) {
-            if ((t = scan(w, r)) != null)
-                w.runTask(t);
-            else if (!awaitWork(w, r))
-                break;
-            r ^= r << 13; r ^= r >>> 17; r ^= r << 5; // xorshift
+        w.growArray();                                  // allocate queue
+        int bound = (w.config & SPARE_WORKER) != 0 ? 0 : POLL_LIMIT;
+        long seed = w.hint * 0xdaba0b6eb09322e3L;       // initial random seed
+        if ((runState & STOP) == 0) {
+            for (long r = (seed == 0L) ? 1L : seed;;) { // ensure nonzero
+                if (bound == 0 && tryDropSpare(w))
+                    break;
+                // high bits of prev seed for step; current low bits for idx
+                int step = (int)(r >>> 48) | 1;
+                r ^= r >>> 12; r ^= r << 25; r ^= r >>> 27; // xorshift
+                if (scan(w, bound, step, (int)r) < 0 && awaitWork(w) < 0)
+                    break;
+            }
         }
     }
 
+    // Scanning for tasks
+
     /**
-     * Scans for and tries to steal a top-level task. Scans start at a
-     * random location, randomly moving on apparent contention,
-     * otherwise continuing linearly until reaching two consecutive
-     * empty passes over all queues with the same checksum (summing
-     * each base index of each queue, that moves on each steal), at
-     * which point the worker tries to inactivate and then re-scans,
-     * attempting to re-activate (itself or some other worker) if
-     * finding a task; otherwise returning null to await work.  Scans
-     * otherwise touch as little memory as possible, to reduce
-     * disruption on other scanning threads.
+     * Repeatedly scans for and tries to steal and execute (via
+     * workQueue.runTask) a queued task. Each scan traverses queues in
+     * pseudorandom permutation. Upon finding a non-empty queue, makes
+     * at most the given bound attempts to re-poll (fewer if
+     * contended) on the same queue before returning (impossible
+     * scanState value) 0 to restart scan. Else returns after at least
+     * 1 and at most 32 full scans.
      *
      * @param w the worker (via its WorkQueue)
-     * @param r a random seed
-     * @return a task, or null if none found
+     * @param bound repoll bound as bitmask (0 if spare)
+     * @param step (circular) index increment per iteration (must be odd)
+     * @param r a random seed for origin index
+     * @return negative if should await signal
      */
-    private ForkJoinTask<?> scan(WorkQueue w, int r) {
-        WorkQueue[] ws; int m;
-        if ((ws = workQueues) != null && (m = ws.length - 1) > 0 && w != null) {
-            int ss = w.scanState;                     // initially non-negative
-            for (int origin = r & m, k = origin, oldSum = 0, checkSum = 0;;) {
-                WorkQueue q; ForkJoinTask<?>[] a; ForkJoinTask<?> t;
-                int b, n; long c;
-                if ((q = ws[k]) != null) {
-                    if ((n = (b = q.base) - q.top) < 0 &&
-                        (a = q.array) != null) {      // non-empty
-                        long i = (((a.length - 1) & b) << ASHIFT) + ABASE;
-                        if ((t = ((ForkJoinTask<?>)
-                                  U.getObjectVolatile(a, i))) != null &&
-                            q.base == b) {
-                            if (ss >= 0) {
-                                if (U.compareAndSwapObject(a, i, t, null)) {
-                                    q.base = b + 1;
-                                    if (n < -1)       // signal others
-                                        signalWork(ws, q);
-                                    return t;
-                                }
-                            }
-                            else if (oldSum == 0 &&   // try to activate
-                                     w.scanState < 0)
-                                tryRelease(c = ctl, ws[m & (int)c], AC_UNIT);
-                        }
-                        if (ss < 0)                   // refresh
-                            ss = w.scanState;
-                        r ^= r << 1; r ^= r >>> 3; r ^= r << 10;
-                        origin = k = r & m;           // move and rescan
-                        oldSum = checkSum = 0;
-                        continue;
+    private int scan(WorkQueue w, int bound, int step, int r) {
+        int stat = 0, wl; WorkQueue[] ws;
+        if ((ws = workQueues) != null && w != null && (wl = ws.length) > 0) {
+            for (int m = wl - 1,
+                     origin = m & r, idx = origin,
+                     npolls = 0,
+                     ss = w.scanState;;) {         // negative if inactive
+                WorkQueue q; ForkJoinTask<?>[] a; int b, al;
+                if ((q = ws[idx]) != null && (b = q.base) - q.top < 0 &&
+                    (a = q.array) != null && (al = a.length) > 0) {
+                    int index = (al - 1) & b;
+                    long offset = ((long)index << ASHIFT) + ABASE;
+                    ForkJoinTask<?> t = (ForkJoinTask<?>)
+                        U.getObjectVolatile(a, offset);
+                    if (t == null)
+                        break;                     // empty or busy
+                    else if (b++ != q.base)
+                        break;                     // busy
+                    else if (ss < 0) {
+                        tryReactivate(w, ws, r);
+                        break;                     // retry upon rescan
                     }
-                    checkSum += b;
-                }
-                if ((k = (k + 1) & m) == origin) {    // continue until stable
-                    if ((ss >= 0 || (ss == (ss = w.scanState))) &&
-                        oldSum == (oldSum = checkSum)) {
-                        if (ss < 0 || w.qlock < 0)    // already inactive
+                    else if (!U.compareAndSwapObject(a, offset, t, null))
+                        break;                     // contended
+                    else {
+                        q.base = b;
+                        w.currentSteal = t;
+                        if (b != q.top)            // propagate signal
+                            signalWork();
+                        w.runTask(t);
+                        if (++npolls > bound)
                             break;
-                        int ns = ss | INACTIVE;       // try to inactivate
-                        long nc = ((SP_MASK & ns) |
-                                   (UC_MASK & ((c = ctl) - AC_UNIT)));
-                        w.stackPred = (int)c;         // hold prev stack top
-                        U.putInt(w, QSCANSTATE, ns);
-                        if (U.compareAndSwapLong(this, CTL, c, nc))
-                            ss = ns;
-                        else
-                            w.scanState = ss;         // back out
                     }
-                    checkSum = 0;
+                }
+                else if (npolls != 0)              // rescan
+                    break;
+                else if ((idx = (idx + step) & m) == origin) {
+                    if (ss < 0) {                  // await signal
+                        stat = ss;
+                        break;
+                    }
+                    else if (r >= 0) {
+                        inactivate(w, ss);
+                        break;
+                    }
+                    else
+                        r <<= 1;                   // at most 31 rescans
                 }
             }
         }
-        return null;
-    }
-
-    /**
-     * Possibly blocks worker w waiting for a task to steal, or
-     * returns false if the worker should terminate.  If inactivating
-     * w has caused the pool to become quiescent, checks for pool
-     * termination, and, so long as this is not the only worker, waits
-     * for up to a given duration.  On timeout, if ctl has not
-     * changed, terminates the worker, which will in turn wake up
-     * another worker to possibly repeat this process.
-     *
-     * @param w the calling worker
-     * @param r a random seed (for spins)
-     * @return false if the worker should terminate
-     */
-    private boolean awaitWork(WorkQueue w, int r) {
-        if (w == null || w.qlock < 0)                 // w is terminating
-            return false;
-        for (int pred = w.stackPred, spins = SPINS, ss;;) {
-            if ((ss = w.scanState) >= 0)
-                break;
-            else if (spins > 0) {
-                r ^= r << 6; r ^= r >>> 21; r ^= r << 7;
-                if (r >= 0 && --spins == 0) {         // randomize spins
-                    WorkQueue v; WorkQueue[] ws; int s, j; AtomicLong sc;
-                    if (pred != 0 && (ws = workQueues) != null &&
-                        (j = pred & SMASK) < ws.length &&
-                        (v = ws[j]) != null &&        // see if pred parking
-                        (v.parker == null || v.scanState >= 0))
-                        spins = SPINS;                // continue spinning
-                }
-            }
-            else if (w.qlock < 0)                     // recheck after spins
-                return false;
-            else if (!Thread.interrupted()) {
-                long c, prevctl, parkTime, deadline;
-                int ac = (int)((c = ctl) >> AC_SHIFT) + (config & SMASK);
-                if ((ac <= 0 && tryTerminate(false, false)) ||
-                    (runState & STOP) != 0)           // pool terminating
-                    return false;
-                if (ac <= 0 && ss == (int)c) {        // is last waiter
-                    prevctl = (UC_MASK & (c + AC_UNIT)) | (SP_MASK & pred);
-                    int t = (short)(c >>> TC_SHIFT);  // shrink excess spares
-                    if (t > 2 && U.compareAndSwapLong(this, CTL, c, prevctl))
-                        return false;                 // else use timed wait
-                    parkTime = IDLE_TIMEOUT * ((t >= 0) ? 1 : 1 - t);
-                    deadline = System.nanoTime() + parkTime - TIMEOUT_SLOP;
-                }
-                else
-                    prevctl = parkTime = deadline = 0L;
-                Thread wt = Thread.currentThread();
-                U.putObject(wt, PARKBLOCKER, this);   // emulate LockSupport
-                w.parker = wt;
-                if (w.scanState < 0 && ctl == c)      // recheck before park
-                    U.park(false, parkTime);
-                U.putOrderedObject(w, QPARKER, null);
-                U.putObject(wt, PARKBLOCKER, null);
-                if (w.scanState >= 0)
-                    break;
-                if (parkTime != 0L && ctl == c &&
-                    deadline - System.nanoTime() <= 0L &&
-                    U.compareAndSwapLong(this, CTL, c, prevctl))
-                    return false;                     // shrink pool
-            }
-        }
-        return true;
+        return stat;
     }
 
     // Joining tasks
@@ -1849,7 +2015,7 @@
      * eligible tasks popped from the worker's own queue (via
      * popCC). Otherwise it scans others, randomly moving on
      * contention or execution, deciding to give up based on a
-     * checksum (via return codes frob pollAndExecCC). The maxTasks
+     * checksum (via return codes from pollAndExecCC). The maxTasks
      * argument supports external usages; internal calls use zero,
      * allowing unbounded steps (external calls trap non-positive
      * values).
@@ -1860,15 +2026,17 @@
      */
     final int helpComplete(WorkQueue w, CountedCompleter<?> task,
                            int maxTasks) {
-        WorkQueue[] ws; int s = 0, m;
-        if ((ws = workQueues) != null && (m = ws.length - 1) >= 0 &&
+        WorkQueue[] ws; int s = 0, wl;
+        if ((ws = workQueues) != null && (wl = ws.length) > 1 &&
             task != null && w != null) {
-            int mode = w.config;                 // for popCC
-            int r = w.hint ^ w.top;              // arbitrary seed for origin
-            int origin = r & m;                  // first queue to scan
-            int h = 1;                           // 1:ran, >1:contended, <0:hash
-            for (int k = origin, oldSum = 0, checkSum = 0;;) {
-                CountedCompleter<?> p; WorkQueue q;
+            for (int m = wl - 1,
+                     mode = w.config,
+                     r = ~mode,                  // scanning seed
+                     origin = r & m, k = origin, // first queue to scan
+                     step = 3,                   // first scan step
+                     h = 1,                      // 1:ran, >1:contended, <0:hash
+                     oldSum = 0, checkSum = 0;;) {
+                CountedCompleter<?> p; WorkQueue q; int i;
                 if ((s = task.status) < 0)
                     break;
                 if (h == 1 && (p = w.popCC(task, mode)) != null) {
@@ -1878,19 +2046,20 @@
                     origin = k;                  // reset
                     oldSum = checkSum = 0;
                 }
-                else {                           // poll other queues
-                    if ((q = ws[k]) == null)
+                else {                           // poll other worker queues
+                    if ((i = k | 1) < 0 || i > m || (q = ws[i]) == null)
                         h = 0;
                     else if ((h = q.pollAndExecCC(task)) < 0)
                         checkSum += h;
                     if (h > 0) {
                         if (h == 1 && maxTasks != 0 && --maxTasks == 0)
                             break;
+                        step = (r >>> 16) | 3;
                         r ^= r << 13; r ^= r >>> 17; r ^= r << 5; // xorshift
-                        origin = k = r & m;      // move and restart
+                        k = origin = r & m;      // move and restart
                         oldSum = checkSum = 0;
                     }
-                    else if ((k = (k + 1) & m) == origin) {
+                    else if ((k = (k + step) & m) == origin) {
                         if (oldSum == (oldSum = checkSum))
                             break;
                         checkSum = 0;
@@ -1903,7 +2072,7 @@
 
     /**
      * Tries to locate and execute tasks for a stealer of the given
-     * task, or in turn one of its stealers, Traces currentSteal ->
+     * task, or in turn one of its stealers. Traces currentSteal ->
      * currentJoin links looking for a thread working on a descendant
      * of the given task and with a non-empty queue to steal back and
      * execute tasks from. The first call to this method upon a
@@ -1915,63 +2084,74 @@
      * @param task the task to join
      */
     private void helpStealer(WorkQueue w, ForkJoinTask<?> task) {
-        WorkQueue[] ws = workQueues;
-        int oldSum = 0, checkSum, m;
-        if (ws != null && (m = ws.length - 1) >= 0 && w != null &&
-            task != null) {
-            do {                                       // restart point
-                checkSum = 0;                          // for stability check
+        if (task != null && w != null) {
+            ForkJoinTask<?> ps = w.currentSteal;
+            WorkQueue[] ws; int wl, oldSum = 0;
+            outer: while (w.tryRemoveAndExec(task) && task.status >= 0 &&
+                          (ws = workQueues) != null && (wl = ws.length) > 0) {
                 ForkJoinTask<?> subtask;
+                int m = wl - 1, checkSum = 0;          // for stability check
                 WorkQueue j = w, v;                    // v is subtask stealer
                 descent: for (subtask = task; subtask.status >= 0; ) {
-                    for (int h = j.hint | 1, k = 0, i; ; k += 2) {
-                        if (k > m)                     // can't find stealer
-                            break descent;
-                        if ((v = ws[i = (h + k) & m]) != null) {
+                    for (int h = j.hint | 1, k = 0, i;;) {
+                        if ((v = ws[i = (h + (k << 1)) & m]) != null) {
                             if (v.currentSteal == subtask) {
                                 j.hint = i;
                                 break;
                             }
                             checkSum += v.base;
                         }
+                        if (++k > m)                   // can't find stealer
+                            break outer;
                     }
+
                     for (;;) {                         // help v or descend
-                        ForkJoinTask<?>[] a; int b;
+                        ForkJoinTask<?>[] a; int b, al;
+                        if (subtask.status < 0)        // too late to help
+                            break descent;
                         checkSum += (b = v.base);
                         ForkJoinTask<?> next = v.currentJoin;
-                        if (subtask.status < 0 || j.currentJoin != subtask ||
-                            v.currentSteal != subtask) // stale
-                            break descent;
-                        if (b - v.top >= 0 || (a = v.array) == null) {
-                            if ((subtask = next) == null)
+                        ForkJoinTask<?> t = null;
+                        if ((a = v.array) != null && (al = a.length) > 0) {
+                            int index = (al - 1) & b;
+                            long offset = ((long)index << ASHIFT) + ABASE;
+                            t = (ForkJoinTask<?>)
+                                U.getObjectVolatile(a, offset);
+                            if (t != null && b++ == v.base) {
+                                if (j.currentJoin != subtask ||
+                                    v.currentSteal != subtask ||
+                                    subtask.status < 0)
+                                    break descent;     // stale
+                                if (U.compareAndSwapObject(a, offset, t, null)) {
+                                    v.base = b;
+                                    w.currentSteal = t;
+                                    for (int top = w.top;;) {
+                                        t.doExec();    // help
+                                        w.currentSteal = ps;
+                                        if (task.status < 0)
+                                            break outer;
+                                        if (w.top == top)
+                                            break;     // run local tasks
+                                        if ((t = w.pop()) == null)
+                                            break descent;
+                                        w.currentSteal = t;
+                                    }
+                                }
+                            }
+                        }
+                        if (t == null && b == v.base && b - v.top >= 0) {
+                            if ((subtask = next) == null) {  // try to descend
+                                if (next == v.currentJoin &&
+                                    oldSum == (oldSum = checkSum))
+                                    break outer;
                                 break descent;
+                            }
                             j = v;
                             break;
                         }
-                        int i = (((a.length - 1) & b) << ASHIFT) + ABASE;
-                        ForkJoinTask<?> t = ((ForkJoinTask<?>)
-                                             U.getObjectVolatile(a, i));
-                        if (v.base == b) {
-                            if (t == null)             // stale
-                                break descent;
-                            if (U.compareAndSwapObject(a, i, t, null)) {
-                                v.base = b + 1;
-                                ForkJoinTask<?> ps = w.currentSteal;
-                                int top = w.top;
-                                do {
-                                    U.putOrderedObject(w, QCURRENTSTEAL, t);
-                                    t.doExec();        // clear local tasks too
-                                } while (task.status >= 0 &&
-                                         w.top != top &&
-                                         (t = w.pop()) != null);
-                                U.putOrderedObject(w, QCURRENTSTEAL, ps);
-                                if (w.base != w.top)
-                                    return;            // can't further help
-                            }
-                        }
                     }
                 }
-            } while (task.status >= 0 && oldSum != (oldSum = checkSum));
+            }
         }
     }
 
@@ -1984,45 +2164,44 @@
      * @param w caller
      */
     private boolean tryCompensate(WorkQueue w) {
-        boolean canBlock;
-        WorkQueue[] ws; long c; int m, pc, sp;
-        if (w == null || w.qlock < 0 ||           // caller terminating
-            (ws = workQueues) == null || (m = ws.length - 1) <= 0 ||
-            (pc = config & SMASK) == 0)           // parallelism disabled
+        boolean canBlock; int wl;
+        long c = ctl;
+        WorkQueue[] ws = workQueues;
+        int pc = config & SMASK;
+        int ac = pc + (int)(c >> AC_SHIFT);
+        int tc = pc + (short)(c >> TC_SHIFT);
+        if (w == null || w.qlock < 0 || pc == 0 ||  // terminating or disabled
+            ws == null || (wl = ws.length) <= 0)
             canBlock = false;
-        else if ((sp = (int)(c = ctl)) != 0)      // release idle worker
-            canBlock = tryRelease(c, ws[sp & m], 0L);
         else {
-            int ac = (int)(c >> AC_SHIFT) + pc;
-            int tc = (short)(c >> TC_SHIFT) + pc;
-            int nbusy = 0;                        // validate saturation
-            for (int i = 0; i <= m; ++i) {        // two passes of odd indices
-                WorkQueue v;
-                if ((v = ws[((i << 1) | 1) & m]) != null) {
-                    if ((v.scanState & SCANNING) != 0)
-                        break;
-                    ++nbusy;
+            int m = wl - 1, sp;
+            boolean busy = true;                    // validate ac
+            for (int i = 0; i <= m; ++i) {
+                int k; WorkQueue v;
+                if ((k = (i << 1) | 1) <= m && k >= 0 && (v = ws[k]) != null &&
+                    v.scanState >= 0 && v.currentSteal == null) {
+                    busy = false;
+                    break;
                 }
             }
-            if (nbusy != (tc << 1) || ctl != c)
-                canBlock = false;                 // unstable or stale
+            if (!busy || ctl != c)
+                canBlock = false;                   // unstable or stale
+            else if ((sp = (int)c) != 0)            // release idle worker
+                canBlock = tryRelease(c, ws[m & sp], 0L);
             else if (tc >= pc && ac > 1 && w.isEmpty()) {
                 long nc = ((AC_MASK & (c - AC_UNIT)) |
-                           (~AC_MASK & c));       // uncompensated
+                           (~AC_MASK & c));         // uncompensated
                 canBlock = U.compareAndSwapLong(this, CTL, c, nc);
             }
             else if (tc >= MAX_CAP ||
-                     (this == common && tc >= pc + commonMaxSpares))
+                     (this == common && tc >= pc + COMMON_MAX_SPARES))
                 throw new RejectedExecutionException(
                     "Thread limit exceeded replacing blocked worker");
-            else {                                // similar to tryAddWorker
-                boolean add = false; int rs;      // CAS within lock
-                long nc = ((AC_MASK & c) |
-                           (TC_MASK & (c + TC_UNIT)));
-                if (((rs = lockRunState()) & STOP) == 0)
-                    add = U.compareAndSwapLong(this, CTL, c, nc);
-                unlockRunState(rs, rs & ~RSLOCK);
-                canBlock = add && createWorker(); // throws on exception
+            else {                                  // similar to tryAddWorker
+                boolean isSpare = (tc >= pc);
+                long nc = (AC_MASK & c) | (TC_MASK & (c + TC_UNIT));
+                canBlock = (U.compareAndSwapLong(this, CTL, c, nc) &&
+                            createWorker(isSpare)); // throws on exception
             }
         }
         return canBlock;
@@ -2038,33 +2217,35 @@
      */
     final int awaitJoin(WorkQueue w, ForkJoinTask<?> task, long deadline) {
         int s = 0;
-        if (task != null && w != null) {
+        if (w != null) {
             ForkJoinTask<?> prevJoin = w.currentJoin;
-            U.putOrderedObject(w, QCURRENTJOIN, task);
-            CountedCompleter<?> cc = (task instanceof CountedCompleter) ?
-                (CountedCompleter<?>)task : null;
-            for (;;) {
-                if ((s = task.status) < 0)
-                    break;
-                if (cc != null)
-                    helpComplete(w, cc, 0);
-                else if (w.base == w.top || w.tryRemoveAndExec(task))
-                    helpStealer(w, task);
-                if ((s = task.status) < 0)
-                    break;
-                long ms, ns;
-                if (deadline == 0L)
-                    ms = 0L;
-                else if ((ns = deadline - System.nanoTime()) <= 0L)
-                    break;
-                else if ((ms = TimeUnit.NANOSECONDS.toMillis(ns)) <= 0L)
-                    ms = 1L;
-                if (tryCompensate(w)) {
-                    task.internalWait(ms);
-                    U.getAndAddLong(this, CTL, AC_UNIT);
+            if (task != null && (s = task.status) >= 0) {
+                w.currentJoin = task;
+                CountedCompleter<?> cc = (task instanceof CountedCompleter) ?
+                    (CountedCompleter<?>)task : null;
+                for (;;) {
+                    if (cc != null)
+                        helpComplete(w, cc, 0);
+                    else
+                        helpStealer(w, task);
+                    if ((s = task.status) < 0)
+                        break;
+                    long ms, ns;
+                    if (deadline == 0L)
+                        ms = 0L;
+                    else if ((ns = deadline - System.nanoTime()) <= 0L)
+                        break;
+                    else if ((ms = TimeUnit.NANOSECONDS.toMillis(ns)) <= 0L)
+                        ms = 1L;
+                    if (tryCompensate(w)) {
+                        task.internalWait(ms);
+                        U.getAndAddLong(this, CTL, AC_UNIT);
+                    }
+                    if ((s = task.status) < 0)
+                        break;
                 }
+                w.currentJoin = prevJoin;
             }
-            U.putOrderedObject(w, QCURRENTJOIN, prevJoin);
         }
         return s;
     }
@@ -2077,10 +2258,11 @@
      * caller if, by the time it tries to use the queue, it is empty.
      */
     private WorkQueue findNonEmptyStealQueue() {
-        WorkQueue[] ws; int m;  // one-shot version of scan loop
+        WorkQueue[] ws; int wl;  // one-shot version of scan loop
         int r = ThreadLocalRandom.nextSecondarySeed();
-        if ((ws = workQueues) != null && (m = ws.length - 1) >= 0) {
-            for (int origin = r & m, k = origin, oldSum = 0, checkSum = 0;;) {
+        if ((ws = workQueues) != null && (wl = ws.length) > 0) {
+            int m = wl - 1, origin = r & m;
+            for (int k = origin, oldSum = 0, checkSum = 0;;) {
                 WorkQueue q; int b;
                 if ((q = ws[k]) != null) {
                     if ((b = q.base) - q.top < 0)
@@ -2105,25 +2287,27 @@
      */
     final void helpQuiescePool(WorkQueue w) {
         ForkJoinTask<?> ps = w.currentSteal; // save context
+        int wc = w.config;
         for (boolean active = true;;) {
-            long c; WorkQueue q; ForkJoinTask<?> t; int b;
-            w.execLocalTasks();     // run locals before each scan
-            if ((q = findNonEmptyStealQueue()) != null) {
+            long c; WorkQueue q; ForkJoinTask<?> t;
+            if (wc >= 0 && (t = w.pop()) != null) { // run locals if LIFO
+                (w.currentSteal = t).doExec();
+                w.currentSteal = ps;
+            }
+            else if ((q = findNonEmptyStealQueue()) != null) {
                 if (!active) {      // re-establish active count
                     active = true;
                     U.getAndAddLong(this, CTL, AC_UNIT);
                 }
-                if ((b = q.base) - q.top < 0 && (t = q.pollAt(b)) != null) {
-                    U.putOrderedObject(w, QCURRENTSTEAL, t);
-                    t.doExec();
+                if ((t = q.pollAt(q.base)) != null) {
+                    (w.currentSteal = t).doExec();
+                    w.currentSteal = ps;
                     if (++w.nsteals < 0)
                         w.transferStealCount(this);
                 }
             }
             else if (active) {      // decrement active count without queuing
                 long nc = (AC_MASK & ((c = ctl) - AC_UNIT)) | (~AC_MASK & c);
-                if ((int)(nc >> AC_SHIFT) + (config & SMASK) <= 0)
-                    break;          // bypass decrement-then-increment
                 if (U.compareAndSwapLong(this, CTL, c, nc))
                     active = false;
             }
@@ -2131,7 +2315,6 @@
                      U.compareAndSwapLong(this, CTL, c, c + AC_UNIT))
                 break;
         }
-        U.putOrderedObject(w, QCURRENTSTEAL, ps);
     }
 
     /**
@@ -2141,12 +2324,12 @@
      */
     final ForkJoinTask<?> nextTaskFor(WorkQueue w) {
         for (ForkJoinTask<?> t;;) {
-            WorkQueue q; int b;
+            WorkQueue q;
             if ((t = w.nextLocalTask()) != null)
                 return t;
             if ((q = findNonEmptyStealQueue()) == null)
                 return null;
-            if ((b = q.base) - q.top < 0 && (t = q.pollAt(b)) != null)
+            if ((t = q.pollAt(q.base)) != null)
                 return t;
         }
     }
@@ -2195,9 +2378,8 @@
      */
     static int getSurplusQueuedTaskCount() {
         Thread t; ForkJoinWorkerThread wt; ForkJoinPool pool; WorkQueue q;
-        if (((t = Thread.currentThread()) instanceof ForkJoinWorkerThread)) {
-            int p = (pool = (wt = (ForkJoinWorkerThread)t).pool).
-                config & SMASK;
+        if ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) {
+            int p = (pool = (wt = (ForkJoinWorkerThread)t).pool).config & SMASK;
             int n = (q = wt.workQueue).top - q.base;
             int a = (int)(pool.ctl >> AC_SHIFT) + p;
             return n - (a > (p >>>= 1) ? 0 :
@@ -2216,212 +2398,165 @@
      *
      * @param now if true, unconditionally terminate, else only
      * if no work and no active workers
-     * @param enable if true, enable shutdown when next possible
-     * @return true if now terminating or terminated
+     * @param enable if true, terminate when next possible
+     * @return -1: terminating/terminated, 0: retry if internal caller, else 1
      */
-    private boolean tryTerminate(boolean now, boolean enable) {
-        int rs;
-        if (this == common)                       // cannot shut down
-            return false;
-        if ((rs = runState) >= 0) {
-            if (!enable)
-                return false;
-            rs = lockRunState();                  // enter SHUTDOWN phase
-            unlockRunState(rs, (rs & ~RSLOCK) | SHUTDOWN);
+    private int tryTerminate(boolean now, boolean enable) {
+        int rs; // 3 phases: try to set SHUTDOWN, then STOP, then TERMINATED
+
+        while ((rs = runState) >= 0) {
+            if (!enable || this == common)        // cannot shutdown
+                return 1;
+            else if (rs == 0)
+                tryInitialize(false);             // ensure initialized
+            else
+                U.compareAndSwapInt(this, RUNSTATE, rs, rs | SHUTDOWN);
         }
 
-        if ((rs & STOP) == 0) {
+        if ((rs & STOP) == 0) {                   // try to initiate termination
             if (!now) {                           // check quiescence
                 for (long oldSum = 0L;;) {        // repeat until stable
-                    WorkQueue[] ws; WorkQueue w; int m, b; long c;
+                    WorkQueue[] ws; WorkQueue w; int b;
                     long checkSum = ctl;
                     if ((int)(checkSum >> AC_SHIFT) + (config & SMASK) > 0)
-                        return false;             // still active workers
-                    if ((ws = workQueues) == null || (m = ws.length - 1) <= 0)
-                        break;                    // check queues
-                    for (int i = 0; i <= m; ++i) {
-                        if ((w = ws[i]) != null) {
-                            if ((b = w.base) != w.top || w.scanState >= 0 ||
-                                w.currentSteal != null) {
-                                tryRelease(c = ctl, ws[m & (int)c], AC_UNIT);
-                                return false;     // arrange for recheck
+                        return 0;                 // still active workers
+                    if ((ws = workQueues) != null) {
+                        for (int i = 0; i < ws.length; ++i) {
+                            if ((w = ws[i]) != null) {
+                                checkSum += (b = w.base);
+                                if (w.currentSteal != null || b != w.top)
+                                    return 0;     // retry if internal caller
                             }
-                            checkSum += b;
-                            if ((i & 1) == 0)
-                                w.qlock = -1;     // try to disable external
                         }
                     }
                     if (oldSum == (oldSum = checkSum))
                         break;
                 }
             }
-            if ((runState & STOP) == 0) {
-                rs = lockRunState();              // enter STOP phase
-                unlockRunState(rs, (rs & ~RSLOCK) | STOP);
-            }
+            do {} while (!U.compareAndSwapInt(this, RUNSTATE,
+                                              rs = runState, rs | STOP));
         }
 
-        int pass = 0;                             // 3 passes to help terminate
-        for (long oldSum = 0L;;) {                // or until done or stable
-            WorkQueue[] ws; WorkQueue w; ForkJoinWorkerThread wt; int m;
+        for (long oldSum = 0L;;) {                // repeat until stable
+            WorkQueue[] ws; WorkQueue w; ForkJoinWorkerThread wt;
             long checkSum = ctl;
-            if ((short)(checkSum >>> TC_SHIFT) + (config & SMASK) <= 0 ||
-                (ws = workQueues) == null || (m = ws.length - 1) <= 0) {
-                if ((runState & TERMINATED) == 0) {
-                    rs = lockRunState();          // done
-                    unlockRunState(rs, (rs & ~RSLOCK) | TERMINATED);
-                    synchronized (this) { notifyAll(); } // for awaitTermination
-                }
-                break;
-            }
-            for (int i = 0; i <= m; ++i) {
-                if ((w = ws[i]) != null) {
-                    checkSum += w.base;
-                    w.qlock = -1;                 // try to disable
-                    if (pass > 0) {
-                        w.cancelAll();            // clear queue
-                        if (pass > 1 && (wt = w.owner) != null) {
-                            if (!wt.isInterrupted()) {
-                                try {             // unblock join
+            if ((ws = workQueues) != null) {      // help terminate others
+                for (int i = 0; i < ws.length; ++i) {
+                    if ((w = ws[i]) != null) {
+                        w.cancelAll();            // clear queues
+                        checkSum += w.base;
+                        if (w.qlock >= 0) {
+                            w.qlock = -1;         // racy set OK
+                            if ((wt = w.owner) != null) {
+                                try {             // unblock join or park
                                     wt.interrupt();
                                 } catch (Throwable ignore) {
                                 }
                             }
-                            if (w.scanState < 0)
-                                U.unpark(wt);     // wake up
                         }
                     }
                 }
             }
-            if (checkSum != oldSum) {             // unstable
-                oldSum = checkSum;
-                pass = 0;
-            }
-            else if (pass > 3 && pass > m)        // can't further help
+            if (oldSum == (oldSum = checkSum))
                 break;
-            else if (++pass > 1) {                // try to dequeue
-                long c; int j = 0, sp;            // bound attempts
-                while (j++ <= m && (sp = (int)(c = ctl)) != 0)
-                    tryRelease(c, ws[sp & m], AC_UNIT);
+        }
+
+        if ((short)(ctl >>> TC_SHIFT) + (config & SMASK) <= 0) {
+            runState = (STARTED | SHUTDOWN | STOP | TERMINATED); // final write
+            synchronized (this) {
+                notifyAll();                      // for awaitTermination
             }
         }
-        return true;
+
+        return -1;
     }
 
     // External operations
 
     /**
-     * Full version of externalPush, handling uncommon cases, as well
-     * as performing secondary initialization upon the first
-     * submission of the first task to the pool.  It also detects
+     * Constructs and tries to install a new external queue,
+     * failing if the workQueues array already has a queue at
+     * the given index.
+     *
+     * @param index the index of the new queue
+     */
+    private void tryCreateExternalQueue(int index) {
+        AuxState aux;
+        if ((aux = auxState) != null && index >= 0) {
+            WorkQueue q = new WorkQueue(this, null);
+            q.config = index;
+            q.scanState = ~UNSIGNALLED;
+            q.qlock = 1;                   // lock queue
+            boolean installed = false;
+            aux.lock();
+            try {                          // lock pool to install
+                WorkQueue[] ws;
+                if ((ws = workQueues) != null && index < ws.length &&
+                    ws[index] == null) {
+                    ws[index] = q;         // else throw away
+                    installed = true;
+                }
+            } finally {
+                aux.unlock();
+            }
+            if (installed) {
+                try {
+                    q.growArray();
+                } finally {
+                    q.qlock = 0;
+                }
+            }
+        }
+    }
+
+    /**
+     * Adds the given task to a submission queue at submitter's
+     * current queue. Also performs secondary initialization upon the
+     * first submission of the first task to the pool, and detects
      * first submission by an external thread and creates a new shared
      * queue if the one at index if empty or contended.
      *
      * @param task the task. Caller must ensure non-null.
      */
-    private void externalSubmit(ForkJoinTask<?> task) {
-        int r;                                    // initialize caller's probe
+    final void externalPush(ForkJoinTask<?> task) {
+        int r;                            // initialize caller's probe
         if ((r = ThreadLocalRandom.getProbe()) == 0) {
             ThreadLocalRandom.localInit();
             r = ThreadLocalRandom.getProbe();
         }
         for (;;) {
-            WorkQueue[] ws; WorkQueue q; int rs, m, k;
-            boolean move = false;
-            if ((rs = runState) < 0) {
-                tryTerminate(false, false);     // help terminate
-                throw new RejectedExecutionException();
-            }
-            else if ((rs & STARTED) == 0 ||     // initialize
-                     ((ws = workQueues) == null || (m = ws.length - 1) < 0)) {
-                int ns = 0;
-                rs = lockRunState();
-                try {
-                    if ((rs & STARTED) == 0) {
-                        U.compareAndSwapObject(this, STEALCOUNTER, null,
-                                               new AtomicLong());
-                        // create workQueues array with size a power of two
-                        int p = config & SMASK; // ensure at least 2 slots
-                        int n = (p > 1) ? p - 1 : 1;
-                        n |= n >>> 1; n |= n >>> 2;  n |= n >>> 4;
-                        n |= n >>> 8; n |= n >>> 16; n = (n + 1) << 1;
-                        workQueues = new WorkQueue[n];
-                        ns = STARTED;
-                    }
-                } finally {
-                    unlockRunState(rs, (rs & ~RSLOCK) | ns);
-                }
+            WorkQueue q; int wl, k, stat;
+            int rs = runState;
+            WorkQueue[] ws = workQueues;
+            if (rs <= 0 || ws == null || (wl = ws.length) <= 0)
+                tryInitialize(true);
+            else if ((q = ws[k = (wl - 1) & r & SQMASK]) == null)
+                tryCreateExternalQueue(k);
+            else if ((stat = q.sharedPush(task)) < 0)
+                break;
+            else if (stat == 0) {
+                signalWork();
+                break;
             }
-            else if ((q = ws[k = r & m & SQMASK]) != null) {
-                if (q.qlock == 0 && U.compareAndSwapInt(q, QLOCK, 0, 1)) {
-                    ForkJoinTask<?>[] a = q.array;
-                    int s = q.top;
-                    boolean submitted = false; // initial submission or resizing
-                    try {                      // locked version of push
-                        if ((a != null && a.length > s + 1 - q.base) ||
-                            (a = q.growArray()) != null) {
-                            int j = (((a.length - 1) & s) << ASHIFT) + ABASE;
-                            U.putOrderedObject(a, j, task);
-                            U.putOrderedInt(q, QTOP, s + 1);
-                            submitted = true;
-                        }
-                    } finally {
-                        U.compareAndSwapInt(q, QLOCK, 1, 0);
-                    }
-                    if (submitted) {
-                        signalWork(ws, q);
-                        return;
-                    }
-                }
-                move = true;                   // move on failure
-            }
-            else if (((rs = runState) & RSLOCK) == 0) { // create new queue
-                q = new WorkQueue(this, null);
-                q.hint = r;
-                q.config = k | SHARED_QUEUE;
-                q.scanState = INACTIVE;
-                rs = lockRunState();           // publish index
-                if (rs > 0 &&  (ws = workQueues) != null &&
-                    k < ws.length && ws[k] == null)
-                    ws[k] = q;                 // else terminated
-                unlockRunState(rs, rs & ~RSLOCK);
-            }
-            else
-                move = true;                   // move if busy
-            if (move)
+            else                          // move if busy
                 r = ThreadLocalRandom.advanceProbe(r);
         }
     }
 
     /**
-     * Tries to add the given task to a submission queue at
-     * submitter's current queue. Only the (vastly) most common path
-     * is directly handled in this method, while screening for need
-     * for externalSubmit.
-     *
-     * @param task the task. Caller must ensure non-null.
+     * Pushes a possibly-external submission.
      */
-    final void externalPush(ForkJoinTask<?> task) {
-        WorkQueue[] ws; WorkQueue q; int m;
-        int r = ThreadLocalRandom.getProbe();
-        int rs = runState;
-        if ((ws = workQueues) != null && (m = (ws.length - 1)) >= 0 &&
-            (q = ws[m & r & SQMASK]) != null && r != 0 && rs > 0 &&
-            U.compareAndSwapInt(q, QLOCK, 0, 1)) {
-            ForkJoinTask<?>[] a; int am, n, s;
-            if ((a = q.array) != null &&
-                (am = a.length - 1) > (n = (s = q.top) - q.base)) {
-                int j = ((am & s) << ASHIFT) + ABASE;
-                U.putOrderedObject(a, j, task);
-                U.putOrderedInt(q, QTOP, s + 1);
-                U.putIntVolatile(q, QLOCK, 0);
-                if (n <= 1)
-                    signalWork(ws, q);
-                return;
-            }
-            U.compareAndSwapInt(q, QLOCK, 1, 0);
-        }
-        externalSubmit(task);
+    private <T> ForkJoinTask<T> externalSubmit(ForkJoinTask<T> task) {
+        Thread t; ForkJoinWorkerThread w; WorkQueue q;
+        if (task == null)
+            throw new NullPointerException();
+        if (((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) &&
+            (w = (ForkJoinWorkerThread)t).pool == this &&
+            (q = w.workQueue) != null)
+            q.push(task);
+        else
+            externalPush(task);
+        return task;
     }
 
     /**
@@ -2430,46 +2565,32 @@
     static WorkQueue commonSubmitterQueue() {
         ForkJoinPool p = common;
         int r = ThreadLocalRandom.getProbe();
-        WorkQueue[] ws; int m;
+        WorkQueue[] ws; int wl;
         return (p != null && (ws = p.workQueues) != null &&
-                (m = ws.length - 1) >= 0) ?
-            ws[m & r & SQMASK] : null;
+                (wl = ws.length) > 0) ?
+            ws[(wl - 1) & r & SQMASK] : null;
     }
 
     /**
-     * Performs tryUnpush for an external submitter: Finds queue,
-     * locks if apparently non-empty, validates upon locking, and
-     * adjusts top. Each check can fail but rarely does.
+     * Performs tryUnpush for an external submitter.
      */
     final boolean tryExternalUnpush(ForkJoinTask<?> task) {
-        WorkQueue[] ws; WorkQueue w; ForkJoinTask<?>[] a; int m, s;
         int r = ThreadLocalRandom.getProbe();
-        if ((ws = workQueues) != null && (m = ws.length - 1) >= 0 &&
-            (w = ws[m & r & SQMASK]) != null &&
-            (a = w.array) != null && (s = w.top) != w.base) {
-            long j = (((a.length - 1) & (s - 1)) << ASHIFT) + ABASE;
-            if (U.compareAndSwapInt(w, QLOCK, 0, 1)) {
-                if (w.top == s && w.array == a &&
-                    U.getObject(a, j) == task &&
-                    U.compareAndSwapObject(a, j, task, null)) {
-                    U.putOrderedInt(w, QTOP, s - 1);
-                    U.putOrderedInt(w, QLOCK, 0);
-                    return true;
-                }
-                U.compareAndSwapInt(w, QLOCK, 1, 0);
-            }
-        }
-        return false;
+        WorkQueue[] ws; WorkQueue w; int wl;
+        return ((ws = workQueues) != null &&
+                (wl = ws.length) > 0 &&
+                (w = ws[(wl - 1) & r & SQMASK]) != null &&
+                w.trySharedUnpush(task));
     }
 
     /**
      * Performs helpComplete for an external submitter.
      */
     final int externalHelpComplete(CountedCompleter<?> task, int maxTasks) {
-        WorkQueue[] ws; int n;
+        WorkQueue[] ws; int wl;
         int r = ThreadLocalRandom.getProbe();
-        return ((ws = workQueues) == null || (n = ws.length) == 0) ? 0 :
-            helpComplete(ws[(n - 1) & r & SQMASK], task, maxTasks);
+        return ((ws = workQueues) != null && (wl = ws.length) > 0) ?
+            helpComplete(ws[(wl - 1) & r & SQMASK], task, maxTasks) : 0;
     }
 
     // Exported methods
@@ -2617,7 +2738,7 @@
     public <T> T invoke(ForkJoinTask<T> task) {
         if (task == null)
             throw new NullPointerException();
-        externalPush(task);
+        externalSubmit(task);
         return task.join();
     }
 
@@ -2630,9 +2751,7 @@
      *         scheduled for execution
      */
     public void execute(ForkJoinTask<?> task) {
-        if (task == null)
-            throw new NullPointerException();
-        externalPush(task);
+        externalSubmit(task);
     }
 
     // AbstractExecutorService methods
@@ -2650,7 +2769,7 @@
             job = (ForkJoinTask<?>) task;
         else
             job = new ForkJoinTask.RunnableExecuteAction(task);
-        externalPush(job);
+        externalSubmit(job);
     }
 
     /**
@@ -2664,10 +2783,7 @@
      *         scheduled for execution
      */
     public <T> ForkJoinTask<T> submit(ForkJoinTask<T> task) {
-        if (task == null)
-            throw new NullPointerException();
-        externalPush(task);
-        return task;
+        return externalSubmit(task);
     }
 
     /**
@@ -2676,9 +2792,7 @@
      *         scheduled for execution
      */
     public <T> ForkJoinTask<T> submit(Callable<T> task) {
-        ForkJoinTask<T> job = new ForkJoinTask.AdaptedCallable<T>(task);
-        externalPush(job);
-        return job;
+        return externalSubmit(new ForkJoinTask.AdaptedCallable<T>(task));
     }
 
     /**
@@ -2687,9 +2801,7 @@
      *         scheduled for execution
      */
     public <T> ForkJoinTask<T> submit(Runnable task, T result) {
-        ForkJoinTask<T> job = new ForkJoinTask.AdaptedRunnable<T>(task, result);
-        externalPush(job);
-        return job;
+        return externalSubmit(new ForkJoinTask.AdaptedRunnable<T>(task, result));
     }
 
     /**
@@ -2705,8 +2817,7 @@
             job = (ForkJoinTask<?>) task;
         else
             job = new ForkJoinTask.AdaptedRunnableAction(task);
-        externalPush(job);
-        return job;
+        return externalSubmit(job);
     }
 
     /**
@@ -2719,21 +2830,19 @@
         // invocation of multiple tasks is at least as efficient.
         ArrayList<Future<T>> futures = new ArrayList<>(tasks.size());
 
-        boolean done = false;
         try {
             for (Callable<T> t : tasks) {
                 ForkJoinTask<T> f = new ForkJoinTask.AdaptedCallable<T>(t);
                 futures.add(f);
-                externalPush(f);
+                externalSubmit(f);
             }
             for (int i = 0, size = futures.size(); i < size; i++)
                 ((ForkJoinTask<?>)futures.get(i)).quietlyJoin();
-            done = true;
             return futures;
-        } finally {
-            if (!done)
-                for (int i = 0, size = futures.size(); i < size; i++)
-                    futures.get(i).cancel(false);
+        } catch (Throwable t) {
+            for (int i = 0, size = futures.size(); i < size; i++)
+                futures.get(i).cancel(false);
+            throw t;
         }
     }
 
@@ -2773,7 +2882,7 @@
      * @since 1.8
      */
     public static int getCommonPoolParallelism() {
-        return commonParallelism;
+        return COMMON_PARALLELISM;
     }
 
     /**
@@ -2857,8 +2966,8 @@
      * @return the number of steals
      */
     public long getStealCount() {
-        AtomicLong sc = stealCounter;
-        long count = (sc == null) ? 0L : sc.get();
+        AuxState sc = auxState;
+        long count = (sc == null) ? 0L : sc.stealCount;
         WorkQueue[] ws; WorkQueue w;
         if ((ws = workQueues) != null) {
             for (int i = 1; i < ws.length; i += 2) {
@@ -2935,10 +3044,11 @@
      * @return the next submission, or {@code null} if none
      */
     protected ForkJoinTask<?> pollSubmission() {
-        WorkQueue[] ws; WorkQueue w; ForkJoinTask<?> t;
-        if ((ws = workQueues) != null) {
-            for (int i = 0; i < ws.length; i += 2) {
-                if ((w = ws[i]) != null && (t = w.poll()) != null)
+        WorkQueue[] ws; int wl; WorkQueue w; ForkJoinTask<?> t;
+        int r = ThreadLocalRandom.nextSecondarySeed();
+        if ((ws = workQueues) != null && (wl = ws.length) > 0) {
+            for (int m = wl - 1, i = 0; i < wl; ++i) {
+                if ((w = ws[(i << 1) & m]) != null && (t = w.poll()) != null)
                     return t;
             }
         }
@@ -2988,8 +3098,8 @@
     public String toString() {
         // Use a single pass through workQueues to collect counts
         long qt = 0L, qs = 0L; int rc = 0;
-        AtomicLong sc = stealCounter;
-        long st = (sc == null) ? 0L : sc.get();
+        AuxState sc = auxState;
+        long st = (sc == null) ? 0L : sc.stealCount;
         long c = ctl;
         WorkQueue[] ws; WorkQueue w;
         if ((ws = workQueues) != null) {
@@ -3171,17 +3281,17 @@
         }
         long startTime = System.nanoTime();
         WorkQueue[] ws;
-        int r = 0, m;
+        int r = 0, wl;
         boolean found = true;
         while (!isQuiescent() && (ws = workQueues) != null &&
-               (m = ws.length - 1) >= 0) {
+               (wl = ws.length) > 0) {
             if (!found) {
                 if ((System.nanoTime() - startTime) > nanos)
                     return false;
                 Thread.yield(); // cannot block
             }
             found = false;
-            for (int j = (m + 1) << 2; j >= 0; --j) {
+            for (int m = wl - 1, j = (m + 1) << 2; j >= 0; --j) {
                 ForkJoinTask<?> t; WorkQueue q; int b, k;
                 if ((k = r++ & m) <= m && k >= 0 && (q = ws[k]) != null &&
                     (b = q.base) - q.top < 0) {
@@ -3223,7 +3333,7 @@
      *
      * <p>For example, here is a ManagedBlocker based on a
      * ReentrantLock:
-     *  <pre> {@code
+     * <pre> {@code
      * class ManagedLocker implements ManagedBlocker {
      *   final ReentrantLock lock;
      *   boolean hasLock = false;
@@ -3240,7 +3350,7 @@
      *
      * <p>Here is a class that possibly blocks waiting for an
      * item on a given queue:
-     *  <pre> {@code
+     * <pre> {@code
      * class QueueTaker<E> implements ManagedBlocker {
      *   final BlockingQueue<E> queue;
      *   volatile E item = null;
@@ -3291,7 +3401,7 @@
      *
      * <p>If not running in a ForkJoinPool, this method is
      * behaviorally equivalent to
-     *  <pre> {@code
+     * <pre> {@code
      * while (!blocker.isReleasable())
      *   if (blocker.block())
      *     break;}</pre>
@@ -3342,58 +3452,40 @@
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe U;
-    private static final int  ABASE;
-    private static final int  ASHIFT;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
     private static final long CTL;
     private static final long RUNSTATE;
-    private static final long STEALCOUNTER;
-    private static final long PARKBLOCKER;
-    private static final long QTOP;
-    private static final long QLOCK;
-    private static final long QSCANSTATE;
-    private static final long QPARKER;
-    private static final long QCURRENTSTEAL;
-    private static final long QCURRENTJOIN;
+    private static final int ABASE;
+    private static final int ASHIFT;
 
     static {
-        // initialize field offsets for CAS etc
         try {
-            U = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = ForkJoinPool.class;
             CTL = U.objectFieldOffset
-                (k.getDeclaredField("ctl"));
+                (ForkJoinPool.class.getDeclaredField("ctl"));
             RUNSTATE = U.objectFieldOffset
-                (k.getDeclaredField("runState"));
-            STEALCOUNTER = U.objectFieldOffset
-                (k.getDeclaredField("stealCounter"));
-            Class<?> tk = Thread.class;
-            PARKBLOCKER = U.objectFieldOffset
-                (tk.getDeclaredField("parkBlocker"));
-            Class<?> wk = WorkQueue.class;
-            QTOP = U.objectFieldOffset
-                (wk.getDeclaredField("top"));
-            QLOCK = U.objectFieldOffset
-                (wk.getDeclaredField("qlock"));
-            QSCANSTATE = U.objectFieldOffset
-                (wk.getDeclaredField("scanState"));
-            QPARKER = U.objectFieldOffset
-                (wk.getDeclaredField("parker"));
-            QCURRENTSTEAL = U.objectFieldOffset
-                (wk.getDeclaredField("currentSteal"));
-            QCURRENTJOIN = U.objectFieldOffset
-                (wk.getDeclaredField("currentJoin"));
-            Class<?> ak = ForkJoinTask[].class;
-            ABASE = U.arrayBaseOffset(ak);
-            int scale = U.arrayIndexScale(ak);
+                (ForkJoinPool.class.getDeclaredField("runState"));
+            ABASE = U.arrayBaseOffset(ForkJoinTask[].class);
+            int scale = U.arrayIndexScale(ForkJoinTask[].class);
             if ((scale & (scale - 1)) != 0)
-                throw new Error("data type scale not a power of two");
+                throw new Error("array index scale not a power of two");
             ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
-        } catch (Exception e) {
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
 
-        commonMaxSpares = DEFAULT_COMMON_MAX_SPARES;
+        // Reduce the risk of rare disastrous classloading in first call to
+        // LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
+        Class<?> ensureLoaded = LockSupport.class;
+
+        int commonMaxSpares = DEFAULT_COMMON_MAX_SPARES;
+        try {
+            String p = System.getProperty
+                ("java.util.concurrent.ForkJoinPool.common.maximumSpares");
+            if (p != null)
+                commonMaxSpares = Integer.parseInt(p);
+        } catch (Exception ignore) {}
+        COMMON_MAX_SPARES = commonMaxSpares;
+
         defaultForkJoinWorkerThreadFactory =
             new DefaultForkJoinWorkerThreadFactory();
         modifyThreadPermission = new RuntimePermission("modifyThread");
@@ -3401,15 +3493,16 @@
         common = java.security.AccessController.doPrivileged
             (new java.security.PrivilegedAction<ForkJoinPool>() {
                 public ForkJoinPool run() { return makeCommonPool(); }});
-        int par = common.config & SMASK; // report 1 even if threads disabled
-        commonParallelism = par > 0 ? par : 1;
+
+        // report 1 even if threads disabled
+        COMMON_PARALLELISM = Math.max(common.config & SMASK, 1);
     }
 
     /**
      * Creates and returns the common pool, respecting user settings
      * specified via system properties.
      */
-    private static ForkJoinPool makeCommonPool() {
+    static ForkJoinPool makeCommonPool() {
         int parallelism = -1;
         ForkJoinWorkerThreadFactory factory = null;
         UncaughtExceptionHandler handler = null;
@@ -3420,8 +3513,6 @@
                 ("java.util.concurrent.ForkJoinPool.common.threadFactory");
             String hp = System.getProperty
                 ("java.util.concurrent.ForkJoinPool.common.exceptionHandler");
-            String mp = System.getProperty
-                ("java.util.concurrent.ForkJoinPool.common.maximumSpares");
             if (pp != null)
                 parallelism = Integer.parseInt(pp);
             if (fp != null)
@@ -3430,8 +3521,6 @@
             if (hp != null)
                 handler = ((UncaughtExceptionHandler)ClassLoader.
                            getSystemClassLoader().loadClass(hp).newInstance());
-            if (mp != null)
-                commonMaxSpares = Integer.parseInt(mp);
         } catch (Exception ignore) {
         }
         if (factory == null) {
@@ -3450,9 +3539,9 @@
     }
 
     /**
-     * Factory for innocuous worker threads
+     * Factory for innocuous worker threads.
      */
-    static final class InnocuousForkJoinWorkerThreadFactory
+    private static final class InnocuousForkJoinWorkerThreadFactory
         implements ForkJoinWorkerThreadFactory {
 
         /**
@@ -3473,9 +3562,8 @@
         }
 
         public final ForkJoinWorkerThread newThread(ForkJoinPool pool) {
-            return (ForkJoinWorkerThread.InnocuousForkJoinWorkerThread)
-                java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedAction<ForkJoinWorkerThread>() {
+            return java.security.AccessController.doPrivileged(
+                new java.security.PrivilegedAction<ForkJoinWorkerThread>() {
                     public ForkJoinWorkerThread run() {
                         return new ForkJoinWorkerThread.
                             InnocuousForkJoinWorkerThread(pool);
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java	Tue Oct 27 01:45:03 2015 -0400
@@ -36,21 +36,13 @@
 package java.util.concurrent;
 
 import java.io.Serializable;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.lang.reflect.Constructor;
 import java.util.Collection;
 import java.util.List;
 import java.util.RandomAccess;
-import java.lang.ref.WeakReference;
-import java.lang.ref.ReferenceQueue;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.RunnableFuture;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
 import java.util.concurrent.locks.ReentrantLock;
-import java.lang.reflect.Constructor;
 
 /**
  * Abstract base class for tasks that run within a {@link ForkJoinPool}.
@@ -442,7 +434,8 @@
         ExceptionNode next;
         final long thrower;  // use id not ref to avoid weak cycles
         final int hashCode;  // store task hashCode before weak ref disappears
-        ExceptionNode(ForkJoinTask<?> task, Throwable ex, ExceptionNode next) {
+        ExceptionNode(ForkJoinTask<?> task, Throwable ex, ExceptionNode next,
+                      ReferenceQueue<Object> exceptionTableRefQueue) {
             super(task, exceptionTableRefQueue);
             this.ex = ex;
             this.next = next;
@@ -468,7 +461,8 @@
                 int i = h & (t.length - 1);
                 for (ExceptionNode e = t[i]; ; e = e.next) {
                     if (e == null) {
-                        t[i] = new ExceptionNode(this, ex, t[i]);
+                        t[i] = new ExceptionNode(this, ex, t[i],
+                                                 exceptionTableRefQueue);
                         break;
                     }
                     if (e.get() == this) // already present
@@ -561,8 +555,6 @@
      * @return the exception, or null if none
      */
     private Throwable getThrowableException() {
-        if ((status & DONE_MASK) != EXCEPTIONAL)
-            return null;
         int h = System.identityHashCode(this);
         ExceptionNode e;
         final ReentrantLock lock = exceptionTableLock;
@@ -608,7 +600,7 @@
     }
 
     /**
-     * Poll stale refs and remove them. Call only while holding lock.
+     * Polls stale refs and removes them. Call only while holding lock.
      */
     private static void expungeStaleExceptions() {
         for (Object x; (x = exceptionTableRefQueue.poll()) != null;) {
@@ -635,7 +627,7 @@
     }
 
     /**
-     * If lock is available, poll stale refs and remove them.
+     * If lock is available, polls stale refs and removes them.
      * Called from ForkJoinPool when pools become quiescent.
      */
     static final void helpExpungeStaleExceptions() {
@@ -650,21 +642,23 @@
     }
 
     /**
-     * A version of "sneaky throw" to relay exceptions
+     * A version of "sneaky throw" to relay exceptions.
      */
     static void rethrow(Throwable ex) {
-        if (ex != null)
-            ForkJoinTask.<RuntimeException>uncheckedThrow(ex);
+        ForkJoinTask.<RuntimeException>uncheckedThrow(ex);
     }
 
     /**
      * The sneaky part of sneaky throw, relying on generics
      * limitations to evade compiler complaints about rethrowing
-     * unchecked exceptions
+     * unchecked exceptions.
      */
     @SuppressWarnings("unchecked") static <T extends Throwable>
-        void uncheckedThrow(Throwable t) throws T {
-        throw (T)t; // rely on vacuous cast
+    void uncheckedThrow(Throwable t) throws T {
+        if (t != null)
+            throw (T)t; // rely on vacuous cast
+        else
+            throw new Error("Unknown Exception");
     }
 
     /**
@@ -999,11 +993,10 @@
     public final V get() throws InterruptedException, ExecutionException {
         int s = (Thread.currentThread() instanceof ForkJoinWorkerThread) ?
             doJoin() : externalInterruptibleAwaitDone();
-        Throwable ex;
         if ((s &= DONE_MASK) == CANCELLED)
             throw new CancellationException();
-        if (s == EXCEPTIONAL && (ex = getThrowableException()) != null)
-            throw new ExecutionException(ex);
+        if (s == EXCEPTIONAL)
+            throw new ExecutionException(getThrowableException());
         return getRawResult();
     }
 
@@ -1058,13 +1051,11 @@
         if (s >= 0)
             s = status;
         if ((s &= DONE_MASK) != NORMAL) {
-            Throwable ex;
             if (s == CANCELLED)
                 throw new CancellationException();
             if (s != EXCEPTIONAL)
                 throw new TimeoutException();
-            if ((ex = getThrowableException()) != null)
-                throw new ExecutionException(ex);
+            throw new ExecutionException(getThrowableException());
         }
         return getRawResult();
     }
@@ -1090,10 +1081,10 @@
 
     /**
      * Possibly executes tasks until the pool hosting the current task
-     * {@link ForkJoinPool#isQuiescent is quiescent}. This method may
-     * be of use in designs in which many tasks are forked, but none
-     * are explicitly joined, instead executing them until all are
-     * processed.
+     * {@linkplain ForkJoinPool#isQuiescent is quiescent}.  This
+     * method may be of use in designs in which many tasks are forked,
+     * but none are explicitly joined, instead executing them until
+     * all are processed.
      */
     public static void helpQuiesce() {
         Thread t;
@@ -1129,10 +1120,12 @@
     }
 
     /**
-     * Returns the pool hosting the current task execution, or null
-     * if this task is executing outside of any ForkJoinPool.
+     * Returns the pool hosting the current thread, or {@code null}
+     * if the current thread is executing outside of any ForkJoinPool.
      *
-     * @see #inForkJoinPool
+     * <p>This method returns {@code null} if and only if {@link
+     * #inForkJoinPool} returns {@code false}.
+     *
      * @return the pool, or {@code null} if none
      */
     public static ForkJoinPool getPool() {
@@ -1299,6 +1292,23 @@
             null;
     }
 
+    /**
+     * If the current thread is operating in a ForkJoinPool,
+     * unschedules and returns, without executing, a task externally
+     * submitted to the pool, if one is available. Availability may be
+     * transient, so a {@code null} result does not necessarily imply
+     * quiescence of the pool.  This method is designed primarily to
+     * support extensions, and is unlikely to be useful otherwise.
+     *
+     * @return a task, or {@code null} if none are available
+     * @since 1.9
+     */
+    protected static ForkJoinTask<?> pollSubmission() {
+        Thread t;
+        return ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) ?
+            ((ForkJoinWorkerThread)t).pool.pollSubmission() : null;
+    }
+
     // tag operations
 
     /**
@@ -1312,16 +1322,16 @@
     }
 
     /**
-     * Atomically sets the tag value for this task.
+     * Atomically sets the tag value for this task and returns the old value.
      *
-     * @param tag the tag value
+     * @param newValue the new tag value
      * @return the previous value of the tag
      * @since 1.8
      */
-    public final short setForkJoinTaskTag(short tag) {
+    public final short setForkJoinTaskTag(short newValue) {
         for (int s;;) {
             if (U.compareAndSwapInt(this, STATUS, s = status,
-                                    (s & ~SMASK) | (tag & SMASK)))
+                                    (s & ~SMASK) | (newValue & SMASK)))
                 return (short)s;
         }
     }
@@ -1334,24 +1344,24 @@
      * before processing, otherwise exiting because the node has
      * already been visited.
      *
-     * @param e the expected tag value
-     * @param tag the new tag value
+     * @param expect the expected tag value
+     * @param update the new tag value
      * @return {@code true} if successful; i.e., the current value was
-     * equal to e and is now tag.
+     * equal to {@code expect} and was changed to {@code update}.
      * @since 1.8
      */
-    public final boolean compareAndSetForkJoinTaskTag(short e, short tag) {
+    public final boolean compareAndSetForkJoinTaskTag(short expect, short update) {
         for (int s;;) {
-            if ((short)(s = status) != e)
+            if ((short)(s = status) != expect)
                 return false;
             if (U.compareAndSwapInt(this, STATUS, s,
-                                    (s & ~SMASK) | (tag & SMASK)))
+                                    (s & ~SMASK) | (update & SMASK)))
                 return true;
         }
     }
 
     /**
-     * Adaptor for Runnables. This implements RunnableFuture
+     * Adapter for Runnables. This implements RunnableFuture
      * to be compliant with AbstractExecutorService constraints
      * when used in ForkJoinPool.
      */
@@ -1372,7 +1382,7 @@
     }
 
     /**
-     * Adaptor for Runnables without results
+     * Adapter for Runnables without results.
      */
     static final class AdaptedRunnableAction extends ForkJoinTask<Void>
         implements RunnableFuture<Void> {
@@ -1389,7 +1399,7 @@
     }
 
     /**
-     * Adaptor for Runnables in which failure forces worker exception
+     * Adapter for Runnables in which failure forces worker exception.
      */
     static final class RunnableExecuteAction extends ForkJoinTask<Void> {
         final Runnable runnable;
@@ -1407,7 +1417,7 @@
     }
 
     /**
-     * Adaptor for Callables
+     * Adapter for Callables.
      */
     static final class AdaptedCallable<T> extends ForkJoinTask<T>
         implements RunnableFuture<T> {
@@ -1423,8 +1433,6 @@
             try {
                 result = callable.call();
                 return true;
-            } catch (Error err) {
-                throw err;
             } catch (RuntimeException rex) {
                 throw rex;
             } catch (Exception ex) {
@@ -1509,7 +1517,7 @@
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe U;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
     private static final long STATUS;
 
     static {
@@ -1517,11 +1525,9 @@
         exceptionTableRefQueue = new ReferenceQueue<Object>();
         exceptionTable = new ExceptionNode[EXCEPTION_MAP_CAPACITY];
         try {
-            U = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = ForkJoinTask.class;
             STATUS = U.objectFieldOffset
-                (k.getDeclaredField("status"));
-        } catch (Exception e) {
+                (ForkJoinTask.class.getDeclaredField("status"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java	Tue Oct 27 01:45:03 2015 -0400
@@ -87,7 +87,7 @@
     }
 
     /**
-     * Version for InnocuousForkJoinWorkerThread
+     * Version for InnocuousForkJoinWorkerThread.
      */
     ForkJoinWorkerThread(ForkJoinPool pool, ThreadGroup threadGroup,
                          AccessControlContext acc) {
@@ -179,28 +179,25 @@
     }
 
     /**
-     * Non-public hook method for InnocuousForkJoinWorkerThread
+     * Non-public hook method for InnocuousForkJoinWorkerThread.
      */
     void afterTopLevelExec() {
     }
 
     // Set up to allow setting thread fields in constructor
-    private static final sun.misc.Unsafe U;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
     private static final long THREADLOCALS;
     private static final long INHERITABLETHREADLOCALS;
     private static final long INHERITEDACCESSCONTROLCONTEXT;
     static {
         try {
-            U = sun.misc.Unsafe.getUnsafe();
-            Class<?> tk = Thread.class;
             THREADLOCALS = U.objectFieldOffset
-                (tk.getDeclaredField("threadLocals"));
+                (Thread.class.getDeclaredField("threadLocals"));
             INHERITABLETHREADLOCALS = U.objectFieldOffset
-                (tk.getDeclaredField("inheritableThreadLocals"));
+                (Thread.class.getDeclaredField("inheritableThreadLocals"));
             INHERITEDACCESSCONTROLCONTEXT = U.objectFieldOffset
-                (tk.getDeclaredField("inheritedAccessControlContext"));
-
-        } catch (Exception e) {
+                (Thread.class.getDeclaredField("inheritedAccessControlContext"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
@@ -252,10 +249,10 @@
         private static ThreadGroup createThreadGroup() {
             try {
                 sun.misc.Unsafe u = sun.misc.Unsafe.getUnsafe();
-                Class<?> tk = Thread.class;
-                Class<?> gk = ThreadGroup.class;
-                long tg = u.objectFieldOffset(tk.getDeclaredField("group"));
-                long gp = u.objectFieldOffset(gk.getDeclaredField("parent"));
+                long tg = u.objectFieldOffset
+                    (Thread.class.getDeclaredField("group"));
+                long gp = u.objectFieldOffset
+                    (ThreadGroup.class.getDeclaredField("parent"));
                 ThreadGroup group = (ThreadGroup)
                     u.getObject(Thread.currentThread(), tg);
                 while (group != null) {
@@ -265,7 +262,7 @@
                                                "InnocuousForkJoinWorkerThreadGroup");
                     group = parent;
                 }
-            } catch (Exception e) {
+            } catch (ReflectiveOperationException e) {
                 throw new Error(e);
             }
             // fall through if null as cannot-happen safeguard
--- a/jdk/src/java.base/share/classes/java/util/concurrent/Future.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/Future.java	Tue Oct 27 01:45:03 2015 -0400
@@ -53,6 +53,7 @@
  * <p>
  * <b>Sample Usage</b> (Note that the following classes are all
  * made-up.)
+ *
  * <pre> {@code
  * interface ArchiveSearcher { String search(String target); }
  * class App {
@@ -75,9 +76,9 @@
  * The {@link FutureTask} class is an implementation of {@code Future} that
  * implements {@code Runnable}, and so may be executed by an {@code Executor}.
  * For example, the above construction with {@code submit} could be replaced by:
- *  <pre> {@code
+ * <pre> {@code
  * FutureTask<String> future =
- *   new FutureTask<String>(new Callable<String>() {
+ *   new FutureTask<>(new Callable<String>() {
  *     public String call() {
  *       return searcher.search(target);
  *   }});
--- a/jdk/src/java.base/share/classes/java/util/concurrent/FutureTask.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/FutureTask.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent;
+
 import java.util.concurrent.locks.LockSupport;
 
 /**
@@ -395,7 +396,7 @@
         throws InterruptedException {
         // The code below is very delicate, to achieve these goals:
         // - call nanoTime exactly once for each call to park
-        // - if nanos <= 0, return promptly without allocation or nanoTime
+        // - if nanos <= 0L, return promptly without allocation or nanoTime
         // - if nanos == Long.MIN_VALUE, don't underflow
         // - if nanos == Long.MAX_VALUE, and nanoTime is non-monotonic
         //   and we suffer a spurious wakeup, we will do no worse than
@@ -404,19 +405,20 @@
         WaitNode q = null;
         boolean queued = false;
         for (;;) {
-            if (Thread.interrupted()) {
-                removeWaiter(q);
-                throw new InterruptedException();
-            }
-
             int s = state;
             if (s > COMPLETING) {
                 if (q != null)
                     q.thread = null;
                 return s;
             }
-            else if (s == COMPLETING) // cannot time out yet
+            else if (s == COMPLETING)
+                // We may have already promised (via isDone) that we are done
+                // so never return empty-handed or throw InterruptedException
                 Thread.yield();
+            else if (Thread.interrupted()) {
+                removeWaiter(q);
+                throw new InterruptedException();
+            }
             else if (q == null) {
                 if (timed && nanos <= 0L)
                     return s;
@@ -440,7 +442,9 @@
                     }
                     parkNanos = nanos - elapsed;
                 }
-                LockSupport.parkNanos(this, parkNanos);
+                // nanoTime may be slow; recheck before parking
+                if (state < COMPLETING)
+                    LockSupport.parkNanos(this, parkNanos);
             }
             else
                 LockSupport.park(this);
@@ -480,20 +484,25 @@
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe U;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
     private static final long STATE;
     private static final long RUNNER;
     private static final long WAITERS;
     static {
         try {
-            U = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = FutureTask.class;
-            STATE   = U.objectFieldOffset(k.getDeclaredField("state"));
-            RUNNER  = U.objectFieldOffset(k.getDeclaredField("runner"));
-            WAITERS = U.objectFieldOffset(k.getDeclaredField("waiters"));
-        } catch (Exception e) {
+            STATE = U.objectFieldOffset
+                (FutureTask.class.getDeclaredField("state"));
+            RUNNER = U.objectFieldOffset
+                (FutureTask.class.getDeclaredField("runner"));
+            WAITERS = U.objectFieldOffset
+                (FutureTask.class.getDeclaredField("waiters"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
+
+        // Reduce the risk of rare disastrous classloading in first call to
+        // LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
+        Class<?> ensureLoaded = LockSupport.class;
     }
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/Helpers.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,118 @@
+/*
+ * 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.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Martin Buchholz with assistance from members of JCP
+ * JSR-166 Expert Group and released to the public domain, as
+ * explained at http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+package java.util.concurrent;
+
+import java.util.Collection;
+
+/** Shared implementation code for java.util.concurrent. */
+class Helpers {
+    private Helpers() {}                // non-instantiable
+
+    /**
+     * An implementation of Collection.toString() suitable for classes
+     * with locks.  Instead of holding a lock for the entire duration of
+     * toString(), or acquiring a lock for each call to Iterator.next(),
+     * we hold the lock only during the call to toArray() (less
+     * disruptive to other threads accessing the collection) and follows
+     * the maxim "Never call foreign code while holding a lock".
+     */
+    static String collectionToString(Collection<?> c) {
+        final Object[] a = c.toArray();
+        final int size = a.length;
+        if (size == 0)
+            return "[]";
+        int charLength = 0;
+
+        // Replace every array element with its string representation
+        for (int i = 0; i < size; i++) {
+            Object e = a[i];
+            // Extreme compatibility with AbstractCollection.toString()
+            String s = (e == c) ? "(this Collection)" : objectToString(e);
+            a[i] = s;
+            charLength += s.length();
+        }
+
+        return toString(a, size, charLength);
+    }
+
+    /**
+     * Like Arrays.toString(), but caller guarantees that size > 0,
+     * each element with index 0 <= i < size is a non-null String,
+     * and charLength is the sum of the lengths of the input Strings.
+     */
+    static String toString(Object[] a, int size, int charLength) {
+        // assert a != null;
+        // assert size > 0;
+
+        // Copy each string into a perfectly sized char[]
+        // Length of [ , , , ] == 2 * size
+        final char[] chars = new char[charLength + 2 * size];
+        chars[0] = '[';
+        int j = 1;
+        for (int i = 0; i < size; i++) {
+            if (i > 0) {
+                chars[j++] = ',';
+                chars[j++] = ' ';
+            }
+            String s = (String) a[i];
+            int len = s.length();
+            s.getChars(0, len, chars, j);
+            j += len;
+        }
+        chars[j] = ']';
+        // assert j == chars.length - 1;
+        return new String(chars);
+    }
+
+    /** Optimized form of: key + "=" + val */
+    static String mapEntryToString(Object key, Object val) {
+        final String k, v;
+        final int klen, vlen;
+        final char[] chars =
+            new char[(klen = (k = objectToString(key)).length()) +
+                     (vlen = (v = objectToString(val)).length()) + 1];
+        k.getChars(0, klen, chars, 0);
+        chars[klen] = '=';
+        v.getChars(0, vlen, chars, klen + 1);
+        return new String(chars);
+    }
+
+    private static String objectToString(Object x) {
+        // Extreme compatibility with StringBuilder.append(null)
+        String s;
+        return (x == null || (s = x.toString()) == null) ? "null" : s;
+    }
+}
--- a/jdk/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java	Tue Oct 27 01:45:03 2015 -0400
@@ -39,10 +39,10 @@
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
+import java.util.Spliterator;
+import java.util.Spliterators;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;
-import java.util.Spliterator;
-import java.util.Spliterators;
 import java.util.function.Consumer;
 
 /**
@@ -72,7 +72,7 @@
  *
  * @since 1.6
  * @author  Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this deque
  */
 public class LinkedBlockingDeque<E>
     extends AbstractQueue<E>
@@ -412,7 +412,7 @@
         lock.lockInterruptibly();
         try {
             while (!linkFirst(node)) {
-                if (nanos <= 0)
+                if (nanos <= 0L)
                     return false;
                 nanos = notFull.awaitNanos(nanos);
             }
@@ -435,7 +435,7 @@
         lock.lockInterruptibly();
         try {
             while (!linkLast(node)) {
-                if (nanos <= 0)
+                if (nanos <= 0L)
                     return false;
                 nanos = notFull.awaitNanos(nanos);
             }
@@ -517,7 +517,7 @@
         try {
             E x;
             while ( (x = unlinkFirst()) == null) {
-                if (nanos <= 0)
+                if (nanos <= 0L)
                     return null;
                 nanos = notEmpty.awaitNanos(nanos);
             }
@@ -535,7 +535,7 @@
         try {
             E x;
             while ( (x = unlinkLast()) == null) {
-                if (nanos <= 0)
+                if (nanos <= 0L)
                     return null;
                 nanos = notEmpty.awaitNanos(nanos);
             }
@@ -924,7 +924,7 @@
      * The following code can be used to dump the deque into a newly
      * allocated array of {@code String}:
      *
-     *  <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
+     * <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
      *
      * Note that {@code toArray(new Object[0])} is identical in function to
      * {@code toArray()}.
@@ -959,26 +959,7 @@
     }
 
     public String toString() {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
-            Node<E> p = first;
-            if (p == null)
-                return "[]";
-
-            StringBuilder sb = new StringBuilder();
-            sb.append('[');
-            for (;;) {
-                E e = p.item;
-                sb.append(e == this ? "(this Collection)" : e);
-                p = p.next;
-                if (p == null)
-                    return sb.append(']').toString();
-                sb.append(',').append(' ');
-            }
-        } finally {
-            lock.unlock();
-        }
+        return Helpers.collectionToString(this);
     }
 
     /**
@@ -1032,11 +1013,11 @@
     }
 
     /**
-     * Base class for Iterators for LinkedBlockingDeque
+     * Base class for LinkedBlockingDeque iterators.
      */
     private abstract class AbstractItr implements Iterator<E> {
         /**
-         * The next node to return in next()
+         * The next node to return in next().
          */
         Node<E> next;
 
@@ -1192,8 +1173,9 @@
                 if (i > 0) {
                     batch = i;
                     return Spliterators.spliterator
-                        (a, 0, i, Spliterator.ORDERED | Spliterator.NONNULL |
-                         Spliterator.CONCURRENT);
+                        (a, 0, i, (Spliterator.ORDERED |
+                                   Spliterator.NONNULL |
+                                   Spliterator.CONCURRENT));
                 }
             }
             return null;
--- a/jdk/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -35,15 +35,15 @@
 
 package java.util.concurrent;
 
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.ReentrantLock;
 import java.util.AbstractQueue;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 import java.util.Spliterator;
 import java.util.Spliterators;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.ReentrantLock;
 import java.util.function.Consumer;
 
 /**
@@ -75,7 +75,7 @@
  *
  * @since 1.5
  * @author Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this queue
  */
 public class LinkedBlockingQueue<E> extends AbstractQueue<E>
         implements BlockingQueue<E>, java.io.Serializable {
@@ -117,7 +117,7 @@
      */
 
     /**
-     * Linked list node class
+     * Linked list node class.
      */
     static class Node<E> {
         E item;
@@ -380,7 +380,7 @@
         putLock.lockInterruptibly();
         try {
             while (count.get() == capacity) {
-                if (nanos <= 0)
+                if (nanos <= 0L)
                     return false;
                 nanos = notFull.awaitNanos(nanos);
             }
@@ -462,7 +462,7 @@
         takeLock.lockInterruptibly();
         try {
             while (count.get() == 0) {
-                if (nanos <= 0)
+                if (nanos <= 0L)
                     return null;
                 nanos = notEmpty.awaitNanos(nanos);
             }
@@ -507,11 +507,7 @@
         final ReentrantLock takeLock = this.takeLock;
         takeLock.lock();
         try {
-            Node<E> first = head.next;
-            if (first == null)
-                return null;
-            else
-                return first.item;
+            return (count.get() > 0) ? head.next.item : null;
         } finally {
             takeLock.unlock();
         }
@@ -630,7 +626,7 @@
      * The following code can be used to dump the queue into a newly
      * allocated array of {@code String}:
      *
-     *  <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
+     * <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
      *
      * Note that {@code toArray(new Object[0])} is identical in function to
      * {@code toArray()}.
@@ -665,25 +661,7 @@
     }
 
     public String toString() {
-        fullyLock();
-        try {
-            Node<E> p = head.next;
-            if (p == null)
-                return "[]";
-
-            StringBuilder sb = new StringBuilder();
-            sb.append('[');
-            for (;;) {
-                E e = p.item;
-                sb.append(e == this ? "(this Collection)" : e);
-                p = p.next;
-                if (p == null)
-                    return sb.append(']').toString();
-                sb.append(',').append(' ');
-            }
-        } finally {
-            fullyUnlock();
-        }
+        return Helpers.collectionToString(this);
     }
 
     /**
@@ -801,34 +779,26 @@
             return current != null;
         }
 
-        /**
-         * Returns the next live successor of p, or null if no such.
-         *
-         * Unlike other traversal methods, iterators need to handle both:
-         * - dequeued nodes (p.next == p)
-         * - (possibly multiple) interior removed nodes (p.item == null)
-         */
-        private Node<E> nextNode(Node<E> p) {
-            for (;;) {
-                Node<E> s = p.next;
-                if (s == p)
-                    return head.next;
-                if (s == null || s.item != null)
-                    return s;
-                p = s;
-            }
-        }
-
         public E next() {
             fullyLock();
             try {
                 if (current == null)
                     throw new NoSuchElementException();
-                E x = currentElement;
                 lastRet = current;
-                current = nextNode(current);
-                currentElement = (current == null) ? null : current.item;
-                return x;
+                E item = null;
+                // Unlike other traversal methods, iterators must handle both:
+                // - dequeued nodes (p.next == p)
+                // - (possibly multiple) interior removed nodes (p.item == null)
+                for (Node<E> p = current, q;; p = q) {
+                    if ((q = p.next) == p)
+                        q = head.next;
+                    if (q == null || (item = q.item) != null) {
+                        current = q;
+                        E x = currentElement;
+                        currentElement = item;
+                        return x;
+                    }
+                }
             } finally {
                 fullyUnlock();
             }
@@ -901,8 +871,9 @@
                 if (i > 0) {
                     batch = i;
                     return Spliterators.spliterator
-                        (a, 0, i, Spliterator.ORDERED | Spliterator.NONNULL |
-                         Spliterator.CONCURRENT);
+                        (a, 0, i, (Spliterator.ORDERED |
+                                   Spliterator.NONNULL |
+                                   Spliterator.CONCURRENT));
                 }
             }
             return null;
--- a/jdk/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -36,14 +36,14 @@
 package java.util.concurrent;
 
 import java.util.AbstractQueue;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 import java.util.Queue;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.LockSupport;
 import java.util.Spliterator;
 import java.util.Spliterators;
+import java.util.concurrent.locks.LockSupport;
 import java.util.function.Consumer;
 
 /**
@@ -83,7 +83,7 @@
  *
  * @since 1.7
  * @author Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this queue
  */
 public class LinkedTransferQueue<E> extends AbstractQueue<E>
     implements TransferQueue<E>, java.io.Serializable {
@@ -108,7 +108,7 @@
      *
      * A FIFO dual queue may be implemented using a variation of the
      * Michael & Scott (M&S) lock-free queue algorithm
-     * (http://www.cs.rochester.edu/u/scott/papers/1996_PODC_queues.pdf).
+     * (http://www.cs.rochester.edu/~scott/papers/1996_PODC_queues.pdf).
      * It maintains two pointer fields, "head", pointing to a
      * (matched) node that in turn points to the first actual
      * (unmatched) queue node (or null if empty); and "tail" that
@@ -215,7 +215,7 @@
      * of costly-to-reclaim garbage caused by the sequential "next"
      * links of nodes starting at old forgotten head nodes: As first
      * described in detail by Boehm
-     * (http://portal.acm.org/citation.cfm?doid=503272.503282) if a GC
+     * (http://portal.acm.org/citation.cfm?doid=503272.503282), if a GC
      * delays noticing that any arbitrarily old node has become
      * garbage, all newer dead nodes will also be unreclaimed.
      * (Similar issues arise in non-GC environments.)  To cope with
@@ -456,12 +456,12 @@
 
         // CAS methods for fields
         final boolean casNext(Node cmp, Node val) {
-            return UNSAFE.compareAndSwapObject(this, nextOffset, cmp, val);
+            return U.compareAndSwapObject(this, NEXT, cmp, val);
         }
 
         final boolean casItem(Object cmp, Object val) {
             // assert cmp == null || cmp.getClass() != Node.class;
-            return UNSAFE.compareAndSwapObject(this, itemOffset, cmp, val);
+            return U.compareAndSwapObject(this, ITEM, cmp, val);
         }
 
         /**
@@ -469,7 +469,7 @@
          * only be seen after publication via casNext.
          */
         Node(Object item, boolean isData) {
-            UNSAFE.putObject(this, itemOffset, item); // relaxed write
+            U.putObject(this, ITEM, item); // relaxed write
             this.isData = isData;
         }
 
@@ -478,7 +478,7 @@
          * only after CASing head field, so uses relaxed write.
          */
         final void forgetNext() {
-            UNSAFE.putObject(this, nextOffset, this);
+            U.putObject(this, NEXT, this);
         }
 
         /**
@@ -491,8 +491,8 @@
          * else we don't care).
          */
         final void forgetContents() {
-            UNSAFE.putObject(this, itemOffset, this);
-            UNSAFE.putObject(this, waiterOffset, null);
+            U.putObject(this, ITEM, this);
+            U.putObject(this, WAITER, null);
         }
 
         /**
@@ -538,21 +538,19 @@
         private static final long serialVersionUID = -3375979862319811754L;
 
         // Unsafe mechanics
-        private static final sun.misc.Unsafe UNSAFE;
-        private static final long itemOffset;
-        private static final long nextOffset;
-        private static final long waiterOffset;
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+        private static final long ITEM;
+        private static final long NEXT;
+        private static final long WAITER;
         static {
             try {
-                UNSAFE = sun.misc.Unsafe.getUnsafe();
-                Class<?> k = Node.class;
-                itemOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("item"));
-                nextOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("next"));
-                waiterOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("waiter"));
-            } catch (Exception e) {
+                ITEM = U.objectFieldOffset
+                    (Node.class.getDeclaredField("item"));
+                NEXT = U.objectFieldOffset
+                    (Node.class.getDeclaredField("next"));
+                WAITER = U.objectFieldOffset
+                    (Node.class.getDeclaredField("waiter"));
+            } catch (ReflectiveOperationException e) {
                 throw new Error(e);
             }
         }
@@ -569,15 +567,15 @@
 
     // CAS methods for fields
     private boolean casTail(Node cmp, Node val) {
-        return UNSAFE.compareAndSwapObject(this, tailOffset, cmp, val);
+        return U.compareAndSwapObject(this, TAIL, cmp, val);
     }
 
     private boolean casHead(Node cmp, Node val) {
-        return UNSAFE.compareAndSwapObject(this, headOffset, cmp, val);
+        return U.compareAndSwapObject(this, HEAD, cmp, val);
     }
 
     private boolean casSweepVotes(int cmp, int val) {
-        return UNSAFE.compareAndSwapInt(this, sweepVotesOffset, cmp, val);
+        return U.compareAndSwapInt(this, SWEEPVOTES, cmp, val);
     }
 
     /*
@@ -588,12 +586,6 @@
     private static final int SYNC  = 2; // for transfer, take
     private static final int TIMED = 3; // for timed poll, tryTransfer
 
-    @SuppressWarnings("unchecked")
-    static <E> E cast(Object item) {
-        // assert item == null || item.getClass() != Node.class;
-        return (E) item;
-    }
-
     /**
      * Implements all queuing methods. See above for explanation.
      *
@@ -630,7 +622,8 @@
                                 break;        // unless slack < 2
                         }
                         LockSupport.unpark(p.waiter);
-                        return LinkedTransferQueue.<E>cast(item);
+                        @SuppressWarnings("unchecked") E itemE = (E) item;
+                        return itemE;
                     }
                 }
                 Node n = p.next;
@@ -708,15 +701,15 @@
             if (item != e) {                  // matched
                 // assert item != s;
                 s.forgetContents();           // avoid garbage
-                return LinkedTransferQueue.<E>cast(item);
+                @SuppressWarnings("unchecked") E itemE = (E) item;
+                return itemE;
             }
-            if ((w.isInterrupted() || (timed && nanos <= 0)) &&
-                    s.casItem(e, s)) {        // cancel
-                unsplice(pred, s);
-                return e;
+            else if (w.isInterrupted() || (timed && nanos <= 0L)) {
+                unsplice(pred, s);           // try to unlink and cancel
+                if (s.casItem(e, s))         // return normally if lost CAS
+                    return e;
             }
-
-            if (spins < 0) {                  // establish spins at/near front
+            else if (spins < 0) {            // establish spins at/near front
                 if ((spins = spinsFor(pred, s.isData)) > 0)
                     randomYields = ThreadLocalRandom.current();
             }
@@ -768,52 +761,25 @@
     }
 
     /**
-     * Returns the first unmatched node of the given mode, or null if
-     * none.  Used by methods isEmpty, hasWaitingConsumer.
-     */
-    private Node firstOfMode(boolean isData) {
-        for (Node p = head; p != null; p = succ(p)) {
-            if (!p.isMatched())
-                return (p.isData == isData) ? p : null;
-        }
-        return null;
-    }
-
-    /**
-     * Version of firstOfMode used by Spliterator. Callers must
-     * recheck if the returned node's item field is null or
-     * self-linked before using.
+     * Returns the first unmatched data node, or null if none.
+     * Callers must recheck if the returned node's item field is null
+     * or self-linked before using.
      */
     final Node firstDataNode() {
-        for (Node p = head; p != null;) {
-            Object item = p.item;
-            if (p.isData) {
-                if (item != null && item != p)
-                    return p;
+        restartFromHead: for (;;) {
+            for (Node p = head; p != null;) {
+                Object item = p.item;
+                if (p.isData) {
+                    if (item != null && item != p)
+                        return p;
+                }
+                else if (item == null)
+                    break;
+                if (p == (p = p.next))
+                    continue restartFromHead;
             }
-            else if (item == null)
-                break;
-            if (p == (p = p.next))
-                p = head;
+            return null;
         }
-        return null;
-    }
-
-    /**
-     * Returns the item in the first unmatched node with isData; or
-     * null if none.  Used by peek.
-     */
-    private E firstDataItem() {
-        for (Node p = head; p != null; p = succ(p)) {
-            Object item = p.item;
-            if (p.isData) {
-                if (item != null && item != p)
-                    return LinkedTransferQueue.<E>cast(item);
-            }
-            else if (item == null)
-                return null;
-        }
-        return null;
     }
 
     /**
@@ -821,23 +787,140 @@
      * Used by methods size and getWaitingConsumerCount.
      */
     private int countOfMode(boolean data) {
-        int count = 0;
-        for (Node p = head; p != null; ) {
-            if (!p.isMatched()) {
-                if (p.isData != data)
-                    return 0;
-                if (++count == Integer.MAX_VALUE) // saturated
+        restartFromHead: for (;;) {
+            int count = 0;
+            for (Node p = head; p != null;) {
+                if (!p.isMatched()) {
+                    if (p.isData != data)
+                        return 0;
+                    if (++count == Integer.MAX_VALUE)
+                        break;  // @see Collection.size()
+                }
+                if (p == (p = p.next))
+                    continue restartFromHead;
+            }
+            return count;
+        }
+    }
+
+    public String toString() {
+        String[] a = null;
+        restartFromHead: for (;;) {
+            int charLength = 0;
+            int size = 0;
+            for (Node p = head; p != null;) {
+                Object item = p.item;
+                if (p.isData) {
+                    if (item != null && item != p) {
+                        if (a == null)
+                            a = new String[4];
+                        else if (size == a.length)
+                            a = Arrays.copyOf(a, 2 * size);
+                        String s = item.toString();
+                        a[size++] = s;
+                        charLength += s.length();
+                    }
+                } else if (item == null)
                     break;
+                if (p == (p = p.next))
+                    continue restartFromHead;
+            }
+
+            if (size == 0)
+                return "[]";
+
+            return Helpers.toString(a, size, charLength);
+        }
+    }
+
+    private Object[] toArrayInternal(Object[] a) {
+        Object[] x = a;
+        restartFromHead: for (;;) {
+            int size = 0;
+            for (Node p = head; p != null;) {
+                Object item = p.item;
+                if (p.isData) {
+                    if (item != null && item != p) {
+                        if (x == null)
+                            x = new Object[4];
+                        else if (size == x.length)
+                            x = Arrays.copyOf(x, 2 * (size + 4));
+                        x[size++] = item;
+                    }
+                } else if (item == null)
+                    break;
+                if (p == (p = p.next))
+                    continue restartFromHead;
             }
-            Node n = p.next;
-            if (n != p)
-                p = n;
-            else {
-                count = 0;
-                p = head;
+            if (x == null)
+                return new Object[0];
+            else if (a != null && size <= a.length) {
+                if (a != x)
+                    System.arraycopy(x, 0, a, 0, size);
+                if (size < a.length)
+                    a[size] = null;
+                return a;
             }
+            return (size == x.length) ? x : Arrays.copyOf(x, size);
         }
-        return count;
+    }
+
+    /**
+     * Returns an array containing all of the elements in this queue, in
+     * proper sequence.
+     *
+     * <p>The returned array will be "safe" in that no references to it are
+     * maintained by this queue.  (In other words, this method must allocate
+     * a new array).  The caller is thus free to modify the returned array.
+     *
+     * <p>This method acts as bridge between array-based and collection-based
+     * APIs.
+     *
+     * @return an array containing all of the elements in this queue
+     */
+    public Object[] toArray() {
+        return toArrayInternal(null);
+    }
+
+    /**
+     * Returns an array containing all of the elements in this queue, in
+     * proper sequence; the runtime type of the returned array is that of
+     * the specified array.  If the queue fits in the specified array, it
+     * is returned therein.  Otherwise, a new array is allocated with the
+     * runtime type of the specified array and the size of this queue.
+     *
+     * <p>If this queue fits in the specified array with room to spare
+     * (i.e., the array has more elements than this queue), the element in
+     * the array immediately following the end of the queue is set to
+     * {@code null}.
+     *
+     * <p>Like the {@link #toArray()} method, this method acts as bridge between
+     * array-based and collection-based APIs.  Further, this method allows
+     * precise control over the runtime type of the output array, and may,
+     * under certain circumstances, be used to save allocation costs.
+     *
+     * <p>Suppose {@code x} is a queue known to contain only strings.
+     * The following code can be used to dump the queue into a newly
+     * allocated array of {@code String}:
+     *
+     * <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
+     *
+     * Note that {@code toArray(new Object[0])} is identical in function to
+     * {@code toArray()}.
+     *
+     * @param a the array into which the elements of the queue are to
+     *          be stored, if it is big enough; otherwise, a new array of the
+     *          same runtime type is allocated for this purpose
+     * @return an array containing all of the elements in this queue
+     * @throws ArrayStoreException if the runtime type of the specified array
+     *         is not a supertype of the runtime type of every element in
+     *         this queue
+     * @throws NullPointerException if the specified array is null
+     */
+    @SuppressWarnings("unchecked")
+    public <T> T[] toArray(T[] a) {
+        if (a == null) throw new NullPointerException();
+        return (T[]) toArrayInternal(a);
     }
 
     final class Itr implements Iterator<E> {
@@ -886,7 +969,8 @@
                 Object item = s.item;
                 if (s.isData) {
                     if (item != null && item != s) {
-                        nextItem = LinkedTransferQueue.<E>cast(item);
+                        @SuppressWarnings("unchecked") E itemE = (E) item;
+                        nextItem = itemE;
                         nextNode = s;
                         return;
                     }
@@ -934,23 +1018,19 @@
     }
 
     /** A customized variant of Spliterators.IteratorSpliterator */
-    static final class LTQSpliterator<E> implements Spliterator<E> {
+    final class LTQSpliterator<E> implements Spliterator<E> {
         static final int MAX_BATCH = 1 << 25;  // max batch array size;
-        final LinkedTransferQueue<E> queue;
-        Node current;    // current node; null until initialized
+        Node current;       // current node; null until initialized
         int batch;          // batch size for splits
         boolean exhausted;  // true when no more nodes
-        LTQSpliterator(LinkedTransferQueue<E> queue) {
-            this.queue = queue;
-        }
+        LTQSpliterator() {}
 
         public Spliterator<E> trySplit() {
             Node p;
-            final LinkedTransferQueue<E> q = this.queue;
             int b = batch;
             int n = (b <= 0) ? 1 : (b >= MAX_BATCH) ? MAX_BATCH : b + 1;
             if (!exhausted &&
-                ((p = current) != null || (p = q.firstDataNode()) != null) &&
+                ((p = current) != null || (p = firstDataNode()) != null) &&
                 p.next != null) {
                 Object[] a = new Object[n];
                 int i = 0;
@@ -959,15 +1039,16 @@
                     if (e != p && (a[i] = e) != null)
                         ++i;
                     if (p == (p = p.next))
-                        p = q.firstDataNode();
+                        p = firstDataNode();
                 } while (p != null && i < n && p.isData);
                 if ((current = p) == null)
                     exhausted = true;
                 if (i > 0) {
                     batch = i;
                     return Spliterators.spliterator
-                        (a, 0, i, Spliterator.ORDERED | Spliterator.NONNULL |
-                         Spliterator.CONCURRENT);
+                        (a, 0, i, (Spliterator.ORDERED |
+                                   Spliterator.NONNULL |
+                                   Spliterator.CONCURRENT));
                 }
             }
             return null;
@@ -977,16 +1058,15 @@
         public void forEachRemaining(Consumer<? super E> action) {
             Node p;
             if (action == null) throw new NullPointerException();
-            final LinkedTransferQueue<E> q = this.queue;
             if (!exhausted &&
-                ((p = current) != null || (p = q.firstDataNode()) != null)) {
+                ((p = current) != null || (p = firstDataNode()) != null)) {
                 exhausted = true;
                 do {
                     Object e = p.item;
                     if (e != null && e != p)
                         action.accept((E)e);
                     if (p == (p = p.next))
-                        p = q.firstDataNode();
+                        p = firstDataNode();
                 } while (p != null && p.isData);
             }
         }
@@ -995,15 +1075,14 @@
         public boolean tryAdvance(Consumer<? super E> action) {
             Node p;
             if (action == null) throw new NullPointerException();
-            final LinkedTransferQueue<E> q = this.queue;
             if (!exhausted &&
-                ((p = current) != null || (p = q.firstDataNode()) != null)) {
+                ((p = current) != null || (p = firstDataNode()) != null)) {
                 Object e;
                 do {
                     if ((e = p.item) == p)
                         e = null;
                     if (p == (p = p.next))
-                        p = q.firstDataNode();
+                        p = firstDataNode();
                 } while (e == null && p != null && p.isData);
                 if ((current = p) == null)
                     exhausted = true;
@@ -1040,7 +1119,7 @@
      * @since 1.8
      */
     public Spliterator<E> spliterator() {
-        return new LTQSpliterator<E>(this);
+        return new LTQSpliterator<E>();
     }
 
     /* -------------- Removal methods -------------- */
@@ -1054,7 +1133,7 @@
      * @param s the node to be unspliced
      */
     final void unsplice(Node pred, Node s) {
-        s.forgetContents(); // forget unneeded fields
+        s.waiter = null; // disable signals
         /*
          * See above for rationale. Briefly: if pred still points to
          * s, try to unlink s.  If s cannot be unlinked, because it is
@@ -1332,7 +1411,22 @@
     }
 
     public E peek() {
-        return firstDataItem();
+        restartFromHead: for (;;) {
+            for (Node p = head; p != null;) {
+                Object item = p.item;
+                if (p.isData) {
+                    if (item != null && item != p) {
+                        @SuppressWarnings("unchecked") E e = (E) item;
+                        return e;
+                    }
+                }
+                else if (item == null)
+                    break;
+                if (p == (p = p.next))
+                    continue restartFromHead;
+            }
+            return null;
+        }
     }
 
     /**
@@ -1341,15 +1435,24 @@
      * @return {@code true} if this queue contains no elements
      */
     public boolean isEmpty() {
-        for (Node p = head; p != null; p = succ(p)) {
-            if (!p.isMatched())
-                return !p.isData;
-        }
-        return true;
+        return firstDataNode() == null;
     }
 
     public boolean hasWaitingConsumer() {
-        return firstOfMode(false) != null;
+        restartFromHead: for (;;) {
+            for (Node p = head; p != null;) {
+                Object item = p.item;
+                if (p.isData) {
+                    if (item != null && item != p)
+                        break;
+                }
+                else if (item == null)
+                    return true;
+                if (p == (p = p.next))
+                    continue restartFromHead;
+            }
+            return false;
+        }
     }
 
     /**
@@ -1396,15 +1499,16 @@
      * @return {@code true} if this queue contains the specified element
      */
     public boolean contains(Object o) {
-        if (o == null) return false;
-        for (Node p = head; p != null; p = succ(p)) {
-            Object item = p.item;
-            if (p.isData) {
-                if (item != null && item != p && o.equals(item))
-                    return true;
+        if (o != null) {
+            for (Node p = head; p != null; p = succ(p)) {
+                Object item = p.item;
+                if (p.isData) {
+                    if (item != null && item != p && o.equals(item))
+                        return true;
+                }
+                else if (item == null)
+                    break;
             }
-            else if (item == null)
-                break;
         }
         return false;
     }
@@ -1460,22 +1564,24 @@
 
     // Unsafe mechanics
 
-    private static final sun.misc.Unsafe UNSAFE;
-    private static final long headOffset;
-    private static final long tailOffset;
-    private static final long sweepVotesOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long HEAD;
+    private static final long TAIL;
+    private static final long SWEEPVOTES;
     static {
         try {
-            UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = LinkedTransferQueue.class;
-            headOffset = UNSAFE.objectFieldOffset
-                (k.getDeclaredField("head"));
-            tailOffset = UNSAFE.objectFieldOffset
-                (k.getDeclaredField("tail"));
-            sweepVotesOffset = UNSAFE.objectFieldOffset
-                (k.getDeclaredField("sweepVotes"));
-        } catch (Exception e) {
+            HEAD = U.objectFieldOffset
+                (LinkedTransferQueue.class.getDeclaredField("head"));
+            TAIL = U.objectFieldOffset
+                (LinkedTransferQueue.class.getDeclaredField("tail"));
+            SWEEPVOTES = U.objectFieldOffset
+                (LinkedTransferQueue.class.getDeclaredField("sweepVotes"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
+
+        // Reduce the risk of rare disastrous classloading in first call to
+        // LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
+        Class<?> ensureLoaded = LockSupport.class;
     }
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/Phaser.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/Phaser.java	Tue Oct 27 01:45:03 2015 -0400
@@ -35,8 +35,6 @@
 
 package java.util.concurrent;
 
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.concurrent.locks.LockSupport;
 
@@ -73,7 +71,7 @@
  *
  * <ul>
  *
- *   <li> <b>Arrival.</b> Methods {@link #arrive} and
+ *   <li><b>Arrival.</b> Methods {@link #arrive} and
  *       {@link #arriveAndDeregister} record arrival.  These methods
  *       do not block, but return an associated <em>arrival phase
  *       number</em>; that is, the phase number of the phaser to which
@@ -86,7 +84,7 @@
  *       flexible than, providing a barrier action to a {@code
  *       CyclicBarrier}.
  *
- *   <li> <b>Waiting.</b> Method {@link #awaitAdvance} requires an
+ *   <li><b>Waiting.</b> Method {@link #awaitAdvance} requires an
  *       argument indicating an arrival phase number, and returns when
  *       the phaser advances to (or is already at) a different phase.
  *       Unlike similar constructions using {@code CyclicBarrier},
@@ -97,9 +95,10 @@
  *       state of the phaser. If necessary, you can perform any
  *       associated recovery within handlers of those exceptions,
  *       often after invoking {@code forceTermination}.  Phasers may
- *       also be used by tasks executing in a {@link ForkJoinPool},
- *       which will ensure sufficient parallelism to execute tasks
- *       when others are blocked waiting for a phase to advance.
+ *       also be used by tasks executing in a {@link ForkJoinPool}.
+ *       Progress is ensured if the pool's parallelismLevel can
+ *       accommodate the maximum number of simultaneously blocked
+ *       parties.
  *
  * </ul>
  *
@@ -155,7 +154,7 @@
  * The typical idiom is for the method setting this up to first
  * register, then start the actions, then deregister, as in:
  *
- *  <pre> {@code
+ * <pre> {@code
  * void runTasks(List<Runnable> tasks) {
  *   final Phaser phaser = new Phaser(1); // "1" to register self
  *   // create and start threads
@@ -176,7 +175,7 @@
  * <p>One way to cause a set of threads to repeatedly perform actions
  * for a given number of iterations is to override {@code onAdvance}:
  *
- *  <pre> {@code
+ * <pre> {@code
  * void startTasks(List<Runnable> tasks, final int iterations) {
  *   final Phaser phaser = new Phaser() {
  *     protected boolean onAdvance(int phase, int registeredParties) {
@@ -200,7 +199,7 @@
  *
  * If the main task must later await termination, it
  * may re-register and then execute a similar loop:
- *  <pre> {@code
+ * <pre> {@code
  *   // ...
  *   phaser.register();
  *   while (!phaser.isTerminated())
@@ -210,7 +209,7 @@
  * in contexts where you are sure that the phase will never wrap around
  * {@code Integer.MAX_VALUE}. For example:
  *
- *  <pre> {@code
+ * <pre> {@code
  * void awaitPhase(Phaser phaser, int phase) {
  *   int p = phaser.register(); // assumes caller not already registered
  *   while (p < phase) {
@@ -230,7 +229,7 @@
  * new Phaser())}, these tasks could then be started, for example by
  * submitting to a pool:
  *
- *  <pre> {@code
+ * <pre> {@code
  * void build(Task[] tasks, int lo, int hi, Phaser ph) {
  *   if (hi - lo > TASKS_PER_PHASER) {
  *     for (int i = lo; i < hi; i += TASKS_PER_PHASER) {
@@ -331,7 +330,7 @@
     }
 
     /**
-     * The parent of this phaser, or null if none
+     * The parent of this phaser, or null if none.
      */
     private final Phaser parent;
 
@@ -389,7 +388,7 @@
             int unarrived = (counts == EMPTY) ? 0 : (counts & UNARRIVED_MASK);
             if (unarrived <= 0)
                 throw new IllegalStateException(badArrive(s));
-            if (UNSAFE.compareAndSwapLong(this, stateOffset, s, s-=adjust)) {
+            if (U.compareAndSwapLong(this, STATE, s, s-=adjust)) {
                 if (unarrived == 1) {
                     long n = s & PARTIES_MASK;  // base of next state
                     int nextUnarrived = (int)n >>> PARTIES_SHIFT;
@@ -402,13 +401,12 @@
                             n |= nextUnarrived;
                         int nextPhase = (phase + 1) & MAX_PHASE;
                         n |= (long)nextPhase << PHASE_SHIFT;
-                        UNSAFE.compareAndSwapLong(this, stateOffset, s, n);
+                        U.compareAndSwapLong(this, STATE, s, n);
                         releaseWaiters(phase);
                     }
                     else if (nextUnarrived == 0) { // propagate deregistration
                         phase = parent.doArrive(ONE_DEREGISTER);
-                        UNSAFE.compareAndSwapLong(this, stateOffset,
-                                                  s, s | EMPTY);
+                        U.compareAndSwapLong(this, STATE, s, s | EMPTY);
                     }
                     else
                         phase = parent.doArrive(ONE_ARRIVAL);
@@ -419,7 +417,7 @@
     }
 
     /**
-     * Implementation of register, bulkRegister
+     * Implementation of register, bulkRegister.
      *
      * @param registrations number to add to both parties and
      * unarrived fields. Must be greater than zero.
@@ -443,14 +441,13 @@
                 if (parent == null || reconcileState() == s) {
                     if (unarrived == 0)             // wait out advance
                         root.internalAwaitAdvance(phase, null);
-                    else if (UNSAFE.compareAndSwapLong(this, stateOffset,
-                                                       s, s + adjust))
+                    else if (U.compareAndSwapLong(this, STATE, s, s + adjust))
                         break;
                 }
             }
             else if (parent == null) {              // 1st root registration
                 long next = ((long)phase << PHASE_SHIFT) | adjust;
-                if (UNSAFE.compareAndSwapLong(this, stateOffset, s, next))
+                if (U.compareAndSwapLong(this, STATE, s, next))
                     break;
             }
             else {
@@ -462,8 +459,8 @@
                         // finish registration whenever parent registration
                         // succeeded, even when racing with termination,
                         // since these are part of the same "transaction".
-                        while (!UNSAFE.compareAndSwapLong
-                               (this, stateOffset, s,
+                        while (!U.compareAndSwapLong
+                               (this, STATE, s,
                                 ((long)phase << PHASE_SHIFT) | adjust)) {
                             s = state;
                             phase = (int)(root.state >>> PHASE_SHIFT);
@@ -494,8 +491,8 @@
             // CAS to root phase with current parties, tripping unarrived
             while ((phase = (int)(root.state >>> PHASE_SHIFT)) !=
                    (int)(s >>> PHASE_SHIFT) &&
-                   !UNSAFE.compareAndSwapLong
-                   (this, stateOffset, s,
+                   !U.compareAndSwapLong
+                   (this, STATE, s,
                     s = (((long)phase << PHASE_SHIFT) |
                          ((phase < 0) ? (s & COUNTS_MASK) :
                           (((p = (int)s >>> PARTIES_SHIFT) == 0) ? EMPTY :
@@ -684,8 +681,7 @@
             int unarrived = (counts == EMPTY) ? 0 : (counts & UNARRIVED_MASK);
             if (unarrived <= 0)
                 throw new IllegalStateException(badArrive(s));
-            if (UNSAFE.compareAndSwapLong(this, stateOffset, s,
-                                          s -= ONE_ARRIVAL)) {
+            if (U.compareAndSwapLong(this, STATE, s, s -= ONE_ARRIVAL)) {
                 if (unarrived > 1)
                     return root.internalAwaitAdvance(phase, null);
                 if (root != this)
@@ -700,7 +696,7 @@
                     n |= nextUnarrived;
                 int nextPhase = (phase + 1) & MAX_PHASE;
                 n |= (long)nextPhase << PHASE_SHIFT;
-                if (!UNSAFE.compareAndSwapLong(this, stateOffset, s, n))
+                if (!U.compareAndSwapLong(this, STATE, s, n))
                     return (int)(state >>> PHASE_SHIFT); // terminated
                 releaseWaiters(phase);
                 return nextPhase;
@@ -816,8 +812,7 @@
         final Phaser root = this.root;
         long s;
         while ((s = root.state) >= 0) {
-            if (UNSAFE.compareAndSwapLong(root, stateOffset,
-                                          s, s | TERMINATION_BIT)) {
+            if (U.compareAndSwapLong(root, STATE, s, s | TERMINATION_BIT)) {
                 // signal all threads
                 releaseWaiters(0); // Waiters on evenQ
                 releaseWaiters(1); // Waiters on oddQ
@@ -956,7 +951,7 @@
     }
 
     /**
-     * Implementation of toString and string-based error messages
+     * Implementation of toString and string-based error messages.
      */
     private String stateToString(long s) {
         return super.toString() +
@@ -1065,7 +1060,7 @@
             else {
                 try {
                     ForkJoinPool.managedBlock(node);
-                } catch (InterruptedException ie) {
+                } catch (InterruptedException cantHappen) {
                     node.wasInterrupted = true;
                 }
             }
@@ -1084,7 +1079,7 @@
     }
 
     /**
-     * Wait nodes for Treiber stack representing wait queue
+     * Wait nodes for Treiber stack representing wait queue.
      */
     static final class QNode implements ForkJoinPool.ManagedBlocker {
         final Phaser phaser;
@@ -1121,41 +1116,39 @@
                 thread = null;
                 return true;
             }
-            if (timed) {
-                if (nanos > 0L) {
-                    nanos = deadline - System.nanoTime();
-                }
-                if (nanos <= 0L) {
-                    thread = null;
-                    return true;
-                }
+            if (timed &&
+                (nanos <= 0L || (nanos = deadline - System.nanoTime()) <= 0L)) {
+                thread = null;
+                return true;
             }
             return false;
         }
 
         public boolean block() {
-            if (isReleasable())
-                return true;
-            else if (!timed)
-                LockSupport.park(this);
-            else if (nanos > 0L)
-                LockSupport.parkNanos(this, nanos);
-            return isReleasable();
+            while (!isReleasable()) {
+                if (timed)
+                    LockSupport.parkNanos(this, nanos);
+                else
+                    LockSupport.park(this);
+            }
+            return true;
         }
     }
 
     // Unsafe mechanics
 
-    private static final sun.misc.Unsafe UNSAFE;
-    private static final long stateOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long STATE;
     static {
         try {
-            UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = Phaser.class;
-            stateOffset = UNSAFE.objectFieldOffset
-                (k.getDeclaredField("state"));
-        } catch (Exception e) {
+            STATE = U.objectFieldOffset
+                (Phaser.class.getDeclaredField("state"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
+
+        // Reduce the risk of rare disastrous classloading in first call to
+        // LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
+        Class<?> ensureLoaded = LockSupport.class;
     }
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -35,8 +35,6 @@
 
 package java.util.concurrent;
 
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.ReentrantLock;
 import java.util.AbstractQueue;
 import java.util.Arrays;
 import java.util.Collection;
@@ -47,6 +45,8 @@
 import java.util.Queue;
 import java.util.SortedSet;
 import java.util.Spliterator;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.ReentrantLock;
 import java.util.function.Consumer;
 
 /**
@@ -78,7 +78,7 @@
  * tie-breaking to comparable elements. To use it, you would insert a
  * {@code new FIFOEntry(anEntry)} instead of a plain entry object.
  *
- *  <pre> {@code
+ * <pre> {@code
  * class FIFOEntry<E extends Comparable<? super E>>
  *     implements Comparable<FIFOEntry<E>> {
  *   static final AtomicLong seq = new AtomicLong(0);
@@ -103,7 +103,7 @@
  *
  * @since 1.5
  * @author Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this queue
  */
 @SuppressWarnings("unchecked")
 public class PriorityBlockingQueue<E> extends AbstractQueue<E>
@@ -161,12 +161,12 @@
     private transient Comparator<? super E> comparator;
 
     /**
-     * Lock used for all public operations
+     * Lock used for all public operations.
      */
     private final ReentrantLock lock;
 
     /**
-     * Condition for blocking when empty
+     * Condition for blocking when empty.
      */
     private final Condition notEmpty;
 
@@ -289,8 +289,7 @@
         lock.unlock(); // must release and then re-acquire main lock
         Object[] newArray = null;
         if (allocationSpinLock == 0 &&
-            UNSAFE.compareAndSwapInt(this, allocationSpinLockOffset,
-                                     0, 1)) {
+            U.compareAndSwapInt(this, ALLOCATIONSPINLOCK, 0, 1)) {
             try {
                 int newCap = oldCap + ((oldCap < 64) ?
                                        (oldCap + 2) : // grow faster if small
@@ -672,7 +671,7 @@
     }
 
     /**
-     * Identity-based version for use in Itr.remove
+     * Identity-based version for use in Itr.remove.
      */
     void removeEQ(Object o) {
         final ReentrantLock lock = this.lock;
@@ -708,48 +707,8 @@
         }
     }
 
-    /**
-     * Returns an array containing all of the elements in this queue.
-     * The returned array elements are in no particular order.
-     *
-     * <p>The returned array will be "safe" in that no references to it are
-     * maintained by this queue.  (In other words, this method must allocate
-     * a new array).  The caller is thus free to modify the returned array.
-     *
-     * <p>This method acts as bridge between array-based and collection-based
-     * APIs.
-     *
-     * @return an array containing all of the elements in this queue
-     */
-    public Object[] toArray() {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
-            return Arrays.copyOf(queue, size);
-        } finally {
-            lock.unlock();
-        }
-    }
-
     public String toString() {
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
-            int n = size;
-            if (n == 0)
-                return "[]";
-            StringBuilder sb = new StringBuilder();
-            sb.append('[');
-            for (int i = 0; i < n; ++i) {
-                Object e = queue[i];
-                sb.append(e == this ? "(this Collection)" : e);
-                if (i != n - 1)
-                    sb.append(',').append(' ');
-            }
-            return sb.append(']').toString();
-        } finally {
-            lock.unlock();
-        }
+        return Helpers.collectionToString(this);
     }
 
     /**
@@ -808,6 +767,29 @@
     }
 
     /**
+     * Returns an array containing all of the elements in this queue.
+     * The returned array elements are in no particular order.
+     *
+     * <p>The returned array will be "safe" in that no references to it are
+     * maintained by this queue.  (In other words, this method must allocate
+     * a new array).  The caller is thus free to modify the returned array.
+     *
+     * <p>This method acts as bridge between array-based and collection-based
+     * APIs.
+     *
+     * @return an array containing all of the elements in this queue
+     */
+    public Object[] toArray() {
+        final ReentrantLock lock = this.lock;
+        lock.lock();
+        try {
+            return Arrays.copyOf(queue, size);
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    /**
      * Returns an array containing all of the elements in this queue; the
      * runtime type of the returned array is that of the specified array.
      * The returned array elements are in no particular order.
@@ -829,7 +811,7 @@
      * The following code can be used to dump the queue into a newly
      * allocated array of {@code String}:
      *
-     *  <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
+     * <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
      *
      * Note that {@code toArray(new Object[0])} is identical in function to
      * {@code toArray()}.
@@ -971,7 +953,7 @@
             return hi;
         }
 
-        public Spliterator<E> trySplit() {
+        public PBQSpliterator<E> trySplit() {
             int hi = getFence(), lo = index, mid = (lo + hi) >>> 1;
             return (lo >= mid) ? null :
                 new PBQSpliterator<E>(queue, array, lo, index = mid);
@@ -1028,15 +1010,13 @@
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe UNSAFE;
-    private static final long allocationSpinLockOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long ALLOCATIONSPINLOCK;
     static {
         try {
-            UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = PriorityBlockingQueue.class;
-            allocationSpinLockOffset = UNSAFE.objectFieldOffset
-                (k.getDeclaredField("allocationSpinLock"));
-        } catch (Exception e) {
+            ALLOCATIONSPINLOCK = U.objectFieldOffset
+                (PriorityBlockingQueue.class.getDeclaredField("allocationSpinLock"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/RecursiveAction.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/RecursiveAction.java	Tue Oct 27 01:45:03 2015 -0400
@@ -45,7 +45,7 @@
  * <p><b>Sample Usages.</b> Here is a simple but complete ForkJoin
  * sort that sorts a given {@code long[]} array:
  *
- *  <pre> {@code
+ * <pre> {@code
  * static class SortTask extends RecursiveAction {
  *   final long[] array; final int lo, hi;
  *   SortTask(long[] array, int lo, int hi) {
@@ -79,7 +79,7 @@
  * SortTask(anArray)} and invoking it in a ForkJoinPool.  As a more
  * concrete simple example, the following task increments each element
  * of an array:
- *  <pre> {@code
+ * <pre> {@code
  * class IncrementTask extends RecursiveAction {
  *   final long[] array; final int lo, hi;
  *   IncrementTask(long[] array, int lo, int hi) {
@@ -110,7 +110,7 @@
  * performing leaf actions on unstolen tasks rather than further
  * subdividing.
  *
- *  <pre> {@code
+ * <pre> {@code
  * double sumOfSquares(ForkJoinPool pool, double[] array) {
  *   int n = array.length;
  *   Applyer a = new Applyer(array, 0, n, null);
--- a/jdk/src/java.base/share/classes/java/util/concurrent/RecursiveTask.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/RecursiveTask.java	Tue Oct 27 01:45:03 2015 -0400
@@ -40,11 +40,11 @@
  *
  * <p>For a classic example, here is a task computing Fibonacci numbers:
  *
- *  <pre> {@code
+ * <pre> {@code
  * class Fibonacci extends RecursiveTask<Integer> {
  *   final int n;
  *   Fibonacci(int n) { this.n = n; }
- *   Integer compute() {
+ *   protected Integer compute() {
  *     if (n <= 1)
  *       return n;
  *     Fibonacci f1 = new Fibonacci(n - 1);
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ScheduledExecutorService.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ScheduledExecutorService.java	Tue Oct 27 01:45:03 2015 -0400
@@ -70,7 +70,7 @@
  * Here is a class with a method that sets up a ScheduledExecutorService
  * to beep every ten seconds for an hour:
  *
- *  <pre> {@code
+ * <pre> {@code
  * import static java.util.concurrent.TimeUnit.*;
  * class BeeperControl {
  *   private final ScheduledExecutorService scheduler =
@@ -129,23 +129,37 @@
     /**
      * Creates and executes a periodic action that becomes enabled first
      * after the given initial delay, and subsequently with the given
-     * period; that is executions will commence after
-     * {@code initialDelay} then {@code initialDelay+period}, then
+     * period; that is, executions will commence after
+     * {@code initialDelay}, then {@code initialDelay + period}, then
      * {@code initialDelay + 2 * period}, and so on.
-     * If any execution of the task
-     * encounters an exception, subsequent executions are suppressed.
-     * Otherwise, the task will only terminate via cancellation or
-     * termination of the executor.  If any execution of this task
-     * takes longer than its period, then subsequent executions
-     * may start late, but will not concurrently execute.
+     *
+     * <p>The sequence of task executions continues indefinitely until
+     * one of the following exceptional completions occur:
+     * <ul>
+     * <li>The task is {@linkplain Future#cancel explicitly cancelled}
+     * via the returned future.
+     * <li>The executor terminates, also resulting in task cancellation.
+     * <li>An execution of the task throws an exception.  In this case
+     * calling {@link Future#get() get} on the returned future will
+     * throw {@link ExecutionException}.
+     * </ul>
+     * Subsequent executions are suppressed.  Subsequent calls to
+     * {@link Future#isDone isDone()} on the returned future will
+     * return {@code true}.
+     *
+     * <p>If any execution of this task takes longer than its period, then
+     * subsequent executions may start late, but will not concurrently
+     * execute.
      *
      * @param command the task to execute
      * @param initialDelay the time to delay first execution
      * @param period the period between successive executions
      * @param unit the time unit of the initialDelay and period parameters
      * @return a ScheduledFuture representing pending completion of
-     *         the task, and whose {@code get()} method will throw an
-     *         exception upon cancellation
+     *         the series of repeated tasks.  The future's {@link
+     *         Future#get() get()} method will never return normally,
+     *         and will throw an exception upon task cancellation or
+     *         abnormal termination of a task execution.
      * @throws RejectedExecutionException if the task cannot be
      *         scheduled for execution
      * @throws NullPointerException if command is null
@@ -160,10 +174,21 @@
      * Creates and executes a periodic action that becomes enabled first
      * after the given initial delay, and subsequently with the
      * given delay between the termination of one execution and the
-     * commencement of the next.  If any execution of the task
-     * encounters an exception, subsequent executions are suppressed.
-     * Otherwise, the task will only terminate via cancellation or
-     * termination of the executor.
+     * commencement of the next.
+     *
+     * <p>The sequence of task executions continues indefinitely until
+     * one of the following exceptional completions occur:
+     * <ul>
+     * <li>The task is {@linkplain Future#cancel explicitly cancelled}
+     * via the returned future.
+     * <li>The executor terminates, also resulting in task cancellation.
+     * <li>An execution of the task throws an exception.  In this case
+     * calling {@link Future#get() get} on the returned future will
+     * throw {@link ExecutionException}.
+     * </ul>
+     * Subsequent executions are suppressed.  Subsequent calls to
+     * {@link Future#isDone isDone()} on the returned future will
+     * return {@code true}.
      *
      * @param command the task to execute
      * @param initialDelay the time to delay first execution
@@ -171,8 +196,10 @@
      * execution and the commencement of the next
      * @param unit the time unit of the initialDelay and delay parameters
      * @return a ScheduledFuture representing pending completion of
-     *         the task, and whose {@code get()} method will throw an
-     *         exception upon cancellation
+     *         the series of repeated tasks.  The future's {@link
+     *         Future#get() get()} method will never return normally,
+     *         and will throw an exception upon task cancellation or
+     *         abnormal termination of a task execution.
      * @throws RejectedExecutionException if the task cannot be
      *         scheduled for execution
      * @throws NullPointerException if command is null
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,19 +34,27 @@
  */
 
 package java.util.concurrent;
+
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static java.util.concurrent.TimeUnit.NANOSECONDS;
+
+import java.util.AbstractQueue;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;
-import java.util.*;
 
 /**
  * A {@link ThreadPoolExecutor} that can additionally schedule
- * commands to run after a given delay, or to execute
- * periodically. This class is preferable to {@link java.util.Timer}
- * when multiple worker threads are needed, or when the additional
- * flexibility or capabilities of {@link ThreadPoolExecutor} (which
- * this class extends) are required.
+ * commands to run after a given delay, or to execute periodically.
+ * This class is preferable to {@link java.util.Timer} when multiple
+ * worker threads are needed, or when the additional flexibility or
+ * capabilities of {@link ThreadPoolExecutor} (which this class
+ * extends) are required.
  *
  * <p>Delayed tasks execute no sooner than they are enabled, but
  * without any real-time guarantees about when, after they are
@@ -55,20 +63,19 @@
  * submission.
  *
  * <p>When a submitted task is cancelled before it is run, execution
- * is suppressed. By default, such a cancelled task is not
- * automatically removed from the work queue until its delay
- * elapses. While this enables further inspection and monitoring, it
- * may also cause unbounded retention of cancelled tasks. To avoid
- * this, set {@link #setRemoveOnCancelPolicy} to {@code true}, which
- * causes tasks to be immediately removed from the work queue at
- * time of cancellation.
+ * is suppressed.  By default, such a cancelled task is not
+ * automatically removed from the work queue until its delay elapses.
+ * While this enables further inspection and monitoring, it may also
+ * cause unbounded retention of cancelled tasks.  To avoid this, use
+ * {@link #setRemoveOnCancelPolicy} to cause tasks to be immediately
+ * removed from the work queue at time of cancellation.
  *
- * <p>Successive executions of a task scheduled via
- * {@code scheduleAtFixedRate} or
- * {@code scheduleWithFixedDelay} do not overlap. While different
- * executions may be performed by different threads, the effects of
- * prior executions <a
- * href="package-summary.html#MemoryVisibility"><i>happen-before</i></a>
+ * <p>Successive executions of a periodic task scheduled via
+ * {@link #scheduleAtFixedRate scheduleAtFixedRate} or
+ * {@link #scheduleWithFixedDelay scheduleWithFixedDelay}
+ * do not overlap. While different executions may be performed by
+ * different threads, the effects of prior executions
+ * <a href="package-summary.html#MemoryVisibility"><i>happen-before</i></a>
  * those of subsequent ones.
  *
  * <p>While this class inherits from {@link ThreadPoolExecutor}, a few
@@ -98,7 +105,7 @@
  * {@link FutureTask}. However, this may be modified or replaced using
  * subclasses of the form:
  *
- *  <pre> {@code
+ * <pre> {@code
  * public class CustomScheduledExecutor extends ScheduledThreadPoolExecutor {
  *
  *   static class CustomTask<V> implements RunnableScheduledFuture<V> { ... }
@@ -160,9 +167,9 @@
     private volatile boolean executeExistingDelayedTasksAfterShutdown = true;
 
     /**
-     * True if ScheduledFutureTask.cancel should remove from queue
+     * True if ScheduledFutureTask.cancel should remove from queue.
      */
-    private volatile boolean removeOnCancel = false;
+    volatile boolean removeOnCancel;
 
     /**
      * Sequence number to break scheduling ties, and in turn to
@@ -173,7 +180,7 @@
     /**
      * Returns current nanosecond time.
      */
-    final long now() {
+    static final long now() {
         return System.nanoTime();
     }
 
@@ -184,13 +191,13 @@
         private final long sequenceNumber;
 
         /** The time the task is enabled to execute in nanoTime units */
-        private long time;
+        private volatile long time;
 
         /**
-         * Period in nanoseconds for repeating tasks.  A positive
-         * value indicates fixed-rate execution.  A negative value
-         * indicates fixed-delay execution.  A value of 0 indicates a
-         * non-repeating task.
+         * Period in nanoseconds for repeating tasks.
+         * A positive value indicates fixed-rate execution.
+         * A negative value indicates fixed-delay execution.
+         * A value of 0 indicates a non-repeating (one-shot) task.
          */
         private final long period;
 
@@ -205,31 +212,35 @@
         /**
          * Creates a one-shot action with given nanoTime-based trigger time.
          */
-        ScheduledFutureTask(Runnable r, V result, long ns) {
+        ScheduledFutureTask(Runnable r, V result, long triggerTime,
+                            long sequenceNumber) {
             super(r, result);
-            this.time = ns;
+            this.time = triggerTime;
             this.period = 0;
-            this.sequenceNumber = sequencer.getAndIncrement();
+            this.sequenceNumber = sequenceNumber;
         }
 
         /**
-         * Creates a periodic action with given nano time and period.
+         * Creates a periodic action with given nanoTime-based initial
+         * trigger time and period.
          */
-        ScheduledFutureTask(Runnable r, V result, long ns, long period) {
+        ScheduledFutureTask(Runnable r, V result, long triggerTime,
+                            long period, long sequenceNumber) {
             super(r, result);
-            this.time = ns;
+            this.time = triggerTime;
             this.period = period;
-            this.sequenceNumber = sequencer.getAndIncrement();
+            this.sequenceNumber = sequenceNumber;
         }
 
         /**
          * Creates a one-shot action with given nanoTime-based trigger time.
          */
-        ScheduledFutureTask(Callable<V> callable, long ns) {
+        ScheduledFutureTask(Callable<V> callable, long triggerTime,
+                            long sequenceNumber) {
             super(callable);
-            this.time = ns;
+            this.time = triggerTime;
             this.period = 0;
-            this.sequenceNumber = sequencer.getAndIncrement();
+            this.sequenceNumber = sequenceNumber;
         }
 
         public long getDelay(TimeUnit unit) {
@@ -290,8 +301,8 @@
             if (!canRunInCurrentRunState(periodic))
                 cancel(false);
             else if (!periodic)
-                ScheduledFutureTask.super.run();
-            else if (ScheduledFutureTask.super.runAndReset()) {
+                super.run();
+            else if (super.runAndReset()) {
                 setNextRunTime();
                 reExecutePeriodic(outerTask);
             }
@@ -419,6 +430,22 @@
     }
 
     /**
+     * The default keep-alive time for pool threads.
+     *
+     * Normally, this value is unused because all pool threads will be
+     * core threads, but if a user creates a pool with a corePoolSize
+     * of zero (against our advice), we keep a thread alive as long as
+     * there are queued tasks.  If the keep alive time is zero (the
+     * historic value), we end up hot-spinning in getTask, wasting a
+     * CPU.  But on the other hand, if we set the value too high, and
+     * users create a one-shot pool which they don't cleanly shutdown,
+     * the pool's non-daemon threads will prevent JVM termination.  A
+     * small but non-zero value (relative to a JVM's lifetime) seems
+     * best.
+     */
+    private static final long DEFAULT_KEEPALIVE_MILLIS = 10L;
+
+    /**
      * Creates a new {@code ScheduledThreadPoolExecutor} with the
      * given core pool size.
      *
@@ -427,7 +454,8 @@
      * @throws IllegalArgumentException if {@code corePoolSize < 0}
      */
     public ScheduledThreadPoolExecutor(int corePoolSize) {
-        super(corePoolSize, Integer.MAX_VALUE, 0, NANOSECONDS,
+        super(corePoolSize, Integer.MAX_VALUE,
+              DEFAULT_KEEPALIVE_MILLIS, MILLISECONDS,
               new DelayedWorkQueue());
     }
 
@@ -444,13 +472,14 @@
      */
     public ScheduledThreadPoolExecutor(int corePoolSize,
                                        ThreadFactory threadFactory) {
-        super(corePoolSize, Integer.MAX_VALUE, 0, NANOSECONDS,
+        super(corePoolSize, Integer.MAX_VALUE,
+              DEFAULT_KEEPALIVE_MILLIS, MILLISECONDS,
               new DelayedWorkQueue(), threadFactory);
     }
 
     /**
-     * Creates a new ScheduledThreadPoolExecutor with the given
-     * initial parameters.
+     * Creates a new {@code ScheduledThreadPoolExecutor} with the
+     * given initial parameters.
      *
      * @param corePoolSize the number of threads to keep in the pool, even
      *        if they are idle, unless {@code allowCoreThreadTimeOut} is set
@@ -461,13 +490,14 @@
      */
     public ScheduledThreadPoolExecutor(int corePoolSize,
                                        RejectedExecutionHandler handler) {
-        super(corePoolSize, Integer.MAX_VALUE, 0, NANOSECONDS,
+        super(corePoolSize, Integer.MAX_VALUE,
+              DEFAULT_KEEPALIVE_MILLIS, MILLISECONDS,
               new DelayedWorkQueue(), handler);
     }
 
     /**
-     * Creates a new ScheduledThreadPoolExecutor with the given
-     * initial parameters.
+     * Creates a new {@code ScheduledThreadPoolExecutor} with the
+     * given initial parameters.
      *
      * @param corePoolSize the number of threads to keep in the pool, even
      *        if they are idle, unless {@code allowCoreThreadTimeOut} is set
@@ -482,19 +512,20 @@
     public ScheduledThreadPoolExecutor(int corePoolSize,
                                        ThreadFactory threadFactory,
                                        RejectedExecutionHandler handler) {
-        super(corePoolSize, Integer.MAX_VALUE, 0, NANOSECONDS,
+        super(corePoolSize, Integer.MAX_VALUE,
+              DEFAULT_KEEPALIVE_MILLIS, MILLISECONDS,
               new DelayedWorkQueue(), threadFactory, handler);
     }
 
     /**
-     * Returns the trigger time of a delayed action.
+     * Returns the nanoTime-based trigger time of a delayed action.
      */
     private long triggerTime(long delay, TimeUnit unit) {
         return triggerTime(unit.toNanos((delay < 0) ? 0 : delay));
     }
 
     /**
-     * Returns the trigger time of a delayed action.
+     * Returns the nanoTime-based trigger time of a delayed action.
      */
     long triggerTime(long delay) {
         return now() +
@@ -527,9 +558,10 @@
                                        TimeUnit unit) {
         if (command == null || unit == null)
             throw new NullPointerException();
-        RunnableScheduledFuture<?> t = decorateTask(command,
+        RunnableScheduledFuture<Void> t = decorateTask(command,
             new ScheduledFutureTask<Void>(command, null,
-                                          triggerTime(delay, unit)));
+                                          triggerTime(delay, unit),
+                                          sequencer.getAndIncrement()));
         delayedExecute(t);
         return t;
     }
@@ -545,7 +577,8 @@
             throw new NullPointerException();
         RunnableScheduledFuture<V> t = decorateTask(callable,
             new ScheduledFutureTask<V>(callable,
-                                       triggerTime(delay, unit)));
+                                       triggerTime(delay, unit),
+                                       sequencer.getAndIncrement()));
         delayedExecute(t);
         return t;
     }
@@ -561,13 +594,14 @@
                                                   TimeUnit unit) {
         if (command == null || unit == null)
             throw new NullPointerException();
-        if (period <= 0)
+        if (period <= 0L)
             throw new IllegalArgumentException();
         ScheduledFutureTask<Void> sft =
             new ScheduledFutureTask<Void>(command,
                                           null,
                                           triggerTime(initialDelay, unit),
-                                          unit.toNanos(period));
+                                          unit.toNanos(period),
+                                          sequencer.getAndIncrement());
         RunnableScheduledFuture<Void> t = decorateTask(command, sft);
         sft.outerTask = t;
         delayedExecute(t);
@@ -585,13 +619,14 @@
                                                      TimeUnit unit) {
         if (command == null || unit == null)
             throw new NullPointerException();
-        if (delay <= 0)
+        if (delay <= 0L)
             throw new IllegalArgumentException();
         ScheduledFutureTask<Void> sft =
             new ScheduledFutureTask<Void>(command,
                                           null,
                                           triggerTime(initialDelay, unit),
-                                          unit.toNanos(-delay));
+                                          -unit.toNanos(delay),
+                                          sequencer.getAndIncrement());
         RunnableScheduledFuture<Void> t = decorateTask(command, sft);
         sft.outerTask = t;
         delayedExecute(t);
@@ -764,7 +799,8 @@
     /**
      * Attempts to stop all actively executing tasks, halts the
      * processing of waiting tasks, and returns a list of the tasks
-     * that were awaiting execution.
+     * that were awaiting execution. These tasks are drained (removed)
+     * from the task queue upon return from this method.
      *
      * <p>This method does not wait for actively executing tasks to
      * terminate.  Use {@link #awaitTermination awaitTermination} to
@@ -772,13 +808,15 @@
      *
      * <p>There are no guarantees beyond best-effort attempts to stop
      * processing actively executing tasks.  This implementation
-     * cancels tasks via {@link Thread#interrupt}, so any task that
+     * interrupts tasks via {@link Thread#interrupt}; any task that
      * fails to respond to interrupts may never terminate.
      *
      * @return list of tasks that never commenced execution.
-     *         Each element of this list is a {@link ScheduledFuture},
-     *         including those tasks submitted using {@code execute},
-     *         which are for scheduling purposes used as the basis of a
+     *         Each element of this list is a {@link ScheduledFuture}.
+     *         For tasks submitted via one of the {@code schedule}
+     *         methods, the element will be identical to the returned
+     *         {@code ScheduledFuture}.  For tasks submitted using
+     *         {@link #execute execute}, the element will be a
      *         zero-delay {@code ScheduledFuture}.
      * @throws SecurityException {@inheritDoc}
      */
@@ -787,13 +825,19 @@
     }
 
     /**
-     * Returns the task queue used by this executor.  Each element of
-     * this queue is a {@link ScheduledFuture}, including those
-     * tasks submitted using {@code execute} which are for scheduling
-     * purposes used as the basis of a zero-delay
-     * {@code ScheduledFuture}.  Iteration over this queue is
-     * <em>not</em> guaranteed to traverse tasks in the order in
-     * which they will execute.
+     * Returns the task queue used by this executor.  Access to the
+     * task queue is intended primarily for debugging and monitoring.
+     * This queue may be in active use.  Retrieving the task queue
+     * does not prevent queued tasks from executing.
+     *
+     * <p>Each element of this queue is a {@link ScheduledFuture}.
+     * For tasks submitted via one of the {@code schedule} methods, the
+     * element will be identical to the returned {@code ScheduledFuture}.
+     * For tasks submitted using {@link #execute execute}, the element
+     * will be a zero-delay {@code ScheduledFuture}.
+     *
+     * <p>Iteration over this queue is <em>not</em> guaranteed to traverse
+     * tasks in the order in which they will execute.
      *
      * @return the task queue
      */
@@ -836,7 +880,7 @@
         private RunnableScheduledFuture<?>[] queue =
             new RunnableScheduledFuture<?>[INITIAL_CAPACITY];
         private final ReentrantLock lock = new ReentrantLock();
-        private int size = 0;
+        private int size;
 
         /**
          * Thread designated to wait for the task at the head of the
@@ -854,7 +898,7 @@
          * signalled.  So waiting threads must be prepared to acquire
          * and lose leadership while waiting.
          */
-        private Thread leader = null;
+        private Thread leader;
 
         /**
          * Condition signalled when a newer task becomes available at the
@@ -1062,10 +1106,9 @@
             lock.lock();
             try {
                 RunnableScheduledFuture<?> first = queue[0];
-                if (first == null || first.getDelay(NANOSECONDS) > 0)
-                    return null;
-                else
-                    return finishPoll(first);
+                return (first == null || first.getDelay(NANOSECONDS) > 0)
+                    ? null
+                    : finishPoll(first);
             } finally {
                 lock.unlock();
             }
@@ -1081,7 +1124,7 @@
                         available.await();
                     else {
                         long delay = first.getDelay(NANOSECONDS);
-                        if (delay <= 0)
+                        if (delay <= 0L)
                             return finishPoll(first);
                         first = null; // don't retain ref while waiting
                         if (leader != null)
@@ -1114,15 +1157,15 @@
                 for (;;) {
                     RunnableScheduledFuture<?> first = queue[0];
                     if (first == null) {
-                        if (nanos <= 0)
+                        if (nanos <= 0L)
                             return null;
                         else
                             nanos = available.awaitNanos(nanos);
                     } else {
                         long delay = first.getDelay(NANOSECONDS);
-                        if (delay <= 0)
+                        if (delay <= 0L)
                             return finishPoll(first);
-                        if (nanos <= 0)
+                        if (nanos <= 0L)
                             return null;
                         first = null; // don't retain ref while waiting
                         if (nanos < delay || leader != null)
@@ -1254,8 +1297,8 @@
          */
         private class Itr implements Iterator<Runnable> {
             final RunnableScheduledFuture<?>[] array;
-            int cursor = 0;     // index of next element to return
-            int lastRet = -1;   // index of last element, or -1 if no such
+            int cursor;        // index of next element to return; initially 0
+            int lastRet = -1;  // index of last element returned; -1 if no such
 
             Itr(RunnableScheduledFuture<?>[] array) {
                 this.array = array;
--- a/jdk/src/java.base/share/classes/java/util/concurrent/Semaphore.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/Semaphore.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent;
+
 import java.util.Collection;
 import java.util.concurrent.locks.AbstractQueuedSynchronizer;
 
@@ -48,7 +49,7 @@
  * <p>Semaphores are often used to restrict the number of threads than can
  * access some (physical or logical) resource. For example, here is
  * a class that uses a semaphore to control access to a pool of items:
- *  <pre> {@code
+ * <pre> {@code
  * class Pool {
  *   private static final int MAX_AVAILABLE = 100;
  *   private final Semaphore available = new Semaphore(MAX_AVAILABLE, true);
@@ -114,7 +115,7 @@
  * ownership).  This can be useful in some specialized contexts, such
  * as deadlock recovery.
  *
- * <p> The constructor for this class optionally accepts a
+ * <p>The constructor for this class optionally accepts a
  * <em>fairness</em> parameter. When set false, this class makes no
  * guarantees about the order in which threads acquire permits. In
  * particular, <em>barging</em> is permitted, that is, a thread
@@ -141,8 +142,13 @@
  *
  * <p>This class also provides convenience methods to {@link
  * #acquire(int) acquire} and {@link #release(int) release} multiple
- * permits at a time.  Beware of the increased risk of indefinite
- * postponement when these methods are used without fairness set true.
+ * permits at a time. These methods are generally more efficient and
+ * effective than loops. However, they do not establish any preference
+ * order. For example, if thread A invokes {@code s.acquire(3}) and
+ * thread B invokes {@code s.acquire(2)}, and two permits become
+ * available, then there is no guarantee that thread B will obtain
+ * them unless its acquire came first and Semaphore {@code s} is in
+ * fair mode.
  *
  * <p>Memory consistency effects: Actions in a thread prior to calling
  * a "release" method such as {@code release()}
@@ -433,14 +439,16 @@
      *
      * <p>Acquires the given number of permits, if they are available,
      * and returns immediately, reducing the number of available permits
-     * by the given amount.
+     * by the given amount. This method has the same effect as the
+     * loop {@code for (int i = 0; i < permits; ++i) acquire();} except
+     * that it atomically acquires the permits all at once:
      *
      * <p>If insufficient permits are available then the current thread becomes
      * disabled for thread scheduling purposes and lies dormant until
      * one of two things happens:
      * <ul>
      * <li>Some other thread invokes one of the {@link #release() release}
-     * methods for this semaphore, the current thread is next to be assigned
+     * methods for this semaphore and the current thread is next to be assigned
      * permits and the number of available permits satisfies this request; or
      * <li>Some other thread {@linkplain Thread#interrupt interrupts}
      * the current thread.
@@ -473,12 +481,14 @@
      *
      * <p>Acquires the given number of permits, if they are available,
      * and returns immediately, reducing the number of available permits
-     * by the given amount.
+     * by the given amount. This method has the same effect as the
+     * loop {@code for (int i = 0; i < permits; ++i) acquireUninterruptibly();}
+     * except that it atomically acquires the permits all at once:
      *
      * <p>If insufficient permits are available then the current thread becomes
      * disabled for thread scheduling purposes and lies dormant until
      * some other thread invokes one of the {@link #release() release}
-     * methods for this semaphore, the current thread is next to be assigned
+     * methods for this semaphore and the current thread is next to be assigned
      * permits and the number of available permits satisfies this request.
      *
      * <p>If the current thread is {@linkplain Thread#interrupt interrupted}
@@ -540,7 +550,7 @@
      * purposes and lies dormant until one of three things happens:
      * <ul>
      * <li>Some other thread invokes one of the {@link #release() release}
-     * methods for this semaphore, the current thread is next to be assigned
+     * methods for this semaphore and the current thread is next to be assigned
      * permits and the number of available permits satisfies this request; or
      * <li>Some other thread {@linkplain Thread#interrupt interrupts}
      * the current thread; or
@@ -587,7 +597,7 @@
      *
      * <p>Releases the given number of permits, increasing the number of
      * available permits by that amount.
-     * If any threads are trying to acquire permits, then one
+     * If any threads are trying to acquire permits, then one thread
      * is selected and given the permits that were just released.
      * If the number of available permits satisfies that thread's request
      * then that thread is (re)enabled for thread scheduling purposes;
@@ -671,7 +681,7 @@
      * Returns an estimate of the number of threads waiting to acquire.
      * The value is only an estimate because the number of threads may
      * change dynamically while this method traverses internal data
-     * structures.  This method is designed for use in monitoring of the
+     * structures.  This method is designed for use in monitoring
      * system state, not for synchronization control.
      *
      * @return the estimated number of threads waiting for this lock
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,1632 @@
+/*
+ * 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.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Doug Lea with assistance from members of JCP JSR-166
+ * Expert Group and released to the public domain, as explained at
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+package java.util.concurrent;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.locks.LockSupport;
+import java.util.function.BiConsumer;
+import java.util.function.BiPredicate;
+import java.util.function.Consumer;
+
+/**
+ * A {@link Flow.Publisher} that asynchronously issues submitted
+ * (non-null) items to current subscribers until it is closed.  Each
+ * current subscriber receives newly submitted items in the same order
+ * unless drops or exceptions are encountered.  Using a
+ * SubmissionPublisher allows item generators to act as compliant <a
+ * href="http://www.reactive-streams.org/"> reactive-streams</a>
+ * Publishers relying on drop handling and/or blocking for flow
+ * control.
+ *
+ * <p>A SubmissionPublisher uses the {@link Executor} supplied in its
+ * constructor for delivery to subscribers. The best choice of
+ * Executor depends on expected usage. If the generator(s) of
+ * submitted items run in separate threads, and the number of
+ * subscribers can be estimated, consider using a {@link
+ * Executors#newFixedThreadPool}. Otherwise consider using the
+ * default, normally the {@link ForkJoinPool#commonPool}.
+ *
+ * <p>Buffering allows producers and consumers to transiently operate
+ * at different rates.  Each subscriber uses an independent buffer.
+ * Buffers are created upon first use and expanded as needed up to the
+ * given maximum. (The enforced capacity may be rounded up to the
+ * nearest power of two and/or bounded by the largest value supported
+ * by this implementation.)  Invocations of {@link
+ * Flow.Subscription#request(long) request} do not directly result in
+ * buffer expansion, but risk saturation if unfilled requests exceed
+ * the maximum capacity.  The default value of {@link
+ * Flow#defaultBufferSize()} may provide a useful starting point for
+ * choosing a capacity based on expected rates, resources, and usages.
+ *
+ * <p>Publication methods support different policies about what to do
+ * when buffers are saturated. Method {@link #submit(Object) submit}
+ * blocks until resources are available. This is simplest, but least
+ * responsive.  The {@code offer} methods may drop items (either
+ * immediately or with bounded timeout), but provide an opportunity to
+ * interpose a handler and then retry.
+ *
+ * <p>If any Subscriber method throws an exception, its subscription
+ * is cancelled.  If a handler is supplied as a constructor argument,
+ * it is invoked before cancellation upon an exception in method
+ * {@link Flow.Subscriber#onNext onNext}, but exceptions in methods
+ * {@link Flow.Subscriber#onSubscribe onSubscribe},
+ * {@link Flow.Subscriber#onError(Throwable) onError} and
+ * {@link Flow.Subscriber#onComplete() onComplete} are not recorded or
+ * handled before cancellation.  If the supplied Executor throws
+ * {@link RejectedExecutionException} (or any other RuntimeException
+ * or Error) when attempting to execute a task, or a drop handler
+ * throws an exception when processing a dropped item, then the
+ * exception is rethrown. In these cases, not all subscribers will
+ * have been issued the published item. It is usually good practice to
+ * {@link #closeExceptionally closeExceptionally} in these cases.
+ *
+ * <p>Method {@link #consume(Consumer)} simplifies support for a
+ * common case in which the only action of a subscriber is to request
+ * and process all items using a supplied function.
+ *
+ * <p>This class may also serve as a convenient base for subclasses
+ * that generate items, and use the methods in this class to publish
+ * them.  For example here is a class that periodically publishes the
+ * items generated from a supplier. (In practice you might add methods
+ * to independently start and stop generation, to share Executors
+ * among publishers, and so on, or use a SubmissionPublisher as a
+ * component rather than a superclass.)
+ *
+ * <pre> {@code
+ * class PeriodicPublisher<T> extends SubmissionPublisher<T> {
+ *   final ScheduledFuture<?> periodicTask;
+ *   final ScheduledExecutorService scheduler;
+ *   PeriodicPublisher(Executor executor, int maxBufferCapacity,
+ *                     Supplier<? extends T> supplier,
+ *                     long period, TimeUnit unit) {
+ *     super(executor, maxBufferCapacity);
+ *     scheduler = new ScheduledThreadPoolExecutor(1);
+ *     periodicTask = scheduler.scheduleAtFixedRate(
+ *       () -> submit(supplier.get()), 0, period, unit);
+ *   }
+ *   public void close() {
+ *     periodicTask.cancel(false);
+ *     scheduler.shutdown();
+ *     super.close();
+ *   }
+ * }}</pre>
+ *
+ * <p>Here is an example of a {@link Flow.Processor} implementation.
+ * It uses single-step requests to its publisher for simplicity of
+ * illustration. A more adaptive version could monitor flow using the
+ * lag estimate returned from {@code submit}, along with other utility
+ * methods.
+ *
+ * <pre> {@code
+ * class TransformProcessor<S,T> extends SubmissionPublisher<T>
+ *   implements Flow.Processor<S,T> {
+ *   final Function<? super S, ? extends T> function;
+ *   Flow.Subscription subscription;
+ *   TransformProcessor(Executor executor, int maxBufferCapacity,
+ *                      Function<? super S, ? extends T> function) {
+ *     super(executor, maxBufferCapacity);
+ *     this.function = function;
+ *   }
+ *   public void onSubscribe(Flow.Subscription subscription) {
+ *     (this.subscription = subscription).request(1);
+ *   }
+ *   public void onNext(S item) {
+ *     subscription.request(1);
+ *     submit(function.apply(item));
+ *   }
+ *   public void onError(Throwable ex) { closeExceptionally(ex); }
+ *   public void onComplete() { close(); }
+ * }}</pre>
+ *
+ * @param <T> the published item type
+ * @author Doug Lea
+ * @since 1.9
+ */
+public class SubmissionPublisher<T> implements Flow.Publisher<T>,
+                                               AutoCloseable {
+    /*
+     * Most mechanics are handled by BufferedSubscription. This class
+     * mainly tracks subscribers and ensures sequentiality, by using
+     * built-in synchronization locks across public methods. (Using
+     * built-in locks works well in the most typical case in which
+     * only one thread submits items).
+     */
+
+    /** The largest possible power of two array size. */
+    static final int BUFFER_CAPACITY_LIMIT = 1 << 30;
+
+    /** Round capacity to power of 2, at most limit. */
+    static final int roundCapacity(int cap) {
+        int n = cap - 1;
+        n |= n >>> 1;
+        n |= n >>> 2;
+        n |= n >>> 4;
+        n |= n >>> 8;
+        n |= n >>> 16;
+        return (n <= 0) ? 1 : // at least 1
+            (n >= BUFFER_CAPACITY_LIMIT) ? BUFFER_CAPACITY_LIMIT : n + 1;
+    }
+
+    // default Executor setup; nearly the same as CompletableFuture
+
+    /**
+     * Default executor -- ForkJoinPool.commonPool() unless it cannot
+     * support parallelism.
+     */
+    private static final Executor ASYNC_POOL =
+        (ForkJoinPool.getCommonPoolParallelism() > 1) ?
+        ForkJoinPool.commonPool() : new ThreadPerTaskExecutor();
+
+    /** Fallback if ForkJoinPool.commonPool() cannot support parallelism */
+    private static final class ThreadPerTaskExecutor implements Executor {
+        public void execute(Runnable r) { new Thread(r).start(); }
+    }
+
+    /**
+     * Clients (BufferedSubscriptions) are maintained in a linked list
+     * (via their "next" fields). This works well for publish loops.
+     * It requires O(n) traversal to check for duplicate subscribers,
+     * but we expect that subscribing is much less common than
+     * publishing. Unsubscribing occurs only during traversal loops,
+     * when BufferedSubscription methods return negative values
+     * signifying that they have been disabled.  To reduce
+     * head-of-line blocking, submit and offer methods first call
+     * BufferedSubscription.offer on each subscriber, and place
+     * saturated ones in retries list (using nextRetry field), and
+     * retry, possibly blocking or dropping.
+     */
+    BufferedSubscription<T> clients;
+
+    /** Run status, updated only within locks */
+    volatile boolean closed;
+    /** If non-null, the exception in closeExceptionally */
+    volatile Throwable closedException;
+
+    // Parameters for constructing BufferedSubscriptions
+    final Executor executor;
+    final BiConsumer<? super Flow.Subscriber<? super T>, ? super Throwable> onNextHandler;
+    final int maxBufferCapacity;
+
+    /**
+     * Creates a new SubmissionPublisher using the given Executor for
+     * async delivery to subscribers, with the given maximum buffer size
+     * for each subscriber, and, if non-null, the given handler invoked
+     * when any Subscriber throws an exception in method {@link
+     * Flow.Subscriber#onNext(Object) onNext}.
+     *
+     * @param executor the executor to use for async delivery,
+     * supporting creation of at least one independent thread
+     * @param maxBufferCapacity the maximum capacity for each
+     * subscriber's buffer (the enforced capacity may be rounded up to
+     * the nearest power of two and/or bounded by the largest value
+     * supported by this implementation; method {@link #getMaxBufferCapacity}
+     * returns the actual value)
+     * @param handler if non-null, procedure to invoke upon exception
+     * thrown in method {@code onNext}
+     * @throws NullPointerException if executor is null
+     * @throws IllegalArgumentException if maxBufferCapacity not
+     * positive
+     */
+    public SubmissionPublisher(Executor executor, int maxBufferCapacity,
+                               BiConsumer<? super Flow.Subscriber<? super T>, ? super Throwable> handler) {
+        if (executor == null)
+            throw new NullPointerException();
+        if (maxBufferCapacity <= 0)
+            throw new IllegalArgumentException("capacity must be positive");
+        this.executor = executor;
+        this.onNextHandler = handler;
+        this.maxBufferCapacity = roundCapacity(maxBufferCapacity);
+    }
+
+    /**
+     * Creates a new SubmissionPublisher using the given Executor for
+     * async delivery to subscribers, with the given maximum buffer size
+     * for each subscriber, and no handler for Subscriber exceptions in
+     * method {@link Flow.Subscriber#onNext(Object) onNext}.
+     *
+     * @param executor the executor to use for async delivery,
+     * supporting creation of at least one independent thread
+     * @param maxBufferCapacity the maximum capacity for each
+     * subscriber's buffer (the enforced capacity may be rounded up to
+     * the nearest power of two and/or bounded by the largest value
+     * supported by this implementation; method {@link #getMaxBufferCapacity}
+     * returns the actual value)
+     * @throws NullPointerException if executor is null
+     * @throws IllegalArgumentException if maxBufferCapacity not
+     * positive
+     */
+    public SubmissionPublisher(Executor executor, int maxBufferCapacity) {
+        this(executor, maxBufferCapacity, null);
+    }
+
+    /**
+     * Creates a new SubmissionPublisher using the {@link
+     * ForkJoinPool#commonPool()} for async delivery to subscribers
+     * (unless it does not support a parallelism level of at least two,
+     * in which case, a new Thread is created to run each task), with
+     * maximum buffer capacity of {@link Flow#defaultBufferSize}, and no
+     * handler for Subscriber exceptions in method {@link
+     * Flow.Subscriber#onNext(Object) onNext}.
+     */
+    public SubmissionPublisher() {
+        this(ASYNC_POOL, Flow.defaultBufferSize(), null);
+    }
+
+    /**
+     * Adds the given Subscriber unless already subscribed.  If already
+     * subscribed, the Subscriber's {@link
+     * Flow.Subscriber#onError(Throwable) onError} method is invoked on
+     * the existing subscription with an {@link IllegalStateException}.
+     * Otherwise, upon success, the Subscriber's {@link
+     * Flow.Subscriber#onSubscribe onSubscribe} method is invoked
+     * asynchronously with a new {@link Flow.Subscription}.  If {@link
+     * Flow.Subscriber#onSubscribe onSubscribe} throws an exception, the
+     * subscription is cancelled. Otherwise, if this SubmissionPublisher
+     * was closed exceptionally, then the subscriber's {@link
+     * Flow.Subscriber#onError onError} method is invoked with the
+     * corresponding exception, or if closed without exception, the
+     * subscriber's {@link Flow.Subscriber#onComplete() onComplete}
+     * method is invoked.  Subscribers may enable receiving items by
+     * invoking the {@link Flow.Subscription#request(long) request}
+     * method of the new Subscription, and may unsubscribe by invoking
+     * its {@link Flow.Subscription#cancel() cancel} method.
+     *
+     * @param subscriber the subscriber
+     * @throws NullPointerException if subscriber is null
+     */
+    public void subscribe(Flow.Subscriber<? super T> subscriber) {
+        if (subscriber == null) throw new NullPointerException();
+        BufferedSubscription<T> subscription =
+            new BufferedSubscription<T>(subscriber, executor,
+                                        onNextHandler, maxBufferCapacity);
+        synchronized (this) {
+            for (BufferedSubscription<T> b = clients, pred = null;;) {
+                if (b == null) {
+                    Throwable ex;
+                    subscription.onSubscribe();
+                    if ((ex = closedException) != null)
+                        subscription.onError(ex);
+                    else if (closed)
+                        subscription.onComplete();
+                    else if (pred == null)
+                        clients = subscription;
+                    else
+                        pred.next = subscription;
+                    break;
+                }
+                BufferedSubscription<T> next = b.next;
+                if (b.isDisabled()) { // remove
+                    b.next = null;    // detach
+                    if (pred == null)
+                        clients = next;
+                    else
+                        pred.next = next;
+                }
+                else if (subscriber.equals(b.subscriber)) {
+                    b.onError(new IllegalStateException("Duplicate subscribe"));
+                    break;
+                }
+                else
+                    pred = b;
+                b = next;
+            }
+        }
+    }
+
+    /**
+     * Publishes the given item to each current subscriber by
+     * asynchronously invoking its {@link Flow.Subscriber#onNext(Object)
+     * onNext} method, blocking uninterruptibly while resources for any
+     * subscriber are unavailable. This method returns an estimate of
+     * the maximum lag (number of items submitted but not yet consumed)
+     * among all current subscribers. This value is at least one
+     * (accounting for this submitted item) if there are any
+     * subscribers, else zero.
+     *
+     * <p>If the Executor for this publisher throws a
+     * RejectedExecutionException (or any other RuntimeException or
+     * Error) when attempting to asynchronously notify subscribers,
+     * then this exception is rethrown, in which case not all
+     * subscribers will have been issued this item.
+     *
+     * @param item the (non-null) item to publish
+     * @return the estimated maximum lag among subscribers
+     * @throws IllegalStateException if closed
+     * @throws NullPointerException if item is null
+     * @throws RejectedExecutionException if thrown by Executor
+     */
+    public int submit(T item) {
+        if (item == null) throw new NullPointerException();
+        int lag = 0;
+        boolean complete;
+        synchronized (this) {
+            complete = closed;
+            BufferedSubscription<T> b = clients;
+            if (!complete) {
+                BufferedSubscription<T> pred = null, r = null, rtail = null;
+                while (b != null) {
+                    BufferedSubscription<T> next = b.next;
+                    int stat = b.offer(item);
+                    if (stat < 0) {           // disabled
+                        b.next = null;
+                        if (pred == null)
+                            clients = next;
+                        else
+                            pred.next = next;
+                    }
+                    else {
+                        if (stat > lag)
+                            lag = stat;
+                        else if (stat == 0) { // place on retry list
+                            b.nextRetry = null;
+                            if (rtail == null)
+                                r = b;
+                            else
+                                rtail.nextRetry = b;
+                            rtail = b;
+                        }
+                        pred = b;
+                    }
+                    b = next;
+                }
+                while (r != null) {
+                    BufferedSubscription<T> nextRetry = r.nextRetry;
+                    r.nextRetry = null;
+                    int stat = r.submit(item);
+                    if (stat > lag)
+                        lag = stat;
+                    else if (stat < 0 && clients == r)
+                        clients = r.next; // postpone internal unsubscribes
+                    r = nextRetry;
+                }
+            }
+        }
+        if (complete)
+            throw new IllegalStateException("Closed");
+        else
+            return lag;
+    }
+
+    /**
+     * Publishes the given item, if possible, to each current subscriber
+     * by asynchronously invoking its {@link
+     * Flow.Subscriber#onNext(Object) onNext} method. The item may be
+     * dropped by one or more subscribers if resource limits are
+     * exceeded, in which case the given handler (if non-null) is
+     * invoked, and if it returns true, retried once.  Other calls to
+     * methods in this class by other threads are blocked while the
+     * handler is invoked.  Unless recovery is assured, options are
+     * usually limited to logging the error and/or issuing an {@link
+     * Flow.Subscriber#onError(Throwable) onError} signal to the
+     * subscriber.
+     *
+     * <p>This method returns a status indicator: If negative, it
+     * represents the (negative) number of drops (failed attempts to
+     * issue the item to a subscriber). Otherwise it is an estimate of
+     * the maximum lag (number of items submitted but not yet
+     * consumed) among all current subscribers. This value is at least
+     * one (accounting for this submitted item) if there are any
+     * subscribers, else zero.
+     *
+     * <p>If the Executor for this publisher throws a
+     * RejectedExecutionException (or any other RuntimeException or
+     * Error) when attempting to asynchronously notify subscribers, or
+     * the drop handler throws an exception when processing a dropped
+     * item, then this exception is rethrown.
+     *
+     * @param item the (non-null) item to publish
+     * @param onDrop if non-null, the handler invoked upon a drop to a
+     * subscriber, with arguments of the subscriber and item; if it
+     * returns true, an offer is re-attempted (once)
+     * @return if negative, the (negative) number of drops; otherwise
+     * an estimate of maximum lag
+     * @throws IllegalStateException if closed
+     * @throws NullPointerException if item is null
+     * @throws RejectedExecutionException if thrown by Executor
+     */
+    public int offer(T item,
+                     BiPredicate<Flow.Subscriber<? super T>, ? super T> onDrop) {
+        return doOffer(0L, item, onDrop);
+    }
+
+    /**
+     * Publishes the given item, if possible, to each current subscriber
+     * by asynchronously invoking its {@link
+     * Flow.Subscriber#onNext(Object) onNext} method, blocking while
+     * resources for any subscription are unavailable, up to the
+     * specified timeout or until the caller thread is interrupted, at
+     * which point the given handler (if non-null) is invoked, and if it
+     * returns true, retried once. (The drop handler may distinguish
+     * timeouts from interrupts by checking whether the current thread
+     * is interrupted.)  Other calls to methods in this class by other
+     * threads are blocked while the handler is invoked.  Unless
+     * recovery is assured, options are usually limited to logging the
+     * error and/or issuing an {@link Flow.Subscriber#onError(Throwable)
+     * onError} signal to the subscriber.
+     *
+     * <p>This method returns a status indicator: If negative, it
+     * represents the (negative) number of drops (failed attempts to
+     * issue the item to a subscriber). Otherwise it is an estimate of
+     * the maximum lag (number of items submitted but not yet
+     * consumed) among all current subscribers. This value is at least
+     * one (accounting for this submitted item) if there are any
+     * subscribers, else zero.
+     *
+     * <p>If the Executor for this publisher throws a
+     * RejectedExecutionException (or any other RuntimeException or
+     * Error) when attempting to asynchronously notify subscribers, or
+     * the drop handler throws an exception when processing a dropped
+     * item, then this exception is rethrown.
+     *
+     * @param item the (non-null) item to publish
+     * @param timeout how long to wait for resources for any subscriber
+     * before giving up, in units of {@code unit}
+     * @param unit a {@code TimeUnit} determining how to interpret the
+     * {@code timeout} parameter
+     * @param onDrop if non-null, the handler invoked upon a drop to a
+     * subscriber, with arguments of the subscriber and item; if it
+     * returns true, an offer is re-attempted (once)
+     * @return if negative, the (negative) number of drops; otherwise
+     * an estimate of maximum lag
+     * @throws IllegalStateException if closed
+     * @throws NullPointerException if item is null
+     * @throws RejectedExecutionException if thrown by Executor
+     */
+    public int offer(T item, long timeout, TimeUnit unit,
+                     BiPredicate<Flow.Subscriber<? super T>, ? super T> onDrop) {
+        return doOffer(unit.toNanos(timeout), item, onDrop);
+    }
+
+    /** Common implementation for both forms of offer */
+    final int doOffer(long nanos, T item,
+                      BiPredicate<Flow.Subscriber<? super T>, ? super T> onDrop) {
+        if (item == null) throw new NullPointerException();
+        int lag = 0, drops = 0;
+        boolean complete;
+        synchronized (this) {
+            complete = closed;
+            BufferedSubscription<T> b = clients;
+            if (!complete) {
+                BufferedSubscription<T> pred = null, r = null, rtail = null;
+                while (b != null) {
+                    BufferedSubscription<T> next = b.next;
+                    int stat = b.offer(item);
+                    if (stat < 0) {
+                        b.next = null;
+                        if (pred == null)
+                            clients = next;
+                        else
+                            pred.next = next;
+                    }
+                    else {
+                        if (stat > lag)
+                            lag = stat;
+                        else if (stat == 0) {
+                            b.nextRetry = null;
+                            if (rtail == null)
+                                r = b;
+                            else
+                                rtail.nextRetry = b;
+                            rtail = b;
+                        }
+                        else if (stat > lag)
+                            lag = stat;
+                        pred = b;
+                    }
+                    b = next;
+                }
+                while (r != null) {
+                    BufferedSubscription<T> nextRetry = r.nextRetry;
+                    r.nextRetry = null;
+                    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);
+                    if (stat == 0)
+                        ++drops;
+                    else if (stat > lag)
+                        lag = stat;
+                    else if (stat < 0 && clients == r)
+                        clients = r.next;
+                    r = nextRetry;
+                }
+            }
+        }
+        if (complete)
+            throw new IllegalStateException("Closed");
+        else
+            return (drops > 0) ? -drops : lag;
+    }
+
+    /**
+     * Unless already closed, issues {@link
+     * Flow.Subscriber#onComplete() onComplete} signals to current
+     * subscribers, and disallows subsequent attempts to publish.
+     * Upon return, this method does <em>NOT</em> guarantee that all
+     * subscribers have yet completed.
+     */
+    public void close() {
+        if (!closed) {
+            BufferedSubscription<T> b;
+            synchronized (this) {
+                b = clients;
+                clients = null;
+                closed = true;
+            }
+            while (b != null) {
+                BufferedSubscription<T> next = b.next;
+                b.next = null;
+                b.onComplete();
+                b = next;
+            }
+        }
+    }
+
+    /**
+     * Unless already closed, issues {@link
+     * Flow.Subscriber#onError(Throwable) onError} signals to current
+     * subscribers with the given error, and disallows subsequent
+     * attempts to publish.  Future subscribers also receive the given
+     * error. Upon return, this method does <em>NOT</em> guarantee
+     * that all subscribers have yet completed.
+     *
+     * @param error the {@code onError} argument sent to subscribers
+     * @throws NullPointerException if error is null
+     */
+    public void closeExceptionally(Throwable error) {
+        if (error == null)
+            throw new NullPointerException();
+        if (!closed) {
+            BufferedSubscription<T> b;
+            synchronized (this) {
+                b = clients;
+                clients = null;
+                closed = true;
+                closedException = error;
+            }
+            while (b != null) {
+                BufferedSubscription<T> next = b.next;
+                b.next = null;
+                b.onError(error);
+                b = next;
+            }
+        }
+    }
+
+    /**
+     * Returns true if this publisher is not accepting submissions.
+     *
+     * @return true if closed
+     */
+    public boolean isClosed() {
+        return closed;
+    }
+
+    /**
+     * Returns the exception associated with {@link
+     * #closeExceptionally(Throwable) closeExceptionally}, or null if
+     * not closed or if closed normally.
+     *
+     * @return the exception, or null if none
+     */
+    public Throwable getClosedException() {
+        return closedException;
+    }
+
+    /**
+     * Returns true if this publisher has any subscribers.
+     *
+     * @return true if this publisher has any subscribers
+     */
+    public boolean hasSubscribers() {
+        boolean nonEmpty = false;
+        if (!closed) {
+            synchronized (this) {
+                for (BufferedSubscription<T> b = clients; b != null;) {
+                    BufferedSubscription<T> next = b.next;
+                    if (b.isDisabled()) {
+                        b.next = null;
+                        b = clients = next;
+                    }
+                    else {
+                        nonEmpty = true;
+                        break;
+                    }
+                }
+            }
+        }
+        return nonEmpty;
+    }
+
+    /**
+     * Returns the number of current subscribers.
+     *
+     * @return the number of current subscribers
+     */
+    public int getNumberOfSubscribers() {
+        int count = 0;
+        if (!closed) {
+            synchronized (this) {
+                BufferedSubscription<T> pred = null, next;
+                for (BufferedSubscription<T> b = clients; b != null; b = next) {
+                    next = b.next;
+                    if (b.isDisabled()) {
+                        b.next = null;
+                        if (pred == null)
+                            clients = next;
+                        else
+                            pred.next = next;
+                    }
+                    else {
+                        pred = b;
+                        ++count;
+                    }
+                }
+            }
+        }
+        return count;
+    }
+
+    /**
+     * Returns the Executor used for asynchronous delivery.
+     *
+     * @return the Executor used for asynchronous delivery
+     */
+    public Executor getExecutor() {
+        return executor;
+    }
+
+    /**
+     * Returns the maximum per-subscriber buffer capacity.
+     *
+     * @return the maximum per-subscriber buffer capacity
+     */
+    public int getMaxBufferCapacity() {
+        return maxBufferCapacity;
+    }
+
+    /**
+     * Returns a list of current subscribers for monitoring and
+     * tracking purposes, not for invoking {@link Flow.Subscriber}
+     * methods on the subscribers.
+     *
+     * @return list of current subscribers
+     */
+    public List<Flow.Subscriber<? super T>> getSubscribers() {
+        ArrayList<Flow.Subscriber<? super T>> subs = new ArrayList<>();
+        synchronized (this) {
+            BufferedSubscription<T> pred = null, next;
+            for (BufferedSubscription<T> b = clients; b != null; b = next) {
+                next = b.next;
+                if (b.isDisabled()) {
+                    b.next = null;
+                    if (pred == null)
+                        clients = next;
+                    else
+                        pred.next = next;
+                }
+                else
+                    subs.add(b.subscriber);
+            }
+        }
+        return subs;
+    }
+
+    /**
+     * Returns true if the given Subscriber is currently subscribed.
+     *
+     * @param subscriber the subscriber
+     * @return true if currently subscribed
+     * @throws NullPointerException if subscriber is null
+     */
+    public boolean isSubscribed(Flow.Subscriber<? super T> subscriber) {
+        if (subscriber == null) throw new NullPointerException();
+        if (!closed) {
+            synchronized (this) {
+                BufferedSubscription<T> pred = null, next;
+                for (BufferedSubscription<T> b = clients; b != null; b = next) {
+                    next = b.next;
+                    if (b.isDisabled()) {
+                        b.next = null;
+                        if (pred == null)
+                            clients = next;
+                        else
+                            pred.next = next;
+                    }
+                    else if (subscriber.equals(b.subscriber))
+                        return true;
+                    else
+                        pred = b;
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Returns an estimate of the minimum number of items requested
+     * (via {@link Flow.Subscription#request(long) request}) but not
+     * yet produced, among all current subscribers.
+     *
+     * @return the estimate, or zero if no subscribers
+     */
+    public long estimateMinimumDemand() {
+        long min = Long.MAX_VALUE;
+        boolean nonEmpty = false;
+        synchronized (this) {
+            BufferedSubscription<T> pred = null, next;
+            for (BufferedSubscription<T> b = clients; b != null; b = next) {
+                int n; long d;
+                next = b.next;
+                if ((n = b.estimateLag()) < 0) {
+                    b.next = null;
+                    if (pred == null)
+                        clients = next;
+                    else
+                        pred.next = next;
+                }
+                else {
+                    if ((d = b.demand - n) < min)
+                        min = d;
+                    nonEmpty = true;
+                    pred = b;
+                }
+            }
+        }
+        return nonEmpty ? min : 0;
+    }
+
+    /**
+     * Returns an estimate of the maximum number of items produced but
+     * not yet consumed among all current subscribers.
+     *
+     * @return the estimate
+     */
+    public int estimateMaximumLag() {
+        int max = 0;
+        synchronized (this) {
+            BufferedSubscription<T> pred = null, next;
+            for (BufferedSubscription<T> b = clients; b != null; b = next) {
+                int n;
+                next = b.next;
+                if ((n = b.estimateLag()) < 0) {
+                    b.next = null;
+                    if (pred == null)
+                        clients = next;
+                    else
+                        pred.next = next;
+                }
+                else {
+                    if (n > max)
+                        max = n;
+                    pred = b;
+                }
+            }
+        }
+        return max;
+    }
+
+    /**
+     * Processes all published items using the given Consumer function.
+     * Returns a CompletableFuture that is completed normally when this
+     * publisher signals {@link Flow.Subscriber#onComplete()
+     * onComplete}, or completed exceptionally upon any error, or an
+     * exception is thrown by the Consumer, or the returned
+     * CompletableFuture is cancelled, in which case no further items
+     * are processed.
+     *
+     * @param consumer the function applied to each onNext item
+     * @return a CompletableFuture that is completed normally
+     * when the publisher signals onComplete, and exceptionally
+     * upon any error or cancellation
+     * @throws NullPointerException if consumer is null
+     */
+    public CompletableFuture<Void> consume(Consumer<? super T> consumer) {
+        if (consumer == null)
+            throw new NullPointerException();
+        CompletableFuture<Void> status = new CompletableFuture<>();
+        subscribe(new ConsumerSubscriber<T>(status, consumer));
+        return status;
+    }
+
+    /** Subscriber for method consume */
+    private static final class ConsumerSubscriber<T>
+            implements Flow.Subscriber<T> {
+        final CompletableFuture<Void> status;
+        final Consumer<? super T> consumer;
+        Flow.Subscription subscription;
+        ConsumerSubscriber(CompletableFuture<Void> status,
+                           Consumer<? super T> consumer) {
+            this.status = status; this.consumer = consumer;
+        }
+        public final void onSubscribe(Flow.Subscription subscription) {
+            this.subscription = subscription;
+            status.whenComplete((v, e) -> subscription.cancel());
+            if (!status.isDone())
+                subscription.request(Long.MAX_VALUE);
+        }
+        public final void onError(Throwable ex) {
+            status.completeExceptionally(ex);
+        }
+        public final void onComplete() {
+            status.complete(null);
+        }
+        public final void onNext(T item) {
+            try {
+                consumer.accept(item);
+            } catch (Throwable ex) {
+                subscription.cancel();
+                status.completeExceptionally(ex);
+            }
+        }
+    }
+
+    /**
+     * A task for consuming buffer items and signals, created and
+     * executed whenever they become available. A task consumes as
+     * many items/signals as possible before terminating, at which
+     * point another task is created when needed. The dual Runnable
+     * and ForkJoinTask declaration saves overhead when executed by
+     * ForkJoinPools, without impacting other kinds of Executors.
+     */
+    @SuppressWarnings("serial")
+    static final class ConsumerTask<T> extends ForkJoinTask<Void>
+        implements Runnable {
+        final BufferedSubscription<T> consumer;
+        ConsumerTask(BufferedSubscription<T> consumer) {
+            this.consumer = consumer;
+        }
+        public final Void getRawResult() { return null; }
+        public final void setRawResult(Void v) {}
+        public final boolean exec() { consumer.consume(); return false; }
+        public final void run() { consumer.consume(); }
+    }
+
+    /**
+     * A bounded (ring) buffer with integrated control to start a
+     * consumer task whenever items are available.  The buffer
+     * algorithm is similar to one used inside ForkJoinPool (see its
+     * internal documentation for details) specialized for the case of
+     * at most one concurrent producer and consumer, and power of two
+     * buffer sizes. This allows methods to operate without locks even
+     * while supporting resizing, blocking, task-triggering, and
+     * garbage-free buffers (nulling out elements when consumed),
+     * although supporting these does impose a bit of overhead
+     * compared to plain fixed-size ring buffers.
+     *
+     * The publisher guarantees a single producer via its lock.  We
+     * ensure in this class that there is at most one consumer.  The
+     * request and cancel methods must be fully thread-safe but are
+     * coded to exploit the most common case in which they are only
+     * called by consumers (usually within onNext).
+     *
+     * Execution control is managed using the ACTIVE ctl bit. We
+     * ensure that a task is active when consumable items (and
+     * usually, SUBSCRIBE, ERROR or COMPLETE signals) are present and
+     * there is demand (unfilled requests).  This is complicated on
+     * the creation side by the possibility of exceptions when trying
+     * to execute tasks. These eventually force DISABLED state, but
+     * sometimes not directly. On the task side, termination (clearing
+     * ACTIVE) that would otherwise race with producers or request()
+     * calls uses the CONSUME keep-alive bit to force a recheck.
+     *
+     * The ctl field also manages run state. When DISABLED, no further
+     * updates are possible. Disabling may be preceded by setting
+     * ERROR or COMPLETE (or both -- ERROR has precedence), in which
+     * case the associated Subscriber methods are invoked, possibly
+     * synchronously if there is no active consumer task (including
+     * cases where execute() failed). The cancel() method is supported
+     * by treating as ERROR but suppressing onError signal.
+     *
+     * Support for blocking also exploits the fact that there is only
+     * one possible waiter. ManagedBlocker-compatible control fields
+     * are placed in this class itself rather than in wait-nodes.
+     * Blocking control relies on the "waiter" field. Producers set
+     * the field before trying to block, but must then recheck (via
+     * offer) before parking. Signalling then just unparks and clears
+     * waiter field. If the producer and consumer are both in the same
+     * ForkJoinPool, or consumers are running in commonPool, the
+     * producer attempts to help run consumer tasks that it forked
+     * before blocking.  To avoid potential cycles, only one level of
+     * helping is currently supported.
+     *
+     * This class uses @Contended and heuristic field declaration
+     * ordering to reduce false-sharing-based memory contention among
+     * instances of BufferedSubscription, but it does not currently
+     * attempt to avoid memory contention among buffers. This field
+     * and element packing can hurt performance especially when each
+     * publisher has only one client operating at a high rate.
+     * Addressing this may require allocating substantially more space
+     * than users expect.
+     */
+    @SuppressWarnings("serial")
+    @sun.misc.Contended
+    private static final class BufferedSubscription<T>
+        implements Flow.Subscription, ForkJoinPool.ManagedBlocker {
+        // Order-sensitive field declarations
+        long timeout;                      // > 0 if timed wait
+        volatile long demand;              // # unfilled requests
+        int maxCapacity;                   // reduced on OOME
+        int putStat;                       // offer result for ManagedBlocker
+        int helpDepth;                     // nested helping depth (at most 1)
+        volatile int ctl;                  // atomic run state flags
+        volatile int head;                 // next position to take
+        int tail;                          // next position to put
+        Object[] array;                    // buffer: null if disabled
+        Flow.Subscriber<? super T> subscriber; // null if disabled
+        Executor executor;                 // null if disabled
+        BiConsumer<? super Flow.Subscriber<? super T>, ? super Throwable> onNextHandler;
+        volatile Throwable pendingError;   // holds until onError issued
+        volatile Thread waiter;            // blocked producer thread
+        T putItem;                         // for offer within ManagedBlocker
+        BufferedSubscription<T> next;      // used only by publisher
+        BufferedSubscription<T> nextRetry; // used only by publisher
+
+        // ctl values
+        static final int ACTIVE    = 0x01; // consumer task active
+        static final int CONSUME   = 0x02; // keep-alive for consumer task
+        static final int DISABLED  = 0x04; // final state
+        static final int ERROR     = 0x08; // signal onError then disable
+        static final int SUBSCRIBE = 0x10; // signal onSubscribe
+        static final int COMPLETE  = 0x20; // signal onComplete when done
+
+        static final long INTERRUPTED = -1L; // timeout vs interrupt sentinel
+
+        /**
+         * Initial buffer capacity used when maxBufferCapacity is
+         * greater. Must be a power of two.
+         */
+        static final int DEFAULT_INITIAL_CAP = 32;
+
+        BufferedSubscription(Flow.Subscriber<? super T> subscriber,
+                             Executor executor,
+                             BiConsumer<? super Flow.Subscriber<? super T>,
+                             ? super Throwable> onNextHandler,
+                             int maxBufferCapacity) {
+            this.subscriber = subscriber;
+            this.executor = executor;
+            this.onNextHandler = onNextHandler;
+            this.maxCapacity = maxBufferCapacity;
+            this.array = new Object[maxBufferCapacity < DEFAULT_INITIAL_CAP ?
+                                    (maxBufferCapacity < 2 ? // at least 2 slots
+                                     2 : maxBufferCapacity) :
+                                    DEFAULT_INITIAL_CAP];
+        }
+
+        final boolean isDisabled() {
+            return ctl == DISABLED;
+        }
+
+        /**
+         * Returns estimated number of buffered items, or -1 if
+         * disabled.
+         */
+        final int estimateLag() {
+            int n;
+            return (ctl == DISABLED) ? -1 : ((n = tail - head) > 0) ? n : 0;
+        }
+
+        /**
+         * Tries to add item and start consumer task if necessary.
+         * @return -1 if disabled, 0 if dropped, else estimated lag
+         */
+        final int offer(T item) {
+            int h = head, t = tail, cap, size, stat;
+            Object[] a = array;
+            if (a != null && (cap = a.length) > 0 && cap >= (size = t + 1 - h)) {
+                a[(cap - 1) & t] = item;    // relaxed writes OK
+                tail = t + 1;
+                stat = size;
+            }
+            else
+                stat = growAndAdd(a, item);
+            return (stat > 0 &&
+                    (ctl & (ACTIVE | CONSUME)) != (ACTIVE | CONSUME)) ?
+                startOnOffer(stat) : stat;
+        }
+
+        /**
+         * Tries to create or expand buffer, then adds item if possible.
+         */
+        private int growAndAdd(Object[] a, T item) {
+            boolean alloc;
+            int cap, stat;
+            if ((ctl & (ERROR | DISABLED)) != 0) {
+                cap = 0;
+                stat = -1;
+                alloc = false;
+            }
+            else if (a == null || (cap = a.length) <= 0) {
+                cap = 0;
+                stat = 1;
+                alloc = true;
+            }
+            else {
+                U.fullFence();                   // recheck
+                int h = head, t = tail, size = t + 1 - h;
+                if (cap >= size) {
+                    a[(cap - 1) & t] = item;
+                    tail = t + 1;
+                    stat = size;
+                    alloc = false;
+                }
+                else if (cap >= maxCapacity) {
+                    stat = 0;                    // cannot grow
+                    alloc = false;
+                }
+                else {
+                    stat = cap + 1;
+                    alloc = true;
+                }
+            }
+            if (alloc) {
+                int newCap = (cap > 0) ? cap << 1 : 1;
+                if (newCap <= cap)
+                    stat = 0;
+                else {
+                    Object[] newArray = null;
+                    try {
+                        newArray = new Object[newCap];
+                    } catch (Throwable ex) {     // try to cope with OOME
+                    }
+                    if (newArray == null) {
+                        if (cap > 0)
+                            maxCapacity = cap;   // avoid continuous failure
+                        stat = 0;
+                    }
+                    else {
+                        array = newArray;
+                        int t = tail;
+                        int newMask = newCap - 1;
+                        if (a != null && cap > 0) {
+                            int mask = cap - 1;
+                            for (int j = head; j != t; ++j) {
+                                long k = ((long)(j & mask) << ASHIFT) + ABASE;
+                                Object x = U.getObjectVolatile(a, k);
+                                if (x != null && // races with consumer
+                                    U.compareAndSwapObject(a, k, x, null))
+                                    newArray[j & newMask] = x;
+                            }
+                        }
+                        newArray[t & newMask] = item;
+                        tail = t + 1;
+                    }
+                }
+            }
+            return stat;
+        }
+
+        /**
+         * Spins/helps/blocks while offer returns 0.  Called only if
+         * initial offer return 0.
+         */
+        final int submit(T item) {
+            int stat; Executor e; ForkJoinWorkerThread w;
+            if ((stat = offer(item)) == 0 && helpDepth == 0 &&
+                ((e = executor) instanceof ForkJoinPool)) {
+                helpDepth = 1;
+                Thread thread = Thread.currentThread();
+                if ((thread instanceof ForkJoinWorkerThread) &&
+                    ((w = (ForkJoinWorkerThread)thread)).getPool() == e)
+                    stat = internalHelpConsume(w.workQueue, item);
+                else if (e == ForkJoinPool.commonPool())
+                    stat = externalHelpConsume
+                        (ForkJoinPool.commonSubmitterQueue(), item);
+                helpDepth = 0;
+            }
+            if (stat == 0 && (stat = offer(item)) == 0) {
+                putItem = item;
+                timeout = 0L;
+                try {
+                    ForkJoinPool.managedBlock(this);
+                } catch (InterruptedException ie) {
+                    timeout = INTERRUPTED;
+                }
+                stat = putStat;
+                if (timeout < 0L)
+                    Thread.currentThread().interrupt();
+            }
+            return stat;
+        }
+
+        /**
+         * Tries helping for FJ submitter.
+         */
+        private int internalHelpConsume(ForkJoinPool.WorkQueue w, T item) {
+            int stat = 0;
+            if (w != null) {
+                ForkJoinTask<?> t;
+                while ((t = w.peek()) != null && (t instanceof ConsumerTask)) {
+                    if ((stat = offer(item)) != 0 || !w.tryUnpush(t))
+                        break;
+                    ((ConsumerTask<?>)t).consumer.consume();
+                }
+            }
+            return stat;
+        }
+
+        /**
+         * Tries helping for non-FJ submitter.
+         */
+        private int externalHelpConsume(ForkJoinPool.WorkQueue w, T item) {
+            int stat = 0;
+            if (w != null) {
+                ForkJoinTask<?> t;
+                while ((t = w.peek()) != null && (t instanceof ConsumerTask)) {
+                    if ((stat = offer(item)) != 0 || !w.trySharedUnpush(t))
+                        break;
+                    ((ConsumerTask<?>)t).consumer.consume();
+                }
+            }
+            return stat;
+        }
+
+        /**
+         * Timeout version; similar to submit.
+         */
+        final int timedOffer(T item, long nanos) {
+            int stat; Executor e;
+            if ((stat = offer(item)) == 0 && helpDepth == 0 &&
+                ((e = executor) instanceof ForkJoinPool)) {
+                Thread thread = Thread.currentThread();
+                if (((thread instanceof ForkJoinWorkerThread) &&
+                     ((ForkJoinWorkerThread)thread).getPool() == e) ||
+                    e == ForkJoinPool.commonPool()) {
+                    helpDepth = 1;
+                    ForkJoinTask<?> t;
+                    long deadline = System.nanoTime() + nanos;
+                    while ((t = ForkJoinTask.peekNextLocalTask()) != null &&
+                           (t instanceof ConsumerTask)) {
+                        if ((stat = offer(item)) != 0 ||
+                            (nanos = deadline - System.nanoTime()) <= 0L ||
+                            !t.tryUnfork())
+                            break;
+                        ((ConsumerTask<?>)t).consumer.consume();
+                    }
+                    helpDepth = 0;
+                }
+            }
+            if (stat == 0 && (stat = offer(item)) == 0 &&
+                (timeout = nanos) > 0L) {
+                putItem = item;
+                try {
+                    ForkJoinPool.managedBlock(this);
+                } catch (InterruptedException ie) {
+                    timeout = INTERRUPTED;
+                }
+                stat = putStat;
+                if (timeout < 0L)
+                    Thread.currentThread().interrupt();
+            }
+            return stat;
+        }
+
+        /**
+         * Tries to start consumer task after offer.
+         * @return -1 if now disabled, else argument
+         */
+        private int startOnOffer(int stat) {
+            for (;;) {
+                Executor e; int c;
+                if ((c = ctl) == DISABLED || (e = executor) == null) {
+                    stat = -1;
+                    break;
+                }
+                else if ((c & ACTIVE) != 0) { // ensure keep-alive
+                    if ((c & CONSUME) != 0 ||
+                        U.compareAndSwapInt(this, CTL, c,
+                                            c | CONSUME))
+                        break;
+                }
+                else if (demand == 0L || tail == head)
+                    break;
+                else if (U.compareAndSwapInt(this, CTL, c,
+                                             c | (ACTIVE | CONSUME))) {
+                    try {
+                        e.execute(new ConsumerTask<T>(this));
+                        break;
+                    } catch (RuntimeException | Error ex) { // back out
+                        do {} while (((c = ctl) & DISABLED) == 0 &&
+                                     (c & ACTIVE) != 0 &&
+                                     !U.compareAndSwapInt(this, CTL, c,
+                                                          c & ~ACTIVE));
+                        throw ex;
+                    }
+                }
+            }
+            return stat;
+        }
+
+        private void signalWaiter(Thread w) {
+            waiter = null;
+            LockSupport.unpark(w);    // release producer
+        }
+
+        /**
+         * Nulls out most fields, mainly to avoid garbage retention
+         * until publisher unsubscribes, but also to help cleanly stop
+         * upon error by nulling required components.
+         */
+        private void detach() {
+            Thread w = waiter;
+            executor = null;
+            subscriber = null;
+            pendingError = null;
+            signalWaiter(w);
+        }
+
+        /**
+         * Issues error signal, asynchronously if a task is running,
+         * else synchronously.
+         */
+        final void onError(Throwable ex) {
+            for (int c;;) {
+                if (((c = ctl) & (ERROR | DISABLED)) != 0)
+                    break;
+                else if ((c & ACTIVE) != 0) {
+                    pendingError = ex;
+                    if (U.compareAndSwapInt(this, CTL, c, c | ERROR))
+                        break; // cause consumer task to exit
+                }
+                else if (U.compareAndSwapInt(this, CTL, c, DISABLED)) {
+                    Flow.Subscriber<? super T> s = subscriber;
+                    if (s != null && ex != null) {
+                        try {
+                            s.onError(ex);
+                        } catch (Throwable ignore) {
+                        }
+                    }
+                    detach();
+                    break;
+                }
+            }
+        }
+
+        /**
+         * Tries to start consumer task upon a signal or request;
+         * disables on failure.
+         */
+        private void startOrDisable() {
+            Executor e;
+            if ((e = executor) != null) { // skip if already disabled
+                try {
+                    e.execute(new ConsumerTask<T>(this));
+                } catch (Throwable ex) {  // back out and force signal
+                    for (int c;;) {
+                        if ((c = ctl) == DISABLED || (c & ACTIVE) == 0)
+                            break;
+                        if (U.compareAndSwapInt(this, CTL, c, c & ~ACTIVE)) {
+                            onError(ex);
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+
+        final void onComplete() {
+            for (int c;;) {
+                if ((c = ctl) == DISABLED)
+                    break;
+                if (U.compareAndSwapInt(this, CTL, c,
+                                        c | (ACTIVE | CONSUME | COMPLETE))) {
+                    if ((c & ACTIVE) == 0)
+                        startOrDisable();
+                    break;
+                }
+            }
+        }
+
+        final void onSubscribe() {
+            for (int c;;) {
+                if ((c = ctl) == DISABLED)
+                    break;
+                if (U.compareAndSwapInt(this, CTL, c,
+                                        c | (ACTIVE | CONSUME | SUBSCRIBE))) {
+                    if ((c & ACTIVE) == 0)
+                        startOrDisable();
+                    break;
+                }
+            }
+        }
+
+        /**
+         * Causes consumer task to exit if active (without reporting
+         * onError unless there is already a pending error), and
+         * disables.
+         */
+        public void cancel() {
+            for (int c;;) {
+                if ((c = ctl) == DISABLED)
+                    break;
+                else if ((c & ACTIVE) != 0) {
+                    if (U.compareAndSwapInt(this, CTL, c,
+                                            c | (CONSUME | ERROR)))
+                        break;
+                }
+                else if (U.compareAndSwapInt(this, CTL, c, DISABLED)) {
+                    detach();
+                    break;
+                }
+            }
+        }
+
+        /**
+         * Adds to demand and possibly starts task.
+         */
+        public void request(long n) {
+            if (n > 0L) {
+                for (;;) {
+                    long prev = demand, d;
+                    if ((d = prev + n) < prev) // saturate
+                        d = Long.MAX_VALUE;
+                    if (U.compareAndSwapLong(this, DEMAND, prev, d)) {
+                        for (int c, h;;) {
+                            if ((c = ctl) == DISABLED)
+                                break;
+                            else if ((c & ACTIVE) != 0) {
+                                if ((c & CONSUME) != 0 ||
+                                    U.compareAndSwapInt(this, CTL, c,
+                                                        c | CONSUME))
+                                    break;
+                            }
+                            else if ((h = head) != tail) {
+                                if (U.compareAndSwapInt(this, CTL, c,
+                                                        c | (ACTIVE|CONSUME))) {
+                                    startOrDisable();
+                                    break;
+                                }
+                            }
+                            else if (head == h && tail == h)
+                                break;          // else stale
+                            if (demand == 0L)
+                                break;
+                        }
+                        break;
+                    }
+                }
+            }
+            else if (n < 0L)
+                onError(new IllegalArgumentException(
+                            "negative subscription request"));
+        }
+
+        public final boolean isReleasable() { // for ManagedBlocker
+            T item = putItem;
+            if (item != null) {
+                if ((putStat = offer(item)) == 0)
+                    return false;
+                putItem = null;
+            }
+            return true;
+        }
+
+        public final boolean block() { // for ManagedBlocker
+            T item = putItem;
+            if (item != null) {
+                putItem = null;
+                long nanos = timeout;
+                long deadline = (nanos > 0L) ? System.nanoTime() + nanos : 0L;
+                while ((putStat = offer(item)) == 0) {
+                    if (Thread.interrupted()) {
+                        timeout = INTERRUPTED;
+                        if (nanos > 0L)
+                            break;
+                    }
+                    else if (nanos > 0L &&
+                             (nanos = deadline - System.nanoTime()) <= 0L)
+                        break;
+                    else if (waiter == null)
+                        waiter = Thread.currentThread();
+                    else {
+                        if (nanos > 0L)
+                            LockSupport.parkNanos(this, nanos);
+                        else
+                            LockSupport.park(this);
+                        waiter = null;
+                    }
+                }
+            }
+            waiter = null;
+            return true;
+        }
+
+        /**
+         * Consumer loop, called from ConsumerTask, or indirectly
+         * when helping during submit.
+         */
+        final void consume() {
+            Flow.Subscriber<? super T> s;
+            int h = head;
+            if ((s = subscriber) != null) {           // else disabled
+                for (;;) {
+                    long d = demand;
+                    int c; Object[] a; int n; long i; Object x; Thread w;
+                    if (((c = ctl) & (ERROR | SUBSCRIBE | DISABLED)) != 0) {
+                        if (!checkControl(s, c))
+                            break;
+                    }
+                    else if ((a = array) == null || h == tail ||
+                             (n = a.length) == 0 ||
+                             (x = U.getObjectVolatile
+                              (a, (i = ((long)((n - 1) & h) << ASHIFT) + ABASE)))
+                             == null) {
+                        if (!checkEmpty(s, c))
+                            break;
+                    }
+                    else if (d == 0L) {
+                        if (!checkDemand(c))
+                            break;
+                    }
+                    else if (((c & CONSUME) != 0 ||
+                              U.compareAndSwapInt(this, CTL, c, c | CONSUME)) &&
+                             U.compareAndSwapObject(a, i, x, null)) {
+                        U.putOrderedInt(this, HEAD, ++h);
+                        U.getAndAddLong(this, DEMAND, -1L);
+                        if ((w = waiter) != null)
+                            signalWaiter(w);
+                        try {
+                            @SuppressWarnings("unchecked") T y = (T) x;
+                            s.onNext(y);
+                        } catch (Throwable ex) {
+                            handleOnNext(s, ex);
+                        }
+                    }
+                }
+            }
+        }
+
+        /**
+         * Responds to control events in consume().
+         */
+        private boolean checkControl(Flow.Subscriber<? super T> s, int c) {
+            boolean stat = true;
+            if ((c & ERROR) != 0) {
+                Throwable ex = pendingError;
+                ctl = DISABLED;           // no need for CAS
+                if (ex != null) {         // null if errorless cancel
+                    try {
+                        if (s != null)
+                            s.onError(ex);
+                    } catch (Throwable ignore) {
+                    }
+                }
+            }
+            else if ((c & SUBSCRIBE) != 0) {
+                if (U.compareAndSwapInt(this, CTL, c, c & ~SUBSCRIBE)) {
+                    try {
+                        if (s != null)
+                            s.onSubscribe(this);
+                    } catch (Throwable ex) {
+                        onError(ex);
+                    }
+                }
+            }
+            else {
+                detach();
+                stat = false;
+            }
+            return stat;
+        }
+
+        /**
+         * Responds to apparent emptiness in consume().
+         */
+        private boolean checkEmpty(Flow.Subscriber<? super T> s, int c) {
+            boolean stat = true;
+            if (head == tail) {
+                if ((c & CONSUME) != 0)
+                    U.compareAndSwapInt(this, CTL, c, c & ~CONSUME);
+                else if ((c & COMPLETE) != 0) {
+                    if (U.compareAndSwapInt(this, CTL, c, DISABLED)) {
+                        try {
+                            if (s != null)
+                                s.onComplete();
+                        } catch (Throwable ignore) {
+                        }
+                    }
+                }
+                else if (U.compareAndSwapInt(this, CTL, c, c & ~ACTIVE))
+                    stat = false;
+            }
+            return stat;
+        }
+
+        /**
+         * Responds to apparent zero demand in consume().
+         */
+        private boolean checkDemand(int c) {
+            boolean stat = true;
+            if (demand == 0L) {
+                if ((c & CONSUME) != 0)
+                    U.compareAndSwapInt(this, CTL, c, c & ~CONSUME);
+                else if (U.compareAndSwapInt(this, CTL, c, c & ~ACTIVE))
+                    stat = false;
+            }
+            return stat;
+        }
+
+        /**
+         * Processes exception in Subscriber.onNext.
+         */
+        private void handleOnNext(Flow.Subscriber<? super T> s, Throwable ex) {
+            BiConsumer<? super Flow.Subscriber<? super T>, ? super Throwable> h;
+            if ((h = onNextHandler) != null) {
+                try {
+                    h.accept(s, ex);
+                } catch (Throwable ignore) {
+                }
+            }
+            onError(ex);
+        }
+
+        // Unsafe mechanics
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+        private static final long CTL;
+        private static final long TAIL;
+        private static final long HEAD;
+        private static final long DEMAND;
+        private static final int ABASE;
+        private static final int ASHIFT;
+
+        static {
+            try {
+                CTL = U.objectFieldOffset
+                    (BufferedSubscription.class.getDeclaredField("ctl"));
+                TAIL = U.objectFieldOffset
+                    (BufferedSubscription.class.getDeclaredField("tail"));
+                HEAD = U.objectFieldOffset
+                    (BufferedSubscription.class.getDeclaredField("head"));
+                DEMAND = U.objectFieldOffset
+                    (BufferedSubscription.class.getDeclaredField("demand"));
+
+                ABASE = U.arrayBaseOffset(Object[].class);
+                int scale = U.arrayIndexScale(Object[].class);
+                if ((scale & (scale - 1)) != 0)
+                    throw new Error("data type scale not a power of two");
+                ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
+            } catch (ReflectiveOperationException e) {
+                throw new Error(e);
+            }
+
+            // Reduce the risk of rare disastrous classloading in first call to
+            // LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
+            Class<?> ensureLoaded = LockSupport.class;
+        }
+    }
+}
--- a/jdk/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -35,11 +35,15 @@
  */
 
 package java.util.concurrent;
+
+import java.util.AbstractQueue;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Spliterator;
+import java.util.Spliterators;
 import java.util.concurrent.locks.LockSupport;
 import java.util.concurrent.locks.ReentrantLock;
-import java.util.*;
-import java.util.Spliterator;
-import java.util.Spliterators;
 
 /**
  * A {@linkplain BlockingQueue blocking queue} in which each insert
@@ -79,7 +83,7 @@
  *
  * @since 1.5
  * @author Doug Lea and Bill Scherer and Michael Scott
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this queue
  */
 public class SynchronousQueue<E> extends AbstractQueue<E>
     implements BlockingQueue<E>, java.io.Serializable {
@@ -182,9 +186,6 @@
         abstract E transfer(E e, boolean timed, long nanos);
     }
 
-    /** The number of CPUs, for spin control */
-    static final int NCPUS = Runtime.getRuntime().availableProcessors();
-
     /**
      * The number of times to spin before blocking in timed waits.
      * The value is empirically derived -- it works well across a
@@ -192,20 +193,21 @@
      * seems not to vary with number of CPUs (beyond 2) so is just
      * a constant.
      */
-    static final int maxTimedSpins = (NCPUS < 2) ? 0 : 32;
+    static final int MAX_TIMED_SPINS =
+        (Runtime.getRuntime().availableProcessors() < 2) ? 0 : 32;
 
     /**
      * The number of times to spin before blocking in untimed waits.
      * This is greater than timed value because untimed waits spin
      * faster since they don't need to check times on each spin.
      */
-    static final int maxUntimedSpins = maxTimedSpins * 16;
+    static final int MAX_UNTIMED_SPINS = MAX_TIMED_SPINS * 16;
 
     /**
      * The number of nanoseconds for which it is faster to spin
      * rather than to use timed park. A rough estimate suffices.
      */
-    static final long spinForTimeoutThreshold = 1000L;
+    static final long SPIN_FOR_TIMEOUT_THRESHOLD = 1000L;
 
     /** Dual stack */
     static final class TransferStack<E> extends Transferer<E> {
@@ -245,7 +247,7 @@
 
             boolean casNext(SNode cmp, SNode val) {
                 return cmp == next &&
-                    UNSAFE.compareAndSwapObject(this, nextOffset, cmp, val);
+                    U.compareAndSwapObject(this, NEXT, cmp, val);
             }
 
             /**
@@ -258,7 +260,7 @@
              */
             boolean tryMatch(SNode s) {
                 if (match == null &&
-                    UNSAFE.compareAndSwapObject(this, matchOffset, null, s)) {
+                    U.compareAndSwapObject(this, MATCH, null, s)) {
                     Thread w = waiter;
                     if (w != null) {    // waiters need at most one unpark
                         waiter = null;
@@ -273,7 +275,7 @@
              * Tries to cancel a wait by matching node to itself.
              */
             void tryCancel() {
-                UNSAFE.compareAndSwapObject(this, matchOffset, null, this);
+                U.compareAndSwapObject(this, MATCH, null, this);
             }
 
             boolean isCancelled() {
@@ -281,19 +283,17 @@
             }
 
             // Unsafe mechanics
-            private static final sun.misc.Unsafe UNSAFE;
-            private static final long matchOffset;
-            private static final long nextOffset;
+            private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+            private static final long MATCH;
+            private static final long NEXT;
 
             static {
                 try {
-                    UNSAFE = sun.misc.Unsafe.getUnsafe();
-                    Class<?> k = SNode.class;
-                    matchOffset = UNSAFE.objectFieldOffset
-                        (k.getDeclaredField("match"));
-                    nextOffset = UNSAFE.objectFieldOffset
-                        (k.getDeclaredField("next"));
-                } catch (Exception e) {
+                    MATCH = U.objectFieldOffset
+                        (SNode.class.getDeclaredField("match"));
+                    NEXT = U.objectFieldOffset
+                        (SNode.class.getDeclaredField("next"));
+                } catch (ReflectiveOperationException e) {
                     throw new Error(e);
                 }
             }
@@ -304,7 +304,7 @@
 
         boolean casHead(SNode h, SNode nh) {
             return h == head &&
-                UNSAFE.compareAndSwapObject(this, headOffset, h, nh);
+                U.compareAndSwapObject(this, HEAD, h, nh);
         }
 
         /**
@@ -353,7 +353,7 @@
             for (;;) {
                 SNode h = head;
                 if (h == null || h.mode == mode) {  // empty or same-mode
-                    if (timed && nanos <= 0) {      // can't wait
+                    if (timed && nanos <= 0L) {     // can't wait
                         if (h != null && h.isCancelled())
                             casHead(h, h.next);     // pop cancelled node
                         else
@@ -435,8 +435,9 @@
              */
             final long deadline = timed ? System.nanoTime() + nanos : 0L;
             Thread w = Thread.currentThread();
-            int spins = (shouldSpin(s) ?
-                         (timed ? maxTimedSpins : maxUntimedSpins) : 0);
+            int spins = shouldSpin(s)
+                ? (timed ? MAX_TIMED_SPINS : MAX_UNTIMED_SPINS)
+                : 0;
             for (;;) {
                 if (w.isInterrupted())
                     s.tryCancel();
@@ -451,12 +452,12 @@
                     }
                 }
                 if (spins > 0)
-                    spins = shouldSpin(s) ? (spins-1) : 0;
+                    spins = shouldSpin(s) ? (spins - 1) : 0;
                 else if (s.waiter == null)
                     s.waiter = w; // establish waiter so can park next iter
                 else if (!timed)
                     LockSupport.park(this);
-                else if (nanos > spinForTimeoutThreshold)
+                else if (nanos > SPIN_FOR_TIMEOUT_THRESHOLD)
                     LockSupport.parkNanos(this, nanos);
             }
         }
@@ -508,15 +509,13 @@
         }
 
         // Unsafe mechanics
-        private static final sun.misc.Unsafe UNSAFE;
-        private static final long headOffset;
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+        private static final long HEAD;
         static {
             try {
-                UNSAFE = sun.misc.Unsafe.getUnsafe();
-                Class<?> k = TransferStack.class;
-                headOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("head"));
-            } catch (Exception e) {
+                HEAD = U.objectFieldOffset
+                    (TransferStack.class.getDeclaredField("head"));
+            } catch (ReflectiveOperationException e) {
                 throw new Error(e);
             }
         }
@@ -547,19 +546,19 @@
 
             boolean casNext(QNode cmp, QNode val) {
                 return next == cmp &&
-                    UNSAFE.compareAndSwapObject(this, nextOffset, cmp, val);
+                    U.compareAndSwapObject(this, NEXT, cmp, val);
             }
 
             boolean casItem(Object cmp, Object val) {
                 return item == cmp &&
-                    UNSAFE.compareAndSwapObject(this, itemOffset, cmp, val);
+                    U.compareAndSwapObject(this, ITEM, cmp, val);
             }
 
             /**
              * Tries to cancel by CAS'ing ref to this as item.
              */
             void tryCancel(Object cmp) {
-                UNSAFE.compareAndSwapObject(this, itemOffset, cmp, this);
+                U.compareAndSwapObject(this, ITEM, cmp, this);
             }
 
             boolean isCancelled() {
@@ -576,19 +575,17 @@
             }
 
             // Unsafe mechanics
-            private static final sun.misc.Unsafe UNSAFE;
-            private static final long itemOffset;
-            private static final long nextOffset;
+            private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+            private static final long ITEM;
+            private static final long NEXT;
 
             static {
                 try {
-                    UNSAFE = sun.misc.Unsafe.getUnsafe();
-                    Class<?> k = QNode.class;
-                    itemOffset = UNSAFE.objectFieldOffset
-                        (k.getDeclaredField("item"));
-                    nextOffset = UNSAFE.objectFieldOffset
-                        (k.getDeclaredField("next"));
-                } catch (Exception e) {
+                    ITEM = U.objectFieldOffset
+                        (QNode.class.getDeclaredField("item"));
+                    NEXT = U.objectFieldOffset
+                        (QNode.class.getDeclaredField("next"));
+                } catch (ReflectiveOperationException e) {
                     throw new Error(e);
                 }
             }
@@ -617,7 +614,7 @@
          */
         void advanceHead(QNode h, QNode nh) {
             if (h == head &&
-                UNSAFE.compareAndSwapObject(this, headOffset, h, nh))
+                U.compareAndSwapObject(this, HEAD, h, nh))
                 h.next = h; // forget old next
         }
 
@@ -626,7 +623,7 @@
          */
         void advanceTail(QNode t, QNode nt) {
             if (tail == t)
-                UNSAFE.compareAndSwapObject(this, tailOffset, t, nt);
+                U.compareAndSwapObject(this, TAIL, t, nt);
         }
 
         /**
@@ -634,7 +631,7 @@
          */
         boolean casCleanMe(QNode cmp, QNode val) {
             return cleanMe == cmp &&
-                UNSAFE.compareAndSwapObject(this, cleanMeOffset, cmp, val);
+                U.compareAndSwapObject(this, CLEANME, cmp, val);
         }
 
         /**
@@ -684,7 +681,7 @@
                         advanceTail(t, tn);
                         continue;
                     }
-                    if (timed && nanos <= 0)        // can't wait
+                    if (timed && nanos <= 0L)       // can't wait
                         return null;
                     if (s == null)
                         s = new QNode(e, isData);
@@ -739,8 +736,9 @@
             /* Same idea as TransferStack.awaitFulfill */
             final long deadline = timed ? System.nanoTime() + nanos : 0L;
             Thread w = Thread.currentThread();
-            int spins = ((head.next == s) ?
-                         (timed ? maxTimedSpins : maxUntimedSpins) : 0);
+            int spins = (head.next == s)
+                ? (timed ? MAX_TIMED_SPINS : MAX_UNTIMED_SPINS)
+                : 0;
             for (;;) {
                 if (w.isInterrupted())
                     s.tryCancel(e);
@@ -760,7 +758,7 @@
                     s.waiter = w;
                 else if (!timed)
                     LockSupport.park(this);
-                else if (nanos > spinForTimeoutThreshold)
+                else if (nanos > SPIN_FOR_TIMEOUT_THRESHOLD)
                     LockSupport.parkNanos(this, nanos);
             }
         }
@@ -819,21 +817,19 @@
             }
         }
 
-        private static final sun.misc.Unsafe UNSAFE;
-        private static final long headOffset;
-        private static final long tailOffset;
-        private static final long cleanMeOffset;
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+        private static final long HEAD;
+        private static final long TAIL;
+        private static final long CLEANME;
         static {
             try {
-                UNSAFE = sun.misc.Unsafe.getUnsafe();
-                Class<?> k = TransferQueue.class;
-                headOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("head"));
-                tailOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("tail"));
-                cleanMeOffset = UNSAFE.objectFieldOffset
-                    (k.getDeclaredField("cleanMe"));
-            } catch (Exception e) {
+                HEAD = U.objectFieldOffset
+                    (TransferQueue.class.getDeclaredField("head"));
+                TAIL = U.objectFieldOffset
+                    (TransferQueue.class.getDeclaredField("tail"));
+                CLEANME = U.objectFieldOffset
+                    (TransferQueue.class.getDeclaredField("cleanMe"));
+            } catch (ReflectiveOperationException e) {
                 throw new Error(e);
             }
         }
@@ -1088,7 +1084,7 @@
     }
 
     /**
-     * Sets the zeroeth element of the specified array to {@code null}
+     * Sets the zeroth element of the specified array to {@code null}
      * (if the array has non-zero length) and returns it.
      *
      * @param a the array
@@ -1102,6 +1098,14 @@
     }
 
     /**
+     * Always returns {@code "[]"}.
+     * @return {@code "[]"}
+     */
+    public String toString() {
+        return "[]";
+    }
+
+    /**
      * @throws UnsupportedOperationException {@inheritDoc}
      * @throws ClassCastException            {@inheritDoc}
      * @throws NullPointerException          {@inheritDoc}
@@ -1196,17 +1200,9 @@
             transferer = new TransferStack<E>();
     }
 
-    // Unsafe mechanics
-    static long objectFieldOffset(sun.misc.Unsafe UNSAFE,
-                                  String field, Class<?> klazz) {
-        try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
-        }
+    static {
+        // Reduce the risk of rare disastrous classloading in first call to
+        // LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
+        Class<?> ensureLoaded = LockSupport.class;
     }
-
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -42,7 +42,7 @@
  *
  * <p>
  * The simplest implementation of this interface is just:
- *  <pre> {@code
+ * <pre> {@code
  * class SimpleThreadFactory implements ThreadFactory {
  *   public Thread newThread(Runnable r) {
  *     return new Thread(r);
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java	Tue Oct 27 01:45:03 2015 -0400
@@ -126,8 +126,7 @@
      */
 
     /** Generates per-thread initialization/probe field */
-    private static final AtomicInteger probeGenerator =
-        new AtomicInteger();
+    private static final AtomicInteger probeGenerator = new AtomicInteger();
 
     /**
      * The next seed for default constructors.
@@ -150,17 +149,17 @@
     }
 
     /**
-     * The seed increment
+     * The seed increment.
      */
     private static final long GAMMA = 0x9e3779b97f4a7c15L;
 
     /**
-     * The increment for generating probe values
+     * The increment for generating probe values.
      */
     private static final int PROBE_INCREMENT = 0x9e3779b9;
 
     /**
-     * The increment of seeder per new instance
+     * The increment of seeder per new instance.
      */
     private static final long SEEDER_INCREMENT = 0xbb67ae8584caa73bL;
 
@@ -170,7 +169,7 @@
 
     /** Rarely-used holder for the second of a pair of Gaussians */
     private static final ThreadLocal<Double> nextLocalGaussian =
-        new ThreadLocal<Double>();
+        new ThreadLocal<>();
 
     private static long mix64(long z) {
         z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
@@ -209,8 +208,8 @@
         int probe = (p == 0) ? 1 : p; // skip 0
         long seed = mix64(seeder.getAndAdd(SEEDER_INCREMENT));
         Thread t = Thread.currentThread();
-        UNSAFE.putLong(t, SEED, seed);
-        UNSAFE.putInt(t, PROBE, probe);
+        U.putLong(t, SEED, seed);
+        U.putInt(t, PROBE, probe);
     }
 
     /**
@@ -219,7 +218,7 @@
      * @return the current thread's {@code ThreadLocalRandom}
      */
     public static ThreadLocalRandom current() {
-        if (UNSAFE.getInt(Thread.currentThread(), PROBE) == 0)
+        if (U.getInt(Thread.currentThread(), PROBE) == 0)
             localInit();
         return instance;
     }
@@ -238,8 +237,8 @@
 
     final long nextSeed() {
         Thread t; long r; // read and update per-thread seed
-        UNSAFE.putLong(t = Thread.currentThread(), SEED,
-                       r = UNSAFE.getLong(t, SEED) + GAMMA);
+        U.putLong(t = Thread.currentThread(), SEED,
+                  r = U.getLong(t, SEED) + GAMMA);
         return r;
     }
 
@@ -249,9 +248,9 @@
     }
 
     // IllegalArgumentException messages
-    static final String BadBound = "bound must be positive";
-    static final String BadRange = "bound must be greater than origin";
-    static final String BadSize  = "size must be non-negative";
+    static final String BAD_BOUND = "bound must be positive";
+    static final String BAD_RANGE = "bound must be greater than origin";
+    static final String BAD_SIZE  = "size must be non-negative";
 
     /**
      * The form of nextLong used by LongStream Spliterators.  If
@@ -349,7 +348,7 @@
      */
     public int nextInt(int bound) {
         if (bound <= 0)
-            throw new IllegalArgumentException(BadBound);
+            throw new IllegalArgumentException(BAD_BOUND);
         int r = mix32(nextSeed());
         int m = bound - 1;
         if ((bound & m) == 0) // power of two
@@ -376,7 +375,7 @@
      */
     public int nextInt(int origin, int bound) {
         if (origin >= bound)
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return internalNextInt(origin, bound);
     }
 
@@ -400,7 +399,7 @@
      */
     public long nextLong(long bound) {
         if (bound <= 0)
-            throw new IllegalArgumentException(BadBound);
+            throw new IllegalArgumentException(BAD_BOUND);
         long r = mix64(nextSeed());
         long m = bound - 1;
         if ((bound & m) == 0L) // power of two
@@ -427,7 +426,7 @@
      */
     public long nextLong(long origin, long bound) {
         if (origin >= bound)
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return internalNextLong(origin, bound);
     }
 
@@ -453,9 +452,9 @@
      */
     public double nextDouble(double bound) {
         if (!(bound > 0.0))
-            throw new IllegalArgumentException(BadBound);
+            throw new IllegalArgumentException(BAD_BOUND);
         double result = (mix64(nextSeed()) >>> 11) * DOUBLE_UNIT * bound;
-        return (result < bound) ?  result : // correct for rounding
+        return (result < bound) ? result : // correct for rounding
             Double.longBitsToDouble(Double.doubleToLongBits(bound) - 1);
     }
 
@@ -472,7 +471,7 @@
      */
     public double nextDouble(double origin, double bound) {
         if (!(origin < bound))
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return internalNextDouble(origin, bound);
     }
 
@@ -529,7 +528,7 @@
      */
     public IntStream ints(long streamSize) {
         if (streamSize < 0L)
-            throw new IllegalArgumentException(BadSize);
+            throw new IllegalArgumentException(BAD_SIZE);
         return StreamSupport.intStream
             (new RandomIntsSpliterator
              (0L, streamSize, Integer.MAX_VALUE, 0),
@@ -571,9 +570,9 @@
     public IntStream ints(long streamSize, int randomNumberOrigin,
                           int randomNumberBound) {
         if (streamSize < 0L)
-            throw new IllegalArgumentException(BadSize);
+            throw new IllegalArgumentException(BAD_SIZE);
         if (randomNumberOrigin >= randomNumberBound)
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return StreamSupport.intStream
             (new RandomIntsSpliterator
              (0L, streamSize, randomNumberOrigin, randomNumberBound),
@@ -598,7 +597,7 @@
      */
     public IntStream ints(int randomNumberOrigin, int randomNumberBound) {
         if (randomNumberOrigin >= randomNumberBound)
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return StreamSupport.intStream
             (new RandomIntsSpliterator
              (0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
@@ -617,7 +616,7 @@
      */
     public LongStream longs(long streamSize) {
         if (streamSize < 0L)
-            throw new IllegalArgumentException(BadSize);
+            throw new IllegalArgumentException(BAD_SIZE);
         return StreamSupport.longStream
             (new RandomLongsSpliterator
              (0L, streamSize, Long.MAX_VALUE, 0L),
@@ -659,9 +658,9 @@
     public LongStream longs(long streamSize, long randomNumberOrigin,
                             long randomNumberBound) {
         if (streamSize < 0L)
-            throw new IllegalArgumentException(BadSize);
+            throw new IllegalArgumentException(BAD_SIZE);
         if (randomNumberOrigin >= randomNumberBound)
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return StreamSupport.longStream
             (new RandomLongsSpliterator
              (0L, streamSize, randomNumberOrigin, randomNumberBound),
@@ -686,7 +685,7 @@
      */
     public LongStream longs(long randomNumberOrigin, long randomNumberBound) {
         if (randomNumberOrigin >= randomNumberBound)
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return StreamSupport.longStream
             (new RandomLongsSpliterator
              (0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
@@ -706,7 +705,7 @@
      */
     public DoubleStream doubles(long streamSize) {
         if (streamSize < 0L)
-            throw new IllegalArgumentException(BadSize);
+            throw new IllegalArgumentException(BAD_SIZE);
         return StreamSupport.doubleStream
             (new RandomDoublesSpliterator
              (0L, streamSize, Double.MAX_VALUE, 0.0),
@@ -750,9 +749,9 @@
     public DoubleStream doubles(long streamSize, double randomNumberOrigin,
                                 double randomNumberBound) {
         if (streamSize < 0L)
-            throw new IllegalArgumentException(BadSize);
+            throw new IllegalArgumentException(BAD_SIZE);
         if (!(randomNumberOrigin < randomNumberBound))
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return StreamSupport.doubleStream
             (new RandomDoublesSpliterator
              (0L, streamSize, randomNumberOrigin, randomNumberBound),
@@ -777,7 +776,7 @@
      */
     public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound) {
         if (!(randomNumberOrigin < randomNumberBound))
-            throw new IllegalArgumentException(BadRange);
+            throw new IllegalArgumentException(BAD_RANGE);
         return StreamSupport.doubleStream
             (new RandomDoublesSpliterator
              (0L, Long.MAX_VALUE, randomNumberOrigin, randomNumberBound),
@@ -792,7 +791,8 @@
      * approach. The long and double versions of this class are
      * identical except for types.
      */
-    static final class RandomIntsSpliterator implements Spliterator.OfInt {
+    private static final class RandomIntsSpliterator
+            implements Spliterator.OfInt {
         long index;
         final long fence;
         final int origin;
@@ -846,7 +846,8 @@
     /**
      * Spliterator for long streams.
      */
-    static final class RandomLongsSpliterator implements Spliterator.OfLong {
+    private static final class RandomLongsSpliterator
+            implements Spliterator.OfLong {
         long index;
         final long fence;
         final long origin;
@@ -901,7 +902,8 @@
     /**
      * Spliterator for double streams.
      */
-    static final class RandomDoublesSpliterator implements Spliterator.OfDouble {
+    private static final class RandomDoublesSpliterator
+            implements Spliterator.OfDouble {
         long index;
         final long fence;
         final double origin;
@@ -978,7 +980,7 @@
      * can be used to force initialization on zero return.
      */
     static final int getProbe() {
-        return UNSAFE.getInt(Thread.currentThread(), PROBE);
+        return U.getInt(Thread.currentThread(), PROBE);
     }
 
     /**
@@ -989,7 +991,7 @@
         probe ^= probe << 13;   // xorshift
         probe ^= probe >>> 17;
         probe ^= probe << 5;
-        UNSAFE.putInt(Thread.currentThread(), PROBE, probe);
+        U.putInt(Thread.currentThread(), PROBE, probe);
         return probe;
     }
 
@@ -999,17 +1001,14 @@
     static final int nextSecondarySeed() {
         int r;
         Thread t = Thread.currentThread();
-        if ((r = UNSAFE.getInt(t, SECONDARY)) != 0) {
+        if ((r = U.getInt(t, SECONDARY)) != 0) {
             r ^= r << 13;   // xorshift
             r ^= r >>> 17;
             r ^= r << 5;
         }
-        else {
-            localInit();
-            if ((r = (int)UNSAFE.getLong(t, SEED)) == 0)
-                r = 1; // avoid zero
-        }
-        UNSAFE.putInt(t, SECONDARY, r);
+        else if ((r = mix32(seeder.getAndAdd(SEEDER_INCREMENT))) == 0)
+            r = 1; // avoid zero
+        U.putInt(t, SECONDARY, r);
         return r;
     }
 
@@ -1024,8 +1023,8 @@
      *              always true
      */
     private static final ObjectStreamField[] serialPersistentFields = {
-            new ObjectStreamField("rnd", long.class),
-            new ObjectStreamField("initialized", boolean.class),
+        new ObjectStreamField("rnd", long.class),
+        new ObjectStreamField("initialized", boolean.class),
     };
 
     /**
@@ -1037,7 +1036,7 @@
         throws java.io.IOException {
 
         java.io.ObjectOutputStream.PutField fields = s.putFields();
-        fields.put("rnd", UNSAFE.getLong(Thread.currentThread(), SEED));
+        fields.put("rnd", U.getLong(Thread.currentThread(), SEED));
         fields.put("initialized", true);
         s.writeFields();
     }
@@ -1051,21 +1050,19 @@
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe UNSAFE;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
     private static final long SEED;
     private static final long PROBE;
     private static final long SECONDARY;
     static {
         try {
-            UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class<?> tk = Thread.class;
-            SEED = UNSAFE.objectFieldOffset
-                (tk.getDeclaredField("threadLocalRandomSeed"));
-            PROBE = UNSAFE.objectFieldOffset
-                (tk.getDeclaredField("threadLocalRandomProbe"));
-            SECONDARY = UNSAFE.objectFieldOffset
-                (tk.getDeclaredField("threadLocalRandomSecondarySeed"));
-        } catch (Exception e) {
+            SEED = U.objectFieldOffset
+                (Thread.class.getDeclaredField("threadLocalRandomSeed"));
+            PROBE = U.objectFieldOffset
+                (Thread.class.getDeclaredField("threadLocalRandomProbe"));
+            SECONDARY = U.objectFieldOffset
+                (Thread.class.getDeclaredField("threadLocalRandomSecondarySeed"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,11 +34,16 @@
  */
 
 package java.util.concurrent;
+
+import java.util.ArrayList;
+import java.util.ConcurrentModificationException;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.locks.AbstractQueuedSynchronizer;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.*;
 
 /**
  * An {@link ExecutorService} that executes each submitted task using
@@ -69,7 +74,8 @@
  *
  * <dt>Core and maximum pool sizes</dt>
  *
- * <dd>A {@code ThreadPoolExecutor} will automatically adjust the
+ * <dd style="font-family:'DejaVu Sans', Arial, Helvetica, sans-serif">
+ * A {@code ThreadPoolExecutor} will automatically adjust the
  * pool size (see {@link #getPoolSize})
  * according to the bounds set by
  * corePoolSize (see {@link #getCorePoolSize}) and
@@ -91,7 +97,8 @@
  *
  * <dt>On-demand construction</dt>
  *
- * <dd>By default, even core threads are initially created and
+ * <dd style="font-family:'DejaVu Sans', Arial, Helvetica, sans-serif">
+ * By default, even core threads are initially created and
  * started only when new tasks arrive, but this can be overridden
  * dynamically using method {@link #prestartCoreThread} or {@link
  * #prestartAllCoreThreads}.  You probably want to prestart threads if
@@ -99,7 +106,8 @@
  *
  * <dt>Creating new threads</dt>
  *
- * <dd>New threads are created using a {@link ThreadFactory}.  If not
+ * <dd style="font-family:'DejaVu Sans', Arial, Helvetica, sans-serif">
+ * New threads are created using a {@link ThreadFactory}.  If not
  * otherwise specified, a {@link Executors#defaultThreadFactory} is
  * used, that creates threads to all be in the same {@link
  * ThreadGroup} and with the same {@code NORM_PRIORITY} priority and
@@ -116,7 +124,8 @@
  *
  * <dt>Keep-alive times</dt>
  *
- * <dd>If the pool currently has more than corePoolSize threads,
+ * <dd style="font-family:'DejaVu Sans', Arial, Helvetica, sans-serif">
+ * If the pool currently has more than corePoolSize threads,
  * excess threads will be terminated if they have been idle for more
  * than the keepAliveTime (see {@link #getKeepAliveTime(TimeUnit)}).
  * This provides a means of reducing resource consumption when the
@@ -126,36 +135,37 @@
  * TimeUnit)}.  Using a value of {@code Long.MAX_VALUE} {@link
  * TimeUnit#NANOSECONDS} effectively disables idle threads from ever
  * terminating prior to shut down. By default, the keep-alive policy
- * applies only when there are more than corePoolSize threads. But
+ * applies only when there are more than corePoolSize threads, but
  * method {@link #allowCoreThreadTimeOut(boolean)} can be used to
  * apply this time-out policy to core threads as well, so long as the
  * keepAliveTime value is non-zero. </dd>
  *
  * <dt>Queuing</dt>
  *
- * <dd>Any {@link BlockingQueue} may be used to transfer and hold
+ * <dd style="font-family:'DejaVu Sans', Arial, Helvetica, sans-serif">
+ * Any {@link BlockingQueue} may be used to transfer and hold
  * submitted tasks.  The use of this queue interacts with pool sizing:
  *
  * <ul>
  *
- * <li> If fewer than corePoolSize threads are running, the Executor
+ * <li>If fewer than corePoolSize threads are running, the Executor
  * always prefers adding a new thread
- * rather than queuing.</li>
+ * rather than queuing.
  *
- * <li> If corePoolSize or more threads are running, the Executor
+ * <li>If corePoolSize or more threads are running, the Executor
  * always prefers queuing a request rather than adding a new
- * thread.</li>
+ * thread.
  *
- * <li> If a request cannot be queued, a new thread is created unless
+ * <li>If a request cannot be queued, a new thread is created unless
  * this would exceed maximumPoolSize, in which case, the task will be
- * rejected.</li>
+ * rejected.
  *
  * </ul>
  *
  * There are three general strategies for queuing:
  * <ol>
  *
- * <li> <em> Direct handoffs.</em> A good default choice for a work
+ * <li><em> Direct handoffs.</em> A good default choice for a work
  * queue is a {@link SynchronousQueue} that hands off tasks to threads
  * without otherwise holding them. Here, an attempt to queue a task
  * will fail if no threads are immediately available to run it, so a
@@ -164,7 +174,7 @@
  * Direct handoffs generally require unbounded maximumPoolSizes to
  * avoid rejection of new submitted tasks. This in turn admits the
  * possibility of unbounded thread growth when commands continue to
- * arrive on average faster than they can be processed.  </li>
+ * arrive on average faster than they can be processed.
  *
  * <li><em> Unbounded queues.</em> Using an unbounded queue (for
  * example a {@link LinkedBlockingQueue} without a predefined
@@ -177,7 +187,7 @@
  * While this style of queuing can be useful in smoothing out
  * transient bursts of requests, it admits the possibility of
  * unbounded work queue growth when commands continue to arrive on
- * average faster than they can be processed.  </li>
+ * average faster than they can be processed.
  *
  * <li><em>Bounded queues.</em> A bounded queue (for example, an
  * {@link ArrayBlockingQueue}) helps prevent resource exhaustion when
@@ -190,7 +200,7 @@
  * time for more threads than you otherwise allow. Use of small queues
  * generally requires larger pool sizes, which keeps CPUs busier but
  * may encounter unacceptable scheduling overhead, which also
- * decreases throughput.  </li>
+ * decreases throughput.
  *
  * </ol>
  *
@@ -198,7 +208,8 @@
  *
  * <dt>Rejected tasks</dt>
  *
- * <dd>New tasks submitted in method {@link #execute(Runnable)} will be
+ * <dd style="font-family:'DejaVu Sans', Arial, Helvetica, sans-serif">
+ * New tasks submitted in method {@link #execute(Runnable)} will be
  * <em>rejected</em> when the Executor has been shut down, and also when
  * the Executor uses finite bounds for both maximum threads and work queue
  * capacity, and is saturated.  In either case, the {@code execute} method
@@ -209,22 +220,22 @@
  *
  * <ol>
  *
- * <li> In the default {@link ThreadPoolExecutor.AbortPolicy}, the
+ * <li>In the default {@link ThreadPoolExecutor.AbortPolicy}, the
  * handler throws a runtime {@link RejectedExecutionException} upon
- * rejection. </li>
+ * rejection.
  *
- * <li> In {@link ThreadPoolExecutor.CallerRunsPolicy}, the thread
+ * <li>In {@link ThreadPoolExecutor.CallerRunsPolicy}, the thread
  * that invokes {@code execute} itself runs the task. This provides a
  * simple feedback control mechanism that will slow down the rate that
- * new tasks are submitted. </li>
+ * new tasks are submitted.
  *
- * <li> In {@link ThreadPoolExecutor.DiscardPolicy}, a task that
- * cannot be executed is simply dropped.  </li>
+ * <li>In {@link ThreadPoolExecutor.DiscardPolicy}, a task that
+ * cannot be executed is simply dropped.
  *
  * <li>In {@link ThreadPoolExecutor.DiscardOldestPolicy}, if the
  * executor is not shut down, the task at the head of the work queue
  * is dropped, and then execution is retried (which can fail again,
- * causing this to be repeated.) </li>
+ * causing this to be repeated.)
  *
  * </ol>
  *
@@ -235,7 +246,8 @@
  *
  * <dt>Hook methods</dt>
  *
- * <dd>This class provides {@code protected} overridable
+ * <dd style="font-family:'DejaVu Sans', Arial, Helvetica, sans-serif">
+ * This class provides {@code protected} overridable
  * {@link #beforeExecute(Thread, Runnable)} and
  * {@link #afterExecute(Runnable, Throwable)} methods that are called
  * before and after execution of each task.  These can be used to
@@ -245,12 +257,14 @@
  * any special processing that needs to be done once the Executor has
  * fully terminated.
  *
- * <p>If hook or callback methods throw exceptions, internal worker
- * threads may in turn fail and abruptly terminate.</dd>
+ * <p>If hook, callback, or BlockingQueue methods throw exceptions,
+ * internal worker threads may in turn fail, abruptly terminate, and
+ * possibly be replaced.</dd>
  *
  * <dt>Queue maintenance</dt>
  *
- * <dd>Method {@link #getQueue()} allows access to the work queue
+ * <dd style="font-family:'DejaVu Sans', Arial, Helvetica, sans-serif">
+ * Method {@link #getQueue()} allows access to the work queue
  * for purposes of monitoring and debugging.  Use of this method for
  * any other purpose is strongly discouraged.  Two supplied methods,
  * {@link #remove(Runnable)} and {@link #purge} are available to
@@ -259,7 +273,8 @@
  *
  * <dt>Finalization</dt>
  *
- * <dd>A pool that is no longer referenced in a program <em>AND</em>
+ * <dd style="font-family:'DejaVu Sans', Arial, Helvetica, sans-serif">
+ * A pool that is no longer referenced in a program <em>AND</em>
  * has no remaining threads will be {@code shutdown} automatically. If
  * you would like to ensure that unreferenced pools are reclaimed even
  * if users forget to call {@link #shutdown}, then you must arrange
@@ -273,7 +288,7 @@
  * override one or more of the protected hook methods. For example,
  * here is a subclass that adds a simple pause/resume feature:
  *
- *  <pre> {@code
+ * <pre> {@code
  * class PausableThreadPoolExecutor extends ThreadPoolExecutor {
  *   private boolean isPaused;
  *   private ReentrantLock pauseLock = new ReentrantLock();
@@ -462,10 +477,10 @@
      * Set containing all worker threads in pool. Accessed only when
      * holding mainLock.
      */
-    private final HashSet<Worker> workers = new HashSet<Worker>();
+    private final HashSet<Worker> workers = new HashSet<>();
 
     /**
-     * Wait condition to support awaitTermination
+     * Wait condition to support awaitTermination.
      */
     private final Condition termination = mainLock.newCondition();
 
@@ -541,7 +556,7 @@
     private volatile int maximumPoolSize;
 
     /**
-     * The default rejected execution handler
+     * The default rejected execution handler.
      */
     private static final RejectedExecutionHandler defaultHandler =
         new AbortPolicy();
@@ -612,7 +627,7 @@
             this.thread = getThreadFactory().newThread(this);
         }
 
-        /** Delegates main run loop to outer runWorker  */
+        /** Delegates main run loop to outer runWorker. */
         public void run() {
             runWorker(this);
         }
@@ -668,6 +683,7 @@
      *        (but not TIDYING or TERMINATED -- use tryTerminate for that)
      */
     private void advanceRunState(int targetState) {
+        // assert targetState == SHUTDOWN || targetState == STOP;
         for (;;) {
             int c = ctl.get();
             if (runStateAtLeast(c, targetState) ||
@@ -850,7 +866,7 @@
      */
     private List<Runnable> drainQueue() {
         BlockingQueue<Runnable> q = workQueue;
-        ArrayList<Runnable> taskList = new ArrayList<Runnable>();
+        ArrayList<Runnable> taskList = new ArrayList<>();
         q.drainTo(taskList);
         if (!q.isEmpty()) {
             for (Runnable r : q.toArray(new Runnable[0])) {
@@ -1406,7 +1422,7 @@
      *
      * <p>There are no guarantees beyond best-effort attempts to stop
      * processing actively executing tasks.  This implementation
-     * cancels tasks via {@link Thread#interrupt}, so any task that
+     * interrupts tasks via {@link Thread#interrupt}; any task that
      * fails to respond to interrupts may never terminate.
      *
      * @throws SecurityException {@inheritDoc}
@@ -1457,13 +1473,12 @@
         final ReentrantLock mainLock = this.mainLock;
         mainLock.lock();
         try {
-            for (;;) {
-                if (runStateAtLeast(ctl.get(), TERMINATED))
-                    return true;
-                if (nanos <= 0)
+            while (!runStateAtLeast(ctl.get(), TERMINATED)) {
+                if (nanos <= 0L)
                     return false;
                 nanos = termination.awaitNanos(nanos);
             }
+            return true;
         } finally {
             mainLock.unlock();
         }
@@ -1680,11 +1695,13 @@
     }
 
     /**
-     * Sets the time limit for which threads may remain idle before
-     * being terminated.  If there are more than the core number of
-     * threads currently in the pool, after waiting this amount of
-     * time without processing a task, excess threads will be
-     * terminated.  This overrides any value set in the constructor.
+     * Sets the thread keep-alive time, which is the amount of time
+     * that threads may remain idle before being terminated.
+     * Threads that wait this amount of time without processing a
+     * task will be terminated if there are more than the core
+     * number of threads currently in the pool, or if this pool
+     * {@linkplain #allowsCoreThreadTimeOut() allows core thread timeout}.
+     * This overrides any value set in the constructor.
      *
      * @param time the time to wait.  A time value of zero will cause
      *        excess threads to terminate immediately after executing tasks.
@@ -1707,8 +1724,11 @@
 
     /**
      * Returns the thread keep-alive time, which is the amount of time
-     * that threads in excess of the core pool size may remain
-     * idle before being terminated.
+     * that threads may remain idle before being terminated.
+     * Threads that wait this amount of time without processing a
+     * task will be terminated if there are more than the core
+     * number of threads currently in the pool, or if this pool
+     * {@linkplain #allowsCoreThreadTimeOut() allows core thread timeout}.
      *
      * @param unit the desired time unit of the result
      * @return the time limit
@@ -1739,8 +1759,8 @@
      *
      * <p>This method may be useful as one part of a cancellation
      * scheme.  It may fail to remove tasks that have been converted
-     * into other forms before being placed on the internal queue. For
-     * example, a task entered using {@code submit} might be
+     * into other forms before being placed on the internal queue.
+     * For example, a task entered using {@code submit} might be
      * converted into a form that maintains {@code Future} status.
      * However, in such cases, method {@link #purge} may be used to
      * remove those Futures that have been cancelled.
@@ -1912,11 +1932,12 @@
             mainLock.unlock();
         }
         int c = ctl.get();
-        String rs = (runStateLessThan(c, SHUTDOWN) ? "Running" :
-                     (runStateAtLeast(c, TERMINATED) ? "Terminated" :
-                      "Shutting down"));
+        String runState =
+            runStateLessThan(c, SHUTDOWN) ? "Running" :
+            runStateAtLeast(c, TERMINATED) ? "Terminated" :
+            "Shutting down";
         return super.toString() +
-            "[" + rs +
+            "[" + runState +
             ", pool size = " + nworkers +
             ", active threads = " + nactive +
             ", queued tasks = " + workQueue.size() +
@@ -1963,20 +1984,23 @@
      * as in this sample subclass that prints either the direct cause
      * or the underlying exception if a task has been aborted:
      *
-     *  <pre> {@code
+     * <pre> {@code
      * class ExtendedExecutor extends ThreadPoolExecutor {
      *   // ...
      *   protected void afterExecute(Runnable r, Throwable t) {
      *     super.afterExecute(r, t);
-     *     if (t == null && r instanceof Future<?>) {
+     *     if (t == null
+     *         && r instanceof Future<?>
+     *         && ((Future<?>)r).isDone()) {
      *       try {
      *         Object result = ((Future<?>) r).get();
      *       } catch (CancellationException ce) {
-     *           t = ce;
+     *         t = ce;
      *       } catch (ExecutionException ee) {
-     *           t = ee.getCause();
+     *         t = ee.getCause();
      *       } catch (InterruptedException ie) {
-     *           Thread.currentThread().interrupt(); // ignore/reset
+     *         // ignore/reset
+     *         Thread.currentThread().interrupt();
      *       }
      *     }
      *     if (t != null)
--- a/jdk/src/java.base/share/classes/java/util/concurrent/TimeUnit.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/TimeUnit.java	Tue Oct 27 01:45:03 2015 -0400
@@ -52,12 +52,12 @@
  * the following code will timeout in 50 milliseconds if the {@link
  * java.util.concurrent.locks.Lock lock} is not available:
  *
- *  <pre> {@code
+ * <pre> {@code
  * Lock lock = ...;
  * if (lock.tryLock(50L, TimeUnit.MILLISECONDS)) ...}</pre>
  *
  * while this code will timeout in 50 seconds:
- *  <pre> {@code
+ * <pre> {@code
  * Lock lock = ...;
  * if (lock.tryLock(50L, TimeUnit.SECONDS)) ...}</pre>
  *
@@ -70,7 +70,7 @@
  */
 public enum TimeUnit {
     /**
-     * Time unit representing one thousandth of a microsecond
+     * Time unit representing one thousandth of a microsecond.
      */
     NANOSECONDS {
         public long toNanos(long d)   { return d; }
@@ -85,7 +85,7 @@
     },
 
     /**
-     * Time unit representing one thousandth of a millisecond
+     * Time unit representing one thousandth of a millisecond.
      */
     MICROSECONDS {
         public long toNanos(long d)   { return x(d, C1/C0, MAX/(C1/C0)); }
@@ -100,7 +100,7 @@
     },
 
     /**
-     * Time unit representing one thousandth of a second
+     * Time unit representing one thousandth of a second.
      */
     MILLISECONDS {
         public long toNanos(long d)   { return x(d, C2/C0, MAX/(C2/C0)); }
@@ -115,7 +115,7 @@
     },
 
     /**
-     * Time unit representing one second
+     * Time unit representing one second.
      */
     SECONDS {
         public long toNanos(long d)   { return x(d, C3/C0, MAX/(C3/C0)); }
@@ -130,7 +130,7 @@
     },
 
     /**
-     * Time unit representing sixty seconds
+     * Time unit representing sixty seconds.
      * @since 1.6
      */
     MINUTES {
@@ -146,7 +146,7 @@
     },
 
     /**
-     * Time unit representing sixty minutes
+     * Time unit representing sixty minutes.
      * @since 1.6
      */
     HOURS {
@@ -162,7 +162,7 @@
     },
 
     /**
-     * Time unit representing twenty four hours
+     * Time unit representing twenty four hours.
      * @since 1.6
      */
     DAYS {
@@ -193,7 +193,7 @@
      * This has a short name to make above code more readable.
      */
     static long x(long d, long m, long over) {
-        if (d >  over) return Long.MAX_VALUE;
+        if (d > +over) return Long.MAX_VALUE;
         if (d < -over) return Long.MIN_VALUE;
         return d * m;
     }
@@ -329,7 +329,7 @@
      * method (see {@link BlockingQueue#poll BlockingQueue.poll})
      * using:
      *
-     *  <pre> {@code
+     * <pre> {@code
      * public synchronized Object poll(long timeout, TimeUnit unit)
      *     throws InterruptedException {
      *   while (empty) {
--- a/jdk/src/java.base/share/classes/java/util/concurrent/TransferQueue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/TransferQueue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -63,7 +63,7 @@
  *
  * @since 1.7
  * @author Doug Lea
- * @param <E> the type of elements held in this collection
+ * @param <E> the type of elements held in this queue
  */
 public interface TransferQueue<E> extends BlockingQueue<E> {
     /**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Tue Oct 27 01:45:03 2015 -0400
@@ -53,9 +53,9 @@
     private static final long serialVersionUID = -6209656149925076980L;
 
     private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long ARRAY;
     private static final int ABASE;
     private static final int ASHIFT;
-    private static final long ARRAY;
     private final Object[] array; // must have exact type Object[]
 
     static {
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,11 +34,12 @@
  */
 
 package java.util.concurrent.locks;
-import java.util.concurrent.TimeUnit;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
-import sun.misc.Unsafe;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.AbstractQueuedSynchronizer.Node;
 
 /**
  * A version of {@link AbstractQueuedSynchronizer} in
@@ -77,221 +78,6 @@
     protected AbstractQueuedLongSynchronizer() { }
 
     /**
-     * Wait queue node class.
-     *
-     * <p>The wait queue is a variant of a "CLH" (Craig, Landin, and
-     * Hagersten) lock queue. CLH locks are normally used for
-     * spinlocks.  We instead use them for blocking synchronizers, but
-     * use the same basic tactic of holding some of the control
-     * information about a thread in the predecessor of its node.  A
-     * "status" field in each node keeps track of whether a thread
-     * should block.  A node is signalled when its predecessor
-     * releases.  Each node of the queue otherwise serves as a
-     * specific-notification-style monitor holding a single waiting
-     * thread. The status field does NOT control whether threads are
-     * granted locks etc though.  A thread may try to acquire if it is
-     * first in the queue. But being first does not guarantee success;
-     * it only gives the right to contend.  So the currently released
-     * contender thread may need to rewait.
-     *
-     * <p>To enqueue into a CLH lock, you atomically splice it in as new
-     * tail. To dequeue, you just set the head field.
-     * <pre>
-     *      +------+  prev +-----+       +-----+
-     * head |      | <---- |     | <---- |     |  tail
-     *      +------+       +-----+       +-----+
-     * </pre>
-     *
-     * <p>Insertion into a CLH queue requires only a single atomic
-     * operation on "tail", so there is a simple atomic point of
-     * demarcation from unqueued to queued. Similarly, dequeuing
-     * involves only updating the "head". However, it takes a bit
-     * more work for nodes to determine who their successors are,
-     * in part to deal with possible cancellation due to timeouts
-     * and interrupts.
-     *
-     * <p>The "prev" links (not used in original CLH locks), are mainly
-     * needed to handle cancellation. If a node is cancelled, its
-     * successor is (normally) relinked to a non-cancelled
-     * predecessor. For explanation of similar mechanics in the case
-     * of spin locks, see the papers by Scott and Scherer at
-     * http://www.cs.rochester.edu/u/scott/synchronization/
-     *
-     * <p>We also use "next" links to implement blocking mechanics.
-     * The thread id for each node is kept in its own node, so a
-     * predecessor signals the next node to wake up by traversing
-     * next link to determine which thread it is.  Determination of
-     * successor must avoid races with newly queued nodes to set
-     * the "next" fields of their predecessors.  This is solved
-     * when necessary by checking backwards from the atomically
-     * updated "tail" when a node's successor appears to be null.
-     * (Or, said differently, the next-links are an optimization
-     * so that we don't usually need a backward scan.)
-     *
-     * <p>Cancellation introduces some conservatism to the basic
-     * algorithms.  Since we must poll for cancellation of other
-     * nodes, we can miss noticing whether a cancelled node is
-     * ahead or behind us. This is dealt with by always unparking
-     * successors upon cancellation, allowing them to stabilize on
-     * a new predecessor, unless we can identify an uncancelled
-     * predecessor who will carry this responsibility.
-     *
-     * <p>CLH queues need a dummy header node to get started. But
-     * we don't create them on construction, because it would be wasted
-     * effort if there is never contention. Instead, the node
-     * is constructed and head and tail pointers are set upon first
-     * contention.
-     *
-     * <p>Threads waiting on Conditions use the same nodes, but
-     * use an additional link. Conditions only need to link nodes
-     * in simple (non-concurrent) linked queues because they are
-     * only accessed when exclusively held.  Upon await, a node is
-     * inserted into a condition queue.  Upon signal, the node is
-     * transferred to the main queue.  A special value of status
-     * field is used to mark which queue a node is on.
-     *
-     * <p>Thanks go to Dave Dice, Mark Moir, Victor Luchangco, Bill
-     * Scherer and Michael Scott, along with members of JSR-166
-     * expert group, for helpful ideas, discussions, and critiques
-     * on the design of this class.
-     */
-    static final class Node {
-        /** Marker to indicate a node is waiting in shared mode */
-        static final Node SHARED = new Node();
-        /** Marker to indicate a node is waiting in exclusive mode */
-        static final Node EXCLUSIVE = null;
-
-        /** waitStatus value to indicate thread has cancelled */
-        static final int CANCELLED =  1;
-        /** waitStatus value to indicate successor's thread needs unparking */
-        static final int SIGNAL    = -1;
-        /** waitStatus value to indicate thread is waiting on condition */
-        static final int CONDITION = -2;
-        /**
-         * waitStatus value to indicate the next acquireShared should
-         * unconditionally propagate
-         */
-        static final int PROPAGATE = -3;
-
-        /**
-         * Status field, taking on only the values:
-         *   SIGNAL:     The successor of this node is (or will soon be)
-         *               blocked (via park), so the current node must
-         *               unpark its successor when it releases or
-         *               cancels. To avoid races, acquire methods must
-         *               first indicate they need a signal,
-         *               then retry the atomic acquire, and then,
-         *               on failure, block.
-         *   CANCELLED:  This node is cancelled due to timeout or interrupt.
-         *               Nodes never leave this state. In particular,
-         *               a thread with cancelled node never again blocks.
-         *   CONDITION:  This node is currently on a condition queue.
-         *               It will not be used as a sync queue node
-         *               until transferred, at which time the status
-         *               will be set to 0. (Use of this value here has
-         *               nothing to do with the other uses of the
-         *               field, but simplifies mechanics.)
-         *   PROPAGATE:  A releaseShared should be propagated to other
-         *               nodes. This is set (for head node only) in
-         *               doReleaseShared to ensure propagation
-         *               continues, even if other operations have
-         *               since intervened.
-         *   0:          None of the above
-         *
-         * The values are arranged numerically to simplify use.
-         * Non-negative values mean that a node doesn't need to
-         * signal. So, most code doesn't need to check for particular
-         * values, just for sign.
-         *
-         * The field is initialized to 0 for normal sync nodes, and
-         * CONDITION for condition nodes.  It is modified using CAS
-         * (or when possible, unconditional volatile writes).
-         */
-        volatile int waitStatus;
-
-        /**
-         * Link to predecessor node that current node/thread relies on
-         * for checking waitStatus. Assigned during enqueuing, and nulled
-         * out (for sake of GC) only upon dequeuing.  Also, upon
-         * cancellation of a predecessor, we short-circuit while
-         * finding a non-cancelled one, which will always exist
-         * because the head node is never cancelled: A node becomes
-         * head only as a result of successful acquire. A
-         * cancelled thread never succeeds in acquiring, and a thread only
-         * cancels itself, not any other node.
-         */
-        volatile Node prev;
-
-        /**
-         * Link to the successor node that the current node/thread
-         * unparks upon release. Assigned during enqueuing, adjusted
-         * when bypassing cancelled predecessors, and nulled out (for
-         * sake of GC) when dequeued.  The enq operation does not
-         * assign next field of a predecessor until after attachment,
-         * so seeing a null next field does not necessarily mean that
-         * node is at end of queue. However, if a next field appears
-         * to be null, we can scan prev's from the tail to
-         * double-check.  The next field of cancelled nodes is set to
-         * point to the node itself instead of null, to make life
-         * easier for isOnSyncQueue.
-         */
-        volatile Node next;
-
-        /**
-         * The thread that enqueued this node.  Initialized on
-         * construction and nulled out after use.
-         */
-        volatile Thread thread;
-
-        /**
-         * Link to next node waiting on condition, or the special
-         * value SHARED.  Because condition queues are accessed only
-         * when holding in exclusive mode, we just need a simple
-         * linked queue to hold nodes while they are waiting on
-         * conditions. They are then transferred to the queue to
-         * re-acquire. And because conditions can only be exclusive,
-         * we save a field by using special value to indicate shared
-         * mode.
-         */
-        Node nextWaiter;
-
-        /**
-         * Returns true if node is waiting in shared mode.
-         */
-        final boolean isShared() {
-            return nextWaiter == SHARED;
-        }
-
-        /**
-         * Returns previous node, or throws NullPointerException if null.
-         * Use when predecessor cannot be null.  The null check could
-         * be elided, but is present to help the VM.
-         *
-         * @return the predecessor of this node
-         */
-        final Node predecessor() throws NullPointerException {
-            Node p = prev;
-            if (p == null)
-                throw new NullPointerException();
-            else
-                return p;
-        }
-
-        Node() {    // Used to establish initial head or SHARED marker
-        }
-
-        Node(Thread thread, Node mode) {     // Used by addWaiter
-            this.nextWaiter = mode;
-            this.thread = thread;
-        }
-
-        Node(Thread thread, int waitStatus) { // Used by Condition
-            this.waitStatus = waitStatus;
-            this.thread = thread;
-        }
-    }
-
-    /**
      * Head of the wait queue, lazily initialized.  Except for
      * initialization, it is modified only via method setHead.  Note:
      * If head exists, its waitStatus is guaranteed not to be
@@ -325,7 +111,9 @@
      * @param newState the new state value
      */
     protected final void setState(long newState) {
-        state = newState;
+        // Use putLongVolatile instead of ordinary volatile store when
+        // using compareAndSwapLong, for sake of some 32bit systems.
+        U.putLongVolatile(this, STATE, newState);
     }
 
     /**
@@ -340,8 +128,7 @@
      *         value was not equal to the expected value.
      */
     protected final boolean compareAndSetState(long expect, long update) {
-        // See below for intrinsics setup to support this
-        return unsafe.compareAndSwapLong(this, stateOffset, expect, update);
+        return U.compareAndSwapLong(this, STATE, expect, update);
     }
 
     // Queuing utilities
@@ -351,25 +138,24 @@
      * rather than to use timed park. A rough estimate suffices
      * to improve responsiveness with very short timeouts.
      */
-    static final long spinForTimeoutThreshold = 1000L;
+    static final long SPIN_FOR_TIMEOUT_THRESHOLD = 1000L;
 
     /**
      * Inserts node into queue, initializing if necessary. See picture above.
      * @param node the node to insert
      * @return node's predecessor
      */
-    private Node enq(final Node node) {
+    private Node enq(Node node) {
         for (;;) {
-            Node t = tail;
-            if (t == null) { // Must initialize
-                if (compareAndSetHead(new Node()))
-                    tail = head;
+            Node oldTail = tail;
+            if (oldTail != null) {
+                U.putObject(node, Node.PREV, oldTail);
+                if (compareAndSetTail(oldTail, node)) {
+                    oldTail.next = node;
+                    return oldTail;
+                }
             } else {
-                node.prev = t;
-                if (compareAndSetTail(t, node)) {
-                    t.next = node;
-                    return t;
-                }
+                initializeSyncQueue();
             }
         }
     }
@@ -381,18 +167,20 @@
      * @return the new node
      */
     private Node addWaiter(Node mode) {
-        Node node = new Node(Thread.currentThread(), mode);
-        // Try the fast path of enq; backup to full enq on failure
-        Node pred = tail;
-        if (pred != null) {
-            node.prev = pred;
-            if (compareAndSetTail(pred, node)) {
-                pred.next = node;
-                return node;
+        Node node = new Node(mode);
+
+        for (;;) {
+            Node oldTail = tail;
+            if (oldTail != null) {
+                U.putObject(node, Node.PREV, oldTail);
+                if (compareAndSetTail(oldTail, node)) {
+                    oldTail.next = node;
+                    return node;
+                }
+            } else {
+                initializeSyncQueue();
             }
         }
-        enq(node);
-        return node;
     }
 
     /**
@@ -421,7 +209,7 @@
          */
         int ws = node.waitStatus;
         if (ws < 0)
-            compareAndSetWaitStatus(node, ws, 0);
+            node.compareAndSetWaitStatus(ws, 0);
 
         /*
          * Thread to unpark is held in successor, which is normally
@@ -432,9 +220,9 @@
         Node s = node.next;
         if (s == null || s.waitStatus > 0) {
             s = null;
-            for (Node t = tail; t != null && t != node; t = t.prev)
-                if (t.waitStatus <= 0)
-                    s = t;
+            for (Node p = tail; p != node && p != null; p = p.prev)
+                if (p.waitStatus <= 0)
+                    s = p;
         }
         if (s != null)
             LockSupport.unpark(s.thread);
@@ -462,12 +250,12 @@
             if (h != null && h != tail) {
                 int ws = h.waitStatus;
                 if (ws == Node.SIGNAL) {
-                    if (!compareAndSetWaitStatus(h, Node.SIGNAL, 0))
+                    if (!h.compareAndSetWaitStatus(Node.SIGNAL, 0))
                         continue;            // loop to recheck cases
                     unparkSuccessor(h);
                 }
                 else if (ws == 0 &&
-                         !compareAndSetWaitStatus(h, 0, Node.PROPAGATE))
+                         !h.compareAndSetWaitStatus(0, Node.PROPAGATE))
                     continue;                // loop on failed CAS
             }
             if (h == head)                   // loop if head changed
@@ -541,18 +329,18 @@
 
         // If we are the tail, remove ourselves.
         if (node == tail && compareAndSetTail(node, pred)) {
-            compareAndSetNext(pred, predNext, null);
+            pred.compareAndSetNext(predNext, null);
         } else {
             // If successor needs signal, try to set pred's next-link
             // so it will get one. Otherwise wake it up to propagate.
             int ws;
             if (pred != head &&
                 ((ws = pred.waitStatus) == Node.SIGNAL ||
-                 (ws <= 0 && compareAndSetWaitStatus(pred, ws, Node.SIGNAL))) &&
+                 (ws <= 0 && pred.compareAndSetWaitStatus(ws, Node.SIGNAL))) &&
                 pred.thread != null) {
                 Node next = node.next;
                 if (next != null && next.waitStatus <= 0)
-                    compareAndSetNext(pred, predNext, next);
+                    pred.compareAndSetNext(predNext, next);
             } else {
                 unparkSuccessor(node);
             }
@@ -593,7 +381,7 @@
              * need a signal, but don't park yet.  Caller will need to
              * retry to make sure it cannot acquire before parking.
              */
-            compareAndSetWaitStatus(pred, ws, Node.SIGNAL);
+            pred.compareAndSetWaitStatus(ws, Node.SIGNAL);
         }
         return false;
     }
@@ -606,7 +394,7 @@
     }
 
     /**
-     * Convenience method to park and then check if interrupted
+     * Convenience method to park and then check if interrupted.
      *
      * @return {@code true} if interrupted
      */
@@ -633,7 +421,6 @@
      * @return {@code true} if interrupted while waiting
      */
     final boolean acquireQueued(final Node node, long arg) {
-        boolean failed = true;
         try {
             boolean interrupted = false;
             for (;;) {
@@ -641,16 +428,15 @@
                 if (p == head && tryAcquire(arg)) {
                     setHead(node);
                     p.next = null; // help GC
-                    failed = false;
                     return interrupted;
                 }
                 if (shouldParkAfterFailedAcquire(p, node) &&
                     parkAndCheckInterrupt())
                     interrupted = true;
             }
-        } finally {
-            if (failed)
-                cancelAcquire(node);
+        } catch (Throwable t) {
+            cancelAcquire(node);
+            throw t;
         }
     }
 
@@ -661,23 +447,21 @@
     private void doAcquireInterruptibly(long arg)
         throws InterruptedException {
         final Node node = addWaiter(Node.EXCLUSIVE);
-        boolean failed = true;
         try {
             for (;;) {
                 final Node p = node.predecessor();
                 if (p == head && tryAcquire(arg)) {
                     setHead(node);
                     p.next = null; // help GC
-                    failed = false;
                     return;
                 }
                 if (shouldParkAfterFailedAcquire(p, node) &&
                     parkAndCheckInterrupt())
                     throw new InterruptedException();
             }
-        } finally {
-            if (failed)
-                cancelAcquire(node);
+        } catch (Throwable t) {
+            cancelAcquire(node);
+            throw t;
         }
     }
 
@@ -694,28 +478,28 @@
             return false;
         final long deadline = System.nanoTime() + nanosTimeout;
         final Node node = addWaiter(Node.EXCLUSIVE);
-        boolean failed = true;
         try {
             for (;;) {
                 final Node p = node.predecessor();
                 if (p == head && tryAcquire(arg)) {
                     setHead(node);
                     p.next = null; // help GC
-                    failed = false;
                     return true;
                 }
                 nanosTimeout = deadline - System.nanoTime();
-                if (nanosTimeout <= 0L)
+                if (nanosTimeout <= 0L) {
+                    cancelAcquire(node);
                     return false;
+                }
                 if (shouldParkAfterFailedAcquire(p, node) &&
-                    nanosTimeout > spinForTimeoutThreshold)
+                    nanosTimeout > SPIN_FOR_TIMEOUT_THRESHOLD)
                     LockSupport.parkNanos(this, nanosTimeout);
                 if (Thread.interrupted())
                     throw new InterruptedException();
             }
-        } finally {
-            if (failed)
-                cancelAcquire(node);
+        } catch (Throwable t) {
+            cancelAcquire(node);
+            throw t;
         }
     }
 
@@ -725,7 +509,6 @@
      */
     private void doAcquireShared(long arg) {
         final Node node = addWaiter(Node.SHARED);
-        boolean failed = true;
         try {
             boolean interrupted = false;
             for (;;) {
@@ -737,7 +520,6 @@
                         p.next = null; // help GC
                         if (interrupted)
                             selfInterrupt();
-                        failed = false;
                         return;
                     }
                 }
@@ -745,9 +527,9 @@
                     parkAndCheckInterrupt())
                     interrupted = true;
             }
-        } finally {
-            if (failed)
-                cancelAcquire(node);
+        } catch (Throwable t) {
+            cancelAcquire(node);
+            throw t;
         }
     }
 
@@ -758,7 +540,6 @@
     private void doAcquireSharedInterruptibly(long arg)
         throws InterruptedException {
         final Node node = addWaiter(Node.SHARED);
-        boolean failed = true;
         try {
             for (;;) {
                 final Node p = node.predecessor();
@@ -767,7 +548,6 @@
                     if (r >= 0) {
                         setHeadAndPropagate(node, r);
                         p.next = null; // help GC
-                        failed = false;
                         return;
                     }
                 }
@@ -775,9 +555,9 @@
                     parkAndCheckInterrupt())
                     throw new InterruptedException();
             }
-        } finally {
-            if (failed)
-                cancelAcquire(node);
+        } catch (Throwable t) {
+            cancelAcquire(node);
+            throw t;
         }
     }
 
@@ -794,7 +574,6 @@
             return false;
         final long deadline = System.nanoTime() + nanosTimeout;
         final Node node = addWaiter(Node.SHARED);
-        boolean failed = true;
         try {
             for (;;) {
                 final Node p = node.predecessor();
@@ -803,22 +582,23 @@
                     if (r >= 0) {
                         setHeadAndPropagate(node, r);
                         p.next = null; // help GC
-                        failed = false;
                         return true;
                     }
                 }
                 nanosTimeout = deadline - System.nanoTime();
-                if (nanosTimeout <= 0L)
+                if (nanosTimeout <= 0L) {
+                    cancelAcquire(node);
                     return false;
+                }
                 if (shouldParkAfterFailedAcquire(p, node) &&
-                    nanosTimeout > spinForTimeoutThreshold)
+                    nanosTimeout > SPIN_FOR_TIMEOUT_THRESHOLD)
                     LockSupport.parkNanos(this, nanosTimeout);
                 if (Thread.interrupted())
                     throw new InterruptedException();
             }
-        } finally {
-            if (failed)
-                cancelAcquire(node);
+        } catch (Throwable t) {
+            cancelAcquire(node);
+            throw t;
         }
     }
 
@@ -1170,7 +950,7 @@
     }
 
     /**
-     * Version of getFirstQueuedThread called when fastpath fails
+     * Version of getFirstQueuedThread called when fastpath fails.
      */
     private Thread fullGetFirstQueuedThread() {
         /*
@@ -1250,7 +1030,7 @@
      *
      * <p>An invocation of this method is equivalent to (but may be
      * more efficient than):
-     *  <pre> {@code
+     * <pre> {@code
      * getFirstQueuedThread() != Thread.currentThread() &&
      * hasQueuedThreads()}</pre>
      *
@@ -1270,7 +1050,7 @@
      * tryAcquire} method for a fair, reentrant, exclusive mode
      * synchronizer might look like this:
      *
-     *  <pre> {@code
+     * <pre> {@code
      * protected boolean tryAcquire(int arg) {
      *   if (isHeldExclusively()) {
      *     // A reentrant acquire; increment hold count
@@ -1306,8 +1086,7 @@
      * acquire.  The value is only an estimate because the number of
      * threads may change dynamically while this method traverses
      * internal data structures.  This method is designed for use in
-     * monitoring system state, not for synchronization
-     * control.
+     * monitoring system state, not for synchronization control.
      *
      * @return the estimated number of threads waiting to acquire
      */
@@ -1332,7 +1111,7 @@
      * @return the collection of threads
      */
     public final Collection<Thread> getQueuedThreads() {
-        ArrayList<Thread> list = new ArrayList<Thread>();
+        ArrayList<Thread> list = new ArrayList<>();
         for (Node p = tail; p != null; p = p.prev) {
             Thread t = p.thread;
             if (t != null)
@@ -1350,7 +1129,7 @@
      * @return the collection of threads
      */
     public final Collection<Thread> getExclusiveQueuedThreads() {
-        ArrayList<Thread> list = new ArrayList<Thread>();
+        ArrayList<Thread> list = new ArrayList<>();
         for (Node p = tail; p != null; p = p.prev) {
             if (!p.isShared()) {
                 Thread t = p.thread;
@@ -1370,7 +1149,7 @@
      * @return the collection of threads
      */
     public final Collection<Thread> getSharedQueuedThreads() {
-        ArrayList<Thread> list = new ArrayList<Thread>();
+        ArrayList<Thread> list = new ArrayList<>();
         for (Node p = tail; p != null; p = p.prev) {
             if (p.isShared()) {
                 Thread t = p.thread;
@@ -1391,10 +1170,9 @@
      * @return a string identifying this synchronizer, as well as its state
      */
     public String toString() {
-        long s = getState();
-        String q  = hasQueuedThreads() ? "non" : "";
-        return super.toString() +
-            "[State = " + s + ", " + q + "empty queue]";
+        return super.toString()
+            + "[State = " + getState() + ", "
+            + (hasQueuedThreads() ? "non" : "") + "empty queue]";
     }
 
 
@@ -1428,13 +1206,15 @@
      * @return true if present
      */
     private boolean findNodeFromTail(Node node) {
-        Node t = tail;
-        for (;;) {
-            if (t == node)
+        // We check for node first, since it's likely to be at or near tail.
+        // tail is known to be non-null, so we could re-order to "save"
+        // one null check, but we leave it this way to help the VM.
+        for (Node p = tail;;) {
+            if (p == node)
                 return true;
-            if (t == null)
+            if (p == null)
                 return false;
-            t = t.prev;
+            p = p.prev;
         }
     }
 
@@ -1449,7 +1229,7 @@
         /*
          * If cannot change waitStatus, the node has been cancelled.
          */
-        if (!compareAndSetWaitStatus(node, Node.CONDITION, 0))
+        if (!node.compareAndSetWaitStatus(Node.CONDITION, 0))
             return false;
 
         /*
@@ -1460,7 +1240,7 @@
          */
         Node p = enq(node);
         int ws = p.waitStatus;
-        if (ws > 0 || !compareAndSetWaitStatus(p, ws, Node.SIGNAL))
+        if (ws > 0 || !p.compareAndSetWaitStatus(ws, Node.SIGNAL))
             LockSupport.unpark(node.thread);
         return true;
     }
@@ -1473,7 +1253,7 @@
      * @return true if cancelled before the node was signalled
      */
     final boolean transferAfterCancelledWait(Node node) {
-        if (compareAndSetWaitStatus(node, Node.CONDITION, 0)) {
+        if (node.compareAndSetWaitStatus(Node.CONDITION, 0)) {
             enq(node);
             return true;
         }
@@ -1495,18 +1275,14 @@
      * @return previous sync state
      */
     final long fullyRelease(Node node) {
-        boolean failed = true;
         try {
             long savedState = getState();
-            if (release(savedState)) {
-                failed = false;
+            if (release(savedState))
                 return savedState;
-            } else {
-                throw new IllegalMonitorStateException();
-            }
-        } finally {
-            if (failed)
-                node.waitStatus = Node.CANCELLED;
+            throw new IllegalMonitorStateException();
+        } catch (Throwable t) {
+            node.waitStatus = Node.CANCELLED;
+            throw t;
         }
     }
 
@@ -1551,8 +1327,8 @@
      * given condition associated with this synchronizer. Note that
      * because timeouts and interrupts may occur at any time, the
      * estimate serves only as an upper bound on the actual number of
-     * waiters.  This method is designed for use in monitoring of the
-     * system state, not for synchronization control.
+     * waiters.  This method is designed for use in monitoring system
+     * state, not for synchronization control.
      *
      * @param condition the condition
      * @return the estimated number of waiting threads
@@ -1632,7 +1408,9 @@
                 unlinkCancelledWaiters();
                 t = lastWaiter;
             }
-            Node node = new Node(Thread.currentThread(), Node.CONDITION);
+
+            Node node = new Node(Node.CONDITION);
+
             if (t == null)
                 firstWaiter = node;
             else
@@ -1740,12 +1518,12 @@
         /**
          * Implements uninterruptible condition wait.
          * <ol>
-         * <li> Save lock state returned by {@link #getState}.
-         * <li> Invoke {@link #release} with saved state as argument,
-         *      throwing IllegalMonitorStateException if it fails.
-         * <li> Block until signalled.
-         * <li> Reacquire by invoking specialized version of
-         *      {@link #acquire} with saved state as argument.
+         * <li>Save lock state returned by {@link #getState}.
+         * <li>Invoke {@link #release} with saved state as argument,
+         *     throwing IllegalMonitorStateException if it fails.
+         * <li>Block until signalled.
+         * <li>Reacquire by invoking specialized version of
+         *     {@link #acquire} with saved state as argument.
          * </ol>
          */
         public final void awaitUninterruptibly() {
@@ -1799,14 +1577,14 @@
         /**
          * Implements interruptible condition wait.
          * <ol>
-         * <li> If current thread is interrupted, throw InterruptedException.
-         * <li> Save lock state returned by {@link #getState}.
-         * <li> Invoke {@link #release} with saved state as argument,
-         *      throwing IllegalMonitorStateException if it fails.
-         * <li> Block until signalled or interrupted.
-         * <li> Reacquire by invoking specialized version of
-         *      {@link #acquire} with saved state as argument.
-         * <li> If interrupted while blocked in step 4, throw InterruptedException.
+         * <li>If current thread is interrupted, throw InterruptedException.
+         * <li>Save lock state returned by {@link #getState}.
+         * <li>Invoke {@link #release} with saved state as argument,
+         *     throwing IllegalMonitorStateException if it fails.
+         * <li>Block until signalled or interrupted.
+         * <li>Reacquire by invoking specialized version of
+         *     {@link #acquire} with saved state as argument.
+         * <li>If interrupted while blocked in step 4, throw InterruptedException.
          * </ol>
          */
         public final void await() throws InterruptedException {
@@ -1831,30 +1609,33 @@
         /**
          * Implements timed condition wait.
          * <ol>
-         * <li> If current thread is interrupted, throw InterruptedException.
-         * <li> Save lock state returned by {@link #getState}.
-         * <li> Invoke {@link #release} with saved state as argument,
-         *      throwing IllegalMonitorStateException if it fails.
-         * <li> Block until signalled, interrupted, or timed out.
-         * <li> Reacquire by invoking specialized version of
-         *      {@link #acquire} with saved state as argument.
-         * <li> If interrupted while blocked in step 4, throw InterruptedException.
+         * <li>If current thread is interrupted, throw InterruptedException.
+         * <li>Save lock state returned by {@link #getState}.
+         * <li>Invoke {@link #release} with saved state as argument,
+         *     throwing IllegalMonitorStateException if it fails.
+         * <li>Block until signalled, interrupted, or timed out.
+         * <li>Reacquire by invoking specialized version of
+         *     {@link #acquire} with saved state as argument.
+         * <li>If interrupted while blocked in step 4, throw InterruptedException.
          * </ol>
          */
         public final long awaitNanos(long nanosTimeout)
                 throws InterruptedException {
             if (Thread.interrupted())
                 throw new InterruptedException();
+            // We don't check for nanosTimeout <= 0L here, to allow
+            // awaitNanos(0) as a way to "yield the lock".
+            final long deadline = System.nanoTime() + nanosTimeout;
+            long initialNanos = nanosTimeout;
             Node node = addConditionWaiter();
             long savedState = fullyRelease(node);
-            final long deadline = System.nanoTime() + nanosTimeout;
             int interruptMode = 0;
             while (!isOnSyncQueue(node)) {
                 if (nanosTimeout <= 0L) {
                     transferAfterCancelledWait(node);
                     break;
                 }
-                if (nanosTimeout >= spinForTimeoutThreshold)
+                if (nanosTimeout >= SPIN_FOR_TIMEOUT_THRESHOLD)
                     LockSupport.parkNanos(this, nanosTimeout);
                 if ((interruptMode = checkInterruptWhileWaiting(node)) != 0)
                     break;
@@ -1866,21 +1647,22 @@
                 unlinkCancelledWaiters();
             if (interruptMode != 0)
                 reportInterruptAfterWait(interruptMode);
-            return deadline - System.nanoTime();
+            long remaining = deadline - System.nanoTime(); // avoid overflow
+            return (remaining <= initialNanos) ? remaining : Long.MIN_VALUE;
         }
 
         /**
          * Implements absolute timed condition wait.
          * <ol>
-         * <li> If current thread is interrupted, throw InterruptedException.
-         * <li> Save lock state returned by {@link #getState}.
-         * <li> Invoke {@link #release} with saved state as argument,
-         *      throwing IllegalMonitorStateException if it fails.
-         * <li> Block until signalled, interrupted, or timed out.
-         * <li> Reacquire by invoking specialized version of
-         *      {@link #acquire} with saved state as argument.
-         * <li> If interrupted while blocked in step 4, throw InterruptedException.
-         * <li> If timed out while blocked in step 4, return false, else true.
+         * <li>If current thread is interrupted, throw InterruptedException.
+         * <li>Save lock state returned by {@link #getState}.
+         * <li>Invoke {@link #release} with saved state as argument,
+         *     throwing IllegalMonitorStateException if it fails.
+         * <li>Block until signalled, interrupted, or timed out.
+         * <li>Reacquire by invoking specialized version of
+         *     {@link #acquire} with saved state as argument.
+         * <li>If interrupted while blocked in step 4, throw InterruptedException.
+         * <li>If timed out while blocked in step 4, return false, else true.
          * </ol>
          */
         public final boolean awaitUntil(Date deadline)
@@ -1893,7 +1675,7 @@
             boolean timedout = false;
             int interruptMode = 0;
             while (!isOnSyncQueue(node)) {
-                if (System.currentTimeMillis() > abstime) {
+                if (System.currentTimeMillis() >= abstime) {
                     timedout = transferAfterCancelledWait(node);
                     break;
                 }
@@ -1913,15 +1695,15 @@
         /**
          * Implements timed condition wait.
          * <ol>
-         * <li> If current thread is interrupted, throw InterruptedException.
-         * <li> Save lock state returned by {@link #getState}.
-         * <li> Invoke {@link #release} with saved state as argument,
-         *      throwing IllegalMonitorStateException if it fails.
-         * <li> Block until signalled, interrupted, or timed out.
-         * <li> Reacquire by invoking specialized version of
-         *      {@link #acquire} with saved state as argument.
-         * <li> If interrupted while blocked in step 4, throw InterruptedException.
-         * <li> If timed out while blocked in step 4, return false, else true.
+         * <li>If current thread is interrupted, throw InterruptedException.
+         * <li>Save lock state returned by {@link #getState}.
+         * <li>Invoke {@link #release} with saved state as argument,
+         *     throwing IllegalMonitorStateException if it fails.
+         * <li>Block until signalled, interrupted, or timed out.
+         * <li>Reacquire by invoking specialized version of
+         *     {@link #acquire} with saved state as argument.
+         * <li>If interrupted while blocked in step 4, throw InterruptedException.
+         * <li>If timed out while blocked in step 4, return false, else true.
          * </ol>
          */
         public final boolean await(long time, TimeUnit unit)
@@ -1929,9 +1711,11 @@
             long nanosTimeout = unit.toNanos(time);
             if (Thread.interrupted())
                 throw new InterruptedException();
+            // We don't check for nanosTimeout <= 0L here, to allow
+            // await(0, unit) as a way to "yield the lock".
+            final long deadline = System.nanoTime() + nanosTimeout;
             Node node = addConditionWaiter();
             long savedState = fullyRelease(node);
-            final long deadline = System.nanoTime() + nanosTimeout;
             boolean timedout = false;
             int interruptMode = 0;
             while (!isOnSyncQueue(node)) {
@@ -1939,7 +1723,7 @@
                     timedout = transferAfterCancelledWait(node);
                     break;
                 }
-                if (nanosTimeout >= spinForTimeoutThreshold)
+                if (nanosTimeout >= SPIN_FOR_TIMEOUT_THRESHOLD)
                     LockSupport.parkNanos(this, nanosTimeout);
                 if ((interruptMode = checkInterruptWhileWaiting(node)) != 0)
                     break;
@@ -2016,7 +1800,7 @@
         protected final Collection<Thread> getWaitingThreads() {
             if (!isHeldExclusively())
                 throw new IllegalMonitorStateException();
-            ArrayList<Thread> list = new ArrayList<Thread>();
+            ArrayList<Thread> list = new ArrayList<>();
             for (Node w = firstWaiter; w != null; w = w.nextWaiter) {
                 if (w.waitStatus == Node.CONDITION) {
                     Thread t = w.thread;
@@ -2037,59 +1821,40 @@
      * are at it, we do the same for other CASable fields (which could
      * otherwise be done with atomic field updaters).
      */
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final long stateOffset;
-    private static final long headOffset;
-    private static final long tailOffset;
-    private static final long waitStatusOffset;
-    private static final long nextOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long STATE;
+    private static final long HEAD;
+    private static final long TAIL;
 
     static {
         try {
-            stateOffset = unsafe.objectFieldOffset
+            STATE = U.objectFieldOffset
                 (AbstractQueuedLongSynchronizer.class.getDeclaredField("state"));
-            headOffset = unsafe.objectFieldOffset
+            HEAD = U.objectFieldOffset
                 (AbstractQueuedLongSynchronizer.class.getDeclaredField("head"));
-            tailOffset = unsafe.objectFieldOffset
+            TAIL = U.objectFieldOffset
                 (AbstractQueuedLongSynchronizer.class.getDeclaredField("tail"));
-            waitStatusOffset = unsafe.objectFieldOffset
-                (Node.class.getDeclaredField("waitStatus"));
-            nextOffset = unsafe.objectFieldOffset
-                (Node.class.getDeclaredField("next"));
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
 
-        } catch (Exception ex) { throw new Error(ex); }
+        // Reduce the risk of rare disastrous classloading in first call to
+        // LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
+        Class<?> ensureLoaded = LockSupport.class;
     }
 
     /**
-     * CAS head field. Used only by enq.
+     * Initializes head and tail fields on first contention.
      */
-    private final boolean compareAndSetHead(Node update) {
-        return unsafe.compareAndSwapObject(this, headOffset, null, update);
-    }
-
-    /**
-     * CAS tail field. Used only by enq.
-     */
-    private final boolean compareAndSetTail(Node expect, Node update) {
-        return unsafe.compareAndSwapObject(this, tailOffset, expect, update);
+    private final void initializeSyncQueue() {
+        if (U.compareAndSwapObject(this, HEAD, null, new Node()))
+            tail = head;
     }
 
     /**
-     * CAS waitStatus field of a node.
+     * CASes tail field.
      */
-    private static final boolean compareAndSetWaitStatus(Node node,
-                                                         int expect,
-                                                         int update) {
-        return unsafe.compareAndSwapInt(node, waitStatusOffset,
-                                        expect, update);
-    }
-
-    /**
-     * CAS next field of a node.
-     */
-    private static final boolean compareAndSetNext(Node node,
-                                                   Node expect,
-                                                   Node update) {
-        return unsafe.compareAndSwapObject(node, nextOffset, expect, update);
+    private final boolean compareAndSetTail(Node expect, Node update) {
+        return U.compareAndSwapObject(this, TAIL, expect, update);
     }
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,11 +34,11 @@
  */
 
 package java.util.concurrent.locks;
-import java.util.concurrent.TimeUnit;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
-import sun.misc.Unsafe;
+import java.util.concurrent.TimeUnit;
 
 /**
  * Provides a framework for implementing blocking locks and related
@@ -110,11 +110,11 @@
  * #setState} and/or {@link #compareAndSetState}:
  *
  * <ul>
- * <li> {@link #tryAcquire}
- * <li> {@link #tryRelease}
- * <li> {@link #tryAcquireShared}
- * <li> {@link #tryReleaseShared}
- * <li> {@link #isHeldExclusively}
+ * <li>{@link #tryAcquire}
+ * <li>{@link #tryRelease}
+ * <li>{@link #tryAcquireShared}
+ * <li>{@link #tryReleaseShared}
+ * <li>{@link #isHeldExclusively}
  * </ul>
  *
  * Each of these methods by default throws {@link
@@ -195,7 +195,7 @@
  * It also supports conditions and exposes
  * one of the instrumentation methods:
  *
- *  <pre> {@code
+ * <pre> {@code
  * class Mutex implements Lock, java.io.Serializable {
  *
  *   // Our internal helper class
@@ -259,7 +259,7 @@
  * fire. Because a latch is non-exclusive, it uses the {@code shared}
  * acquire and release methods.
  *
- *  <pre> {@code
+ * <pre> {@code
  * class BooleanLatch {
  *
  *   private static class Sync extends AbstractQueuedSynchronizer {
@@ -383,15 +383,15 @@
         /** Marker to indicate a node is waiting in exclusive mode */
         static final Node EXCLUSIVE = null;
 
-        /** waitStatus value to indicate thread has cancelled */
+        /** waitStatus value to indicate thread has cancelled. */
         static final int CANCELLED =  1;
-        /** waitStatus value to indicate successor's thread needs unparking */
+        /** waitStatus value to indicate successor's thread needs unparking. */
         static final int SIGNAL    = -1;
-        /** waitStatus value to indicate thread is waiting on condition */
+        /** waitStatus value to indicate thread is waiting on condition. */
         static final int CONDITION = -2;
         /**
          * waitStatus value to indicate the next acquireShared should
-         * unconditionally propagate
+         * unconditionally propagate.
          */
         static final int PROPAGATE = -3;
 
@@ -499,17 +499,49 @@
                 return p;
         }
 
-        Node() {    // Used to establish initial head or SHARED marker
+        /** Establishes initial head or SHARED marker. */
+        Node() {}
+
+        /** Constructor used by addWaiter. */
+        Node(Node nextWaiter) {
+            this.nextWaiter = nextWaiter;
+            U.putObject(this, THREAD, Thread.currentThread());
+        }
+
+        /** Constructor used by addConditionWaiter. */
+        Node(int waitStatus) {
+            U.putInt(this, WAITSTATUS, waitStatus);
+            U.putObject(this, THREAD, Thread.currentThread());
+        }
+
+        /** CASes waitStatus field. */
+        final boolean compareAndSetWaitStatus(int expect, int update) {
+            return U.compareAndSwapInt(this, WAITSTATUS, expect, update);
         }
 
-        Node(Thread thread, Node mode) {     // Used by addWaiter
-            this.nextWaiter = mode;
-            this.thread = thread;
+        /** CASes next field. */
+        final boolean compareAndSetNext(Node expect, Node update) {
+            return U.compareAndSwapObject(this, NEXT, expect, update);
         }
 
-        Node(Thread thread, int waitStatus) { // Used by Condition
-            this.waitStatus = waitStatus;
-            this.thread = thread;
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+        private static final long NEXT;
+        static final long PREV;
+        private static final long THREAD;
+        private static final long WAITSTATUS;
+        static {
+            try {
+                NEXT = U.objectFieldOffset
+                    (Node.class.getDeclaredField("next"));
+                PREV = U.objectFieldOffset
+                    (Node.class.getDeclaredField("prev"));
+                THREAD = U.objectFieldOffset
+                    (Node.class.getDeclaredField("thread"));
+                WAITSTATUS = U.objectFieldOffset
+                    (Node.class.getDeclaredField("waitStatus"));
+            } catch (ReflectiveOperationException e) {
+                throw new Error(e);
+            }
         }
     }
 
@@ -562,8 +594,7 @@
      *         value was not equal to the expected value.
      */
     protected final boolean compareAndSetState(int expect, int update) {
-        // See below for intrinsics setup to support this
-        return unsafe.compareAndSwapInt(this, stateOffset, expect, update);
+        return U.compareAndSwapInt(this, STATE, expect, update);
     }
 
     // Queuing utilities
@@ -573,25 +604,24 @@
      * rather than to use timed park. A rough estimate suffices
      * to improve responsiveness with very short timeouts.
      */
-    static final long spinForTimeoutThreshold = 1000L;
+    static final long SPIN_FOR_TIMEOUT_THRESHOLD = 1000L;
 
     /**
      * Inserts node into queue, initializing if necessary. See picture above.
      * @param node the node to insert
      * @return node's predecessor
      */
-    private Node enq(final Node node) {
+    private Node enq(Node node) {
         for (;;) {
-            Node t = tail;
-            if (t == null) { // Must initialize
-                if (compareAndSetHead(new Node()))
-                    tail = head;
+            Node oldTail = tail;
+            if (oldTail != null) {
+                U.putObject(node, Node.PREV, oldTail);
+                if (compareAndSetTail(oldTail, node)) {
+                    oldTail.next = node;
+                    return oldTail;
+                }
             } else {
-                node.prev = t;
-                if (compareAndSetTail(t, node)) {
-                    t.next = node;
-                    return t;
-                }
+                initializeSyncQueue();
             }
         }
     }
@@ -603,18 +633,20 @@
      * @return the new node
      */
     private Node addWaiter(Node mode) {
-        Node node = new Node(Thread.currentThread(), mode);
-        // Try the fast path of enq; backup to full enq on failure
-        Node pred = tail;
-        if (pred != null) {
-            node.prev = pred;
-            if (compareAndSetTail(pred, node)) {
-                pred.next = node;
-                return node;
+        Node node = new Node(mode);
+
+        for (;;) {
+            Node oldTail = tail;
+            if (oldTail != null) {
+                U.putObject(node, Node.PREV, oldTail);
+                if (compareAndSetTail(oldTail, node)) {
+                    oldTail.next = node;
+                    return node;
+                }
+            } else {
+                initializeSyncQueue();
             }
         }
-        enq(node);
-        return node;
     }
 
     /**
@@ -643,7 +675,7 @@
          */
         int ws = node.waitStatus;
         if (ws < 0)
-            compareAndSetWaitStatus(node, ws, 0);
+            node.compareAndSetWaitStatus(ws, 0);
 
         /*
          * Thread to unpark is held in successor, which is normally
@@ -654,9 +686,9 @@
         Node s = node.next;
         if (s == null || s.waitStatus > 0) {
             s = null;
-            for (Node t = tail; t != null && t != node; t = t.prev)
-                if (t.waitStatus <= 0)
-                    s = t;
+            for (Node p = tail; p != node && p != null; p = p.prev)
+                if (p.waitStatus <= 0)
+                    s = p;
         }
         if (s != null)
             LockSupport.unpark(s.thread);
@@ -684,12 +716,12 @@
             if (h != null && h != tail) {
                 int ws = h.waitStatus;
                 if (ws == Node.SIGNAL) {
-                    if (!compareAndSetWaitStatus(h, Node.SIGNAL, 0))
+                    if (!h.compareAndSetWaitStatus(Node.SIGNAL, 0))
                         continue;            // loop to recheck cases
                     unparkSuccessor(h);
                 }
                 else if (ws == 0 &&
-                         !compareAndSetWaitStatus(h, 0, Node.PROPAGATE))
+                         !h.compareAndSetWaitStatus(0, Node.PROPAGATE))
                     continue;                // loop on failed CAS
             }
             if (h == head)                   // loop if head changed
@@ -763,18 +795,18 @@
 
         // If we are the tail, remove ourselves.
         if (node == tail && compareAndSetTail(node, pred)) {
-            compareAndSetNext(pred, predNext, null);
+            pred.compareAndSetNext(predNext, null);
         } else {
             // If successor needs signal, try to set pred's next-link
             // so it will get one. Otherwise wake it up to propagate.
             int ws;
             if (pred != head &&
                 ((ws = pred.waitStatus) == Node.SIGNAL ||
-                 (ws <= 0 && compareAndSetWaitStatus(pred, ws, Node.SIGNAL))) &&
+                 (ws <= 0 && pred.compareAndSetWaitStatus(ws, Node.SIGNAL))) &&
                 pred.thread != null) {
                 Node next = node.next;
                 if (next != null && next.waitStatus <= 0)
-                    compareAndSetNext(pred, predNext, next);
+                    pred.compareAndSetNext(predNext, next);
             } else {
                 unparkSuccessor(node);
             }
@@ -815,7 +847,7 @@
              * need a signal, but don't park yet.  Caller will need to
              * retry to make sure it cannot acquire before parking.
              */
-            compareAndSetWaitStatus(pred, ws, Node.SIGNAL);
+            pred.compareAndSetWaitStatus(ws, Node.SIGNAL);
         }
         return false;
     }
@@ -828,7 +860,7 @@
     }
 
     /**
-     * Convenience method to park and then check if interrupted
+     * Convenience method to park and then check if interrupted.
      *
      * @return {@code true} if interrupted
      */
@@ -855,7 +887,6 @@
      * @return {@code true} if interrupted while waiting
      */
     final boolean acquireQueued(final Node node, int arg) {
-        boolean failed = true;
         try {
             boolean interrupted = false;
             for (;;) {
@@ -863,16 +894,15 @@
                 if (p == head && tryAcquire(arg)) {
                     setHead(node);
                     p.next = null; // help GC
-                    failed = false;
                     return interrupted;
                 }
                 if (shouldParkAfterFailedAcquire(p, node) &&
                     parkAndCheckInterrupt())
                     interrupted = true;
             }
-        } finally {
-            if (failed)
-                cancelAcquire(node);
+        } catch (Throwable t) {
+            cancelAcquire(node);
+            throw t;
         }
     }
 
@@ -883,23 +913,21 @@
     private void doAcquireInterruptibly(int arg)
         throws InterruptedException {
         final Node node = addWaiter(Node.EXCLUSIVE);
-        boolean failed = true;
         try {
             for (;;) {
                 final Node p = node.predecessor();
                 if (p == head && tryAcquire(arg)) {
                     setHead(node);
                     p.next = null; // help GC
-                    failed = false;
                     return;
                 }
                 if (shouldParkAfterFailedAcquire(p, node) &&
                     parkAndCheckInterrupt())
                     throw new InterruptedException();
             }
-        } finally {
-            if (failed)
-                cancelAcquire(node);
+        } catch (Throwable t) {
+            cancelAcquire(node);
+            throw t;
         }
     }
 
@@ -916,28 +944,28 @@
             return false;
         final long deadline = System.nanoTime() + nanosTimeout;
         final Node node = addWaiter(Node.EXCLUSIVE);
-        boolean failed = true;
         try {
             for (;;) {
                 final Node p = node.predecessor();
                 if (p == head && tryAcquire(arg)) {
                     setHead(node);
                     p.next = null; // help GC
-                    failed = false;
                     return true;
                 }
                 nanosTimeout = deadline - System.nanoTime();
-                if (nanosTimeout <= 0L)
+                if (nanosTimeout <= 0L) {
+                    cancelAcquire(node);
                     return false;
+                }
                 if (shouldParkAfterFailedAcquire(p, node) &&
-                    nanosTimeout > spinForTimeoutThreshold)
+                    nanosTimeout > SPIN_FOR_TIMEOUT_THRESHOLD)
                     LockSupport.parkNanos(this, nanosTimeout);
                 if (Thread.interrupted())
                     throw new InterruptedException();
             }
-        } finally {
-            if (failed)
-                cancelAcquire(node);
+        } catch (Throwable t) {
+            cancelAcquire(node);
+            throw t;
         }
     }
 
@@ -947,7 +975,6 @@
      */
     private void doAcquireShared(int arg) {
         final Node node = addWaiter(Node.SHARED);
-        boolean failed = true;
         try {
             boolean interrupted = false;
             for (;;) {
@@ -959,7 +986,6 @@
                         p.next = null; // help GC
                         if (interrupted)
                             selfInterrupt();
-                        failed = false;
                         return;
                     }
                 }
@@ -967,9 +993,9 @@
                     parkAndCheckInterrupt())
                     interrupted = true;
             }
-        } finally {
-            if (failed)
-                cancelAcquire(node);
+        } catch (Throwable t) {
+            cancelAcquire(node);
+            throw t;
         }
     }
 
@@ -980,7 +1006,6 @@
     private void doAcquireSharedInterruptibly(int arg)
         throws InterruptedException {
         final Node node = addWaiter(Node.SHARED);
-        boolean failed = true;
         try {
             for (;;) {
                 final Node p = node.predecessor();
@@ -989,7 +1014,6 @@
                     if (r >= 0) {
                         setHeadAndPropagate(node, r);
                         p.next = null; // help GC
-                        failed = false;
                         return;
                     }
                 }
@@ -997,9 +1021,9 @@
                     parkAndCheckInterrupt())
                     throw new InterruptedException();
             }
-        } finally {
-            if (failed)
-                cancelAcquire(node);
+        } catch (Throwable t) {
+            cancelAcquire(node);
+            throw t;
         }
     }
 
@@ -1016,7 +1040,6 @@
             return false;
         final long deadline = System.nanoTime() + nanosTimeout;
         final Node node = addWaiter(Node.SHARED);
-        boolean failed = true;
         try {
             for (;;) {
                 final Node p = node.predecessor();
@@ -1025,22 +1048,23 @@
                     if (r >= 0) {
                         setHeadAndPropagate(node, r);
                         p.next = null; // help GC
-                        failed = false;
                         return true;
                     }
                 }
                 nanosTimeout = deadline - System.nanoTime();
-                if (nanosTimeout <= 0L)
+                if (nanosTimeout <= 0L) {
+                    cancelAcquire(node);
                     return false;
+                }
                 if (shouldParkAfterFailedAcquire(p, node) &&
-                    nanosTimeout > spinForTimeoutThreshold)
+                    nanosTimeout > SPIN_FOR_TIMEOUT_THRESHOLD)
                     LockSupport.parkNanos(this, nanosTimeout);
                 if (Thread.interrupted())
                     throw new InterruptedException();
             }
-        } finally {
-            if (failed)
-                cancelAcquire(node);
+        } catch (Throwable t) {
+            cancelAcquire(node);
+            throw t;
         }
     }
 
@@ -1392,7 +1416,7 @@
     }
 
     /**
-     * Version of getFirstQueuedThread called when fastpath fails
+     * Version of getFirstQueuedThread called when fastpath fails.
      */
     private Thread fullGetFirstQueuedThread() {
         /*
@@ -1472,7 +1496,7 @@
      *
      * <p>An invocation of this method is equivalent to (but may be
      * more efficient than):
-     *  <pre> {@code
+     * <pre> {@code
      * getFirstQueuedThread() != Thread.currentThread() &&
      * hasQueuedThreads()}</pre>
      *
@@ -1492,7 +1516,7 @@
      * tryAcquire} method for a fair, reentrant, exclusive mode
      * synchronizer might look like this:
      *
-     *  <pre> {@code
+     * <pre> {@code
      * protected boolean tryAcquire(int arg) {
      *   if (isHeldExclusively()) {
      *     // A reentrant acquire; increment hold count
@@ -1528,8 +1552,7 @@
      * acquire.  The value is only an estimate because the number of
      * threads may change dynamically while this method traverses
      * internal data structures.  This method is designed for use in
-     * monitoring system state, not for synchronization
-     * control.
+     * monitoring system state, not for synchronization control.
      *
      * @return the estimated number of threads waiting to acquire
      */
@@ -1554,7 +1577,7 @@
      * @return the collection of threads
      */
     public final Collection<Thread> getQueuedThreads() {
-        ArrayList<Thread> list = new ArrayList<Thread>();
+        ArrayList<Thread> list = new ArrayList<>();
         for (Node p = tail; p != null; p = p.prev) {
             Thread t = p.thread;
             if (t != null)
@@ -1572,7 +1595,7 @@
      * @return the collection of threads
      */
     public final Collection<Thread> getExclusiveQueuedThreads() {
-        ArrayList<Thread> list = new ArrayList<Thread>();
+        ArrayList<Thread> list = new ArrayList<>();
         for (Node p = tail; p != null; p = p.prev) {
             if (!p.isShared()) {
                 Thread t = p.thread;
@@ -1592,7 +1615,7 @@
      * @return the collection of threads
      */
     public final Collection<Thread> getSharedQueuedThreads() {
-        ArrayList<Thread> list = new ArrayList<Thread>();
+        ArrayList<Thread> list = new ArrayList<>();
         for (Node p = tail; p != null; p = p.prev) {
             if (p.isShared()) {
                 Thread t = p.thread;
@@ -1613,10 +1636,9 @@
      * @return a string identifying this synchronizer, as well as its state
      */
     public String toString() {
-        int s = getState();
-        String q  = hasQueuedThreads() ? "non" : "";
-        return super.toString() +
-            "[State = " + s + ", " + q + "empty queue]";
+        return super.toString()
+            + "[State = " + getState() + ", "
+            + (hasQueuedThreads() ? "non" : "") + "empty queue]";
     }
 
 
@@ -1650,13 +1672,15 @@
      * @return true if present
      */
     private boolean findNodeFromTail(Node node) {
-        Node t = tail;
-        for (;;) {
-            if (t == node)
+        // We check for node first, since it's likely to be at or near tail.
+        // tail is known to be non-null, so we could re-order to "save"
+        // one null check, but we leave it this way to help the VM.
+        for (Node p = tail;;) {
+            if (p == node)
                 return true;
-            if (t == null)
+            if (p == null)
                 return false;
-            t = t.prev;
+            p = p.prev;
         }
     }
 
@@ -1671,7 +1695,7 @@
         /*
          * If cannot change waitStatus, the node has been cancelled.
          */
-        if (!compareAndSetWaitStatus(node, Node.CONDITION, 0))
+        if (!node.compareAndSetWaitStatus(Node.CONDITION, 0))
             return false;
 
         /*
@@ -1682,7 +1706,7 @@
          */
         Node p = enq(node);
         int ws = p.waitStatus;
-        if (ws > 0 || !compareAndSetWaitStatus(p, ws, Node.SIGNAL))
+        if (ws > 0 || !p.compareAndSetWaitStatus(ws, Node.SIGNAL))
             LockSupport.unpark(node.thread);
         return true;
     }
@@ -1695,7 +1719,7 @@
      * @return true if cancelled before the node was signalled
      */
     final boolean transferAfterCancelledWait(Node node) {
-        if (compareAndSetWaitStatus(node, Node.CONDITION, 0)) {
+        if (node.compareAndSetWaitStatus(Node.CONDITION, 0)) {
             enq(node);
             return true;
         }
@@ -1717,18 +1741,14 @@
      * @return previous sync state
      */
     final int fullyRelease(Node node) {
-        boolean failed = true;
         try {
             int savedState = getState();
-            if (release(savedState)) {
-                failed = false;
+            if (release(savedState))
                 return savedState;
-            } else {
-                throw new IllegalMonitorStateException();
-            }
-        } finally {
-            if (failed)
-                node.waitStatus = Node.CANCELLED;
+            throw new IllegalMonitorStateException();
+        } catch (Throwable t) {
+            node.waitStatus = Node.CANCELLED;
+            throw t;
         }
     }
 
@@ -1773,8 +1793,8 @@
      * given condition associated with this synchronizer. Note that
      * because timeouts and interrupts may occur at any time, the
      * estimate serves only as an upper bound on the actual number of
-     * waiters.  This method is designed for use in monitoring of the
-     * system state, not for synchronization control.
+     * waiters.  This method is designed for use in monitoring system
+     * state, not for synchronization control.
      *
      * @param condition the condition
      * @return the estimated number of waiting threads
@@ -1852,7 +1872,9 @@
                 unlinkCancelledWaiters();
                 t = lastWaiter;
             }
-            Node node = new Node(Thread.currentThread(), Node.CONDITION);
+
+            Node node = new Node(Node.CONDITION);
+
             if (t == null)
                 firstWaiter = node;
             else
@@ -1960,12 +1982,12 @@
         /**
          * Implements uninterruptible condition wait.
          * <ol>
-         * <li> Save lock state returned by {@link #getState}.
-         * <li> Invoke {@link #release} with saved state as argument,
-         *      throwing IllegalMonitorStateException if it fails.
-         * <li> Block until signalled.
-         * <li> Reacquire by invoking specialized version of
-         *      {@link #acquire} with saved state as argument.
+         * <li>Save lock state returned by {@link #getState}.
+         * <li>Invoke {@link #release} with saved state as argument,
+         *     throwing IllegalMonitorStateException if it fails.
+         * <li>Block until signalled.
+         * <li>Reacquire by invoking specialized version of
+         *     {@link #acquire} with saved state as argument.
          * </ol>
          */
         public final void awaitUninterruptibly() {
@@ -2019,14 +2041,14 @@
         /**
          * Implements interruptible condition wait.
          * <ol>
-         * <li> If current thread is interrupted, throw InterruptedException.
-         * <li> Save lock state returned by {@link #getState}.
-         * <li> Invoke {@link #release} with saved state as argument,
-         *      throwing IllegalMonitorStateException if it fails.
-         * <li> Block until signalled or interrupted.
-         * <li> Reacquire by invoking specialized version of
-         *      {@link #acquire} with saved state as argument.
-         * <li> If interrupted while blocked in step 4, throw InterruptedException.
+         * <li>If current thread is interrupted, throw InterruptedException.
+         * <li>Save lock state returned by {@link #getState}.
+         * <li>Invoke {@link #release} with saved state as argument,
+         *     throwing IllegalMonitorStateException if it fails.
+         * <li>Block until signalled or interrupted.
+         * <li>Reacquire by invoking specialized version of
+         *     {@link #acquire} with saved state as argument.
+         * <li>If interrupted while blocked in step 4, throw InterruptedException.
          * </ol>
          */
         public final void await() throws InterruptedException {
@@ -2051,30 +2073,33 @@
         /**
          * Implements timed condition wait.
          * <ol>
-         * <li> If current thread is interrupted, throw InterruptedException.
-         * <li> Save lock state returned by {@link #getState}.
-         * <li> Invoke {@link #release} with saved state as argument,
-         *      throwing IllegalMonitorStateException if it fails.
-         * <li> Block until signalled, interrupted, or timed out.
-         * <li> Reacquire by invoking specialized version of
-         *      {@link #acquire} with saved state as argument.
-         * <li> If interrupted while blocked in step 4, throw InterruptedException.
+         * <li>If current thread is interrupted, throw InterruptedException.
+         * <li>Save lock state returned by {@link #getState}.
+         * <li>Invoke {@link #release} with saved state as argument,
+         *     throwing IllegalMonitorStateException if it fails.
+         * <li>Block until signalled, interrupted, or timed out.
+         * <li>Reacquire by invoking specialized version of
+         *     {@link #acquire} with saved state as argument.
+         * <li>If interrupted while blocked in step 4, throw InterruptedException.
          * </ol>
          */
         public final long awaitNanos(long nanosTimeout)
                 throws InterruptedException {
             if (Thread.interrupted())
                 throw new InterruptedException();
+            // We don't check for nanosTimeout <= 0L here, to allow
+            // awaitNanos(0) as a way to "yield the lock".
+            final long deadline = System.nanoTime() + nanosTimeout;
+            long initialNanos = nanosTimeout;
             Node node = addConditionWaiter();
             int savedState = fullyRelease(node);
-            final long deadline = System.nanoTime() + nanosTimeout;
             int interruptMode = 0;
             while (!isOnSyncQueue(node)) {
                 if (nanosTimeout <= 0L) {
                     transferAfterCancelledWait(node);
                     break;
                 }
-                if (nanosTimeout >= spinForTimeoutThreshold)
+                if (nanosTimeout >= SPIN_FOR_TIMEOUT_THRESHOLD)
                     LockSupport.parkNanos(this, nanosTimeout);
                 if ((interruptMode = checkInterruptWhileWaiting(node)) != 0)
                     break;
@@ -2086,21 +2111,22 @@
                 unlinkCancelledWaiters();
             if (interruptMode != 0)
                 reportInterruptAfterWait(interruptMode);
-            return deadline - System.nanoTime();
+            long remaining = deadline - System.nanoTime(); // avoid overflow
+            return (remaining <= initialNanos) ? remaining : Long.MIN_VALUE;
         }
 
         /**
          * Implements absolute timed condition wait.
          * <ol>
-         * <li> If current thread is interrupted, throw InterruptedException.
-         * <li> Save lock state returned by {@link #getState}.
-         * <li> Invoke {@link #release} with saved state as argument,
-         *      throwing IllegalMonitorStateException if it fails.
-         * <li> Block until signalled, interrupted, or timed out.
-         * <li> Reacquire by invoking specialized version of
-         *      {@link #acquire} with saved state as argument.
-         * <li> If interrupted while blocked in step 4, throw InterruptedException.
-         * <li> If timed out while blocked in step 4, return false, else true.
+         * <li>If current thread is interrupted, throw InterruptedException.
+         * <li>Save lock state returned by {@link #getState}.
+         * <li>Invoke {@link #release} with saved state as argument,
+         *     throwing IllegalMonitorStateException if it fails.
+         * <li>Block until signalled, interrupted, or timed out.
+         * <li>Reacquire by invoking specialized version of
+         *     {@link #acquire} with saved state as argument.
+         * <li>If interrupted while blocked in step 4, throw InterruptedException.
+         * <li>If timed out while blocked in step 4, return false, else true.
          * </ol>
          */
         public final boolean awaitUntil(Date deadline)
@@ -2113,7 +2139,7 @@
             boolean timedout = false;
             int interruptMode = 0;
             while (!isOnSyncQueue(node)) {
-                if (System.currentTimeMillis() > abstime) {
+                if (System.currentTimeMillis() >= abstime) {
                     timedout = transferAfterCancelledWait(node);
                     break;
                 }
@@ -2133,15 +2159,15 @@
         /**
          * Implements timed condition wait.
          * <ol>
-         * <li> If current thread is interrupted, throw InterruptedException.
-         * <li> Save lock state returned by {@link #getState}.
-         * <li> Invoke {@link #release} with saved state as argument,
-         *      throwing IllegalMonitorStateException if it fails.
-         * <li> Block until signalled, interrupted, or timed out.
-         * <li> Reacquire by invoking specialized version of
-         *      {@link #acquire} with saved state as argument.
-         * <li> If interrupted while blocked in step 4, throw InterruptedException.
-         * <li> If timed out while blocked in step 4, return false, else true.
+         * <li>If current thread is interrupted, throw InterruptedException.
+         * <li>Save lock state returned by {@link #getState}.
+         * <li>Invoke {@link #release} with saved state as argument,
+         *     throwing IllegalMonitorStateException if it fails.
+         * <li>Block until signalled, interrupted, or timed out.
+         * <li>Reacquire by invoking specialized version of
+         *     {@link #acquire} with saved state as argument.
+         * <li>If interrupted while blocked in step 4, throw InterruptedException.
+         * <li>If timed out while blocked in step 4, return false, else true.
          * </ol>
          */
         public final boolean await(long time, TimeUnit unit)
@@ -2149,9 +2175,11 @@
             long nanosTimeout = unit.toNanos(time);
             if (Thread.interrupted())
                 throw new InterruptedException();
+            // We don't check for nanosTimeout <= 0L here, to allow
+            // await(0, unit) as a way to "yield the lock".
+            final long deadline = System.nanoTime() + nanosTimeout;
             Node node = addConditionWaiter();
             int savedState = fullyRelease(node);
-            final long deadline = System.nanoTime() + nanosTimeout;
             boolean timedout = false;
             int interruptMode = 0;
             while (!isOnSyncQueue(node)) {
@@ -2159,7 +2187,7 @@
                     timedout = transferAfterCancelledWait(node);
                     break;
                 }
-                if (nanosTimeout >= spinForTimeoutThreshold)
+                if (nanosTimeout >= SPIN_FOR_TIMEOUT_THRESHOLD)
                     LockSupport.parkNanos(this, nanosTimeout);
                 if ((interruptMode = checkInterruptWhileWaiting(node)) != 0)
                     break;
@@ -2236,7 +2264,7 @@
         protected final Collection<Thread> getWaitingThreads() {
             if (!isHeldExclusively())
                 throw new IllegalMonitorStateException();
-            ArrayList<Thread> list = new ArrayList<Thread>();
+            ArrayList<Thread> list = new ArrayList<>();
             for (Node w = firstWaiter; w != null; w = w.nextWaiter) {
                 if (w.waitStatus == Node.CONDITION) {
                     Thread t = w.thread;
@@ -2257,59 +2285,40 @@
      * are at it, we do the same for other CASable fields (which could
      * otherwise be done with atomic field updaters).
      */
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final long stateOffset;
-    private static final long headOffset;
-    private static final long tailOffset;
-    private static final long waitStatusOffset;
-    private static final long nextOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long STATE;
+    private static final long HEAD;
+    private static final long TAIL;
 
     static {
         try {
-            stateOffset = unsafe.objectFieldOffset
+            STATE = U.objectFieldOffset
                 (AbstractQueuedSynchronizer.class.getDeclaredField("state"));
-            headOffset = unsafe.objectFieldOffset
+            HEAD = U.objectFieldOffset
                 (AbstractQueuedSynchronizer.class.getDeclaredField("head"));
-            tailOffset = unsafe.objectFieldOffset
+            TAIL = U.objectFieldOffset
                 (AbstractQueuedSynchronizer.class.getDeclaredField("tail"));
-            waitStatusOffset = unsafe.objectFieldOffset
-                (Node.class.getDeclaredField("waitStatus"));
-            nextOffset = unsafe.objectFieldOffset
-                (Node.class.getDeclaredField("next"));
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
 
-        } catch (Exception ex) { throw new Error(ex); }
+        // Reduce the risk of rare disastrous classloading in first call to
+        // LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
+        Class<?> ensureLoaded = LockSupport.class;
     }
 
     /**
-     * CAS head field. Used only by enq.
+     * Initializes head and tail fields on first contention.
      */
-    private final boolean compareAndSetHead(Node update) {
-        return unsafe.compareAndSwapObject(this, headOffset, null, update);
-    }
-
-    /**
-     * CAS tail field. Used only by enq.
-     */
-    private final boolean compareAndSetTail(Node expect, Node update) {
-        return unsafe.compareAndSwapObject(this, tailOffset, expect, update);
+    private final void initializeSyncQueue() {
+        if (U.compareAndSwapObject(this, HEAD, null, new Node()))
+            tail = head;
     }
 
     /**
-     * CAS waitStatus field of a node.
+     * CASes tail field.
      */
-    private static final boolean compareAndSetWaitStatus(Node node,
-                                                         int expect,
-                                                         int update) {
-        return unsafe.compareAndSwapInt(node, waitStatusOffset,
-                                        expect, update);
-    }
-
-    /**
-     * CAS next field of a node.
-     */
-    private static final boolean compareAndSetNext(Node node,
-                                                   Node expect,
-                                                   Node update) {
-        return unsafe.compareAndSwapObject(node, nextOffset, expect, update);
+    private final boolean compareAndSetTail(Node expect, Node update) {
+        return U.compareAndSwapObject(this, TAIL, expect, update);
     }
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/Condition.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/Condition.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,8 +34,9 @@
  */
 
 package java.util.concurrent.locks;
+
+import java.util.Date;
 import java.util.concurrent.TimeUnit;
-import java.util.Date;
 
 /**
  * {@code Condition} factors out the {@code Object} monitor
@@ -126,7 +127,7 @@
  * <p>Note that {@code Condition} instances are just normal objects and can
  * themselves be used as the target in a {@code synchronized} statement,
  * and can have their own monitor {@link Object#wait wait} and
- * {@link Object#notify notification} methods invoked.
+ * {@link Object#notify notify} methods invoked.
  * Acquiring the monitor lock of a {@code Condition} instance, or using its
  * monitor methods, has no specified relationship with acquiring the
  * {@link Lock} associated with that {@code Condition} or the use of its
@@ -308,7 +309,7 @@
      * condition still does not hold. Typical uses of this method take
      * the following form:
      *
-     *  <pre> {@code
+     * <pre> {@code
      * boolean aMethod(long timeout, TimeUnit unit) {
      *   long nanos = unit.toNanos(timeout);
      *   lock.lock();
@@ -361,7 +362,7 @@
      * Causes the current thread to wait until it is signalled or interrupted,
      * or the specified waiting time elapses. This method is behaviorally
      * equivalent to:
-     *  <pre> {@code awaitNanos(unit.toNanos(time)) > 0}</pre>
+     * <pre> {@code awaitNanos(unit.toNanos(time)) > 0}</pre>
      *
      * @param time the maximum time to wait
      * @param unit the time unit of the {@code time} argument
@@ -410,7 +411,7 @@
      *
      * <p>The return value indicates whether the deadline has elapsed,
      * which can be used as follows:
-     *  <pre> {@code
+     * <pre> {@code
      * boolean aMethod(Date deadline) {
      *   boolean stillWaiting = true;
      *   lock.lock();
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/Lock.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/Lock.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent.locks;
+
 import java.util.concurrent.TimeUnit;
 
 /**
@@ -77,7 +78,7 @@
  * methods and statements. In most cases, the following idiom
  * should be used:
  *
- *  <pre> {@code
+ * <pre> {@code
  * Lock l = ...;
  * l.lock();
  * try {
@@ -121,8 +122,9 @@
  * <p>All {@code Lock} implementations <em>must</em> enforce the same
  * memory synchronization semantics as provided by the built-in monitor
  * lock, as described in
- * <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.4">
- * The Java Language Specification (17.4 Memory Model)</a>:
+ * <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-17.html#jls-17.4">
+ * Chapter 17 of
+ * <cite>The Java&trade; Language Specification</cite></a>:
  * <ul>
  * <li>A successful {@code lock} operation has the same memory
  * synchronization effects as a successful <em>Lock</em> action.
@@ -240,7 +242,7 @@
      * immediately with the value {@code false}.
      *
      * <p>A typical usage idiom for this method would be:
-     *  <pre> {@code
+     * <pre> {@code
      * Lock lock = ...;
      * if (lock.tryLock()) {
      *   try {
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,7 +34,6 @@
  */
 
 package java.util.concurrent.locks;
-import sun.misc.Unsafe;
 
 /**
  * Basic thread blocking primitives for creating locks and other
@@ -47,6 +46,10 @@
  * it <em>may</em> block.  A call to {@code unpark} makes the permit
  * available, if it was not already available. (Unlike with Semaphores
  * though, permits do not accumulate. There is at most one.)
+ * Reliable usage requires the use of volatile (or atomic) variables
+ * to control when to park or unpark.  Orderings of calls to these
+ * methods are maintained with respect to volatile variable accesses,
+ * but not necessarily non-volatile variable accesses.
  *
  * <p>Methods {@code park} and {@code unpark} provide efficient
  * means of blocking and unblocking threads that do not encounter the
@@ -77,7 +80,7 @@
  * useful for most concurrency control applications.  The {@code park}
  * method is designed for use only in constructions of the form:
  *
- *  <pre> {@code
+ * <pre> {@code
  * while (!canProceed()) { ... LockSupport.park(this); }}</pre>
  *
  * where neither {@code canProceed} nor any other actions prior to the
@@ -87,11 +90,11 @@
  *
  * <p><b>Sample Usage.</b> Here is a sketch of a first-in-first-out
  * non-reentrant lock class:
- *  <pre> {@code
+ * <pre> {@code
  * class FIFOMutex {
  *   private final AtomicBoolean locked = new AtomicBoolean(false);
  *   private final Queue<Thread> waiters
- *     = new ConcurrentLinkedQueue<Thread>();
+ *     = new ConcurrentLinkedQueue<>();
  *
  *   public void lock() {
  *     boolean wasInterrupted = false;
@@ -122,7 +125,7 @@
 
     private static void setBlocker(Thread t, Object arg) {
         // Even though volatile, hotspot doesn't need a write barrier here.
-        UNSAFE.putObject(t, parkBlockerOffset, arg);
+        U.putObject(t, PARKBLOCKER, arg);
     }
 
     /**
@@ -138,7 +141,7 @@
      */
     public static void unpark(Thread thread) {
         if (thread != null)
-            UNSAFE.unpark(thread);
+            U.unpark(thread);
     }
 
     /**
@@ -172,7 +175,7 @@
     public static void park(Object blocker) {
         Thread t = Thread.currentThread();
         setBlocker(t, blocker);
-        UNSAFE.park(false, 0L);
+        U.park(false, 0L);
         setBlocker(t, null);
     }
 
@@ -212,7 +215,7 @@
         if (nanos > 0) {
             Thread t = Thread.currentThread();
             setBlocker(t, blocker);
-            UNSAFE.park(false, nanos);
+            U.park(false, nanos);
             setBlocker(t, null);
         }
     }
@@ -253,7 +256,7 @@
     public static void parkUntil(Object blocker, long deadline) {
         Thread t = Thread.currentThread();
         setBlocker(t, blocker);
-        UNSAFE.park(true, deadline);
+        U.park(true, deadline);
         setBlocker(t, null);
     }
 
@@ -272,7 +275,7 @@
     public static Object getBlocker(Thread t) {
         if (t == null)
             throw new NullPointerException();
-        return UNSAFE.getObjectVolatile(t, parkBlockerOffset);
+        return U.getObjectVolatile(t, PARKBLOCKER);
     }
 
     /**
@@ -301,7 +304,7 @@
      * for example, the interrupt status of the thread upon return.
      */
     public static void park() {
-        UNSAFE.park(false, 0L);
+        U.park(false, 0L);
     }
 
     /**
@@ -335,7 +338,7 @@
      */
     public static void parkNanos(long nanos) {
         if (nanos > 0)
-            UNSAFE.park(false, nanos);
+            U.park(false, nanos);
     }
 
     /**
@@ -369,7 +372,7 @@
      *        to wait until
      */
     public static void parkUntil(long deadline) {
-        UNSAFE.park(true, deadline);
+        U.park(true, deadline);
     }
 
     /**
@@ -379,36 +382,30 @@
     static final int nextSecondarySeed() {
         int r;
         Thread t = Thread.currentThread();
-        if ((r = UNSAFE.getInt(t, SECONDARY)) != 0) {
+        if ((r = U.getInt(t, SECONDARY)) != 0) {
             r ^= r << 13;   // xorshift
             r ^= r >>> 17;
             r ^= r << 5;
         }
         else if ((r = java.util.concurrent.ThreadLocalRandom.current().nextInt()) == 0)
             r = 1; // avoid zero
-        UNSAFE.putInt(t, SECONDARY, r);
+        U.putInt(t, SECONDARY, r);
         return r;
     }
 
     // Hotspot implementation via intrinsics API
-    private static final sun.misc.Unsafe UNSAFE;
-    private static final long parkBlockerOffset;
-    private static final long SEED;
-    private static final long PROBE;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long PARKBLOCKER;
     private static final long SECONDARY;
     static {
         try {
-            UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class<?> tk = Thread.class;
-            parkBlockerOffset = UNSAFE.objectFieldOffset
-                (tk.getDeclaredField("parkBlocker"));
-            SEED = UNSAFE.objectFieldOffset
-                (tk.getDeclaredField("threadLocalRandomSeed"));
-            PROBE = UNSAFE.objectFieldOffset
-                (tk.getDeclaredField("threadLocalRandomProbe"));
-            SECONDARY = UNSAFE.objectFieldOffset
-                (tk.getDeclaredField("threadLocalRandomSecondarySeed"));
-        } catch (Exception ex) { throw new Error(ex); }
+            PARKBLOCKER = U.objectFieldOffset
+                (Thread.class.getDeclaredField("parkBlocker"));
+            SECONDARY = U.objectFieldOffset
+                (Thread.class.getDeclaredField("threadLocalRandomSecondarySeed"));
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
     }
 
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReadWriteLock.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReadWriteLock.java	Tue Oct 27 01:45:03 2015 -0400
@@ -38,9 +38,9 @@
 /**
  * A {@code ReadWriteLock} maintains a pair of associated {@link
  * Lock locks}, one for read-only operations and one for writing.
- * The {@link #readLock read lock} may be held simultaneously by
- * multiple reader threads, so long as there are no writers.  The
- * {@link #writeLock write lock} is exclusive.
+ * The {@linkplain #readLock read lock} may be held simultaneously
+ * by multiple reader threads, so long as there are no writers.
+ * The {@linkplain #writeLock write lock} is exclusive.
  *
  * <p>All {@code ReadWriteLock} implementations must guarantee that
  * the memory synchronization effects of {@code writeLock} operations
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantLock.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantLock.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,8 +34,9 @@
  */
 
 package java.util.concurrent.locks;
+
+import java.util.Collection;
 import java.util.concurrent.TimeUnit;
-import java.util.Collection;
 
 /**
  * A reentrant mutual exclusion {@link Lock} with the same basic
@@ -72,7 +73,7 @@
  * follow a call to {@code lock} with a {@code try} block, most
  * typically in a before/after construction such as:
  *
- *  <pre> {@code
+ * <pre> {@code
  * class X {
  *   private final ReentrantLock lock = new ReentrantLock();
  *   // ...
@@ -378,7 +379,7 @@
      * method. If you want a timed {@code tryLock} that does permit barging on
      * a fair lock then combine the timed and un-timed forms together:
      *
-     *  <pre> {@code
+     * <pre> {@code
      * if (lock.tryLock() ||
      *     lock.tryLock(timeout, unit)) {
      *   ...
@@ -484,7 +485,7 @@
      * InterruptedException} will be thrown, and the thread's
      * interrupted status will be cleared.
      *
-     * <li> Waiting threads are signalled in FIFO order.
+     * <li>Waiting threads are signalled in FIFO order.
      *
      * <li>The ordering of lock reacquisition for threads returning
      * from waiting methods is the same as for threads initially
@@ -511,7 +512,7 @@
      * not be entered with the lock already held then we can assert that
      * fact:
      *
-     *  <pre> {@code
+     * <pre> {@code
      * class X {
      *   ReentrantLock lock = new ReentrantLock();
      *   // ...
@@ -541,7 +542,7 @@
      * debugging and testing. For example, a method that should only be
      * called while a lock is held can assert that this is the case:
      *
-     *  <pre> {@code
+     * <pre> {@code
      * class X {
      *   ReentrantLock lock = new ReentrantLock();
      *   // ...
@@ -555,7 +556,7 @@
      * <p>It can also be used to ensure that a reentrant lock is used
      * in a non-reentrant manner, for example:
      *
-     *  <pre> {@code
+     * <pre> {@code
      * class X {
      *   ReentrantLock lock = new ReentrantLock();
      *   // ...
@@ -646,12 +647,11 @@
     }
 
     /**
-     * Returns an estimate of the number of threads waiting to
-     * acquire this lock.  The value is only an estimate because the number of
+     * Returns an estimate of the number of threads waiting to acquire
+     * this lock.  The value is only an estimate because the number of
      * threads may change dynamically while this method traverses
      * internal data structures.  This method is designed for use in
-     * monitoring of the system state, not for synchronization
-     * control.
+     * monitoring system state, not for synchronization control.
      *
      * @return the estimated number of threads waiting for this lock
      */
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,8 +34,9 @@
  */
 
 package java.util.concurrent.locks;
+
+import java.util.Collection;
 import java.util.concurrent.TimeUnit;
-import java.util.Collection;
 
 /**
  * An implementation of {@link ReadWriteLock} supporting similar
@@ -51,14 +52,16 @@
  *
  * <dl>
  * <dt><b><i>Non-fair mode (default)</i></b>
- * <dd>When constructed as non-fair (the default), the order of entry
+ * <dd style="font-family:'DejaVu Sans', Arial, Helvetica, sans-serif">
+ * When constructed as non-fair (the default), the order of entry
  * to the read and write lock is unspecified, subject to reentrancy
  * constraints.  A nonfair lock that is continuously contended may
  * indefinitely postpone one or more reader or writer threads, but
  * will normally have higher throughput than a fair lock.
  *
  * <dt><b><i>Fair mode</i></b>
- * <dd>When constructed as fair, threads contend for entry using an
+ * <dd style="font-family:'DejaVu Sans', Arial, Helvetica, sans-serif">
+ * When constructed as fair, threads contend for entry using an
  * approximately arrival-order policy. When the currently held lock
  * is released, either the longest-waiting single writer thread will
  * be assigned the write lock, or if there is a group of reader threads
@@ -173,9 +176,9 @@
  * is a class using a TreeMap that is expected to be large and
  * concurrently accessed.
  *
- *  <pre> {@code
+ * <pre> {@code
  * class RWDictionary {
- *   private final Map<String, Data> m = new TreeMap<String, Data>();
+ *   private final Map<String, Data> m = new TreeMap<>();
  *   private final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock();
  *   private final Lock r = rwl.readLock();
  *   private final Lock w = rwl.writeLock();
@@ -263,17 +266,17 @@
         static final int MAX_COUNT      = (1 << SHARED_SHIFT) - 1;
         static final int EXCLUSIVE_MASK = (1 << SHARED_SHIFT) - 1;
 
-        /** Returns the number of shared holds represented in count  */
+        /** Returns the number of shared holds represented in count. */
         static int sharedCount(int c)    { return c >>> SHARED_SHIFT; }
-        /** Returns the number of exclusive holds represented in count  */
+        /** Returns the number of exclusive holds represented in count. */
         static int exclusiveCount(int c) { return c & EXCLUSIVE_MASK; }
 
         /**
          * A counter for per-thread read hold counts.
-         * Maintained as a ThreadLocal; cached in cachedHoldCounter
+         * Maintained as a ThreadLocal; cached in cachedHoldCounter.
          */
         static final class HoldCounter {
-            int count = 0;
+            int count;          // initially 0
             // Use id, not reference, to avoid garbage retention
             final long tid = getThreadId(Thread.currentThread());
         }
@@ -330,7 +333,7 @@
          * <p>This allows tracking of read holds for uncontended read
          * locks to be very cheap.
          */
-        private transient Thread firstReader = null;
+        private transient Thread firstReader;
         private transient int firstReaderHoldCount;
 
         Sync() {
@@ -703,7 +706,7 @@
         private final Sync sync;
 
         /**
-         * Constructor for use by subclasses
+         * Constructor for use by subclasses.
          *
          * @param lock the outer lock object
          * @throws NullPointerException if the lock is null
@@ -814,7 +817,7 @@
          * permit barging on a fair lock then combine the timed and
          * un-timed forms together:
          *
-         *  <pre> {@code
+         * <pre> {@code
          * if (lock.tryLock() ||
          *     lock.tryLock(timeout, unit)) {
          *   ...
@@ -874,7 +877,12 @@
          * Attempts to release this lock.
          *
          * <p>If the number of readers is now zero then the lock
-         * is made available for write lock attempts.
+         * is made available for write lock attempts. If the current
+         * thread does not hold this lock then {@link
+         * IllegalMonitorStateException} is thrown.
+         *
+         * @throws IllegalMonitorStateException if the current thread
+         * does not hold this lock
          */
         public void unlock() {
             sync.releaseShared(1);
@@ -912,7 +920,7 @@
         private final Sync sync;
 
         /**
-         * Constructor for use by subclasses
+         * Constructor for use by subclasses.
          *
          * @param lock the outer lock object
          * @throws NullPointerException if the lock is null
@@ -1026,7 +1034,7 @@
          * by the current thread, or the write lock was already held
          * by the current thread; and {@code false} otherwise.
          */
-        public boolean tryLock( ) {
+        public boolean tryLock() {
             return sync.tryWriteLock();
         }
 
@@ -1046,7 +1054,7 @@
          * that does permit barging on a fair lock then combine the
          * timed and un-timed forms together:
          *
-         *  <pre> {@code
+         * <pre> {@code
          * if (lock.tryLock() ||
          *     lock.tryLock(timeout, unit)) {
          *   ...
@@ -1161,7 +1169,7 @@
          * InterruptedException} will be thrown, and the thread's
          * interrupted status will be cleared.
          *
-         * <li> Waiting threads are signalled in FIFO order.
+         * <li>Waiting threads are signalled in FIFO order.
          *
          * <li>The ordering of lock reacquisition for threads returning
          * from waiting methods is the same as for threads initially
@@ -1369,7 +1377,7 @@
      * either the read or write lock.  The value is only an estimate
      * because the number of threads may change dynamically while this
      * method traverses internal data structures.  This method is
-     * designed for use in monitoring of the system state, not for
+     * designed for use in monitoring system state, not for
      * synchronization control.
      *
      * @return the estimated number of threads waiting for this lock
@@ -1489,19 +1497,17 @@
      * ways that do not preserve unique mappings.
      */
     static final long getThreadId(Thread thread) {
-        return UNSAFE.getLongVolatile(thread, TID_OFFSET);
+        return U.getLongVolatile(thread, TID);
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe UNSAFE;
-    private static final long TID_OFFSET;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long TID;
     static {
         try {
-            UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class<?> tk = Thread.class;
-            TID_OFFSET = UNSAFE.objectFieldOffset
-                (tk.getDeclaredField("tid"));
-        } catch (Exception e) {
+            TID = U.objectFieldOffset
+                (Thread.class.getDeclaredField("tid"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java	Tue Oct 27 01:45:03 2015 -0400
@@ -36,10 +36,6 @@
 package java.util.concurrent.locks;
 
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.LockSupport;
 
 /**
  * A capability-based lock with three modes for controlling read/write
@@ -58,12 +54,12 @@
  *   in method {@link #unlockWrite} to release the lock. Untimed and
  *   timed versions of {@code tryWriteLock} are also provided. When
  *   the lock is held in write mode, no read locks may be obtained,
- *   and all optimistic read validations will fail.  </li>
+ *   and all optimistic read validations will fail.
  *
  *  <li><b>Reading.</b> Method {@link #readLock} possibly blocks
  *   waiting for non-exclusive access, returning a stamp that can be
  *   used in method {@link #unlockRead} to release the lock. Untimed
- *   and timed versions of {@code tryReadLock} are also provided. </li>
+ *   and timed versions of {@code tryReadLock} are also provided.
  *
  *  <li><b>Optimistic Reading.</b> Method {@link #tryOptimisticRead}
  *   returns a non-zero stamp only if the lock is not currently held
@@ -81,7 +77,7 @@
  *   invoke method {@code validate()}.  For example, such steps are
  *   typically required when first reading an object or array
  *   reference, and then accessing one of its fields, elements or
- *   methods. </li>
+ *   methods.
  *
  * </ul>
  *
@@ -132,7 +128,7 @@
  * not strictly needed here because no exceptions can occur in their
  * bodies.<br>
  *
- *  <pre>{@code
+ * <pre> {@code
  * class Point {
  *   private double x, y;
  *   private final StampedLock sl = new StampedLock();
@@ -542,7 +538,7 @@
         WNode h;
         if (state != stamp || (stamp & WBIT) == 0L)
             throw new IllegalMonitorStateException();
-        state = (stamp += WBIT) == 0L ? ORIGIN : stamp;
+        U.putLongVolatile(this, STATE, (stamp += WBIT) == 0L ? ORIGIN : stamp);
         if ((h = whead) != null && h.status != 0)
             release(h);
     }
@@ -589,7 +585,7 @@
             else if (m == WBIT) {
                 if (a != m)
                     break;
-                state = (s += WBIT) == 0L ? ORIGIN : s;
+                U.putLongVolatile(this, STATE, (s += WBIT) == 0L ? ORIGIN : s);
                 if ((h = whead) != null && h.status != 0)
                     release(h);
                 return;
@@ -610,7 +606,7 @@
     }
 
     /**
-     * If the lock state matches the given stamp, performs one of
+     * If the lock state matches the given stamp, atomically performs one of
      * the following actions. If the stamp represents holding a write
      * lock, returns it.  Or, if a read lock, if the write lock is
      * available, releases the read lock and returns a write stamp.
@@ -647,7 +643,7 @@
     }
 
     /**
-     * If the lock state matches the given stamp, performs one of
+     * If the lock state matches the given stamp, atomically performs one of
      * the following actions. If the stamp represents holding a write
      * lock, releases it and obtains a read lock.  Or, if a read lock,
      * returns it. Or, if an optimistic read, acquires a read lock and
@@ -673,7 +669,7 @@
             else if (m == WBIT) {
                 if (a != m)
                     break;
-                state = next = s + (WBIT + RUNIT);
+                U.putLongVolatile(this, STATE, next = s + (WBIT + RUNIT));
                 if ((h = whead) != null && h.status != 0)
                     release(h);
                 return next;
@@ -687,7 +683,7 @@
     }
 
     /**
-     * If the lock state matches the given stamp then, if the stamp
+     * If the lock state matches the given stamp then, atomically, if the stamp
      * represents holding a lock, releases it and returns an
      * observation stamp.  Or, if an optimistic read, returns it if
      * validated. This method returns zero in all other cases, and so
@@ -710,7 +706,8 @@
             else if (m == WBIT) {
                 if (a != m)
                     break;
-                state = next = (s += WBIT) == 0L ? ORIGIN : s;
+                U.putLongVolatile(this, STATE,
+                                  next = (s += WBIT) == 0L ? ORIGIN : s);
                 if ((h = whead) != null && h.status != 0)
                     release(h);
                 return next;
@@ -740,7 +737,7 @@
     public boolean tryUnlockWrite() {
         long s; WNode h;
         if (((s = state) & WBIT) != 0L) {
-            state = (s += WBIT) == 0L ? ORIGIN : s;
+            U.putLongVolatile(this, STATE, (s += WBIT) == 0L ? ORIGIN : s);
             if ((h = whead) != null && h.status != 0)
                 release(h);
             return true;
@@ -923,7 +920,7 @@
         WNode h; long s;
         if (((s = state) & WBIT) == 0L)
             throw new IllegalMonitorStateException();
-        state = (s += WBIT) == 0L ? ORIGIN : s;
+        U.putLongVolatile(this, STATE, (s += WBIT) == 0L ? ORIGIN : s);
         if ((h = whead) != null && h.status != 0)
             release(h);
     }
@@ -948,7 +945,7 @@
     private void readObject(java.io.ObjectInputStream s)
         throws java.io.IOException, ClassNotFoundException {
         s.defaultReadObject();
-        state = ORIGIN; // reset to unlocked state
+        U.putLongVolatile(this, STATE, ORIGIN); // reset to unlocked state
     }
 
     // internals
@@ -966,7 +963,7 @@
         if ((s & ABITS) == RFULL) {
             if (U.compareAndSwapLong(this, STATE, s, s | RBITS)) {
                 ++readerOverflow;
-                state = s;
+                U.putLongVolatile(this, STATE, s);
                 return s;
             }
         }
@@ -993,8 +990,8 @@
                 }
                 else
                     next = s - RUNIT;
-                 state = next;
-                 return next;
+                U.putLongVolatile(this, STATE, next);
+                return next;
             }
         }
         else if ((LockSupport.nextSecondarySeed() &
@@ -1062,6 +1059,7 @@
             }
         }
 
+        boolean wasInterrupted = false;
         for (int spins = -1;;) {
             WNode h, np, pp; int ps;
             if ((h = whead) == p) {
@@ -1076,6 +1074,8 @@
                                                  ns = s + WBIT)) {
                             whead = node;
                             node.prev = null;
+                            if (wasInterrupted)
+                                Thread.currentThread().interrupt();
                             return ns;
                         }
                     }
@@ -1119,8 +1119,11 @@
                         U.park(false, time);  // emulate LockSupport.park
                     node.thread = null;
                     U.putObject(wt, PARKBLOCKER, null);
-                    if (interruptible && Thread.interrupted())
-                        return cancelWaiter(node, node, true);
+                    if (Thread.interrupted()) {
+                        if (interruptible)
+                            return cancelWaiter(node, node, true);
+                        wasInterrupted = true;
+                    }
                 }
             }
         }
@@ -1136,6 +1139,7 @@
      * @return next state, or INTERRUPTED
      */
     private long acquireRead(boolean interruptible, long deadline) {
+        boolean wasInterrupted = false;
         WNode node = null, p;
         for (int spins = -1;;) {
             WNode h;
@@ -1143,8 +1147,11 @@
                 for (long m, s, ns;;) {
                     if ((m = (s = state) & ABITS) < RFULL ?
                         U.compareAndSwapLong(this, STATE, s, ns = s + RUNIT) :
-                        (m < WBIT && (ns = tryIncReaderOverflow(s)) != 0L))
+                        (m < WBIT && (ns = tryIncReaderOverflow(s)) != 0L)) {
+                        if (wasInterrupted)
+                            Thread.currentThread().interrupt();
                         return ns;
+                    }
                     else if (m >= WBIT) {
                         if (spins > 0) {
                             if (LockSupport.nextSecondarySeed() >= 0)
@@ -1193,8 +1200,11 @@
                                 U.compareAndSwapLong(this, STATE, s,
                                                      ns = s + RUNIT) :
                                 (m < WBIT &&
-                                 (ns = tryIncReaderOverflow(s)) != 0L))
+                                 (ns = tryIncReaderOverflow(s)) != 0L)) {
+                                if (wasInterrupted)
+                                    Thread.currentThread().interrupt();
                                 return ns;
+                            }
                         } while (m < WBIT);
                     }
                     if (whead == h && p.prev == pp) {
@@ -1205,8 +1215,11 @@
                         }
                         if (deadline == 0L)
                             time = 0L;
-                        else if ((time = deadline - System.nanoTime()) <= 0L)
+                        else if ((time = deadline - System.nanoTime()) <= 0L) {
+                            if (wasInterrupted)
+                                Thread.currentThread().interrupt();
                             return cancelWaiter(node, p, false);
+                        }
                         Thread wt = Thread.currentThread();
                         U.putObject(wt, PARKBLOCKER, this);
                         node.thread = wt;
@@ -1215,8 +1228,11 @@
                             U.park(false, time);
                         node.thread = null;
                         U.putObject(wt, PARKBLOCKER, null);
-                        if (interruptible && Thread.interrupted())
-                            return cancelWaiter(node, p, true);
+                        if (Thread.interrupted()) {
+                            if (interruptible)
+                                return cancelWaiter(node, p, true);
+                            wasInterrupted = true;
+                        }
                     }
                 }
             }
@@ -1243,6 +1259,8 @@
                                 (w = c.thread) != null)
                                 U.unpark(w);
                         }
+                        if (wasInterrupted)
+                            Thread.currentThread().interrupt();
                         return ns;
                     }
                     else if (m >= WBIT &&
@@ -1286,8 +1304,11 @@
                         U.park(false, time);
                     node.thread = null;
                     U.putObject(wt, PARKBLOCKER, null);
-                    if (interruptible && Thread.interrupted())
-                        return cancelWaiter(node, node, true);
+                    if (Thread.interrupted()) {
+                        if (interruptible)
+                            return cancelWaiter(node, node, true);
+                        wasInterrupted = true;
+                    }
                 }
             }
         }
@@ -1377,7 +1398,7 @@
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe U;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
     private static final long STATE;
     private static final long WHEAD;
     private static final long WTAIL;
@@ -1388,26 +1409,23 @@
 
     static {
         try {
-            U = sun.misc.Unsafe.getUnsafe();
-            Class<?> k = StampedLock.class;
-            Class<?> wk = WNode.class;
             STATE = U.objectFieldOffset
-                (k.getDeclaredField("state"));
+                (StampedLock.class.getDeclaredField("state"));
             WHEAD = U.objectFieldOffset
-                (k.getDeclaredField("whead"));
+                (StampedLock.class.getDeclaredField("whead"));
             WTAIL = U.objectFieldOffset
-                (k.getDeclaredField("wtail"));
+                (StampedLock.class.getDeclaredField("wtail"));
+
             WSTATUS = U.objectFieldOffset
-                (wk.getDeclaredField("status"));
+                (WNode.class.getDeclaredField("status"));
             WNEXT = U.objectFieldOffset
-                (wk.getDeclaredField("next"));
+                (WNode.class.getDeclaredField("next"));
             WCOWAIT = U.objectFieldOffset
-                (wk.getDeclaredField("cowait"));
-            Class<?> tk = Thread.class;
+                (WNode.class.getDeclaredField("cowait"));
+
             PARKBLOCKER = U.objectFieldOffset
-                (tk.getDeclaredField("parkBlocker"));
-
-        } catch (Exception e) {
+                (Thread.class.getDeclaredField("parkBlocker"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/package-info.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/package-info.java	Tue Oct 27 01:45:03 2015 -0400
@@ -226,8 +226,9 @@
  *
  * <h2 id="MemoryVisibility">Memory Consistency Properties</h2>
  *
- * <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.4.5">
- * Chapter 17 of the Java Language Specification</a> defines the
+ * <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-17.html#jls-17.4.5">
+ * Chapter 17 of
+ * <cite>The Java&trade; Language Specification</cite></a> defines the
  * <i>happens-before</i> relation on memory operations such as reads and
  * writes of shared variables.  The results of a write by one thread are
  * guaranteed to be visible to a read by another thread only if the write
--- a/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Tue Oct 27 01:45:03 2015 -0400
@@ -37,7 +37,6 @@
 import java.security.AccessController;
 import java.security.CodeSource;
 import jdk.internal.misc.SharedSecrets;
-import sun.misc.IOUtils;
 import sun.security.action.GetPropertyAction;
 import sun.security.util.ManifestEntryVerifier;
 import sun.security.util.SignatureFileVerifier;
@@ -438,7 +437,21 @@
      */
     private byte[] getBytes(ZipEntry ze) throws IOException {
         try (InputStream is = super.getInputStream(ze)) {
-            return IOUtils.readFully(is, (int)ze.getSize(), true);
+            int len = (int)ze.getSize();
+            int bytesRead;
+            byte[] b;
+            // trust specified entry sizes when reasonably small
+            if (len != -1 && len <= 65535) {
+                b = new byte[len];
+                bytesRead = is.readNBytes(b, 0, len);
+            } else {
+                b = is.readAllBytes();
+                bytesRead = b.length;
+            }
+            if (len != -1 && len != bytesRead) {
+                throw new EOFException("Expected:" + len + ", read:" + bytesRead);
+            }
+            return b;
         }
     }
 
--- a/jdk/src/java.base/share/classes/java/util/zip/Deflater.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/zip/Deflater.java	Tue Oct 27 01:45:03 2015 -0400
@@ -318,7 +318,9 @@
      * should be called in order to provide more input
      */
     public boolean needsInput() {
-        return len <= 0;
+        synchronized (zsRef) {
+            return len <= 0;
+        }
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/zip/ZStreamRef.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZStreamRef.java	Tue Oct 27 01:45:03 2015 -0400
@@ -31,7 +31,7 @@
 
 class ZStreamRef {
 
-    private long address;
+    private volatile long address;
     ZStreamRef (long address) {
         this.address = address;
     }
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java	Tue Oct 27 01:45:03 2015 -0400
@@ -60,7 +60,7 @@
  */
 public
 class ZipFile implements ZipConstants, Closeable {
-    private long jzfile;           // address of jzfile data
+    private long jzfile;  // address of jzfile data
     private final String name;     // zip file name
     private final int total;       // total number of entries
     private final boolean locsig;  // if zip file starts with LOCSIG (usually true)
@@ -691,7 +691,7 @@
      * (possibly compressed) zip file entry.
      */
    private class ZipFileInputStream extends InputStream {
-        private volatile boolean closeRequested = false;
+        private volatile boolean zfisCloseRequested = false;
         protected long jzentry; // address of jzentry data
         private   long pos;     // current position within entry data
         protected long rem;     // number of remaining bytes within entry
@@ -718,6 +718,7 @@
                     len = (int) rem;
                 }
 
+                // Check if ZipFile open
                 ensureOpenOrZipException();
                 len = ZipFile.read(ZipFile.this.jzfile, jzentry, pos, b,
                                    off, len);
@@ -761,9 +762,9 @@
         }
 
         public void close() {
-            if (closeRequested)
+            if (zfisCloseRequested)
                 return;
-            closeRequested = true;
+            zfisCloseRequested = true;
 
             rem = 0;
             synchronized (ZipFile.this) {
--- a/jdk/src/java.base/share/classes/javax/crypto/Cipher.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/javax/crypto/Cipher.java	Tue Oct 27 01:45:03 2015 -0400
@@ -478,6 +478,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param transformation the name of the transformation, e.g.,
      * <i>DES/CBC/PKCS5Padding</i>.
      * See the Cipher section in the <a href=
--- a/jdk/src/java.base/share/classes/javax/crypto/ExemptionMechanism.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/javax/crypto/ExemptionMechanism.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -112,6 +112,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the standard name of the requested exemption
      * mechanism.
      * See the ExemptionMechanism section in the
--- a/jdk/src/java.base/share/classes/javax/crypto/KeyAgreement.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/javax/crypto/KeyAgreement.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -150,6 +150,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the standard name of the requested key agreement
      * algorithm.
      * See the KeyAgreement section in the <a href=
--- a/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -202,6 +202,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the standard name of the requested key algorithm.
      * See the KeyGenerator section in the <a href=
      * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyGenerator">
--- a/jdk/src/java.base/share/classes/javax/crypto/Mac.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/javax/crypto/Mac.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -152,6 +152,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the standard name of the requested MAC algorithm.
      * See the Mac section in the <a href=
      *   "{@docRoot}/../technotes/guides/security/StandardNames.html#Mac">
--- a/jdk/src/java.base/share/classes/javax/crypto/SecretKeyFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/javax/crypto/SecretKeyFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -137,6 +137,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the standard name of the requested secret-key
      * algorithm.
      * See the SecretKeyFactory section in the <a href=
--- a/jdk/src/java.base/share/classes/javax/net/ssl/KeyManagerFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/KeyManagerFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -116,6 +116,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the standard name of the requested algorithm.
      *          See the <a href=
      *  "{@docRoot}/../technotes/guides/security/jsse/JSSERefGuide.html">
--- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java	Tue Oct 27 01:45:03 2015 -0400
@@ -136,6 +136,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param protocol the standard name of the requested protocol.
      *          See the SSLContext section in the <a href=
      * "{@docRoot}/../technotes/guides/security/StandardNames.html#SSLContext">
--- a/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -130,6 +130,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the standard name of the requested trust management
      *          algorithm.  See the <a href=
      *  "{@docRoot}/../technotes/guides/security/jsse/JSSERefGuide.html">
--- a/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java	Tue Oct 27 01:45:03 2015 -0400
@@ -101,6 +101,18 @@
  *                              login Configuration.
  * </pre>
  *
+ * <p>Please note that granting this permission with the "modifyPrincipals",
+ * "modifyPublicCredentials" or "modifyPrivateCredentials" target allows
+ * a JAAS login module to populate principal or credential objects into
+ * the Subject. Although reading information inside the private credentials
+ * set requires a {@link PrivateCredentialPermission} of the credential type to
+ * be granted, reading information inside the principals set and the public
+ * credentials set requires no additional permission. These objects can contain
+ * potentially sensitive information. For example, login modules that read
+ * local user information or perform a Kerberos login are able to add
+ * potentially sensitive information such as user ids, groups and domain names
+ * to the principals set.
+ *
  * <p> The following target name has been deprecated in favor of
  * {@code createLoginContext.{name}}.
  *
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java	Tue Oct 27 01:45:03 2015 -0400
@@ -311,6 +311,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param type the specified Configuration type.  See the Configuration
      *    section in the <a href=
      *    "{@docRoot}/../technotes/guides/security/StandardNames.html#Configuration">
--- a/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java	Tue Oct 27 01:45:03 2015 -0400
@@ -58,7 +58,7 @@
 
         try {
             substrate = ImageNativeSubstrate.openImage(imagePath, byteOrder);
-        } catch (UnsatisfiedLinkError ex) {
+        } catch (UnsatisfiedLinkError | NoClassDefFoundError ex) {
             substrate = ImageJavaSubstrate.openImage(imagePath, byteOrder);
         }
 
--- a/jdk/src/java.base/share/classes/overview-core.html	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/overview-core.html	Tue Oct 27 01:45:03 2015 -0400
@@ -3,7 +3,7 @@
 <head>
 <!--
 
-Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
 This code is free software; you can redistribute it and/or modify it
@@ -30,9 +30,6 @@
 </head>
 <body bgcolor="white">
 
-
-<body>
-
 This document is the API specification for the Java&#x2122;
 Platform, Standard Edition.
 
--- a/jdk/src/java.base/share/classes/sun/invoke/anon/AnonymousClassLoader.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/invoke/anon/AnonymousClassLoader.java	Tue Oct 27 01:45:03 2015 -0400
@@ -25,10 +25,10 @@
 
 package sun.invoke.anon;
 
+import java.io.EOFException;
 import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import sun.misc.IOUtils;
 
 /**
  * Anonymous class loader.  Will load any valid classfile, producing
@@ -225,6 +225,10 @@
         if (contentLength < 0)
             throw new IOException("invalid content length "+contentLength);
 
-        return IOUtils.readFully(connection.getInputStream(), contentLength, true);
+        byte[] b = connection.getInputStream().readAllBytes();
+        if (b.length != contentLength)
+            throw new EOFException("Expected:" + contentLength + ", read:" + b.length);
+
+        return b;
     }
 }
--- a/jdk/src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,14 +37,20 @@
 
     private BytecodeDescriptor() { }  // cannot instantiate
 
+    /**
+     * @param loader the class loader in which to look up the types (null means
+     *               bootstrap class loader)
+     */
     public static List<Class<?>> parseMethod(String bytecodeSignature, ClassLoader loader) {
         return parseMethod(bytecodeSignature, 0, bytecodeSignature.length(), loader);
     }
 
+    /**
+     * @param loader the class loader in which to look up the types (null means
+     *               bootstrap class loader)
+     */
     static List<Class<?>> parseMethod(String bytecodeSignature,
             int start, int end, ClassLoader loader) {
-        if (loader == null)
-            loader = ClassLoader.getSystemClassLoader();
         String str = bytecodeSignature;
         int[] i = {start};
         ArrayList<Class<?>> ptypes = new ArrayList<Class<?>>();
@@ -71,6 +77,10 @@
         throw new IllegalArgumentException("bad signature: "+str+": "+msg);
     }
 
+    /**
+     * @param loader the class loader in which to look up the types (null means
+     *               bootstrap class loader)
+     */
     private static Class<?> parseSig(String str, int[] i, int end, ClassLoader loader) {
         if (i[0] == end)  return null;
         char c = str.charAt(i[0]++);
@@ -80,7 +90,9 @@
             i[0] = endc+1;
             String name = str.substring(begc, endc).replace('/', '.');
             try {
-                return loader.loadClass(name);
+                return (loader == null)
+                    ? Class.forName(name, false, null)
+                    : loader.loadClass(name);
             } catch (ClassNotFoundException ex) {
                 throw new TypeNotPresentException(name, ex);
             }
--- a/jdk/src/java.base/share/classes/sun/misc/ConditionLock.java	Mon Oct 19 17:52:39 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1994, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-/**
- * ConditionLock is a Lock with a built in state variable.  This class
- * provides the ability to wait for the state variable to be set to a
- * desired value and then acquire the lock.<p>
- *
- * The lockWhen() and unlockWith() methods can be safely intermixed
- * with the lock() and unlock() methods. However if there is a thread
- * waiting for the state variable to become a particular value and you
- * simply call Unlock(), that thread will not be able to acquire the
- * lock until the state variable equals its desired value.
- *
- * @author      Peter King
- */
-public final
-class ConditionLock extends Lock {
-    private int state = 0;
-
-    /**
-     * Creates a ConditionLock.
-     */
-    public ConditionLock () {
-    }
-
-    /**
-     * Creates a ConditionLock in an initialState.
-     */
-    public ConditionLock (int initialState) {
-        state = initialState;
-    }
-
-    /**
-     * Acquires the lock when the state variable equals the desired state.
-     *
-     * @param desiredState the desired state
-     * @exception  java.lang.InterruptedException if any thread has
-     *               interrupted this thread.
-     */
-    public synchronized void lockWhen(int desiredState)
-        throws InterruptedException
-    {
-        while (state != desiredState) {
-            wait();
-        }
-        lock();
-    }
-
-    /**
-     * Releases the lock, and sets the state to a new value.
-     * @param newState the new state
-     */
-    public synchronized void unlockWith(int newState) {
-        state = newState;
-        unlock();
-    }
-}
--- a/jdk/src/java.base/share/classes/sun/misc/IOUtils.java	Mon Oct 19 17:52:39 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2009, 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.
- */
-
-/**
- * IOUtils: A collection of IO-related public static methods.
- */
-
-package sun.misc;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Arrays;
-
-public class IOUtils {
-
-    /**
-     * Read up to <code>length</code> of bytes from <code>in</code>
-     * until EOF is detected.
-     * @param is input stream, must not be null
-     * @param length number of bytes to read, -1 or Integer.MAX_VALUE means
-     *        read as much as possible
-     * @param readAll if true, an EOFException will be thrown if not enough
-     *        bytes are read. Ignored when length is -1 or Integer.MAX_VALUE
-     * @return bytes read
-     * @throws IOException Any IO error or a premature EOF is detected
-     */
-    public static byte[] readFully(InputStream is, int length, boolean readAll)
-            throws IOException {
-        byte[] output = {};
-        if (length == -1) length = Integer.MAX_VALUE;
-        int pos = 0;
-        while (pos < length) {
-            int bytesToRead;
-            if (pos >= output.length) { // Only expand when there's no room
-                bytesToRead = Math.min(length - pos, output.length + 1024);
-                if (output.length < pos + bytesToRead) {
-                    output = Arrays.copyOf(output, pos + bytesToRead);
-                }
-            } else {
-                bytesToRead = output.length - pos;
-            }
-            int cc = is.read(output, pos, bytesToRead);
-            if (cc < 0) {
-                if (readAll && length != Integer.MAX_VALUE) {
-                    throw new EOFException("Detect premature EOF");
-                } else {
-                    if (output.length != pos) {
-                        output = Arrays.copyOf(output, pos);
-                    }
-                    break;
-                }
-            }
-            pos += cc;
-        }
-        return output;
-    }
-}
--- a/jdk/src/java.base/share/classes/sun/misc/Lock.java	Mon Oct 19 17:52:39 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 1994, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-/**
- * The Lock class provides a simple, useful interface to a lock.
- * Unlike monitors which synchronize access to an object, locks
- * synchronize access to an arbitrary set of resources (objects,
- * methods, variables, etc.). <p>
- *
- * The programmer using locks must be responsible for clearly defining
- * the semantics of their use and should handle deadlock avoidance in
- * the face of exceptions. <p>
- *
- * For example, if you want to protect a set of method invocations with
- * a lock, and one of the methods may throw an exception, you must be
- * prepared to release the lock similarly to the following example:
- * <pre>
- *      class SomeClass {
- *          Lock myLock = new Lock();
-
- *          void someMethod() {
- *              myLock.lock();
- *              try {
- *                  StartOperation();
- *                  ContinueOperation();
- *                  EndOperation();
- *              } finally {
- *                  myLock.unlock();
- *              }
- *          }
- *      }
- * </pre>
- *
- * @author      Peter King
- */
-public
-class Lock {
-    private boolean locked = false;
-
-    /**
-     * Create a lock, which is initially not locked.
-     */
-    public Lock () {
-    }
-
-    /**
-     * Acquire the lock.  If someone else has the lock, wait until it
-     * has been freed, and then try to acquire it again.  This method
-     * will not return until the lock has been acquired.
-     *
-     * @exception  java.lang.InterruptedException if any thread has
-     *               interrupted this thread.
-     */
-    public final synchronized void lock() throws InterruptedException {
-        while (locked) {
-            wait();
-        }
-        locked = true;
-    }
-
-    /**
-     * Release the lock.  If someone else is waiting for the lock, the
-     * will be notitified so they can try to acquire the lock again.
-     */
-    public final synchronized void unlock() {
-        locked = false;
-        notifyAll();
-    }
-}
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Tue Oct 27 01:45:03 2015 -0400
@@ -487,7 +487,8 @@
     private void checkMessageHeader(String key, String value) {
         char LF = '\n';
         int index = key.indexOf(LF);
-        if (index != -1) {
+        int index1 = key.indexOf(':');
+        if (index != -1 || index1 != -1) {
             throw new IllegalArgumentException(
                 "Illegal character(s) in message header field: " + key);
         }
--- a/jdk/src/java.base/share/classes/sun/reflect/misc/MethodUtil.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/reflect/misc/MethodUtil.java	Tue Oct 27 01:45:03 2015 -0400
@@ -25,6 +25,7 @@
 
 package sun.reflect.misc;
 
+import java.io.EOFException;
 import java.security.AllPermission;
 import java.security.AccessController;
 import java.security.PermissionCollection;
@@ -43,7 +44,6 @@
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
-import sun.misc.IOUtils;
 
 
 class Trampoline {
@@ -368,15 +368,12 @@
             }
         }
         int len = uc.getContentLength();
-        InputStream in = new BufferedInputStream(uc.getInputStream());
-
-        byte[] b;
-        try {
-            b = IOUtils.readFully(in, len, true);
-        } finally {
-            in.close();
+        try (InputStream in = new BufferedInputStream(uc.getInputStream())) {
+            byte[] b = in.readAllBytes();
+            if (len != -1 && b.length != len)
+                throw new EOFException("Expected:" + len + ", read:" + b.length);
+            return b;
         }
-        return b;
     }
 
 
--- a/jdk/src/java.base/share/classes/sun/security/jca/ProviderList.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/jca/ProviderList.java	Tue Oct 27 01:45:03 2015 -0400
@@ -27,8 +27,11 @@
 
 import java.util.*;
 
-import java.security.*;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.Provider;
 import java.security.Provider.Service;
+import java.security.Security;
 
 /**
  * List of Providers. Used to represent the provider preferences.
@@ -65,6 +68,9 @@
     // constant for an ProviderList with no elements
     static final ProviderList EMPTY = new ProviderList(PC0, true);
 
+    // list of all jdk.security.provider.preferred entries
+    static private PreferredList preferredPropList = null;
+
     // dummy provider object to use during initialization
     // used to avoid explicit null checks in various places
     private static final Provider EMPTY_PROVIDER =
@@ -162,11 +168,10 @@
      */
     private ProviderList() {
         List<ProviderConfig> configList = new ArrayList<>();
-        for (int i = 1; true; i++) {
-            String entry = Security.getProperty("security.provider." + i);
-            if (entry == null) {
-                break;
-            }
+        String entry;
+        int i = 1;
+
+        while ((entry = Security.getProperty("security.provider." + i)) != null) {
             entry = entry.trim();
             if (entry.length() == 0) {
                 System.err.println("invalid entry for " +
@@ -187,10 +192,36 @@
             if (configList.contains(config) == false) {
                 configList.add(config);
             }
+            i++;
         }
         configs = configList.toArray(PC0);
+
+        // Load config entries for use when getInstance is called
+        entry = Security.getProperty("jdk.security.provider.preferred");
+        if (entry != null && (entry = entry.trim()).length() > 0) {
+            String[] entries = entry.split(",");
+            if (ProviderList.preferredPropList == null) {
+                ProviderList.preferredPropList = new PreferredList();
+            }
+
+            for (String e : entries) {
+                i = e.indexOf(':');
+                if (i < 0) {
+                    if (debug != null) {
+                        debug.println("invalid preferred entry skipped.  " +
+                                "Missing colon delimiter \"" + e + "\"");
+                    }
+                    continue;
+                }
+                ProviderList.preferredPropList.add(new PreferredEntry(
+                        e.substring(0, i).trim(), e.substring(i + 1).trim()));
+            }
+        }
+
         if (debug != null) {
             debug.println("provider configuration: " + configList);
+            debug.println("config configuration: " +
+                    ProviderList.preferredPropList);
         }
     }
 
@@ -327,7 +358,22 @@
      * algorithm.
      */
     public Service getService(String type, String name) {
-        for (int i = 0; i < configs.length; i++) {
+        ArrayList<PreferredEntry> pList = null;
+        int i;
+
+        // Preferred provider list
+        if (preferredPropList != null &&
+                (pList = preferredPropList.getAll(type, name)) != null) {
+            for (i = 0; i < pList.size(); i++) {
+                Provider p = getProvider(pList.get(i).provider);
+                Service s = p.getService(type, name);
+                if (s != null) {
+                    return s;
+                }
+            }
+        }
+
+        for (i = 0; i < configs.length; i++) {
             Provider p = getProvider(i);
             Service s = p.getService(type, name);
             if (s != null) {
@@ -394,7 +440,11 @@
         private List<Service> services;
 
         // index into config[] of the next provider we need to query
-        private int providerIndex;
+        private int providerIndex = 0;
+
+        // Matching preferred provider list for this ServiceList
+        ArrayList<PreferredEntry> preferredList = null;
+        private int preferredIndex = 0;
 
         ServiceList(String type, String algorithm) {
             this.type = type;
@@ -421,6 +471,14 @@
         }
 
         private Service tryGet(int index) {
+            Provider p;
+
+            // If preferred providers are configured, check for matches with
+            // the requested service.
+            if (preferredPropList != null && preferredList == null) {
+                preferredList = preferredPropList.getAll(this);
+            }
+
             while (true) {
                 if ((index == 0) && (firstService != null)) {
                     return firstService;
@@ -430,8 +488,27 @@
                 if (providerIndex >= configs.length) {
                     return null;
                 }
-                // check all algorithms in this provider before moving on
-                Provider p = getProvider(providerIndex++);
+
+                // If there were matches with a preferred provider, iterate
+                // through the list first before going through the
+                // ordered list (java.security.provider.#)
+                if (preferredList != null &&
+                        preferredIndex < preferredList.size()) {
+                    PreferredEntry entry = preferredList.get(preferredIndex++);
+                    // Look for the provider name in the PreferredEntry
+                    p = getProvider(entry.provider);
+                    if (p == null) {
+                        if (debug != null) {
+                            debug.println("No provider found with name: " +
+                                    entry.provider);
+                        }
+                        continue;
+                    }
+                } else {
+                    // check all algorithms in this provider before moving on
+                    p = getProvider(providerIndex++);
+                }
+
                 if (type != null) {
                     // simple lookup
                     Service s = p.getService(type, algorithm);
@@ -502,4 +579,119 @@
         }
     }
 
+    // Provider list defined by jdk.security.provider.preferred entry
+    static final class PreferredList {
+        ArrayList<PreferredEntry> list = new ArrayList<PreferredEntry>();
+
+        /*
+         * Return a list of all preferred entries that match the passed
+         * ServiceList.
+         */
+        ArrayList<PreferredEntry> getAll(ServiceList s) {
+            if (s.ids == null) {
+                return getAll(s.type, s.algorithm);
+
+            }
+
+            ArrayList<PreferredEntry> l = new ArrayList<PreferredEntry>();
+            for (ServiceId id : s.ids) {
+                implGetAll(l, id.type, id.algorithm);
+            }
+
+            return l;
+        }
+
+        /*
+         * Return a list of all preferred entries that match the passed
+         * type and algorithm.
+         */
+        ArrayList<PreferredEntry> getAll(String type, String algorithm) {
+            ArrayList<PreferredEntry> l = new ArrayList<PreferredEntry>();
+            implGetAll(l, type, algorithm);
+            return l;
+        }
+
+        /*
+         * Compare each preferred entry against the passed type and
+         * algorithm, putting any matches in the passed ArrayList.
+         */
+        private void implGetAll(ArrayList<PreferredEntry> l, String type,
+                String algorithm) {
+            PreferredEntry e;
+
+            for (int i = 0; i < size(); i++) {
+                e = list.get(i);
+                if (e.match(type, algorithm)) {
+                    l.add(e);
+                }
+            }
+        }
+
+        public PreferredEntry get(int i) {
+            return list.get(i);
+        }
+
+        public int size() {
+            return list.size();
+        }
+
+        public boolean add(PreferredEntry e) {
+            return list.add(e);
+        }
+
+        public String toString() {
+            String s = "";
+            for (PreferredEntry e: list) {
+                s += e.toString();
+            }
+            return s;
+        }
+    }
+
+    // Individual preferred property entry from jdk.security.provider.preferred
+    private class PreferredEntry {
+        String type = null;
+        String algorithm;
+        String provider;
+
+        PreferredEntry(String t, String p) {
+            int i = t.indexOf('.');
+            if (i > 0) {
+                type = t.substring(0, i);
+                algorithm = t.substring(i + 1);
+            } else {
+                algorithm = t;
+            }
+
+            provider = p;
+        }
+
+        boolean match(String t, String a) {
+            if (debug != null) {
+                debug.println("Config match:  " + toString() + " == [" + t +
+                        ", " + a + "]");
+            }
+
+            // Compare service type if configured
+            if (type != null && type.compareToIgnoreCase(t) != 0) {
+                return false;
+            }
+
+            // Compare the algorithm string.
+            if (a.compareToIgnoreCase(algorithm) == 0) {
+                if (debug != null) {
+                    debug.println("Config entry found:  " + toString());
+                }
+                return true;
+            }
+
+            // No match
+            return false;
+        }
+
+        public String toString() {
+            return "[" + type + ", " + algorithm + " : " + provider + "] ";
+        }
+    }
+
 }
--- a/jdk/src/java.base/share/classes/sun/security/provider/DomainKeyStore.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/DomainKeyStore.java	Tue Oct 27 01:45:03 2015 -0400
@@ -33,7 +33,6 @@
 import java.security.cert.CertificateException;
 import java.util.*;
 
-import sun.misc.IOUtils;
 import sun.security.pkcs.EncryptedPrivateKeyInfo;
 import sun.security.util.PolicyUtil;
 
--- a/jdk/src/java.base/share/classes/sun/security/provider/JavaKeyStore.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/JavaKeyStore.java	Tue Oct 27 01:45:03 2015 -0400
@@ -32,9 +32,9 @@
 import java.security.cert.CertificateException;
 import java.util.*;
 
-import sun.misc.IOUtils;
 import sun.security.pkcs.EncryptedPrivateKeyInfo;
 import sun.security.pkcs12.PKCS12KeyStore;
+import sun.security.util.IOUtils;
 import sun.security.util.KeyStoreDelegator;
 
 /**
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -77,6 +77,13 @@
     private static final Set<CryptoPrimitive> SIGNATURE_PRIMITIVE_SET =
         Collections.unmodifiableSet(EnumSet.of(CryptoPrimitive.SIGNATURE));
 
+    private static final Set<CryptoPrimitive> KU_PRIMITIVE_SET =
+        Collections.unmodifiableSet(EnumSet.of(
+            CryptoPrimitive.SIGNATURE,
+            CryptoPrimitive.KEY_ENCAPSULATION,
+            CryptoPrimitive.PUBLIC_KEY_ENCRYPTION,
+            CryptoPrimitive.KEY_AGREEMENT));
+
     private static final DisabledAlgorithmConstraints
         certPathDefaultConstraints = new DisabledAlgorithmConstraints(
             DisabledAlgorithmConstraints.PROPERTY_CERTPATH_DISABLED_ALGS);
@@ -210,9 +217,11 @@
                 null, null, -1, PKIXReason.INVALID_KEY_USAGE);
         }
 
+        // Assume all key usage bits are set if key usage is not present
+        Set<CryptoPrimitive> primitives = KU_PRIMITIVE_SET;
+
         if (keyUsage != null) {
-            Set<CryptoPrimitive> primitives =
-                        EnumSet.noneOf(CryptoPrimitive.class);
+                primitives = EnumSet.noneOf(CryptoPrimitive.class);
 
             if (keyUsage[0] || keyUsage[1] || keyUsage[5] || keyUsage[6]) {
                 // keyUsage[0]: KeyUsage.digitalSignature
@@ -237,15 +246,19 @@
             // KeyUsage.encipherOnly and KeyUsage.decipherOnly are
             // undefined in the absence of the keyAgreement bit.
 
-            if (!primitives.isEmpty()) {
-                if (!constraints.permits(primitives, currPubKey)) {
-                    throw new CertPathValidatorException(
-                        "algorithm constraints check failed",
-                        null, null, -1, BasicReason.ALGORITHM_CONSTRAINED);
-                }
+            if (primitives.isEmpty()) {
+                throw new CertPathValidatorException(
+                    "incorrect KeyUsage extension",
+                    null, null, -1, PKIXReason.INVALID_KEY_USAGE);
             }
         }
 
+        if (!constraints.permits(primitives, currPubKey)) {
+            throw new CertPathValidatorException(
+                "algorithm constraints check failed",
+                null, null, -1, BasicReason.ALGORITHM_CONSTRAINED);
+        }
+
         // Check with previous cert for signature algorithm and public key
         if (prevPubKey != null) {
             if (currSigAlg != null) {
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1068,20 +1068,17 @@
                 boolean signFlag = true;
                 List<? extends Certificate> cpList =
                     cpbr.getCertPath().getCertificates();
-                if (cpList.isEmpty()) {
-                    return;
-                }
                 try {
-                    for (int i = cpList.size()-1; i >= 0; i-- ) {
-                        X509Certificate cert = (X509Certificate)cpList.get(i);
+                    for (int i = cpList.size() - 1; i >= 0; i--) {
+                        X509Certificate cert = (X509Certificate) cpList.get(i);
 
                         if (debug != null) {
                             debug.println("RevocationChecker.buildToNewKey()"
-                                          + " index " + i + " checking "
-                                          + cert);
+                                    + " index " + i + " checking "
+                                    + cert);
                         }
                         checkCRLs(cert, prevKey2, null, signFlag, true,
-                                  stackedCerts, newAnchors);
+                                stackedCerts, newAnchors);
                         signFlag = certCanSignCrl(cert);
                         prevKey2 = cert.getPublicKey();
                     }
@@ -1100,8 +1097,10 @@
                 // If it doesn't check out, try to find a different key.
                 // And if we can't find a key, then return false.
                 PublicKey newKey = cpbr.getPublicKey();
+                X509Certificate newCert = cpList.isEmpty() ?
+                    null : (X509Certificate) cpList.get(0);
                 try {
-                    checkCRLs(currCert, newKey, (X509Certificate) cpList.get(0),
+                    checkCRLs(currCert, newKey, newCert,
                               true, false, null, params.trustAnchors());
                     // If that passed, the cert is OK!
                     return;
--- a/jdk/src/java.base/share/classes/sun/security/ssl/CipherSuite.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/CipherSuite.java	Tue Oct 27 01:45:03 2015 -0400
@@ -350,8 +350,6 @@
     private static void add(String name, int id, int priority,
             KeyExchange keyExchange, BulkCipher cipher, MacAlg mac,
             boolean allowed, int obsoleted) {
-        // If this is an obsoleted suite, then don't let the TLS 1.2
-        // protocol have a valid PRF value.
         PRF prf = obsoleted < ProtocolVersion.TLS12.v ? P_NONE : P_SHA256;
 
         add(name, id, priority, keyExchange, cipher, mac, allowed, obsoleted,
--- a/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -672,6 +672,9 @@
                 }
             } else {
                 // we wanted to resume, but the server refused
+                //
+                // Invalidate the session in case of reusing next time.
+                session.invalidate();
                 session = null;
                 if (!enableNewSession) {
                     throw new SSLException("New session creation is disabled");
--- a/jdk/src/java.base/share/classes/sun/security/ssl/DHCrypt.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/DHCrypt.java	Tue Oct 27 01:45:03 2015 -0400
@@ -26,6 +26,11 @@
 
 package sun.security.ssl;
 
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collections;
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
 import java.math.BigInteger;
 import java.security.*;
 import java.io.IOException;
@@ -95,9 +100,35 @@
      * Generate a Diffie-Hellman keypair of the specified size.
      */
     DHCrypt(int keyLength, SecureRandom random) {
+        this(keyLength,
+                ParametersHolder.definedParams.get(keyLength), random);
+    }
+
+    /**
+     * Generate a Diffie-Hellman keypair using the specified parameters.
+     *
+     * @param modulus the Diffie-Hellman modulus P
+     * @param base the Diffie-Hellman base G
+     */
+    DHCrypt(BigInteger modulus, BigInteger base, SecureRandom random) {
+        this(modulus.bitLength(),
+                new DHParameterSpec(modulus, base), random);
+    }
+
+    /**
+     * Generate a Diffie-Hellman keypair using the specified size and
+     * parameters.
+     */
+    private DHCrypt(int keyLength,
+            DHParameterSpec params, SecureRandom random) {
+
         try {
             KeyPairGenerator kpg = JsseJce.getKeyPairGenerator("DiffieHellman");
-            kpg.initialize(keyLength, random);
+            if (params != null) {
+                kpg.initialize(params, random);
+            } else {
+                kpg.initialize(keyLength, random);
+            }
 
             DHPublicKeySpec spec = generateDHPublicKeySpec(kpg);
             if (spec == null) {
@@ -112,33 +143,6 @@
         }
     }
 
-
-    /**
-     * Generate a Diffie-Hellman keypair using the specified parameters.
-     *
-     * @param modulus the Diffie-Hellman modulus P
-     * @param base the Diffie-Hellman base G
-     */
-    DHCrypt(BigInteger modulus, BigInteger base, SecureRandom random) {
-        this.modulus = modulus;
-        this.base = base;
-        try {
-            KeyPairGenerator kpg = JsseJce.getKeyPairGenerator("DiffieHellman");
-            DHParameterSpec params = new DHParameterSpec(modulus, base);
-            kpg.initialize(params, random);
-
-            DHPublicKeySpec spec = generateDHPublicKeySpec(kpg);
-            if (spec == null) {
-                throw new RuntimeException("Could not generate DH keypair");
-            }
-
-            publicValue = spec.getY();
-        } catch (GeneralSecurityException e) {
-            throw new RuntimeException("Could not generate DH keypair", e);
-        }
-    }
-
-
     static DHPublicKeySpec getDHPublicKeySpec(PublicKey key) {
         if (key instanceof DHPublicKey) {
             DHPublicKey dhKey = (DHPublicKey)key;
@@ -268,4 +272,141 @@
 
         return null;
     }
+
+    // lazy initialization holder class idiom for static default parameters
+    //
+    // See Effective Java Second Edition: Item 71.
+    private static class ParametersHolder {
+        private final static boolean debugIsOn =
+                (Debug.getInstance("ssl") != null) && Debug.isOn("sslctx");
+
+        //
+        // Default DH ephemeral parameters
+        //
+        private static final BigInteger g2 = BigInteger.valueOf(2);
+
+        private static final BigInteger p512 = new BigInteger(   // generated
+                "D87780E15FF50B4ABBE89870188B049406B5BEA98AB23A02" +
+                "41D88EA75B7755E669C08093D3F0CA7FC3A5A25CF067DCB9" +
+                "A43DD89D1D90921C6328884461E0B6D3", 16);
+        private static final BigInteger p768 = new BigInteger(   // RFC 2409
+                "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" +
+                "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" +
+                "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" +
+                "E485B576625E7EC6F44C42E9A63A3620FFFFFFFFFFFFFFFF", 16);
+
+        private static final BigInteger p1024 = new BigInteger(  // RFC 2409
+                "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" +
+                "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" +
+                "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" +
+                "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" +
+                "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381" +
+                "FFFFFFFFFFFFFFFF", 16);
+        private static final BigInteger p2048 = new BigInteger(  // TLS FEDHE
+                "FFFFFFFFFFFFFFFFADF85458A2BB4A9AAFDC5620273D3CF1" +
+                "D8B9C583CE2D3695A9E13641146433FBCC939DCE249B3EF9" +
+                "7D2FE363630C75D8F681B202AEC4617AD3DF1ED5D5FD6561" +
+                "2433F51F5F066ED0856365553DED1AF3B557135E7F57C935" +
+                "984F0C70E0E68B77E2A689DAF3EFE8721DF158A136ADE735" +
+                "30ACCA4F483A797ABC0AB182B324FB61D108A94BB2C8E3FB" +
+                "B96ADAB760D7F4681D4F42A3DE394DF4AE56EDE76372BB19" +
+                "0B07A7C8EE0A6D709E02FCE1CDF7E2ECC03404CD28342F61" +
+                "9172FE9CE98583FF8E4F1232EEF28183C3FE3B1B4C6FAD73" +
+                "3BB5FCBC2EC22005C58EF1837D1683B2C6F34A26C1B2EFFA" +
+                "886B423861285C97FFFFFFFFFFFFFFFF", 16);
+
+        private static final BigInteger[] supportedPrimes = {
+                p512, p768, p1024, p2048};
+
+        // a measure of the uncertainty that prime modulus p is not a prime
+        //
+        // see BigInteger.isProbablePrime(int certainty)
+        private final static int PRIME_CERTAINTY = 120;
+
+        // the known security property, jdk.tls.server.defaultDHEParameters
+        private final static String PROPERTY_NAME =
+                "jdk.tls.server.defaultDHEParameters";
+
+        private static final Pattern spacesPattern = Pattern.compile("\\s+");
+
+        private final static Pattern syntaxPattern = Pattern.compile(
+                "(\\{[0-9A-Fa-f]+,[0-9A-Fa-f]+\\})" +
+                "(,\\{[0-9A-Fa-f]+,[0-9A-Fa-f]+\\})*");
+
+        private static final Pattern paramsPattern = Pattern.compile(
+                "\\{([0-9A-Fa-f]+),([0-9A-Fa-f]+)\\}");
+
+        // cache of predefined default DH ephemeral parameters
+        private final static Map<Integer,DHParameterSpec> definedParams;
+
+        static {
+            String property = AccessController.doPrivileged(
+                new PrivilegedAction<String>() {
+                    public String run() {
+                        return Security.getProperty(PROPERTY_NAME);
+                    }
+                });
+
+            if (property != null && !property.isEmpty()) {
+                // remove double quote marks from beginning/end of the property
+                if (property.length() >= 2 && property.charAt(0) == '"' &&
+                        property.charAt(property.length() - 1) == '"') {
+                    property = property.substring(1, property.length() - 1);
+                }
+
+                property = property.trim();
+            }
+
+            if (property != null && !property.isEmpty()) {
+                Matcher spacesMatcher = spacesPattern.matcher(property);
+                property = spacesMatcher.replaceAll("");
+
+                if (debugIsOn) {
+                    System.out.println("The Security Property " +
+                            PROPERTY_NAME + ": " + property);
+                }
+            }
+
+            Map<Integer,DHParameterSpec> defaultParams = new HashMap<>();
+            if (property != null && !property.isEmpty()) {
+                Matcher syntaxMatcher = syntaxPattern.matcher(property);
+                if (syntaxMatcher.matches()) {
+                    Matcher paramsFinder = paramsPattern.matcher(property);
+                    while(paramsFinder.find()) {
+                        String primeModulus = paramsFinder.group(1);
+                        BigInteger p = new BigInteger(primeModulus, 16);
+                        if (!p.isProbablePrime(PRIME_CERTAINTY)) {
+                            if (debugIsOn) {
+                                System.out.println(
+                                    "Prime modulus p in Security Property, " +
+                                    PROPERTY_NAME + ", is not a prime: " +
+                                    primeModulus);
+                            }
+
+                            continue;
+                        }
+
+                        String baseGenerator = paramsFinder.group(2);
+                        BigInteger g = new BigInteger(baseGenerator, 16);
+
+                        DHParameterSpec spec = new DHParameterSpec(p, g);
+                        int primeLen = p.bitLength();
+                        defaultParams.put(primeLen, spec);
+                    }
+                } else if (debugIsOn) {
+                    System.out.println("Invalid Security Property, " +
+                            PROPERTY_NAME + ", definition");
+                }
+            }
+
+            for (BigInteger p : supportedPrimes) {
+                int primeLen = p.bitLength();
+                defaultParams.putIfAbsent(primeLen, new DHParameterSpec(p, g2));
+            }
+
+            definedParams =
+                    Collections.<Integer,DHParameterSpec>unmodifiableMap(
+                                                                defaultParams);
+        }
+    }
 }
--- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLEngineInputRecord.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLEngineInputRecord.java	Tue Oct 27 01:45:03 2015 -0400
@@ -284,7 +284,7 @@
                                        ((plaintext.get() & 0xFF) << 8) |
                                         (plaintext.get() & 0xFF);
                     plaintext.position(frgPos);
-                    if (remains < (handshakeLen + 1)) { // 1: handshake type
+                    if (remains < (handshakeLen + 4)) { // 4: handshake header
                         // This handshake message is fragmented.
                         prevType = handshakeType;
                         hsMsgOff = remains - 4;         // 4: handshake header
--- a/jdk/src/java.base/share/classes/sun/security/timestamp/HttpTimestamper.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/timestamp/HttpTimestamper.java	Tue Oct 27 01:45:03 2015 -0400
@@ -27,13 +27,13 @@
 
 import java.io.BufferedInputStream;
 import java.io.DataOutputStream;
+import java.io.EOFException;
 import java.io.IOException;
 import java.net.URI;
 import java.net.URL;
 import java.net.HttpURLConnection;
 import java.util.*;
 
-import sun.misc.IOUtils;
 import sun.security.util.Debug;
 
 /**
@@ -147,8 +147,11 @@
             }
             verifyMimeType(connection.getContentType());
 
-            int contentLength = connection.getContentLength();
-            replyBuffer = IOUtils.readFully(input, contentLength, false);
+            int clen = connection.getContentLength();
+            replyBuffer = input.readAllBytes();
+            if (clen != -1 && replyBuffer.length != clen)
+                throw new EOFException("Expected:" + clen +
+                                       ", read:" + replyBuffer.length);
 
             if (debug != null) {
                 debug.println("received timestamp response (length=" +
--- a/jdk/src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java	Tue Oct 27 01:45:03 2015 -0400
@@ -54,13 +54,12 @@
         String[] algorithmsInProperty = null;
         if (property != null && !property.isEmpty()) {
             // remove double quote marks from beginning/end of the property
-            if (property.charAt(0) == '"'
-                    && property.charAt(property.length() - 1) == '"') {
+            if (property.length() >= 2 && property.charAt(0) == '"' &&
+                    property.charAt(property.length() - 1) == '"') {
                 property = property.substring(1, property.length() - 1);
             }
             algorithmsInProperty = property.split(",");
-            for (int i = 0; i < algorithmsInProperty.length;
-                    i++) {
+            for (int i = 0; i < algorithmsInProperty.length; i++) {
                 algorithmsInProperty[i] = algorithmsInProperty[i].trim();
             }
         }
--- a/jdk/src/java.base/share/classes/sun/security/util/DerValue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/util/DerValue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -28,7 +28,6 @@
 import java.io.*;
 import java.math.BigInteger;
 import java.util.Date;
-import sun.misc.IOUtils;
 
 /**
  * Represents a single DER-encoded value.  DER encoding rules are a subset
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/IOUtils.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2009, 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.
+ */
+
+/**
+ * IOUtils: A collection of IO-related public static methods.
+ */
+
+package sun.security.util;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+
+public class IOUtils {
+
+    /**
+     * Read up to <code>length</code> of bytes from <code>in</code>
+     * until EOF is detected.
+     * @param is input stream, must not be null
+     * @param length number of bytes to read, -1 or Integer.MAX_VALUE means
+     *        read as much as possible
+     * @param readAll if true, an EOFException will be thrown if not enough
+     *        bytes are read. Ignored when length is -1 or Integer.MAX_VALUE
+     * @return bytes read
+     * @throws IOException Any IO error or a premature EOF is detected
+     */
+    public static byte[] readFully(InputStream is, int length, boolean readAll)
+            throws IOException {
+        byte[] output = {};
+        if (length == -1) length = Integer.MAX_VALUE;
+        int pos = 0;
+        while (pos < length) {
+            int bytesToRead;
+            if (pos >= output.length) { // Only expand when there's no room
+                bytesToRead = Math.min(length - pos, output.length + 1024);
+                if (output.length < pos + bytesToRead) {
+                    output = Arrays.copyOf(output, pos + bytesToRead);
+                }
+            } else {
+                bytesToRead = output.length - pos;
+            }
+            int cc = is.read(output, pos, bytesToRead);
+            if (cc < 0) {
+                if (readAll && length != Integer.MAX_VALUE) {
+                    throw new EOFException("Detect premature EOF");
+                } else {
+                    if (output.length != pos) {
+                        output = Arrays.copyOf(output, pos);
+                    }
+                    break;
+                }
+            }
+            pos += cc;
+        }
+        return output;
+    }
+}
Binary file jdk/src/java.base/share/classes/sun/text/resources/nfc.icu has changed
Binary file jdk/src/java.base/share/classes/sun/text/resources/nfkc.icu has changed
Binary file jdk/src/java.base/share/classes/sun/text/resources/nfkc_cf.icu has changed
Binary file jdk/src/java.base/share/classes/sun/text/resources/ubidi.icu has changed
Binary file jdk/src/java.base/share/classes/sun/text/resources/uprops.icu has changed
--- a/jdk/src/java.base/share/classes/sun/util/cldr/CLDRLocaleProviderAdapter.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/util/cldr/CLDRLocaleProviderAdapter.java	Tue Oct 27 01:45:03 2015 -0400
@@ -26,13 +26,11 @@
 package sun.util.cldr;
 
 import java.security.AccessController;
-import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
 import java.text.spi.BreakIteratorProvider;
 import java.text.spi.CollatorProvider;
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
@@ -41,7 +39,7 @@
 import java.util.ServiceLoader;
 import java.util.Set;
 import java.util.StringTokenizer;
-import java.util.stream.Stream;
+import java.util.concurrent.ConcurrentHashMap;
 import sun.util.locale.provider.JRELocaleProviderAdapter;
 import sun.util.locale.provider.LocaleProviderAdapter;
 import sun.util.locale.provider.LocaleDataMetaInfo;
@@ -59,12 +57,21 @@
     private final LocaleDataMetaInfo nonBaseMetaInfo;
 
     // parent locales map
-    private static volatile Map<Locale, Locale> parentLocalesMap = null;
+    private static volatile Map<Locale, Locale> parentLocalesMap;
+    static {
+        parentLocalesMap = new ConcurrentHashMap<>();
+        // Assuming these locales do NOT have irregular parent locales.
+        parentLocalesMap.put(Locale.ROOT, Locale.ROOT);
+        parentLocalesMap.put(Locale.ENGLISH, Locale.ENGLISH);
+        parentLocalesMap.put(Locale.US, Locale.US);
+    }
 
     public CLDRLocaleProviderAdapter() {
+        LocaleDataMetaInfo nbmi = null;
+
         try {
-            nonBaseMetaInfo = AccessController.doPrivileged(new PrivilegedExceptionAction<LocaleDataMetaInfo>() {
-                    @Override
+            nbmi = AccessController.doPrivileged(new PrivilegedExceptionAction<LocaleDataMetaInfo>() {
+                @Override
                 public LocaleDataMetaInfo run() {
                     for (LocaleDataMetaInfo ldmi : ServiceLoader.loadInstalled(LocaleDataMetaInfo.class)) {
                         if (ldmi.getType() == LocaleProviderAdapter.Type.CLDR) {
@@ -72,18 +79,13 @@
                         }
                     }
                     return null;
-                    }
-                });
+                }
+            });
         }  catch (Exception e) {
-            // Catch any exception, and fail gracefully as if CLDR locales do not exist.
-            // It's ok ignore it if something wrong happens because there always is the
-            // JRE or FALLBACK LocaleProviderAdapter that will do the right thing.
-            throw new UnsupportedOperationException(e);
+            // Catch any exception, and continue as if only CLDR's base locales exist.
         }
 
-        if (nonBaseMetaInfo == null) {
-            throw new UnsupportedOperationException("CLDR locale data could not be found.");
-        }
+        nonBaseMetaInfo = nbmi;
     }
 
     /**
@@ -120,7 +122,11 @@
     protected Set<String> createLanguageTagSet(String category) {
         // Directly call Base tags, as we know it's in the base module.
         String supportedLocaleString = baseMetaInfo.availableLanguageTags(category);
-        String nonBaseTags = nonBaseMetaInfo.availableLanguageTags(category);
+        String nonBaseTags = null;
+
+        if (nonBaseMetaInfo != null) {
+            nonBaseTags = nonBaseMetaInfo.availableLanguageTags(category);
+        }
         if (nonBaseTags != null) {
             if (supportedLocaleString != null) {
                 supportedLocaleString += " " + nonBaseTags;
@@ -144,35 +150,51 @@
     public List<Locale> getCandidateLocales(String baseName, Locale locale) {
         List<Locale> candidates = super.getCandidateLocales(baseName, locale);
         return applyParentLocales(baseName, candidates);
-}
+    }
 
     private List<Locale> applyParentLocales(String baseName, List<Locale> candidates) {
-        if (Objects.isNull(parentLocalesMap)) {
-            Map<Locale, Locale> map = new HashMap<>();
-            baseMetaInfo.parentLocales().forEach((parent, children) -> {
-                Stream.of(children).forEach(child -> {
-                    map.put(Locale.forLanguageTag(child), parent);
-                });
-            });
-            parentLocalesMap = Collections.unmodifiableMap(map);
-        }
-
         // check irregular parents
         for (int i = 0; i < candidates.size(); i++) {
             Locale l = candidates.get(i);
-            Locale p = parentLocalesMap.get(l);
-            if (!l.equals(Locale.ROOT) &&
-                Objects.nonNull(p) &&
-                !candidates.get(i+1).equals(p)) {
-                List<Locale> applied = candidates.subList(0, i+1);
-                applied.addAll(applyParentLocales(baseName, super.getCandidateLocales(baseName, p)));
-                return applied;
+            if (!l.equals(Locale.ROOT)) {
+                Locale p = getParentLocale(l);
+                if (p != null &&
+                    !candidates.get(i+1).equals(p)) {
+                    List<Locale> applied = candidates.subList(0, i+1);
+                    applied.addAll(applyParentLocales(baseName, super.getCandidateLocales(baseName, p)));
+                    return applied;
+                }
             }
         }
 
         return candidates;
     }
 
+    private static Locale getParentLocale(Locale locale) {
+        Locale parent = parentLocalesMap.get(locale);
+
+        if (parent == null) {
+            String tag = locale.toLanguageTag();
+            for (Map.Entry<Locale, String[]> entry : baseMetaInfo.parentLocales().entrySet()) {
+                if (Arrays.binarySearch(entry.getValue(), tag) >= 0) {
+                    parent = entry.getKey();
+                    break;
+                }
+            }
+            if (parent == null) {
+                parent = locale; // non existent marker
+            }
+            parentLocalesMap.putIfAbsent(locale, parent);
+        }
+
+        if (locale.equals(parent)) {
+            // means no irregular parent.
+            parent = null;
+        }
+
+        return parent;
+    }
+
     @Override
     public boolean isSupportedProviderLocale(Locale locale, Set<String> langtags) {
         return Locale.ROOT.equals(locale) ||
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/AuxLocaleProviderAdapter.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/AuxLocaleProviderAdapter.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,10 +33,10 @@
 import java.text.spi.DateFormatSymbolsProvider;
 import java.text.spi.DecimalFormatSymbolsProvider;
 import java.text.spi.NumberFormatProvider;
+import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.HashSet;
+import java.util.List;
 import java.util.Locale;
-import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.spi.CalendarDataProvider;
@@ -161,7 +161,7 @@
     @Override
     public Locale[] getAvailableLocales() {
         if (availableLocales == null) {
-            Set<Locale> avail = new HashSet<>();
+            List<Locale> avail = new ArrayList<>();
             for (Class<? extends LocaleServiceProvider> c :
                     LocaleServiceProviderPool.spiClasses) {
                 LocaleServiceProvider lsp = getLocaleServiceProvider(c);
@@ -169,6 +169,7 @@
                     avail.addAll(Arrays.asList(lsp.getAvailableLocales()));
                 }
             }
+            availableLocales = avail.toArray(new Locale[0]);
         }
 
         // assuming caller won't mutate the array.
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/CalendarDataUtility.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/CalendarDataUtility.java	Tue Oct 27 01:45:03 2015 -0400
@@ -50,7 +50,7 @@
         LocaleServiceProviderPool pool =
                 LocaleServiceProviderPool.getPool(CalendarDataProvider.class);
         Integer value = pool.getLocalizedObject(CalendarWeekParameterGetter.INSTANCE,
-                                                locale, FIRST_DAY_OF_WEEK);
+                                                locale, true, FIRST_DAY_OF_WEEK);
         return (value != null && (value >= SUNDAY && value <= SATURDAY)) ? value : SUNDAY;
     }
 
@@ -58,7 +58,7 @@
         LocaleServiceProviderPool pool =
                 LocaleServiceProviderPool.getPool(CalendarDataProvider.class);
         Integer value = pool.getLocalizedObject(CalendarWeekParameterGetter.INSTANCE,
-                                                locale, MINIMAL_DAYS_IN_FIRST_WEEK);
+                                                locale, true, MINIMAL_DAYS_IN_FIRST_WEEK);
         return (value != null && (value >= 1 && value <= 7)) ? value : 1;
     }
 
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/CalendarProviderImpl.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/CalendarProviderImpl.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,6 @@
 package sun.util.locale.provider;
 
 import java.util.Calendar;
-import java.util.Calendar.Builder;
 import java.util.Locale;
 import java.util.Set;
 import java.util.TimeZone;
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/FallbackLocaleProviderAdapter.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/FallbackLocaleProviderAdapter.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,6 @@
 package sun.util.locale.provider;
 
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.Locale;
 import java.util.Set;
 
@@ -70,5 +69,5 @@
     @Override
     public boolean isSupportedProviderLocale(Locale locale, Set<String>langtags) {
         return Locale.ROOT.equals(locale);
+    }
 }
-}
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Locale;
+import java.util.Map;
 import java.util.ResourceBundle;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -46,7 +47,6 @@
 import java.util.spi.LocaleNameProvider;
 import java.util.spi.LocaleServiceProvider;
 import java.util.spi.TimeZoneNameProvider;
-import sun.util.cldr.CLDRLocaleProviderAdapter;
 import sun.util.spi.CalendarProvider;
 
 /**
@@ -60,24 +60,30 @@
      * Adapter type.
      */
     public static enum Type {
-        JRE("sun.util.resources", "sun.text.resources"),
-        CLDR("sun.util.resources.cldr", "sun.text.resources.cldr"),
-        SPI,
-        HOST,
-        FALLBACK("sun.util.resources", "sun.text.resources");
+        JRE("sun.util.locale.provider.JRELocaleProviderAdapter", "sun.util.resources", "sun.text.resources"),
+        CLDR("sun.util.cldr.CLDRLocaleProviderAdapter", "sun.util.resources.cldr", "sun.text.resources.cldr"),
+        SPI("sun.util.locale.provider.SPILocaleProviderAdapter"),
+        HOST("sun.util.locale.provider.HostLocaleProviderAdapter"),
+        FALLBACK("sun.util.locale.provider.FallbackLocaleProviderAdapter", "sun.util.resources", "sun.text.resources");
 
+        private final String CLASSNAME;
         private final String UTIL_RESOURCES_PACKAGE;
         private final String TEXT_RESOURCES_PACKAGE;
 
-        private Type() {
-            this(null, null);
+        private Type(String className) {
+            this(className, null, null);
         }
 
-        private Type(String util, String text) {
+        private Type(String className, String util, String text) {
+            CLASSNAME = className;
             UTIL_RESOURCES_PACKAGE = util;
             TEXT_RESOURCES_PACKAGE = text;
         }
 
+        public String getAdapterClassName() {
+            return CLASSNAME;
+        }
+
         public String getUtilResourcesPackage() {
             return UTIL_RESOURCES_PACKAGE;
         }
@@ -93,36 +99,15 @@
     private static final List<Type> adapterPreference;
 
     /**
-     * JRE Locale Data Adapter instance
-     */
-    private static LocaleProviderAdapter jreLocaleProviderAdapter = new JRELocaleProviderAdapter();
-
-    /**
-     * SPI Locale Data Adapter instance
-     */
-    private static LocaleProviderAdapter spiLocaleProviderAdapter = new SPILocaleProviderAdapter();
-
-    /**
-     * CLDR Locale Data Adapter instance, if any.
+     * LocaleProviderAdapter instances
      */
-    private static LocaleProviderAdapter cldrLocaleProviderAdapter = null;
-
-    /**
-     * HOST Locale Data Adapter instance, if any.
-     */
-    private static LocaleProviderAdapter hostLocaleProviderAdapter = null;
-
-    /**
-     * FALLBACK Locale Data Adapter instance. It's basically the same with JRE, but only kicks
-     * in for the root locale.
-     */
-    private static LocaleProviderAdapter fallbackLocaleProviderAdapter = null;
+    private static final Map<Type, LocaleProviderAdapter> adapterInstances = new ConcurrentHashMap<>();
 
     /**
      * Default fallback adapter type, which should return something meaningful in any case.
-     * This is either JRE or FALLBACK.
+     * This is either CLDR or FALLBACK.
      */
-    static LocaleProviderAdapter.Type defaultLocaleProviderAdapter = null;
+    static volatile LocaleProviderAdapter.Type defaultLocaleProviderAdapter = null;
 
     /**
      * Adapter lookup cache.
@@ -141,20 +126,6 @@
             for (String type : types) {
                 try {
                     Type aType = Type.valueOf(type.trim().toUpperCase(Locale.ROOT));
-
-                    // load adapter if necessary
-                    switch (aType) {
-                        case CLDR:
-                            if (cldrLocaleProviderAdapter == null) {
-                                cldrLocaleProviderAdapter = new CLDRLocaleProviderAdapter();
-                            }
-                            break;
-                        case HOST:
-                            if (hostLocaleProviderAdapter == null) {
-                                hostLocaleProviderAdapter = new HostLocaleProviderAdapter();
-                            }
-                            break;
-                    }
                     if (!typeList.contains(aType)) {
                         typeList.add(aType);
                     }
@@ -166,28 +137,19 @@
             }
         }
 
+        defaultLocaleProviderAdapter = Type.CLDR;
         if (!typeList.isEmpty()) {
-            if (!typeList.contains(Type.JRE)) {
+            // bona fide preference exists
+            if (!typeList.contains(Type.CLDR)) {
                 // Append FALLBACK as the last resort.
-                fallbackLocaleProviderAdapter = new FallbackLocaleProviderAdapter();
                 typeList.add(Type.FALLBACK);
                 defaultLocaleProviderAdapter = Type.FALLBACK;
-            } else {
-                defaultLocaleProviderAdapter = Type.JRE;
             }
         } else {
             // Default preference list.
-            try {
-                cldrLocaleProviderAdapter = new CLDRLocaleProviderAdapter();
-                typeList.add(Type.CLDR);
-                defaultLocaleProviderAdapter = Type.CLDR;
-            } catch (UnsupportedOperationException e) {
-                LocaleServiceProviderPool.config(LocaleProviderAdapter.class, e.toString());
-            }
+            typeList.add(Type.CLDR);
             typeList.add(Type.JRE);
-            defaultLocaleProviderAdapter = Type.JRE;
         }
-
         adapterPreference = Collections.unmodifiableList(typeList);
     }
 
@@ -197,22 +159,42 @@
     public static LocaleProviderAdapter forType(Type type) {
         switch (type) {
         case JRE:
-            return jreLocaleProviderAdapter;
         case CLDR:
-            return cldrLocaleProviderAdapter;
         case SPI:
-            return spiLocaleProviderAdapter;
         case HOST:
-            return hostLocaleProviderAdapter;
         case FALLBACK:
-            return fallbackLocaleProviderAdapter;
+            LocaleProviderAdapter adapter = null;
+            LocaleProviderAdapter cached = adapterInstances.get(type);
+            if (cached == null) {
+                try {
+                    // lazily load adapters here
+                    adapter = (LocaleProviderAdapter)Class.forName(type.getAdapterClassName())
+                        .newInstance();
+                    cached = adapterInstances.putIfAbsent(type, adapter);
+                    if (cached != null) {
+                        adapter = cached;
+                    }
+                } catch (ClassNotFoundException |
+                         IllegalAccessException |
+                         InstantiationException |
+                         UnsupportedOperationException e) {
+                    LocaleServiceProviderPool.config(LocaleProviderAdapter.class, e.toString());
+                    adapterInstances.putIfAbsent(type, NONEXISTENT_ADAPTER);
+                    if (defaultLocaleProviderAdapter == type) {
+                        defaultLocaleProviderAdapter = Type.FALLBACK;
+                    }
+                }
+            } else if (cached != NONEXISTENT_ADAPTER) {
+                adapter = cached;
+            }
+            return adapter;
         default:
             throw new InternalError("unknown locale data adapter type");
         }
     }
 
     public static LocaleProviderAdapter forJRE() {
-        return jreLocaleProviderAdapter;
+        return forType(Type.JRE);
     }
 
     public static LocaleProviderAdapter getResourceBundleBased() {
@@ -227,6 +209,7 @@
         // Shouldn't happen.
         throw new InternalError();
     }
+
     /**
      * Returns the preference order of LocaleProviderAdapter.Type
      */
@@ -281,18 +264,20 @@
         }
 
         // returns the adapter for FALLBACK as the last resort
-        adapterMap.putIfAbsent(locale, fallbackLocaleProviderAdapter);
-        return fallbackLocaleProviderAdapter;
+        adapterMap.putIfAbsent(locale, forType(Type.FALLBACK));
+        return forType(Type.FALLBACK);
     }
 
     private static LocaleProviderAdapter findAdapter(Class<? extends LocaleServiceProvider> providerClass,
                                                  Locale locale) {
         for (Type type : getAdapterPreference()) {
             LocaleProviderAdapter adapter = forType(type);
-            LocaleServiceProvider provider = adapter.getLocaleServiceProvider(providerClass);
-            if (provider != null) {
-                if (provider.isSupportedLocale(locale)) {
-                    return adapter;
+            if (adapter != null) {
+                LocaleServiceProvider provider = adapter.getLocaleServiceProvider(providerClass);
+                if (provider != null) {
+                    if (provider.isSupportedLocale(locale)) {
+                        return adapter;
+                    }
                 }
             }
         }
@@ -442,4 +427,14 @@
     public abstract LocaleResources getLocaleResources(Locale locale);
 
     public abstract Locale[] getAvailableLocales();
+
+    private static final LocaleProviderAdapter NONEXISTENT_ADAPTER = new NonExistentAdapter();
+    private static final class NonExistentAdapter extends FallbackLocaleProviderAdapter {
+        @Override
+        public LocaleProviderAdapter.Type getAdapterType() {
+            return null;
+        }
+
+        private NonExistentAdapter() {};
+    }
 }
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleResources.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleResources.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -71,8 +71,8 @@
     private final LocaleProviderAdapter.Type type;
 
     // Resource cache
-    private ConcurrentMap<String, ResourceReference> cache = new ConcurrentHashMap<>();
-    private ReferenceQueue<Object> referenceQueue = new ReferenceQueue<>();
+    private final ConcurrentMap<String, ResourceReference> cache = new ConcurrentHashMap<>();
+    private final ReferenceQueue<Object> referenceQueue = new ReferenceQueue<>();
 
     // cache key prefixes
     private static final String BREAK_ITERATOR_INFO = "BII.";
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderPool.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderPool.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,20 +53,13 @@
      * A Map that holds singleton instances of this class.  Each instance holds a
      * set of provider implementations of a particular locale sensitive service.
      */
-    private static ConcurrentMap<Class<? extends LocaleServiceProvider>, LocaleServiceProviderPool> poolOfPools =
-        new ConcurrentHashMap<>();
-
-    /**
-     * A Map containing locale service providers that implement the
-     * specified provider SPI, keyed by a LocaleProviderAdapter.Type
-     */
-    private ConcurrentMap<LocaleProviderAdapter.Type, LocaleServiceProvider> providers =
+    private static final ConcurrentMap<Class<? extends LocaleServiceProvider>, LocaleServiceProviderPool> poolOfPools =
         new ConcurrentHashMap<>();
 
     /**
      * A Map that retains Locale->provider mapping
      */
-    private ConcurrentMap<Locale, List<LocaleProviderAdapter.Type>> providersCache =
+    private final ConcurrentMap<Locale, List<LocaleServiceProvider>> providersCache =
         new ConcurrentHashMap<>();
 
     /**
@@ -78,7 +71,7 @@
     /**
      * Provider class
      */
-    private Class<? extends LocaleServiceProvider> providerClass;
+    private final Class<? extends LocaleServiceProvider> providerClass;
 
     /**
      * Array of all Locale Sensitive SPI classes.
@@ -126,16 +119,6 @@
      */
     private LocaleServiceProviderPool (final Class<? extends LocaleServiceProvider> c) {
         providerClass = c;
-
-        for (LocaleProviderAdapter.Type type : LocaleProviderAdapter.getAdapterPreference()) {
-            LocaleProviderAdapter lda = LocaleProviderAdapter.forType(type);
-            if (lda != null) {
-                LocaleServiceProvider provider = lda.getLocaleServiceProvider(c);
-                if (provider != null) {
-                    providers.putIfAbsent(type, provider);
-                }
-            }
-        }
     }
 
     static void config(Class<? extends Object> caller, String message) {
@@ -208,10 +191,16 @@
     private synchronized Set<Locale> getAvailableLocaleSet() {
         if (availableLocales == null) {
             availableLocales = new HashSet<>();
-            for (LocaleServiceProvider lsp : providers.values()) {
-                Locale[] locales = lsp.getAvailableLocales();
-                for (Locale locale: locales) {
-                    availableLocales.add(getLookupLocale(locale));
+            for (LocaleProviderAdapter.Type type : LocaleProviderAdapter.getAdapterPreference()) {
+                LocaleProviderAdapter lda = LocaleProviderAdapter.forType(type);
+                if (lda != null) {
+                    LocaleServiceProvider lsp = lda.getLocaleServiceProvider(providerClass);
+                    if (lsp != null) {
+                        Locale[] locales = lsp.getAvailableLocales();
+                        for (Locale locale: locales) {
+                            availableLocales.add(getLookupLocale(locale));
+                        }
+                    }
                 }
             }
         }
@@ -220,18 +209,6 @@
     }
 
     /**
-     * Returns whether any provider for this locale sensitive
-     * service is available or not, excluding JRE's one.
-     *
-     * @return true if any provider (other than JRE) is available
-     */
-    boolean hasProviders() {
-        return providers.size() != 1 ||
-               (providers.get(LocaleProviderAdapter.Type.JRE) == null &&
-                providers.get(LocaleProviderAdapter.Type.FALLBACK) == null);
-    }
-
-    /**
      * Returns the provider's localized object for the specified
      * locale.
      *
@@ -265,6 +242,26 @@
         return getLocalizedObjectImpl(getter, locale, false, key, params);
     }
 
+    /**
+     * Returns the provider's localized name for the specified
+     * locale.
+     *
+     * @param getter an object on which getObject() method
+     *     is called to obtain the provider's instance.
+     * @param locale the given locale that is used as the starting one
+     * @param isObjectProvider flag designating object provder or not
+     * @param key the key string for name providers
+     * @param params provider specific parameters
+     * @return provider's instance, or null.
+     */
+    public <P extends LocaleServiceProvider, S> S getLocalizedObject(LocalizedObjectGetter<P, S> getter,
+                                     Locale locale,
+                                     Boolean isObjectProvider,
+                                     String key,
+                                     Object... params) {
+        return getLocalizedObjectImpl(getter, locale, isObjectProvider, key, params);
+    }
+
     @SuppressWarnings("unchecked")
     private <P extends LocaleServiceProvider, S> S getLocalizedObjectImpl(LocalizedObjectGetter<P, S> getter,
                                      Locale locale,
@@ -275,30 +272,19 @@
             throw new NullPointerException();
         }
 
-        // Check whether JRE is the sole locale data provider or not,
-        // and directly call it if it is.
-        if (!hasProviders()) {
-            return getter.getObject((P)providers.get(LocaleProviderAdapter.defaultLocaleProviderAdapter),
-                                    locale, key, params);
-        }
-
         List<Locale> lookupLocales = getLookupLocales(locale);
 
-        Set<Locale> available = getAvailableLocaleSet();
         for (Locale current : lookupLocales) {
-            if (available.contains(current)) {
-                S providersObj;
+            S providersObj;
 
-                for (LocaleProviderAdapter.Type type: findProviders(current)) {
-                    LocaleServiceProvider lsp = providers.get(type);
-                    providersObj = getter.getObject((P)lsp, locale, key, params);
-                    if (providersObj != null) {
-                        return providersObj;
-                    } else if (isObjectProvider) {
-                        config(LocaleServiceProviderPool.class,
-                            "A locale sensitive service provider returned null for a localized objects,  which should not happen.  provider: "
-                                + lsp + " locale: " + locale);
-                    }
+            for (LocaleServiceProvider lsp: findProviders(current, isObjectProvider)) {
+                providersObj = getter.getObject((P)lsp, locale, key, params);
+                if (providersObj != null) {
+                    return providersObj;
+                } else if (isObjectProvider) {
+                    config(LocaleServiceProviderPool.class,
+                        "A locale sensitive service provider returned null for a localized objects,  which should not happen.  provider: "
+                            + lsp + " locale: " + locale);
                 }
             }
         }
@@ -314,31 +300,36 @@
      * @param locale the given locale
      * @return the list of locale data adapter types
      */
-    private List<LocaleProviderAdapter.Type> findProviders(Locale locale) {
-        List<LocaleProviderAdapter.Type> providersList = providersCache.get(locale);
+    private List<LocaleServiceProvider> findProviders(Locale locale, boolean isObjectProvider) {
+        List<LocaleServiceProvider> providersList = providersCache.get(locale);
         if (providersList == null) {
             for (LocaleProviderAdapter.Type type : LocaleProviderAdapter.getAdapterPreference()) {
-                LocaleServiceProvider lsp = providers.get(type);
-                if (lsp != null) {
-                    if (lsp.isSupportedLocale(locale)) {
-                        if (providersList == null) {
-                            providersList = new ArrayList<>(2);
+                LocaleProviderAdapter lda = LocaleProviderAdapter.forType(type);
+                if (lda != null) {
+                    LocaleServiceProvider lsp = lda.getLocaleServiceProvider(providerClass);
+                    if (lsp != null) {
+                        if (lsp.isSupportedLocale(locale)) {
+                            if (providersList == null) {
+                                providersList = new ArrayList<>(2);
+                            }
+                            providersList.add(lsp);
+                            if (isObjectProvider) {
+                                break;
+                            }
                         }
-                        providersList.add(type);
-
                     }
                 }
             }
             if (providersList == null) {
                 providersList = NULL_LIST;
             }
-            List<LocaleProviderAdapter.Type> val = providersCache.putIfAbsent(locale, providersList);
+            List<LocaleServiceProvider> val = providersCache.putIfAbsent(locale, providersList);
             if (val != null) {
                 providersList = val;
             }
         }
-            return providersList;
-        }
+        return providersList;
+    }
 
     /**
      * Returns a list of candidate locales for service look up.
@@ -393,7 +384,7 @@
      * A dummy locale service provider list that indicates there is no
      * provider available
      */
-    private static List<LocaleProviderAdapter.Type> NULL_LIST =
+    private static final List<LocaleServiceProvider> NULL_LIST =
         Collections.emptyList();
 
     /**
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/SPILocaleProviderAdapter.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/SPILocaleProviderAdapter.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -133,7 +133,7 @@
      */
     static class BreakIteratorProviderDelegate extends BreakIteratorProvider
                                         implements Delegate<BreakIteratorProvider> {
-        private ConcurrentMap<Locale, BreakIteratorProvider> map = new ConcurrentHashMap<>();
+        private final ConcurrentMap<Locale, BreakIteratorProvider> map = new ConcurrentHashMap<>();
 
         @Override
         public void addImpl(BreakIteratorProvider impl) {
@@ -188,7 +188,7 @@
     }
 
     static class CollatorProviderDelegate extends CollatorProvider implements Delegate<CollatorProvider> {
-        private ConcurrentMap<Locale, CollatorProvider> map = new ConcurrentHashMap<>();
+        private final ConcurrentMap<Locale, CollatorProvider> map = new ConcurrentHashMap<>();
 
         @Override
         public void addImpl(CollatorProvider impl) {
@@ -222,7 +222,7 @@
 
     static class DateFormatProviderDelegate extends DateFormatProvider
                                      implements Delegate<DateFormatProvider> {
-        private ConcurrentMap<Locale, DateFormatProvider> map = new ConcurrentHashMap<>();
+        private final ConcurrentMap<Locale, DateFormatProvider> map = new ConcurrentHashMap<>();
 
         @Override
         public void addImpl(DateFormatProvider impl) {
@@ -270,7 +270,7 @@
 
     static class DateFormatSymbolsProviderDelegate extends DateFormatSymbolsProvider
                                             implements Delegate<DateFormatSymbolsProvider> {
-        private ConcurrentMap<Locale, DateFormatSymbolsProvider> map = new ConcurrentHashMap<>();
+        private final ConcurrentMap<Locale, DateFormatSymbolsProvider> map = new ConcurrentHashMap<>();
 
         @Override
         public void addImpl(DateFormatSymbolsProvider impl) {
@@ -304,7 +304,7 @@
 
     static class DecimalFormatSymbolsProviderDelegate extends DecimalFormatSymbolsProvider
                                                implements Delegate<DecimalFormatSymbolsProvider> {
-        private ConcurrentMap<Locale, DecimalFormatSymbolsProvider> map = new ConcurrentHashMap<>();
+        private final ConcurrentMap<Locale, DecimalFormatSymbolsProvider> map = new ConcurrentHashMap<>();
 
         @Override
         public void addImpl(DecimalFormatSymbolsProvider impl) {
@@ -338,7 +338,7 @@
 
     static class NumberFormatProviderDelegate extends NumberFormatProvider
                                        implements Delegate<NumberFormatProvider> {
-        private ConcurrentMap<Locale, NumberFormatProvider> map = new ConcurrentHashMap<>();
+        private final ConcurrentMap<Locale, NumberFormatProvider> map = new ConcurrentHashMap<>();
 
         @Override
         public void addImpl(NumberFormatProvider impl) {
@@ -393,7 +393,7 @@
 
     static class CalendarDataProviderDelegate extends CalendarDataProvider
                                        implements Delegate<CalendarDataProvider> {
-        private ConcurrentMap<Locale, CalendarDataProvider> map = new ConcurrentHashMap<>();
+        private final ConcurrentMap<Locale, CalendarDataProvider> map = new ConcurrentHashMap<>();
 
         @Override
         public void addImpl(CalendarDataProvider impl) {
@@ -434,7 +434,7 @@
 
     static class CalendarNameProviderDelegate extends CalendarNameProvider
                                        implements Delegate<CalendarNameProvider> {
-        private ConcurrentMap<Locale, CalendarNameProvider> map = new ConcurrentHashMap<>();
+        private final ConcurrentMap<Locale, CalendarNameProvider> map = new ConcurrentHashMap<>();
 
         @Override
         public void addImpl(CalendarNameProvider impl) {
@@ -479,7 +479,7 @@
 
     static class CurrencyNameProviderDelegate extends CurrencyNameProvider
                                        implements Delegate<CurrencyNameProvider> {
-        private ConcurrentMap<Locale, CurrencyNameProvider> map = new ConcurrentHashMap<>();
+        private final ConcurrentMap<Locale, CurrencyNameProvider> map = new ConcurrentHashMap<>();
 
         @Override
         public void addImpl(CurrencyNameProvider impl) {
@@ -520,7 +520,7 @@
 
     static class LocaleNameProviderDelegate extends LocaleNameProvider
                                      implements Delegate<LocaleNameProvider> {
-        private ConcurrentMap<Locale, LocaleNameProvider> map = new ConcurrentHashMap<>();
+        private final ConcurrentMap<Locale, LocaleNameProvider> map = new ConcurrentHashMap<>();
 
         @Override
         public void addImpl(LocaleNameProvider impl) {
@@ -575,7 +575,7 @@
 
     static class TimeZoneNameProviderDelegate extends TimeZoneNameProvider
                                      implements Delegate<TimeZoneNameProvider> {
-        private ConcurrentMap<Locale, TimeZoneNameProvider> map = new ConcurrentHashMap<>();
+        private final ConcurrentMap<Locale, TimeZoneNameProvider> map = new ConcurrentHashMap<>();
 
         @Override
         public void addImpl(TimeZoneNameProvider impl) {
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/TimeZoneNameUtility.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/TimeZoneNameUtility.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,7 @@
     /**
      * cache to hold time zone localized strings. Keyed by Locale
      */
-    private static ConcurrentHashMap<Locale, SoftReference<String[][]>> cachedZoneData =
+    private static final ConcurrentHashMap<Locale, SoftReference<String[][]>> cachedZoneData =
         new ConcurrentHashMap<>();
 
     /**
--- a/jdk/src/java.base/share/conf/security/java.security	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/conf/security/java.security	Tue Oct 27 01:45:03 2015 -0400
@@ -90,6 +90,31 @@
 security.provider.tbd=sun.security.pkcs11.SunPKCS11
 #endif
 
+#
+# A list of preferred providers for specific algorithms. These providers will
+# be searched for matching algorithms before the list of registered providers.
+# Entries containing errors (parsing, etc) will be ignored. Use the
+# -Djava.security.debug=jca property to debug these errors.
+#
+# The property is a comma-separated list of serviceType.algorithm:provider
+# entries. The serviceType (example: "MessageDigest") is optional, and if
+# not specified, the algorithm applies to all service types that support it.
+# The algorithm is the standard algorithm name or transformation.
+# Transformations can be specified in their full standard name
+# (ex: AES/CBC/PKCS5Padding), or as partial matches (ex: AES, AES/CBC).
+# The provider is the name of the provider. Any provider that does not
+# also appear in the registered list will be ignored.
+#
+# Example:
+#   jdk.security.provider.preferred=AES/GCM/NoPadding:SunJCE, \
+#         MessageDigest.SHA-256:SUN
+#ifdef solaris-sparc
+jdk.security.provider.preferred=AES:SunJCE, SHA-256:SUN, SHA-384:SUN, SHA-512:SUN
+#endif
+#ifdef solaris-x86
+jdk.security.provider.preferred=AES:SunJCE, RSA:SunRsaSign
+#endif
+
 
 #
 # Sun Provider SecureRandom seed source.
@@ -234,6 +259,7 @@
                com.sun.org.apache.xalan.internal.xsltc.util.,\
                com.sun.org.apache.xml.internal.res.,\
                com.sun.org.apache.xml.internal.security.,\
+               com.sun.org.apache.xml.internal.serializer.dom3.,\
                com.sun.org.apache.xml.internal.serializer.utils.,\
                com.sun.org.apache.xml.internal.utils.,\
                com.sun.org.glassfish.,\
@@ -289,6 +315,7 @@
                    com.sun.org.apache.xalan.internal.xsltc.util.,\
                    com.sun.org.apache.xml.internal.res.,\
                    com.sun.org.apache.xml.internal.security.,\
+                   com.sun.org.apache.xml.internal.serializer.dom3.,\
                    com.sun.org.apache.xml.internal.serializer.utils.,\
                    com.sun.org.apache.xml.internal.utils.,\
                    com.sun.org.glassfish.,\
@@ -607,3 +634,60 @@
         DH_RSA_EXPORT, RSA_EXPORT, \
         DH_anon, ECDH_anon, \
         RC4_128, RC4_40, DES_CBC, DES40_CBC
+
+# The pre-defined default finite field Diffie-Hellman ephemeral (DHE)
+# parameters for Transport Layer Security (SSL/TLS/DTLS) processing.
+#
+# In traditional SSL/TLS/DTLS connections where finite field DHE parameters
+# negotiation mechanism is not used, the server offers the client group
+# parameters, base generator g and prime modulus p, for DHE key exchange.
+# It is recommended to use dynamic group parameters.  This property defines
+# a mechanism that allows you to specify custom group parameters.
+#
+# The syntax of this property string is described as this Java BNF-style:
+#   DefaultDHEParameters:
+#       DefinedDHEParameters { , DefinedDHEParameters }
+#
+#   DefinedDHEParameters:
+#       "{" DHEPrimeModulus , DHEBaseGenerator "}"
+#
+#   DHEPrimeModulus:
+#       HexadecimalDigits
+#
+#   DHEBaseGenerator:
+#       HexadecimalDigits
+#
+#   HexadecimalDigits:
+#       HexadecimalDigit { HexadecimalDigit }
+#
+#   HexadecimalDigit: one of
+#       0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f
+#
+# Whitespace characters are ignored.
+#
+# The "DefinedDHEParameters" defines the custom group parameters, prime
+# modulus p and base generator g, for a particular size of prime modulus p.
+# The "DHEPrimeModulus" defines the hexadecimal prime modulus p, and the
+# "DHEBaseGenerator" defines the hexadecimal base generator g of a group
+# parameter.  It is recommended to use safe primes for the custom group
+# parameters.
+#
+# If this property is not defined or the value is empty, the underlying JSSE
+# provider's default group parameter is used for each connection.
+#
+# If the property value does not follow the grammar, or a particular group
+# parameter is not valid, the connection will fall back and use the
+# underlying JSSE provider's default group parameter.
+#
+# Note: This property is currently used by OpenJDK's JSSE implementation. It
+# is not guaranteed to be examined and used by other implementations.
+#
+# Example:
+#   jdk.tls.server.defaultDHEParameters=
+#       { \
+#       FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 \
+#       29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD \
+#       EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245 \
+#       E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED \
+#       EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381 \
+#       FFFFFFFF FFFFFFFF, 2}
--- a/jdk/src/java.base/share/native/libfdlibm/s_cbrt.c	Mon Oct 19 17:52:39 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-
-/*
- * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "fdlibm.h"
-
-/* cbrt(x)
- * Return cube root of x
- */
-#ifdef __STDC__
-static const unsigned
-#else
-static unsigned
-#endif
-        B1 = 715094163, /* B1 = (682-0.03306235651)*2**20 */
-        B2 = 696219795; /* B2 = (664-0.03306235651)*2**20 */
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-C =  5.42857142857142815906e-01, /* 19/35     = 0x3FE15F15, 0xF15F15F1 */
-D = -7.05306122448979611050e-01, /* -864/1225 = 0xBFE691DE, 0x2532C834 */
-E =  1.41428571428571436819e+00, /* 99/70     = 0x3FF6A0EA, 0x0EA0EA0F */
-F =  1.60714285714285720630e+00, /* 45/28     = 0x3FF9B6DB, 0x6DB6DB6E */
-G =  3.57142857142857150787e-01; /* 5/14      = 0x3FD6DB6D, 0xB6DB6DB7 */
-
-#ifdef __STDC__
-        double cbrt(double x)
-#else
-        double cbrt(x)
-        double x;
-#endif
-{
-        int     hx;
-        double r,s,t=0.0,w;
-        unsigned sign;
-
-
-        hx = __HI(x);           /* high word of x */
-        sign=hx&0x80000000;             /* sign= sign(x) */
-        hx  ^=sign;
-        if(hx>=0x7ff00000) return(x+x); /* cbrt(NaN,INF) is itself */
-        if((hx|__LO(x))==0)
-            return(x);          /* cbrt(0) is itself */
-
-        __HI(x) = hx;   /* x <- |x| */
-    /* rough cbrt to 5 bits */
-        if(hx<0x00100000)               /* subnormal number */
-          {__HI(t)=0x43500000;          /* set t= 2**54 */
-           t*=x; __HI(t)=__HI(t)/3+B2;
-          }
-        else
-          __HI(t)=hx/3+B1;
-
-
-    /* new cbrt to 23 bits, may be implemented in single precision */
-        r=t*t/x;
-        s=C+r*t;
-        t*=G+F/(s+E+D/s);
-
-    /* chopped to 20 bits and make it larger than cbrt(x) */
-        __LO(t)=0; __HI(t)+=0x00000001;
-
-
-    /* one step newton iteration to 53 bits with error less than 0.667 ulps */
-        s=t*t;          /* t*t is exact */
-        r=x/s;
-        w=t+t;
-        r=(r-t)/(w+r);  /* r-s is exact */
-        t=t+t*r;
-
-    /* retore the sign bit */
-        __HI(t) |= sign;
-        return(t);
-}
--- a/jdk/src/java.base/share/native/libjava/StrictMath.c	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/native/libjava/StrictMath.c	Tue Oct 27 01:45:03 2015 -0400
@@ -89,12 +89,6 @@
 }
 
 JNIEXPORT jdouble JNICALL
-Java_java_lang_StrictMath_cbrt(JNIEnv *env, jclass unused, jdouble d)
-{
-    return (jdouble) jcbrt((double)d);
-}
-
-JNIEXPORT jdouble JNICALL
 Java_java_lang_StrictMath_atan2(JNIEnv *env, jclass unused, jdouble d1, jdouble d2)
 {
     return (jdouble) jatan2((double)d1, (double)d2);
--- a/jdk/src/java.base/share/native/libnet/InetAddress.c	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/native/libnet/InetAddress.c	Tue Oct 27 01:45:03 2015 -0400
@@ -38,6 +38,7 @@
 jfieldID iac_addressID;
 jfieldID iac_familyID;
 jfieldID iac_hostNameID;
+jfieldID iac_origHostNameID;
 jfieldID ia_preferIPv6AddressID;
 
 static int ia_initialized = 0;
@@ -69,6 +70,8 @@
         CHECK_NULL(iac_familyID);
         iac_hostNameID = (*env)->GetFieldID(env, iac_class, "hostName", "Ljava/lang/String;");
         CHECK_NULL(iac_hostNameID);
+        iac_origHostNameID = (*env)->GetFieldID(env, iac_class, "originalHostName", "Ljava/lang/String;");
+        CHECK_NULL(iac_origHostNameID);
         ia_initialized = 1;
     }
 }
--- a/jdk/src/java.base/share/native/libnet/net_util.c	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/native/libnet/net_util.c	Tue Oct 27 01:45:03 2015 -0400
@@ -174,6 +174,7 @@
 void setInetAddress_hostName(JNIEnv *env, jobject iaObj, jobject host) {
     jobject holder = (*env)->GetObjectField(env, iaObj, ia_holderID);
     (*env)->SetObjectField(env, holder, iac_hostNameID, host);
+    (*env)->SetObjectField(env, holder, iac_origHostNameID, host);
 }
 
 int getInetAddress_addr(JNIEnv *env, jobject iaObj) {
--- a/jdk/src/java.base/share/native/libnet/net_util.h	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/native/libnet/net_util.h	Tue Oct 27 01:45:03 2015 -0400
@@ -53,6 +53,7 @@
 extern jfieldID iac_addressID;
 extern jfieldID iac_familyID;
 extern jfieldID iac_hostNameID;
+extern jfieldID iac_origHostNameID;
 extern jfieldID ia_preferIPv6AddressID;
 
 JNIEXPORT void JNICALL initInetAddressIDs(JNIEnv *env);
--- a/jdk/src/java.base/share/native/libzip/zip_util.c	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/share/native/libzip/zip_util.c	Tue Oct 27 01:45:03 2015 -0400
@@ -1302,12 +1302,23 @@
 jint
 ZIP_Read(jzfile *zip, jzentry *entry, jlong pos, void *buf, jint len)
 {
-    jlong entry_size = (entry->csize != 0) ? entry->csize : entry->size;
+    jlong entry_size;
     jlong start;
 
+    if (zip == 0) {
+        return -1;
+    }
+
     /* Clear previous zip error */
     zip->msg = NULL;
 
+    if (entry == 0) {
+        zip->msg = "ZIP_Read: jzentry is NULL";
+        return -1;
+    }
+
+    entry_size = (entry->csize != 0) ? entry->csize : entry->size;
+
     /* Check specified position */
     if (pos < 0 || pos > entry_size - 1) {
         zip->msg = "ZIP_Read: specified offset out of range";
@@ -1440,6 +1451,11 @@
     char *msg;
     char tmpbuf[1024];
 
+    if (entry == 0) {
+        jio_fprintf(stderr, "jzentry was invalid");
+        return JNI_FALSE;
+    }
+
     strcpy(entryname, entry->name);
     if (entry->csize == 0) {
         /* Entry is stored */
--- a/jdk/src/java.base/unix/native/libnet/ResolverConfigurationImpl.c	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/unix/native/libnet/ResolverConfigurationImpl.c	Tue Oct 27 01:45:03 2015 -0400
@@ -30,12 +30,9 @@
 
 #ifdef __solaris__
 #include <sys/systeminfo.h>
-#include <strings.h>
 #endif
 
-#if defined(__linux__) || defined(_ALLBSD_SOURCE)
 #include <string.h>
-#endif
 
 #include "jni.h"
 
--- a/jdk/src/java.base/windows/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.base/windows/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,6 @@
 import java.util.Currency;
 import java.util.HashSet;
 import java.util.Locale;
-import java.util.Map;
 import java.util.ResourceBundle.Control;
 import java.util.Set;
 import java.util.TimeZone;
@@ -100,10 +99,10 @@
     };
 
     // Caches
-    private static ConcurrentMap<Locale, SoftReference<AtomicReferenceArray<String>>> dateFormatCache = new ConcurrentHashMap<>();
-    private static ConcurrentMap<Locale, SoftReference<DateFormatSymbols>> dateFormatSymbolsCache = new ConcurrentHashMap<>();
-    private static ConcurrentMap<Locale, SoftReference<AtomicReferenceArray<String>>> numberFormatCache = new ConcurrentHashMap<>();
-    private static ConcurrentMap<Locale, SoftReference<DecimalFormatSymbols>> decimalFormatSymbolsCache = new ConcurrentHashMap<>();
+    private static final ConcurrentMap<Locale, SoftReference<AtomicReferenceArray<String>>> dateFormatCache = new ConcurrentHashMap<>();
+    private static final ConcurrentMap<Locale, SoftReference<DateFormatSymbols>> dateFormatSymbolsCache = new ConcurrentHashMap<>();
+    private static final ConcurrentMap<Locale, SoftReference<AtomicReferenceArray<String>>> numberFormatCache = new ConcurrentHashMap<>();
+    private static final ConcurrentMap<Locale, SoftReference<DecimalFormatSymbols>> decimalFormatSymbolsCache = new ConcurrentHashMap<>();
 
     private static final Set<Locale> supportedLocaleSet;
     private static final String nativeDisplayLanguage;
--- a/jdk/src/java.datatransfer/macosx/classes/sun/datatransfer/resources/flavormap.properties	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.datatransfer/macosx/classes/sun/datatransfer/resources/flavormap.properties	Tue Oct 27 01:45:03 2015 -0400
@@ -74,3 +74,4 @@
 HTML=text/html;charset=utf-8;eoln="\r\n";terminators=1
 URL=application/x-java-url;class=java.net.URL,\
     text/uri-list;eoln="\r\n";terminators=1
+XPICT=image/x-pict;class=java.io.InputStream
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Tue Oct 27 01:45:03 2015 -0400
@@ -54,7 +54,8 @@
         "PDF",
         "URL",
         "PNG",
-        "JFIF"
+        "JFIF",
+        "XPICT"
     };
 
     static {
@@ -78,6 +79,7 @@
     public static final int CF_URL         = 7;
     public static final int CF_PNG         = 8;
     public static final int CF_JPEG        = 9;
+    public static final int CF_XPICT       = 10;
 
     private CDataTransferer() {}
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CDataTransferer.m	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CDataTransferer.m	Tue Oct 27 01:45:03 2015 -0400
@@ -56,6 +56,8 @@
                               forKey:[NSNumber numberWithLong:sun_lwawt_macosx_CDataTransferer_CF_PNG]];
         [sStandardMappings setObject:(NSString*)kUTTypeJPEG
                               forKey:[NSNumber numberWithLong:sun_lwawt_macosx_CDataTransferer_CF_JPEG]];
+        [sStandardMappings setObject:NSPICTPboardType
+                              forKey:[NSNumber numberWithLong:sun_lwawt_macosx_CDataTransferer_CF_XPICT]];
     }
     return sStandardMappings;
 }
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java	Tue Oct 27 01:45:03 2015 -0400
@@ -290,6 +290,8 @@
                 imageType = VERSION_2_8_BIT;
             } else if (bitsPerPixel == 24) {
                 imageType = VERSION_2_24_BIT;
+            } else {
+                throw new IIOException(I18N.getString("BMPImageReader8"));
             }
 
             // Read in the palette
@@ -364,6 +366,9 @@
                         metadata.redMask = redMask;
                         metadata.greenMask = greenMask;
                         metadata.blueMask = blueMask;
+                    } else {
+                        throw new
+                            IIOException(I18N.getString("BMPImageReader8"));
                     }
 
                     metadata.bmpVersion = VERSION_3;
@@ -375,6 +380,9 @@
                         imageType = VERSION_3_NT_16_BIT;
                     } else if (bitsPerPixel == 32) {
                         imageType = VERSION_3_NT_32_BIT;
+                    } else {
+                        throw new
+                            IIOException(I18N.getString("BMPImageReader8"));
                     }
 
                     // BitsField encoding
@@ -493,6 +501,9 @@
                             greenMask = 0x0000FF00;
                             blueMask  = 0x000000FF;
                         }
+                    } else {
+                        throw new
+                            IIOException(I18N.getString("BMPImageReader8"));
                     }
 
                     metadata.redMask = redMask;
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/iio-plugin.properties	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/iio-plugin.properties	Tue Oct 27 01:45:03 2015 -0400
@@ -23,6 +23,7 @@
 BMPImageReader5=Input has not been set.
 BMPImageReader6=Unable to read the image header.
 BMPImageReader7=Invalid bitmap offset.
+BMPImageReader8=Invalid bits per pixel in image header.
 BMPImageWriter0=Output is not an ImageOutputStream.
 BMPImageWriter1=The image region to be encoded is empty.
 BMPImageWriter2=Only 1 or 3 band image is encoded.
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1569,6 +1569,11 @@
                 && OSInfo.getWindowsVersion().compareTo(OSInfo.WINDOWS_VISTA) >= 0;
     }
 
+    static boolean isOnWindows7() {
+        return OSInfo.getOSType() == OSInfo.OSType.WINDOWS
+                && OSInfo.getWindowsVersion().compareTo(OSInfo.WINDOWS_7) >= 0;
+    }
+
     private void initVistaComponentDefaults(UIDefaults table) {
         if (! isOnVista()) {
             return;
@@ -1638,28 +1643,30 @@
         }
         table.putDefaults(menuDefaults);
 
-        /* no margins */
-        InsetsUIResource insets = new InsetsUIResource(0, 0, 0, 0);
-        for (int i = 0, j = 0; i < menuClasses.length; i++) {
-            String key = menuClasses[i] + ".margin";
-            Object oldValue = table.get(key);
-            menuDefaults[j++] = key;
-            menuDefaults[j++] = new XPValue(insets, oldValue);
-        }
-        table.putDefaults(menuDefaults);
+        /*For Windows7 margin and checkIconOffset should be greater than 0 */
+        if (!isOnWindows7()) {
+            /* no margins */
+            InsetsUIResource insets = new InsetsUIResource(0, 0, 0, 0);
+            for (int i = 0, j = 0; i < menuClasses.length; i++) {
+                String key = menuClasses[i] + ".margin";
+                Object oldValue = table.get(key);
+                menuDefaults[j++] = key;
+                menuDefaults[j++] = new XPValue(insets, oldValue);
+            }
+            table.putDefaults(menuDefaults);
 
-        /* set checkIcon offset */
-        Integer checkIconOffsetInteger =
-            Integer.valueOf(0);
-        for (int i = 0, j = 0; i < menuClasses.length; i++) {
-            String key = menuClasses[i] + ".checkIconOffset";
-            Object oldValue = table.get(key);
-            menuDefaults[j++] = key;
-            menuDefaults[j++] =
-                new XPValue(checkIconOffsetInteger, oldValue);
+            /* set checkIcon offset */
+            Integer checkIconOffsetInteger =
+                Integer.valueOf(0);
+            for (int i = 0, j = 0; i < menuClasses.length; i++) {
+                String key = menuClasses[i] + ".checkIconOffset";
+                Object oldValue = table.get(key);
+                menuDefaults[j++] = key;
+                menuDefaults[j++] =
+                    new XPValue(checkIconOffsetInteger, oldValue);
+            }
+            table.putDefaults(menuDefaults);
         }
-        table.putDefaults(menuDefaults);
-
         /* set width of the gap after check icon */
         Integer afterCheckIconGap = WindowsPopupMenuUI.getSpanBeforeGutter()
                 + WindowsPopupMenuUI.getGutterWidth()
--- a/jdk/src/java.desktop/share/classes/java/awt/Button.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/java/awt/Button.java	Tue Oct 27 01:45:03 2015 -0400
@@ -26,6 +26,7 @@
 package java.awt;
 
 import java.awt.peer.ButtonPeer;
+import java.beans.BeanProperty;
 import java.util.EventListener;
 import java.awt.event.*;
 import java.io.ObjectOutputStream;
@@ -511,11 +512,10 @@
      *
      * @return an <code>AccessibleAWTButton</code> that serves as the
      *         <code>AccessibleContext</code> of this <code>Button</code>
-     * @beaninfo
-     *       expert: true
-     *  description: The AccessibleContext associated with this Button.
      * @since 1.3
      */
+    @BeanProperty(expert = true, description
+            = "The AccessibleContext associated with this Button.")
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleAWTButton();
--- a/jdk/src/java.desktop/share/classes/java/awt/Component.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/java/awt/Component.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1763,8 +1763,6 @@
      * is returned
      * @see #setForeground
      * @since 1.0
-     * @beaninfo
-     *       bound: true
      */
     @Transient
     public Color getForeground() {
@@ -1843,8 +1841,6 @@
      *          component will inherit the background color of its parent
      * @see #getBackground
      * @since 1.0
-     * @beaninfo
-     *       bound: true
      */
     public void setBackground(Color c) {
         Color oldColor = background;
@@ -1911,8 +1907,6 @@
      * @see #getFont
      * @see #invalidate
      * @since 1.0
-     * @beaninfo
-     *       bound: true
      */
     public void setFont(Font f) {
         Font oldFont, newFont;
@@ -7234,8 +7228,6 @@
      * @param focusable indicates whether this Component is focusable
      * @see #isFocusable
      * @since 1.4
-     * @beaninfo
-     *       bound: true
      */
     public void setFocusable(boolean focusable) {
         boolean oldFocusable;
@@ -7327,8 +7319,6 @@
      *         or if any keystroke already maps to another focus traversal
      *         operation for this Component
      * @since 1.4
-     * @beaninfo
-     *       bound: true
      */
     public void setFocusTraversalKeys(int id,
                                       Set<? extends AWTKeyStroke> keystrokes)
@@ -7479,8 +7469,6 @@
      * @see #setFocusTraversalKeys
      * @see #getFocusTraversalKeys
      * @since 1.4
-     * @beaninfo
-     *       bound: true
      */
     public void setFocusTraversalKeysEnabled(boolean
                                              focusTraversalKeysEnabled) {
@@ -8995,8 +8983,6 @@
      * @see #invalidate
      *
      * @author Laura Werner, IBM
-     * @beaninfo
-     *       bound: true
      */
     public void setComponentOrientation(ComponentOrientation o) {
         ComponentOrientation oldValue = componentOrientation;
--- a/jdk/src/java.desktop/share/classes/java/awt/Container.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/java/awt/Container.java	Tue Oct 27 01:45:03 2015 -0400
@@ -3131,8 +3131,6 @@
      *         or if any keystroke already maps to another focus traversal
      *         operation for this Container
      * @since 1.4
-     * @beaninfo
-     *       bound: true
      */
     public void setFocusTraversalKeys(int id,
                                       Set<? extends AWTKeyStroke> keystrokes)
@@ -3347,8 +3345,6 @@
      * @see #setFocusCycleRoot
      * @see #isFocusCycleRoot
      * @since 1.4
-     * @beaninfo
-     *       bound: true
      */
     public void setFocusTraversalPolicy(FocusTraversalPolicy policy) {
         FocusTraversalPolicy oldPolicy;
@@ -3427,8 +3423,6 @@
      * @see ContainerOrderFocusTraversalPolicy
      * @see #setFocusTraversalPolicyProvider
      * @since 1.4
-     * @beaninfo
-     *       bound: true
      */
     public void setFocusCycleRoot(boolean focusCycleRoot) {
         boolean oldFocusCycleRoot;
@@ -3472,8 +3466,6 @@
      * @see #getFocusTraversalPolicy
      * @see #isFocusTraversalPolicyProvider
      * @since 1.5
-     * @beaninfo
-     *        bound: true
      */
     public final void setFocusTraversalPolicyProvider(boolean provider) {
         boolean oldProvider;
@@ -3499,8 +3491,6 @@
      * @return <code>true</code> if this container provides focus traversal
      *         policy, <code>false</code> otherwise
      * @since 1.5
-     * @beaninfo
-     *        bound: true
      */
     public final boolean isFocusTraversalPolicyProvider() {
         return focusTraversalPolicyProvider;
--- a/jdk/src/java.desktop/share/classes/java/awt/FileDialog.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/java/awt/FileDialog.java	Tue Oct 27 01:45:03 2015 -0400
@@ -174,6 +174,12 @@
      * Creates a file dialog for loading a file.  The title of the
      * file dialog is initially empty.  This is a convenience method for
      * <code>FileDialog(parent, "", LOAD)</code>.
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
      *
      * @param parent the owner of the dialog
      * @since 1.1
@@ -187,6 +193,12 @@
      * a file. The files shown are those in the current directory.
      * This is a convenience method for
      * <code>FileDialog(parent, title, LOAD)</code>.
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
      *
      * @param     parent   the owner of the dialog
      * @param     title    the title of the dialog
@@ -204,6 +216,12 @@
      * in the current directory.   If the value of
      * <code>mode</code> is <code>SAVE</code>, the file dialog is finding
      * a place to write a file.
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
      *
      * @param     parent   the owner of the dialog
      * @param     title   the title of the dialog
@@ -224,6 +242,12 @@
      * Creates a file dialog for loading a file.  The title of the
      * file dialog is initially empty.  This is a convenience method for
      * <code>FileDialog(parent, "", LOAD)</code>.
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
      *
      * @param     parent   the owner of the dialog
      * @exception java.lang.IllegalArgumentException if the <code>parent</code>'s
@@ -245,6 +269,12 @@
      * a file. The files shown are those in the current directory.
      * This is a convenience method for
      * <code>FileDialog(parent, title, LOAD)</code>.
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
      *
      * @param     parent   the owner of the dialog
      * @param     title    the title of the dialog; a <code>null</code> value
@@ -273,6 +303,12 @@
      * in the current directory.   If the value of
      * <code>mode</code> is <code>SAVE</code>, the file dialog is finding
      * a place to write a file.
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
      *
      * @param     parent   the owner of the dialog
      * @param     title    the title of the dialog; a <code>null</code> value
@@ -300,6 +336,22 @@
         setLayout(null);
     }
 
+
+    /**
+     * {@inheritDoc}
+     * <p>
+     * <strong>Note:</strong> Some platforms may not support
+     * showing the user-specified title in a file dialog.
+     * In this situation, either no title will be displayed in the file dialog's
+     * title bar or, on some systems, the file dialog's title bar will not be
+     * displayed.
+     */
+    @Override
+    public void setTitle(String title) {
+        super.setTitle(title);
+    }
+
+
     /**
      * Constructs a name for this component. Called by <code>getName()</code>
      * when the name is <code>null</code>.
--- a/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java	Tue Oct 27 01:45:03 2015 -0400
@@ -528,8 +528,6 @@
      *         current KeyboardFocusManager for the calling thread's context
      *         and if the calling thread does not have "replaceKeyboardFocusManager"
      *         permission
-     * @beaninfo
-     *       bound: true
      */
     protected void setGlobalFocusOwner(Component focusOwner)
         throws SecurityException
@@ -744,8 +742,6 @@
      *         current KeyboardFocusManager for the calling thread's context
      *         and if the calling thread does not have "replaceKeyboardFocusManager"
      *         permission
-     * @beaninfo
-     *       bound: true
      */
     protected void setGlobalPermanentFocusOwner(Component permanentFocusOwner)
         throws SecurityException
@@ -847,8 +843,6 @@
      *         current KeyboardFocusManager for the calling thread's context
      *         and if the calling thread does not have "replaceKeyboardFocusManager"
      *         permission
-     * @beaninfo
-     *       bound: true
      */
     protected void setGlobalFocusedWindow(Window focusedWindow)
         throws SecurityException
@@ -952,8 +946,6 @@
      *         current KeyboardFocusManager for the calling thread's context
      *         and if the calling thread does not have "replaceKeyboardFocusManager"
      *         permission
-     * @beaninfo
-     *       bound: true
      */
     protected void setGlobalActiveWindow(Window activeWindow)
         throws SecurityException
@@ -1008,8 +1000,6 @@
      * @see Container#setFocusTraversalPolicy
      * @see Container#getFocusTraversalPolicy
      * @throws IllegalArgumentException if defaultPolicy is null
-     * @beaninfo
-     *       bound: true
      */
     public void setDefaultFocusTraversalPolicy(FocusTraversalPolicy
                                                defaultPolicy) {
@@ -1113,8 +1103,6 @@
      *         represents a {@code KEY_TYPED} event,
      *         or if any keystroke already maps
      *         to another default focus traversal operation
-     * @beaninfo
-     *       bound: true
      */
     public void
         setDefaultFocusTraversalKeys(int id,
@@ -1272,8 +1260,6 @@
      * @see #getGlobalCurrentFocusCycleRoot
      * @throws SecurityException if the calling thread does not have
      *         "replaceKeyboardFocusManager" permission
-     * @beaninfo
-     *       bound: true
      */
     public void setGlobalCurrentFocusCycleRoot(Container newFocusCycleRoot)
         throws SecurityException
--- a/jdk/src/java.desktop/share/classes/java/awt/TextArea.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/java/awt/TextArea.java	Tue Oct 27 01:45:03 2015 -0400
@@ -327,9 +327,8 @@
         TextAreaPeer peer = (TextAreaPeer)this.peer;
         if (peer != null) {
             peer.insert(str, pos);
-        } else {
-            text = text.substring(0, pos) + str + text.substring(pos);
         }
+        text = text.substring(0, pos) + str + text.substring(pos);
     }
 
     /**
@@ -355,11 +354,7 @@
      */
     @Deprecated
     public synchronized void appendText(String str) {
-        if (peer != null) {
             insertText(str, getText().length());
-        } else {
-            text = text + str;
-        }
     }
 
     /**
@@ -403,9 +398,8 @@
         TextAreaPeer peer = (TextAreaPeer)this.peer;
         if (peer != null) {
             peer.replaceRange(str, start, end);
-        } else {
-            text = text.substring(0, start) + str + text.substring(end);
         }
+        text = text.substring(0, start) + str + text.substring(end);
     }
 
     /**
--- a/jdk/src/java.desktop/share/classes/java/awt/font/NumericShaper.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/java/awt/font/NumericShaper.java	Tue Oct 27 01:45:03 2015 -0400
@@ -672,7 +672,7 @@
         0x0825, 0x0828,
         0x0829, 0x082e,
         0x0859, 0x085c,
-        0x08e4, 0x0903,
+        0x08e3, 0x0903,
         0x093a, 0x093b,
         0x093c, 0x093d,
         0x0941, 0x0949,
@@ -721,7 +721,8 @@
         0x0acd, 0x0ad0,
         0x0ad1, 0x0ae0,
         0x0ae2, 0x0ae6,
-        0x0af1, 0x0b02,
+        0x0af1, 0x0af9,
+        0x0afa, 0x0b02,
         0x0b04, 0x0b05,
         0x0b0d, 0x0b0f,
         0x0b11, 0x0b13,
@@ -761,7 +762,7 @@
         0x0c3a, 0x0c3d,
         0x0c3e, 0x0c41,
         0x0c45, 0x0c58,
-        0x0c5a, 0x0c60,
+        0x0c5b, 0x0c60,
         0x0c62, 0x0c66,
         0x0c70, 0x0c7f,
         0x0c80, 0x0c82,
@@ -787,7 +788,7 @@
         0x0d49, 0x0d4a,
         0x0d4d, 0x0d4e,
         0x0d4f, 0x0d57,
-        0x0d58, 0x0d60,
+        0x0d58, 0x0d5f,
         0x0d62, 0x0d66,
         0x0d76, 0x0d79,
         0x0d80, 0x0d82,
@@ -867,7 +868,8 @@
         0x135b, 0x1360,
         0x137d, 0x1380,
         0x1390, 0x13a0,
-        0x13f5, 0x1401,
+        0x13f6, 0x13f8,
+        0x13fe, 0x1401,
         0x1680, 0x1681,
         0x169b, 0x16a0,
         0x16f9, 0x1700,
@@ -1019,7 +1021,7 @@
         0x33de, 0x33e0,
         0x33ff, 0x3400,
         0x4db6, 0x4e00,
-        0x9fcd, 0xa000,
+        0x9fd6, 0xa000,
         0xa48d, 0xa4d0,
         0xa60d, 0xa610,
         0xa62c, 0xa640,
@@ -1028,9 +1030,8 @@
         0xa6f0, 0xa6f2,
         0xa6f8, 0xa722,
         0xa788, 0xa789,
-        0xa78f, 0xa790,
         0xa7ae, 0xa7b0,
-        0xa7b2, 0xa7f7,
+        0xa7b8, 0xa7f7,
         0xa802, 0xa803,
         0xa806, 0xa807,
         0xa80b, 0xa80c,
@@ -1040,7 +1041,7 @@
         0xa874, 0xa880,
         0xa8c4, 0xa8ce,
         0xa8da, 0xa8f2,
-        0xa8fc, 0xa900,
+        0xa8fe, 0xa900,
         0xa926, 0xa92e,
         0xa947, 0xa952,
         0xa954, 0xa95f,
@@ -1073,8 +1074,7 @@
         0xab17, 0xab20,
         0xab27, 0xab28,
         0xab2f, 0xab30,
-        0xab60, 0xab64,
-        0xab66, 0xabc0,
+        0xab66, 0xab70,
         0xabe5, 0xabe6,
         0xabe8, 0xabe9,
         0xabed, 0xabf0,
@@ -1152,15 +1152,20 @@
         0x11173, 0x11174,
         0x11177, 0x11182,
         0x111b6, 0x111bf,
-        0x111c9, 0x111cd,
+        0x111ca, 0x111cd,
         0x111ce, 0x111d0,
-        0x111db, 0x111e1,
+        0x111e0, 0x111e1,
         0x111f5, 0x11200,
         0x11212, 0x11213,
         0x1122f, 0x11232,
         0x11234, 0x11235,
         0x11236, 0x11238,
-        0x1123e, 0x112b0,
+        0x1123e, 0x11280,
+        0x11287, 0x11288,
+        0x11289, 0x1128a,
+        0x1128e, 0x1128f,
+        0x1129e, 0x1129f,
+        0x112aa, 0x112b0,
         0x112df, 0x112e0,
         0x112e3, 0x112f0,
         0x112fa, 0x11302,
@@ -1174,7 +1179,8 @@
         0x11340, 0x11341,
         0x11345, 0x11347,
         0x11349, 0x1134b,
-        0x1134e, 0x11357,
+        0x1134e, 0x11350,
+        0x11351, 0x11357,
         0x11358, 0x1135d,
         0x11364, 0x11480,
         0x114b3, 0x114b9,
@@ -1186,7 +1192,7 @@
         0x115b2, 0x115b8,
         0x115bc, 0x115be,
         0x115bf, 0x115c1,
-        0x115ca, 0x11600,
+        0x115dc, 0x11600,
         0x11633, 0x1163b,
         0x1163d, 0x1163e,
         0x1163f, 0x11641,
@@ -1196,14 +1202,20 @@
         0x116ad, 0x116ae,
         0x116b0, 0x116b6,
         0x116b7, 0x116c0,
-        0x116ca, 0x118a0,
+        0x116ca, 0x11700,
+        0x1171a, 0x11720,
+        0x11722, 0x11726,
+        0x11727, 0x11730,
+        0x11740, 0x118a0,
         0x118f3, 0x118ff,
         0x11900, 0x11ac0,
         0x11af9, 0x12000,
-        0x12399, 0x12400,
+        0x1239a, 0x12400,
         0x1246f, 0x12470,
-        0x12475, 0x13000,
-        0x1342f, 0x16800,
+        0x12475, 0x12480,
+        0x12544, 0x13000,
+        0x1342f, 0x14400,
+        0x14647, 0x16800,
         0x16a39, 0x16a40,
         0x16a5f, 0x16a60,
         0x16a6a, 0x16a6e,
@@ -1232,7 +1244,7 @@
         0x1d173, 0x1d183,
         0x1d185, 0x1d18c,
         0x1d1aa, 0x1d1ae,
-        0x1d1de, 0x1d360,
+        0x1d1e9, 0x1d360,
         0x1d372, 0x1d400,
         0x1d455, 0x1d456,
         0x1d49d, 0x1d49e,
@@ -1258,7 +1270,12 @@
         0x1d74f, 0x1d750,
         0x1d789, 0x1d78a,
         0x1d7c3, 0x1d7c4,
-        0x1d7cc, 0x1e800,
+        0x1d7cc, 0x1d800,
+        0x1da00, 0x1da37,
+        0x1da3b, 0x1da6d,
+        0x1da75, 0x1da76,
+        0x1da84, 0x1da85,
+        0x1da8c, 0x1e800,
         0x1e8d0, 0x1e8d7,
         0x1eef0, 0x1eef2,
         0x1f000, 0x1f110,
@@ -1271,7 +1288,8 @@
         0x1f252, 0x20000,
         0x2a6d7, 0x2a700,
         0x2b735, 0x2b740,
-        0x2b81e, 0x2f800,
+        0x2b81e, 0x2b820,
+        0x2cea2, 0x2f800,
         0x2fa1e, 0xf0000,
         0xffffe, 0x100000,
         0x10fffe, 0x10ffff // sentinel
--- a/jdk/src/java.desktop/share/classes/java/beans/PropertyDescriptor.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/java/beans/PropertyDescriptor.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
 import java.util.Map.Entry;
 
 import com.sun.beans.introspect.PropertyInfo;
+import sun.reflect.misc.ReflectUtil;
 
 /**
  * A PropertyDescriptor describes one property that a Java Bean
@@ -463,8 +464,9 @@
     public PropertyEditor createPropertyEditor(Object bean) {
         Object editor = null;
 
-        Class<?> cls = getPropertyEditorClass();
-        if (cls != null) {
+        final Class<?> cls = getPropertyEditorClass();
+        if (cls != null && PropertyEditor.class.isAssignableFrom(cls)
+                && ReflectUtil.isPackageAccessible(cls)) {
             Constructor<?> ctor = null;
             if (bean != null) {
                 try {
--- a/jdk/src/java.desktop/share/classes/java/beans/SimpleBeanInfo.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/java/beans/SimpleBeanInfo.java	Tue Oct 27 01:45:03 2015 -0400
@@ -28,6 +28,8 @@
 import java.awt.Image;
 import java.awt.Toolkit;
 import java.io.InputStream;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 
 /**
  * This is a support class to make it easier for people to provide
@@ -41,13 +43,13 @@
  *
  * @since 1.1
  */
-
 public class SimpleBeanInfo implements BeanInfo {
 
     /**
      * Deny knowledge about the class and customizer of the bean.
      * You can override this if you wish to provide explicit info.
      */
+    @Override
     public BeanDescriptor getBeanDescriptor() {
         return null;
     }
@@ -56,6 +58,7 @@
      * Deny knowledge of properties. You can override this
      * if you wish to provide explicit property info.
      */
+    @Override
     public PropertyDescriptor[] getPropertyDescriptors() {
         return null;
     }
@@ -64,6 +67,7 @@
      * Deny knowledge of a default property. You can override this
      * if you wish to define a default property for the bean.
      */
+    @Override
     public int getDefaultPropertyIndex() {
         return -1;
     }
@@ -72,6 +76,7 @@
      * Deny knowledge of event sets. You can override this
      * if you wish to provide explicit event set info.
      */
+    @Override
     public EventSetDescriptor[] getEventSetDescriptors() {
         return null;
     }
@@ -80,6 +85,7 @@
      * Deny knowledge of a default event. You can override this
      * if you wish to define a default event for the bean.
      */
+    @Override
     public int getDefaultEventIndex() {
         return -1;
     }
@@ -88,6 +94,7 @@
      * Deny knowledge of methods. You can override this
      * if you wish to provide explicit method info.
      */
+    @Override
     public MethodDescriptor[] getMethodDescriptors() {
         return null;
     }
@@ -97,6 +104,7 @@
      * may override this if you want to (for example) return a
      * BeanInfo for a base class.
      */
+    @Override
     public BeanInfo[] getAdditionalBeanInfo() {
         return null;
     }
@@ -105,11 +113,64 @@
      * Claim there are no icons available.  You can override
      * this if you want to provide icons for your bean.
      */
-    public Image getIcon(int iconKind) {
+    @Override
+    public Image getIcon(final int iconKind) {
+        final BeanDescriptor descriptor = getBeanDescriptor();
+        if (descriptor != null) {
+            final Class<?> type = descriptor.getBeanClass();
+            if (type != null && type.getClassLoader() == null
+                    && type.getAnnotation(JavaBean.class) != null) {
+                final String name = type.getName();
+                final int index = name.lastIndexOf('.');
+                if (name.substring(0, index).equals("javax.swing")) {
+                    final String className = type.getSimpleName();
+                    switch (iconKind) {
+                        case ICON_COLOR_32x32:
+                            return loadImage(className, "Color32.gif");
+                        case ICON_COLOR_16x16:
+                            return loadImage(className, "Color16.gif");
+                        case ICON_MONO_32x32:
+                            return loadImage(className, "Mono32.gif");
+                        case ICON_MONO_16x16:
+                            return loadImage(className, "Mono16.gif");
+                    }
+                }
+            }
+        }
         return null;
     }
 
     /**
+     * This is a utility method to help in loading standard icon images.
+     *
+     * @param  resourceName A pathname relative to the directory holding the
+     *         class file of the current class
+     * @return an image object. May be null if the load failed.
+     * @see java.beans.SimpleBeanInfo#loadImage(String)
+     */
+    private Image loadStandardImage(final String resourceName) {
+        return AccessController.doPrivileged(
+                (PrivilegedAction<Image>) () -> loadImage(resourceName));
+    }
+
+    /**
+     * This is a utility method to help in loading standard icon images.
+     *
+     * @param  resourceName A pathname relative to the directory holding the
+     *         class file of the current class
+     * @param  suffix A {@code String} containing a file suffix (<i>e.g.</i>,
+     *         "Color32.gif" or "Mono32.gif")
+     * @return an image object. May be null if the load failed.
+     * @see java.beans.SimpleBeanInfo#loadImage(String)
+     */
+    private Image loadImage(final String resourceName, final String suffix) {
+        final String prefix = "/javax/swing/beaninfo/images/";
+        final Image image = loadStandardImage(prefix + resourceName + suffix);
+        return image == null ? loadStandardImage(prefix + "JComponent" + suffix)
+                             : image;
+    }
+
+    /**
      * This is a utility method to help in loading icon images.
      * It takes the name of a resource file associated with the
      * current object's class file and loads an image object
--- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,11 +29,15 @@
 import sun.awt.AppContext;
 
 import java.util.Locale;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeSupport;
 import java.beans.PropertyChangeEvent;
 import java.awt.IllegalComponentStateException;
 
+import javax.swing.SwingContainer;
+
 /**
  * AccessibleContext represents the minimum information all accessible objects
  * return.  This information includes the accessible name, description, role,
@@ -69,17 +73,13 @@
  * minimum and maximum values.  Any object that supports a numerical value
  * should support this interface.</ul>
  *
- *
- * @beaninfo
- *   attribute: isContainer false
- * description: Minimal information that all accessible objects return
- *
-
  * @author      Peter Korn
  * @author      Hans Muller
  * @author      Willie Walker
  * @author      Lynn Monsanto
  */
+@JavaBean(description = "Minimal information that all accessible objects return")
+@SwingContainer(false)
 public abstract class AccessibleContext {
 
     /**
@@ -447,11 +447,9 @@
      *
      * @see #getAccessibleName
      * @see #addPropertyChangeListener
-     *
-     * @beaninfo
-     *    preferred:   true
-     *    description: Sets the accessible name for the component.
      */
+    @BeanProperty(preferred = true, description
+            = "Sets the accessible name for the component.")
     public void setAccessibleName(String s) {
         String oldName = accessibleName;
         accessibleName = s;
@@ -483,11 +481,9 @@
      *
      * @see #setAccessibleName
      * @see #addPropertyChangeListener
-     *
-     * @beaninfo
-     *    preferred:   true
-     *    description: Sets the accessible description for the component.
      */
+    @BeanProperty(preferred = true, description
+            = "Sets the accessible description for the component.")
     public void setAccessibleDescription(String s) {
         String oldDescription = accessibleDescription;
         accessibleDescription = s;
--- a/jdk/src/java.desktop/share/classes/javax/swing/AbstractButton.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/AbstractButton.java	Tue Oct 27 01:45:03 2015 -0400
@@ -26,23 +26,19 @@
 
 import java.awt.*;
 import java.awt.event.*;
-import java.awt.image.*;
 import java.text.*;
 import java.awt.geom.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.beans.Transient;
 import java.util.Enumeration;
-import java.util.Vector;
 import java.io.Serializable;
 import javax.swing.event.*;
-import javax.swing.border.*;
 import javax.swing.plaf.*;
 import javax.accessibility.*;
 import javax.swing.text.*;
-import javax.swing.text.html.*;
-import javax.swing.plaf.basic.*;
-import java.util.*;
 
 /**
  * Defines common behaviors for buttons and menu items.
@@ -73,6 +69,7 @@
  * @author Jeff Dinkins
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI")
 @SuppressWarnings("serial") // Same-version serialization only
 public abstract class AbstractButton extends JComponent implements ItemSelectable, SwingConstants {
 
@@ -251,12 +248,9 @@
      * @see <a href="Action.html#buttonActions">Swing Components Supporting
      *      <code>Action</code></a>
      * @since 1.6
-     * @beaninfo
-     *        bound: true
-     *    expert: true
-     *  description: Whether the text of the button should come from
-     *               the <code>Action</code>.
      */
+    @BeanProperty(expert = true, description
+            = "Whether the text of the button should come from the <code>Action</code>.")
     public void setHideActionText(boolean hideActionText) {
         if (hideActionText != this.hideActionText) {
             this.hideActionText = hideActionText;
@@ -296,12 +290,9 @@
      * Sets the button's text.
      * @param text the string used to set the text
      * @see #getText
-     * @beaninfo
-     *        bound: true
-     *    preferred: true
-     *    attribute: visualUpdate true
-     *  description: The button's text.
      */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "The button's text.")
     public void setText(String text) {
         String oldValue = this.text;
         this.text = text;
@@ -390,12 +381,9 @@
      * effectively be ignored).
      *
      * @param m the space between the border and the label
-     *
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The space between the button's border and the label.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The space between the button's border and the label.")
     public void setMargin(Insets m) {
         // Cache the old margin if it comes from the UI
         if(m instanceof UIResource) {
@@ -448,11 +436,9 @@
      * @param defaultIcon the icon used as the default image
      * @see #getIcon
      * @see #setPressedIcon
-     * @beaninfo
-     *           bound: true
-     *       attribute: visualUpdate true
-     *     description: The button's default icon
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The button's default icon")
     public void setIcon(Icon defaultIcon) {
         Icon oldValue = this.defaultIcon;
         this.defaultIcon = defaultIcon;
@@ -495,11 +481,9 @@
      * Sets the pressed icon for the button.
      * @param pressedIcon the icon used as the "pressed" image
      * @see #getPressedIcon
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The pressed icon for the button.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The pressed icon for the button.")
     public void setPressedIcon(Icon pressedIcon) {
         Icon oldValue = this.pressedIcon;
         this.pressedIcon = pressedIcon;
@@ -529,11 +513,9 @@
      * Sets the selected icon for the button.
      * @param selectedIcon the icon used as the "selected" image
      * @see #getSelectedIcon
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The selected icon for the button.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The selected icon for the button.")
     public void setSelectedIcon(Icon selectedIcon) {
         Icon oldValue = this.selectedIcon;
         this.selectedIcon = selectedIcon;
@@ -575,11 +557,9 @@
      * Sets the rollover icon for the button.
      * @param rolloverIcon the icon used as the "rollover" image
      * @see #getRolloverIcon
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The rollover icon for the button.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The rollover icon for the button.")
     public void setRolloverIcon(Icon rolloverIcon) {
         Icon oldValue = this.rolloverIcon;
         this.rolloverIcon = rolloverIcon;
@@ -612,11 +592,9 @@
      * @param rolloverSelectedIcon the icon used as the
      *          "selected rollover" image
      * @see #getRolloverSelectedIcon
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The rollover selected icon for the button.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The rollover selected icon for the button.")
     public void setRolloverSelectedIcon(Icon rolloverSelectedIcon) {
         Icon oldValue = this.rolloverSelectedIcon;
         this.rolloverSelectedIcon = rolloverSelectedIcon;
@@ -664,11 +642,9 @@
      * Sets the disabled icon for the button.
      * @param disabledIcon the icon used as the disabled image
      * @see #getDisabledIcon
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The disabled icon for the button.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The disabled icon for the button.")
     public void setDisabledIcon(Icon disabledIcon) {
         Icon oldValue = this.disabledIcon;
         this.disabledIcon = disabledIcon;
@@ -717,11 +693,9 @@
      * @param disabledSelectedIcon the icon used as the disabled
      *          selection image
      * @see #getDisabledSelectedIcon
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The disabled selection icon for the button.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The disabled selection icon for the button.")
     public void setDisabledSelectedIcon(Icon disabledSelectedIcon) {
         Icon oldValue = this.disabledSelectedIcon;
         this.disabledSelectedIcon = disabledSelectedIcon;
@@ -768,14 +742,12 @@
      * </ul>
      * @throws IllegalArgumentException if the alignment is not one of the legal
      *         values listed above
-     * @beaninfo
-     *        bound: true
-     *         enum: TOP    SwingConstants.TOP
-     *               CENTER SwingConstants.CENTER
-     *               BOTTOM  SwingConstants.BOTTOM
-     *    attribute: visualUpdate true
-     *  description: The vertical alignment of the icon and text.
      */
+    @BeanProperty(visualUpdate = true, enumerationValues = {
+            "SwingConstants.TOP",
+            "SwingConstants.CENTER",
+            "SwingConstants.BOTTOM"}, description
+            = "The vertical alignment of the icon and text.")
     public void setVerticalAlignment(int alignment) {
         if (alignment == verticalAlignment) return;
         int oldValue = verticalAlignment;
@@ -817,16 +789,14 @@
      * </ul>
      * @throws IllegalArgumentException if the alignment is not one of the
      *         valid values
-     * @beaninfo
-     *        bound: true
-     *         enum: LEFT     SwingConstants.LEFT
-     *               CENTER   SwingConstants.CENTER
-     *               RIGHT    SwingConstants.RIGHT
-     *               LEADING  SwingConstants.LEADING
-     *               TRAILING SwingConstants.TRAILING
-     *    attribute: visualUpdate true
-     *  description: The horizontal alignment of the icon and text.
      */
+    @BeanProperty(visualUpdate = true, enumerationValues = {
+            "SwingConstants.LEFT",
+            "SwingConstants.CENTER",
+            "SwingConstants.RIGHT",
+            "SwingConstants.LEADING",
+            "SwingConstants.TRAILING"}, description
+            = "The horizontal alignment of the icon and text.")
     public void setHorizontalAlignment(int alignment) {
         if (alignment == horizontalAlignment) return;
         int oldValue = horizontalAlignment;
@@ -860,14 +830,12 @@
      * <li>{@code SwingConstants.TOP}
      * <li>{@code SwingConstants.BOTTOM}
      * </ul>
-     * @beaninfo
-     *        bound: true
-     *         enum: TOP    SwingConstants.TOP
-     *               CENTER SwingConstants.CENTER
-     *               BOTTOM SwingConstants.BOTTOM
-     *    attribute: visualUpdate true
-     *  description: The vertical position of the text relative to the icon.
      */
+    @BeanProperty(visualUpdate = true, enumerationValues = {
+            "SwingConstants.TOP",
+            "SwingConstants.CENTER",
+            "SwingConstants.BOTTOM"}, description
+            = "The vertical position of the text relative to the icon.")
     public void setVerticalTextPosition(int textPosition) {
         if (textPosition == verticalTextPosition) return;
         int oldValue = verticalTextPosition;
@@ -905,16 +873,14 @@
      * </ul>
      * @exception IllegalArgumentException if <code>textPosition</code>
      *          is not one of the legal values listed above
-     * @beaninfo
-     *        bound: true
-     *         enum: LEFT     SwingConstants.LEFT
-     *               CENTER   SwingConstants.CENTER
-     *               RIGHT    SwingConstants.RIGHT
-     *               LEADING  SwingConstants.LEADING
-     *               TRAILING SwingConstants.TRAILING
-     *    attribute: visualUpdate true
-     *  description: The horizontal position of the text relative to the icon.
      */
+    @BeanProperty(visualUpdate = true, enumerationValues = {
+            "SwingConstants.LEFT",
+            "SwingConstants.CENTER",
+            "SwingConstants.RIGHT",
+            "SwingConstants.LEADING",
+            "SwingConstants.TRAILING"}, description
+            = "The horizontal position of the text relative to the icon.")
     public void setHorizontalTextPosition(int textPosition) {
         if (textPosition == horizontalTextPosition) return;
         int oldValue = horizontalTextPosition;
@@ -951,12 +917,9 @@
      * @param iconTextGap the space between icon and text if these properties are set.
      * @since 1.4
      * @see #getIconTextGap
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: If both the icon and text properties are set, this
-     *               property defines the space between them.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "If both the icon and text properties are set, this property defines the space between them.")
     public void setIconTextGap(int iconTextGap) {
         int oldValue = this.iconTextGap;
         this.iconTextGap = iconTextGap;
@@ -1095,11 +1058,9 @@
      * @see #configurePropertiesFromAction
      * @see #createActionPropertyChangeListener
      * @see #actionPropertyChanged
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: the Action instance connected with this ActionEvent source
      */
+    @BeanProperty(visualUpdate = true, description
+            = "the Action instance connected with this ActionEvent source")
     public void setAction(Action a) {
         Action oldValue = getAction();
         if (action==null || !action.equals(a)) {
@@ -1393,11 +1354,9 @@
      * @param b if true and border property is not <code>null</code>,
      *          the border is painted
      * @see #isBorderPainted
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Whether the border should be painted.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Whether the border should be painted.")
     public void setBorderPainted(boolean b) {
         boolean oldValue = paintBorder;
         paintBorder = b;
@@ -1443,11 +1402,9 @@
      *
      * @param b if <code>true</code>, the focus state should be painted
      * @see #isFocusPainted
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Whether focus should be painted
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Whether focus should be painted")
     public void setFocusPainted(boolean b) {
         boolean oldValue = paintFocus;
         paintFocus = b;
@@ -1486,12 +1443,9 @@
      *          the content area is not filled
      * @see #isContentAreaFilled
      * @see #setOpaque
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Whether the button should paint the content area
-     *               or leave it transparent.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Whether the button should paint the content area or leave it transparent.")
     public void setContentAreaFilled(boolean b) {
         boolean oldValue = contentAreaFilled;
         contentAreaFilled = b;
@@ -1522,11 +1476,9 @@
      *
      * @param b if <code>true</code>, rollover effects should be painted
      * @see #isRolloverEnabled
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Whether rollover effects should be enabled.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Whether rollover effects should be enabled.")
     public void setRolloverEnabled(boolean b) {
         boolean oldValue = rolloverEnabled;
         rolloverEnabled = b;
@@ -1569,12 +1521,9 @@
      * @param mnemonic the key code which represents the mnemonic
      * @see     java.awt.event.KeyEvent
      * @see     #setDisplayedMnemonicIndex
-     *
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: the keyboard character mnemonic
      */
+    @BeanProperty(visualUpdate = true, description
+            = "the keyboard character mnemonic")
     public void setMnemonic(int mnemonic) {
         int oldValue = getMnemonic();
         model.setMnemonic(mnemonic);
@@ -1589,11 +1538,9 @@
      *
      * @param mnemonic  a char specifying the mnemonic value
      * @see #setMnemonic(int)
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: the keyboard character mnemonic
      */
+    @BeanProperty(visualUpdate = true, description
+            = "the keyboard character mnemonic")
     public void setMnemonic(char mnemonic) {
         int vk = (int) mnemonic;
         if(vk >= 'a' && vk <='z')
@@ -1622,13 +1569,9 @@
      * @exception IllegalArgumentException will be thrown if <code>index</code>
      *            is &gt;= length of the text, or &lt; -1
      * @see #getDisplayedMnemonicIndex
-     *
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: the index into the String to draw the keyboard character
-     *               mnemonic at
      */
+    @BeanProperty(visualUpdate = true, description
+            = "the index into the String to draw the keyboard character mnemonic at")
     public void setDisplayedMnemonicIndex(int index)
                                           throws IllegalArgumentException {
         int oldValue = mnemonicIndex;
@@ -1743,10 +1686,9 @@
      * Sets the model that this button represents.
      * @param newModel the new <code>ButtonModel</code>
      * @see #getModel
-     * @beaninfo
-     *        bound: true
-     *  description: Model that the Button uses.
      */
+    @BeanProperty(description
+            = "Model that the Button uses.")
     public void setModel(ButtonModel newModel) {
 
         ButtonModel oldModel = getModel();
@@ -1804,12 +1746,9 @@
      * Sets the L&amp;F object that renders this component.
      * @param ui the <code>ButtonUI</code> L&amp;F object
      * @see #getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the LookAndFeel.")
     public void setUI(ButtonUI ui) {
         super.setUI(ui);
         // disabled icons are generated by the LF so they should be unset here
@@ -1897,6 +1836,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public ChangeListener[] getChangeListeners() {
         return listenerList.getListeners(ChangeListener.class);
     }
@@ -1954,6 +1894,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public ActionListener[] getActionListeners() {
         return listenerList.getListeners(ActionListener.class);
     }
@@ -2122,11 +2063,10 @@
      *
      * @param label  a <code>String</code> containing the text
      * @deprecated - Replaced by <code>setText(text)</code>
-     * @beaninfo
-     *        bound: true
-     *  description: Replace by setText(text)
      */
     @Deprecated
+    @BeanProperty(description
+            = "Replace by setText(text)")
     public void setLabel(String label) {
         setText(label);
     }
@@ -2155,6 +2095,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public ItemListener[] getItemListeners() {
         return listenerList.getListeners(ItemListener.class);
     }
@@ -2166,7 +2107,8 @@
      * @return an array containing 1 Object: the text of the button,
      *         if the item is selected; otherwise <code>null</code>
      */
-    public Object[] getSelectedObjects() {
+   @BeanProperty(bound = false)
+   public Object[] getSelectedObjects() {
         if (isSelected() == false) {
             return null;
         }
--- a/jdk/src/java.desktop/share/classes/javax/swing/Box.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/Box.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,15 +22,12 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
-
 package javax.swing;
 
 import java.awt.*;
-import java.awt.event.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.ConstructorProperties;
-import java.util.Locale;
-import java.io.Serializable;
 import javax.accessibility.*;
 
 /**
@@ -77,6 +74,7 @@
  * @author  Timothy Prinzing
  * @since 1.2
  */
+@JavaBean(defaultProperty = "accessibleContext")
 @SuppressWarnings("serial")
 public class Box extends JComponent implements Accessible {
 
@@ -413,6 +411,7 @@
      * @return an AccessibleBox that serves as the
      *         AccessibleContext of this Box
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleBox();
--- a/jdk/src/java.desktop/share/classes/javax/swing/ImageIcon.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/ImageIcon.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 import java.awt.*;
 import java.awt.image.*;
 import java.beans.ConstructorProperties;
+import java.beans.BeanProperty;
 import java.beans.Transient;
 import java.net.URL;
 
@@ -567,11 +568,10 @@
      *
      * @return an AccessibleImageIcon that serves as the
      *         AccessibleContext of this ImageIcon
-     * @beaninfo
-     *       expert: true
-     *  description: The AccessibleContext associated with this ImageIcon.
      * @since 1.3
      */
+    @BeanProperty(expert = true, description
+            = "The AccessibleContext associated with this ImageIcon.")
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleImageIcon();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JApplet.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JApplet.java	Tue Oct 27 01:45:03 2015 -0400
@@ -33,6 +33,8 @@
 import java.awt.Graphics;
 import java.awt.HeadlessException;
 import java.awt.LayoutManager;
+import java.beans.BeanProperty;
+import java.beans.JavaBean;
 
 import javax.accessibility.Accessible;
 import javax.accessibility.AccessibleContext;
@@ -87,14 +89,12 @@
  * Please see {@link java.beans.XMLEncoder}.
  *
  * @see javax.swing.RootPaneContainer
- * @beaninfo
- *      attribute: isContainer true
- *      attribute: containerDelegate getContentPane
- *    description: Swing's Applet subclass.
  *
  * @author Arnaud Weber
  * @since 1.2
  */
+@JavaBean(defaultProperty = "JMenuBar", description = "Swing's Applet subclass.")
+@SwingContainer(delegate = "getContentPane")
 @SuppressWarnings("serial") // Same-version serialization only
 public class JApplet extends Applet implements Accessible,
                                                RootPaneContainer,
@@ -203,12 +203,9 @@
      * @see #getTransferHandler
      * @see java.awt.Component#setDropTarget
      * @since 1.6
-     *
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *  description: Mechanism for transfer of data into the component
      */
+    @BeanProperty(hidden = true, description
+            = "Mechanism for transfer of data into the component")
     public void setTransferHandler(TransferHandler newHandler) {
         TransferHandler oldHandler = transferHandler;
         transferHandler = newHandler;
@@ -242,11 +239,9 @@
     * @param menuBar the menubar being placed in the applet
     *
     * @see #getJMenuBar
-    *
-    * @beaninfo
-    *      hidden: true
-    * description: The menubar for accessing pulldown menus from this applet.
     */
+    @BeanProperty(bound = false, hidden = true, description
+            = "The menubar for accessing pulldown menus from this applet.")
     public void setJMenuBar(final JMenuBar menuBar) {
         getRootPane().setJMenuBar(menuBar);
     }
@@ -291,10 +286,9 @@
      * @see #setLayout
      * @see #isRootPaneCheckingEnabled
      * @see javax.swing.RootPaneContainer
-     * @beaninfo
-     *      hidden: true
-     * description: Whether the add and setLayout methods are forwarded
      */
+    @BeanProperty(hidden = true, description
+            = "Whether the add and setLayout methods are forwarded")
     protected void setRootPaneCheckingEnabled(boolean enabled) {
         rootPaneCheckingEnabled = enabled;
     }
@@ -377,6 +371,8 @@
      * @see #setRootPane
      * @see RootPaneContainer#getRootPane
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "the RootPane object for this applet.")
     public JRootPane getRootPane() {
         return rootPane;
     }
@@ -387,10 +383,6 @@
      * @param root the rootPane object for this applet
      *
      * @see #getRootPane
-     *
-     * @beaninfo
-     *   hidden: true
-     * description: the RootPane object for this applet.
      */
     protected void setRootPane(JRootPane root) {
         if(rootPane != null) {
@@ -428,12 +420,9 @@
      *            exception) if the content pane parameter is null
      * @see #getContentPane
      * @see RootPaneContainer#setContentPane
-     *
-     * @beaninfo
-     *     hidden: true
-     *     description: The client area of the applet where child
-     *                  components are normally inserted.
      */
+   @BeanProperty(bound = false, hidden = true, description
+           = "The client area of the applet where child components are normally inserted.")
     public void setContentPane(Container contentPane) {
         getRootPane().setContentPane(contentPane);
     }
@@ -456,11 +445,9 @@
      *
      * @see #getLayeredPane
      * @see RootPaneContainer#setLayeredPane
-     *
-     * @beaninfo
-     *     hidden: true
-     *     description: The pane which holds the various applet layers.
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "The pane which holds the various applet layers.")
     public void setLayeredPane(JLayeredPane layeredPane) {
         getRootPane().setLayeredPane(layeredPane);
     }
@@ -482,11 +469,9 @@
      *
      * @see #getGlassPane
      * @see RootPaneContainer#setGlassPane
-     *
-     * @beaninfo
-     *     hidden: true
-     *     description: A transparent pane used for menu rendering.
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "A transparent pane used for menu rendering.")
     public void setGlassPane(Component glassPane) {
         getRootPane().setGlassPane(glassPane);
     }
@@ -496,6 +481,7 @@
      *
      * @since 1.6
      */
+    @BeanProperty(bound = false)
     public Graphics getGraphics() {
         JComponent.getGraphicsInvoked(this);
         return super.getGraphics();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JButton.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JButton.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,21 +24,16 @@
  */
 package javax.swing;
 
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.ConstructorProperties;
 
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
-
 import javax.swing.plaf.*;
-import javax.swing.event.*;
 import javax.accessibility.*;
 
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
-
 /**
  * An implementation of a "push" button.
   * <p>
@@ -69,13 +64,11 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: An implementation of a \"push\" button.
- *
  * @author Jeff Dinkins
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UIClassID", description = "An implementation of a \"push\" button.")
+@SwingContainer(false)
 @SuppressWarnings("serial")
 public class JButton extends AbstractButton implements Accessible {
 
@@ -156,10 +149,9 @@
      * @return the string "ButtonUI"
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        expert: true
-     *   description: A string that specifies the name of the L&amp;F class.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "A string that specifies the name of the L&amp;F class.")
     public String getUIClassID() {
         return uiClassID;
     }
@@ -176,9 +168,9 @@
      * @return the value of the <code>defaultButton</code> property
      * @see JRootPane#setDefaultButton
      * @see #isDefaultCapable
-     * @beaninfo
-     *  description: Whether or not this button is the default button
      */
+    @BeanProperty(bound = false, description
+            = "Whether or not this button is the default button")
     public boolean isDefaultButton() {
         JRootPane root = SwingUtilities.getRootPane(this);
         if (root != null) {
@@ -211,11 +203,9 @@
      *        capable of being the default button on the
      *        <code>RootPane</code>; otherwise <code>false</code>
      * @see #isDefaultCapable
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Whether or not this button can be the default button
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Whether or not this button can be the default button")
     public void setDefaultCapable(boolean defaultCapable) {
         boolean oldDefaultCapable = this.defaultCapable;
         this.defaultCapable = defaultCapable;
@@ -283,10 +273,9 @@
      *
      * @return an <code>AccessibleJButton</code> that serves as the
      *         <code>AccessibleContext</code> of this <code>JButton</code>
-     * @beaninfo
-     *       expert: true
-     *  description: The AccessibleContext associated with this Button.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The AccessibleContext associated with this Button.")
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJButton();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JCheckBox.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JCheckBox.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,9 +24,8 @@
  */
 package javax.swing;
 
-import java.awt.*;
-import java.awt.event.*;
-import java.beans.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 
 import javax.swing.plaf.*;
 import javax.accessibility.*;
@@ -35,7 +34,6 @@
 import java.io.ObjectInputStream;
 import java.io.IOException;
 
-
 /**
  * An implementation of a check box -- an item that can be selected or
  * deselected, and which displays its state to the user.
@@ -69,13 +67,11 @@
  *
  * @see JRadioButton
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: A component which can be selected or deselected.
- *
  * @author Jeff Dinkins
  * @since 1.2
  */
+@JavaBean(description = "A component which can be selected or deselected.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JCheckBox extends JToggleButton implements Accessible {
 
@@ -195,12 +191,10 @@
      * @param b <code>true</code> requests that the border be painted flat;
      *          <code>false</code> requests normal borders
      * @see #isBorderPaintedFlat
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Whether the border is painted flat.
      * @since 1.3
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Whether the border is painted flat.")
     public void setBorderPaintedFlat(boolean b) {
         boolean oldValue = flat;
         flat = b;
@@ -239,10 +233,9 @@
      * @return the string "CheckBoxUI"
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        expert: true
-     *   description: A string that specifies the name of the L&amp;F class
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "A string that specifies the name of the L&amp;F class")
     public String getUIClassID() {
         return uiClassID;
     }
@@ -311,10 +304,9 @@
      *
      * @return an AccessibleJCheckBox that serves as the
      *         AccessibleContext of this JCheckBox
-     * @beaninfo
-     *       expert: true
-     *  description: The AccessibleContext associated with this CheckBox.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The AccessibleContext associated with this CheckBox.")
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJCheckBox();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JCheckBoxMenuItem.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JCheckBoxMenuItem.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,20 +24,14 @@
  */
 package javax.swing;
 
-import java.util.EventListener;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
-import javax.swing.plaf.*;
 import javax.accessibility.*;
 
-
 /**
  * A menu item that can be selected or deselected. If selected, the menu
  * item typically appears with a checkmark next to it. If unselected or
@@ -81,14 +75,12 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: A menu item which can be selected or deselected.
- *
  * @author Georges Saab
  * @author David Karlton
  * @since 1.2
  */
+@JavaBean(description = "A menu item which can be selected or deselected.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JCheckBoxMenuItem extends JMenuItem implements SwingConstants,
         Accessible
@@ -178,6 +170,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -200,10 +193,9 @@
      *
      * @param b  a boolean value indicating the item's
      *           selected-state, where true=selected
-     * @beaninfo
-     * description: The selection state of the check box menu item
-     *      hidden: true
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "The selection state of the check box menu item")
     public synchronized void setState(boolean b) {
         setSelected(b);
     }
@@ -216,6 +208,7 @@
      * @return an array containing one Object -- the text of the menu item
      *         -- if the item is selected; otherwise null
      */
+    @BeanProperty(bound = false)
     public Object[] getSelectedObjects() {
         if (isSelected() == false)
             return null;
@@ -274,6 +267,7 @@
      * @return an AccessibleJCheckBoxMenuItem that serves as the
      *         AccessibleContext of this AccessibleJCheckBoxMenuItem
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJCheckBoxMenuItem();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JColorChooser.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JColorChooser.java	Tue Oct 27 01:45:03 2015 -0400
@@ -22,11 +22,12 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import java.awt.*;
 import java.awt.event.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.io.*;
 import java.util.*;
 
@@ -36,7 +37,6 @@
 
 import sun.swing.SwingUtilities2;
 
-
 /**
  * <code>JColorChooser</code> provides a pane of controls designed to allow
  * a user to manipulate and select a color.
@@ -73,17 +73,13 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- *
- * @beaninfo
- *      attribute: isContainer false
- *    description: A component that supports selecting a Color.
- *
- *
  * @author James Gosling
  * @author Amy Fowler
  * @author Steve Wilson
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A component that supports selecting a Color.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JColorChooser extends JComponent implements Accessible {
 
@@ -261,12 +257,9 @@
      *
      * @param ui  the <code>ColorChooserUI</code> L&amp;F object
      * @see UIDefaults#getUI
-     *
-     * @beaninfo
-     *       bound: true
-     *      hidden: true
-     * description: The UI object that implements the color chooser's LookAndFeel.
      */
+    @BeanProperty(hidden = true, description
+            = "The UI object that implements the color chooser's LookAndFeel.")
     public void setUI(ColorChooserUI ui) {
         super.setUI(ui);
     }
@@ -289,6 +282,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -308,12 +302,9 @@
      * The <code>ColorSelectionModel</code> will fire a <code>ChangeEvent</code>
      * @param color the color to be set in the color chooser
      * @see JComponent#addPropertyChangeListener
-     *
-     * @beaninfo
-     *       bound: false
-     *      hidden: false
-     * description: The current color the chooser is to display.
      */
+    @BeanProperty(bound = false, description
+            = "The current color the chooser is to display.")
     public void setColor(Color color) {
         selectionModel.setSelectedColor(color);
 
@@ -381,11 +372,9 @@
      * @see #getDragEnabled
      * @see #setTransferHandler
      * @see TransferHandler
-     *
-     * @beaninfo
-     *  description: Determines whether automatic drag handling is enabled.
-     *        bound: false
      */
+    @BeanProperty(bound = false, description
+            = "Determines whether automatic drag handling is enabled.")
     public void setDragEnabled(boolean b) {
         if (b && GraphicsEnvironment.isHeadless()) {
             throw new HeadlessException();
@@ -411,12 +400,9 @@
      *
      * @param preview the <code>JComponent</code> which displays the current color
      * @see JComponent#addPropertyChangeListener
-     *
-     * @beaninfo
-     *       bound: true
-     *      hidden: true
-     * description: The UI component which displays the current color.
      */
+    @BeanProperty(hidden = true, description
+            = "The UI component which displays the current color.")
     public void setPreviewPanel(JComponent preview) {
 
         if (previewPanel != preview) {
@@ -496,12 +482,9 @@
      *
      * @param panels  an array of <code>AbstractColorChooserPanel</code>
      *          objects
-     *
-     * @beaninfo
-     *       bound: true
-     *      hidden: true
-     * description: An array of different chooser types.
      */
+    @BeanProperty(hidden = true, description
+            = "An array of different chooser types.")
     public void setChooserPanels( AbstractColorChooserPanel[] panels) {
         AbstractColorChooserPanel[] oldValue = chooserPanels;
         chooserPanels = panels;
@@ -531,12 +514,9 @@
      * Sets the model containing the selected color.
      *
      * @param newModel   the new <code>ColorSelectionModel</code> object
-     *
-     * @beaninfo
-     *       bound: true
-     *      hidden: true
-     * description: The model which contains the currently selected color.
      */
+    @BeanProperty(hidden = true, description
+            = "The model which contains the currently selected color.")
     public void setSelectionModel(ColorSelectionModel newModel ) {
         ColorSelectionModel oldModel = selectionModel;
         selectionModel = newModel;
@@ -603,6 +583,7 @@
      * @return an AccessibleJColorChooser that serves as the
      *         AccessibleContext of this JColorChooser
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJColorChooser();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
  */
 package javax.swing;
 
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.beans.Transient;
@@ -71,14 +73,12 @@
  *
  * @param <E> the type of the elements of this combo box
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: A combination of a text field and a drop-down list.
- *
  * @author Arnaud Weber
  * @author Mark Davidson
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A combination of a text field and a drop-down list.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JComboBox<E> extends JComponent
 implements ItemSelectable,ListDataListener,ActionListener, Accessible {
@@ -255,13 +255,9 @@
      *
      * @param ui  the <code>ComboBoxUI</code> L&amp;F object
      * @see UIDefaults#getUI
-     *
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(ComboBoxUI ui) {
         super.setUI(ui);
     }
@@ -288,6 +284,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -308,11 +305,9 @@
      *
      * @param aModel the <code>ComboBoxModel</code> that provides the
      *  displayed list of items
-     *
-     * @beaninfo
-     *        bound: true
-     *  description: Model that the combo box uses to get data to display.
      */
+    @BeanProperty(description
+            = "Model that the combo box uses to get data to display.")
     public void setModel(ComboBoxModel<E> aModel) {
         ComboBoxModel<E> oldModel = dataModel;
         if (oldModel != null) {
@@ -363,12 +358,9 @@
      * This method fires a property changed event.
      *
      * @param aFlag if <code>true</code>, lightweight popups are desired
-     *
-     * @beaninfo
-     *        bound: true
-     *       expert: true
-     *  description: Set to <code>false</code> to require heavyweight popups.
      */
+    @BeanProperty(expert = true, description
+            = "Set to <code>false</code> to require heavyweight popups.")
     public void setLightWeightPopupEnabled(boolean aFlag) {
         boolean oldFlag = lightWeightPopupEnabled;
         lightWeightPopupEnabled = aFlag;
@@ -398,12 +390,9 @@
      *
      * @param aFlag a boolean value, where true indicates that the
      *                  field is editable
-     *
-     * @beaninfo
-     *        bound: true
-     *    preferred: true
-     *  description: If true, the user can type a new value in the combo box.
      */
+    @BeanProperty(preferred = true, description
+            = "If true, the user can type a new value in the combo box.")
     public void setEditable(boolean aFlag) {
         boolean oldFlag = isEditable;
         isEditable = aFlag;
@@ -427,11 +416,9 @@
      *
      * @param count an integer specifying the maximum number of items to
      *              display in the list before using a scrollbar
-     * @beaninfo
-     *        bound: true
-     *    preferred: true
-     *  description: The maximum number of rows the popup should have
      */
+    @BeanProperty(preferred = true, description
+            = "The maximum number of rows the popup should have")
     public void setMaximumRowCount(int count) {
         int oldCount = maximumRowCount;
         maximumRowCount = count;
@@ -465,11 +452,9 @@
      * @param aRenderer  the <code>ListCellRenderer</code> that
      *                  displays the selected item
      * @see #setEditor
-     * @beaninfo
-     *      bound: true
-     *     expert: true
-     *  description: The renderer that paints the item selected in the list.
      */
+    @BeanProperty(expert = true, description
+            = "The renderer that paints the item selected in the list.")
     public void setRenderer(ListCellRenderer<? super E> aRenderer) {
         ListCellRenderer<? super E> oldRenderer = renderer;
         renderer = aRenderer;
@@ -497,11 +482,9 @@
      * @param anEditor  the <code>ComboBoxEditor</code> that
      *                  displays the selected item
      * @see #setRenderer
-     * @beaninfo
-     *     bound: true
-     *    expert: true
-     *  description: The editor that combo box uses to edit the current value
      */
+    @BeanProperty(expert = true, description
+            = "The editor that combo box uses to edit the current value")
     public void setEditor(ComboBoxEditor anEditor) {
         ComboBoxEditor oldEditor = editor;
 
@@ -553,10 +536,9 @@
      *
      * @param anObject  the list object to select; use <code>null</code> to
                         clear the selection
-     * @beaninfo
-     *    preferred:   true
-     *    description: Sets the selected item in the JComboBox.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "Sets the selected item in the JComboBox.")
     public void setSelectedItem(Object anObject) {
         Object oldSelection = selectedItemReminder;
         Object objectToSelect = anObject;
@@ -618,10 +600,9 @@
      *                  where 0 specifies the first item in the list and -1 indicates no selection
      * @exception IllegalArgumentException if <code>anIndex</code> &lt; -1 or
      *                  <code>anIndex</code> is greater than or equal to size
-     * @beaninfo
-     *   preferred: true
-     *  description: The item at index is selected.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The item at index is selected.")
     public void setSelectedIndex(int anIndex) {
         int size = dataModel.getSize();
 
@@ -689,11 +670,9 @@
      * @param prototypeDisplayValue the prototype display value
      * @see #getPrototypeDisplayValue
      * @since 1.4
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: The display prototype value, used to compute display width and height.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The display prototype value, used to compute display width and height.")
     public void setPrototypeDisplayValue(E prototypeDisplayValue) {
         Object oldValue = this.prototypeDisplayValue;
         this.prototypeDisplayValue = prototypeDisplayValue;
@@ -869,6 +848,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public ItemListener[] getItemListeners() {
         return listenerList.getListeners(ItemListener.class);
     }
@@ -907,6 +887,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public ActionListener[] getActionListeners() {
         return listenerList.getListeners(ActionListener.class);
     }
@@ -946,6 +927,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public PopupMenuListener[] getPopupMenuListeners() {
         return listenerList.getListeners(PopupMenuListener.class);
     }
@@ -1074,11 +1056,9 @@
      * @see #configurePropertiesFromAction
      * @see #createActionPropertyChangeListener
      * @see #actionPropertyChanged
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: the Action instance connected with this ActionEvent source
      */
+    @BeanProperty(visualUpdate = true, description
+            = "the Action instance connected with this ActionEvent source")
     public void setAction(Action a) {
         Action oldValue = getAction();
         if (action==null || !action.equals(a)) {
@@ -1305,6 +1285,7 @@
      * @return an array of <code>Objects</code> containing one
      *          element -- the selected item
      */
+    @BeanProperty(bound = false)
     public Object[] getSelectedObjects() {
         Object selectedObject = getSelectedItem();
         if ( selectedObject == null )
@@ -1394,11 +1375,9 @@
      *
      * @param b a boolean value, where true enables the component and
      *          false disables it
-     * @beaninfo
-     *        bound: true
-     *    preferred: true
-     *  description: Whether the combo box is enabled.
      */
+    @BeanProperty(preferred = true, description
+            = "The enabled state of the component.")
     public void setEnabled(boolean b) {
         super.setEnabled(b);
         firePropertyChange( "enabled", !isEnabled(), isEnabled() );
@@ -1458,10 +1437,9 @@
      * character becomes the selected item.
      *
      * @param aManager a key selection manager
-     * @beaninfo
-     *       expert: true
-     *  description: The objects that changes the selection when a key is pressed.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The objects that changes the selection when a key is pressed.")
     public void setKeySelectionManager(KeySelectionManager aManager) {
         keySelectionManager = aManager;
     }
@@ -1481,6 +1459,7 @@
      *
      * @return an integer equal to the number of items in the list
      */
+    @BeanProperty(bound = false)
     public int getItemCount() {
         return dataModel.getSize();
     }
@@ -1629,6 +1608,7 @@
      * @return an AccessibleJComboBox that serves as the
      *         AccessibleContext of this JComboBox
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if ( accessibleContext == null ) {
             accessibleContext = new AccessibleJComboBox();
@@ -2131,11 +2111,9 @@
              *
              * @see #getAccessibleName
              * @see #addPropertyChangeListener
-             *
-             * @beaninfo
-             *    preferred:   true
-             *    description: Sets the accessible name for the component.
              */
+            @BeanProperty(preferred = true, description
+                    = "Sets the accessible name for the component.")
             public void setAccessibleName(String s) {
                 ac.setAccessibleName(s);
             }
@@ -2165,11 +2143,9 @@
              *
              * @see #setAccessibleName
              * @see #addPropertyChangeListener
-             *
-             * @beaninfo
-             *    preferred:   true
-             *    description: Sets the accessible description for the component.
              */
+            @BeanProperty(preferred = true, description
+                    = "Sets the accessible description for the component.")
             public void setAccessibleDescription(String s) {
                 ac.setAccessibleDescription(s);
             }
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java	Tue Oct 27 01:45:03 2015 -0400
@@ -25,6 +25,7 @@
 package javax.swing;
 
 
+import java.beans.*;
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Enumeration;
@@ -36,10 +37,6 @@
 import java.awt.*;
 import java.awt.event.*;
 import java.awt.peer.LightweightPeer;
-import java.beans.PropertyChangeListener;
-import java.beans.VetoableChangeListener;
-import java.beans.VetoableChangeSupport;
-import java.beans.Transient;
 
 import java.applet.Applet;
 
@@ -176,6 +173,7 @@
  * @author Arnaud Weber
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UIClassID")
 @SuppressWarnings("serial") // Same-version serialization only
 public abstract class JComponent extends Container implements Serializable,
                                               TransferHandler.HasGetTransferHandler
@@ -479,11 +477,10 @@
      *
      * @param value whether or not the JPopupMenu is inherited
      * @see #setComponentPopupMenu
-     * @beaninfo
-     *        bound: true
-     *  description: Whether or not the JPopupMenu is inherited
      * @since 1.5
      */
+    @BeanProperty(description
+            = "Whether or not the JPopupMenu is inherited")
     public void setInheritsPopupMenu(boolean value) {
         boolean oldValue = getFlag(INHERITS_POPUP_MENU);
         setFlag(INHERITS_POPUP_MENU, value);
@@ -519,12 +516,10 @@
      * @param popup - the popup that will be assigned to this component
      *                may be null
      * @see #getComponentPopupMenu
-     * @beaninfo
-     *        bound: true
-     *    preferred: true
-     *  description: Popup to show
      * @since 1.5
      */
+    @BeanProperty(preferred = true, description
+            = "Popup to show")
     public void setComponentPopupMenu(JPopupMenu popup) {
         if(popup != null) {
             enableEvents(AWTEvent.MOUSE_EVENT_MASK);
@@ -649,12 +644,9 @@
      * @see #updateUI
      * @see UIManager#getLookAndFeel
      * @see UIManager#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The component's look and feel delegate.
-     */
+     */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The component's look and feel delegate.")
     protected void setUI(ComponentUI newUI) {
         /* We do not check that the UI instance is different
          * before allowing the switch in order to enable the
@@ -718,10 +710,9 @@
      * @return the <code>UIDefaults</code> key for a
      *          <code>ComponentUI</code> subclass
      * @see UIDefaults#getUI
-     * @beaninfo
-     *      expert: true
-     * description: UIClassID
-     */
+     */
+    @BeanProperty(bound = false, expert = true, description
+            = "UIClassID")
     public String getUIClassID() {
         return uiClassID;
     }
@@ -1265,6 +1256,7 @@
      *  @return  true if the component is currently painting a tile,
      *          false otherwise
      */
+    @BeanProperty(bound = false)
     public boolean isPaintingTile() {
         return getFlag(IS_PAINTING_TILE);
     }
@@ -1295,6 +1287,7 @@
      * @see #print
      * @since 1.6
      */
+    @BeanProperty(bound = false)
     public final boolean isPaintingForPrint() {
         return getFlag(IS_PRINTING);
     }
@@ -1319,6 +1312,7 @@
      *   <code>Container.setFocusCycleRoot(boolean)</code>.
      */
     @Deprecated
+    @BeanProperty(bound = false)
     public boolean isManagingFocus() {
         return false;
     }
@@ -1589,11 +1583,9 @@
      * @see #getVerifyInputWhenFocusTarget
      *
      * @since 1.3
-     * @beaninfo
-     *       bound: true
-     * description: Whether the Component verifies input before accepting
-     *              focus.
-     */
+     */
+    @BeanProperty(description
+            = "Whether the Component verifies input before accepting focus.")
     public void setVerifyInputWhenFocusTarget(boolean
                                               verifyInputWhenFocusTarget) {
         boolean oldVerifyInputWhenFocusTarget =
@@ -1641,11 +1633,9 @@
      * Sets the preferred size of this component.
      * If <code>preferredSize</code> is <code>null</code>, the UI will
      * be asked for the preferred size.
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The preferred size of the component.
-     */
+     */
+    @BeanProperty(preferred = true, description
+            = "The preferred size of the component.")
     public void setPreferredSize(Dimension preferredSize) {
         super.setPreferredSize(preferredSize);
     }
@@ -1685,10 +1675,9 @@
      * @param maximumSize a <code>Dimension</code> containing the
      *          desired maximum allowable size
      * @see #getMaximumSize
-     * @beaninfo
-     *       bound: true
-     * description: The maximum size of the component.
-     */
+     */
+    @BeanProperty(description
+            = "The maximum size of the component.")
     public void setMaximumSize(Dimension maximumSize) {
         super.setMaximumSize(maximumSize);
     }
@@ -1726,10 +1715,9 @@
      *
      * @param minimumSize the new minimum size of this component
      * @see #getMinimumSize
-     * @beaninfo
-     *       bound: true
-     * description: The minimum size of the component.
-     */
+     */
+    @BeanProperty(description
+            = "The minimum size of the component.")
     public void setMinimumSize(Dimension minimumSize) {
         super.setMinimumSize(minimumSize);
     }
@@ -1793,12 +1781,9 @@
      * @param border the border to be rendered for this component
      * @see Border
      * @see CompoundBorder
-     * @beaninfo
-     *        bound: true
-     *    preferred: true
-     *    attribute: visualUpdate true
-     *  description: The component's border.
-     */
+     */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "The component's border.")
     public void setBorder(Border border) {
         Border         oldBorder = this.border;
 
@@ -1831,6 +1816,7 @@
      * @return the value of the insets property
      * @see #setBorder
      */
+    @BeanProperty(expert = true)
     public Insets getInsets() {
         if (border != null) {
             return border.getBorderInsets(this);
@@ -1849,8 +1835,6 @@
      * @param insets the <code>Insets</code> object, which can be reused
      * @return the <code>Insets</code> object
      * @see #getInsets
-     * @beaninfo
-     *   expert: true
      */
     public Insets getInsets(Insets insets) {
         if (insets == null) {
@@ -1892,9 +1876,9 @@
      *
      * @param alignmentY  the new vertical alignment
      * @see #getAlignmentY
-     * @beaninfo
-     *   description: The preferred vertical alignment of the component.
-     */
+     */
+    @BeanProperty(description
+            = "The preferred vertical alignment of the component.")
     public void setAlignmentY(float alignmentY) {
         this.alignmentY = validateAlignment(alignmentY);
         isAlignmentYSet = true;
@@ -1921,9 +1905,9 @@
      *
      * @param alignmentX  the new horizontal alignment
      * @see #getAlignmentX
-     * @beaninfo
-     *   description: The preferred horizontal alignment of the component.
-     */
+     */
+    @BeanProperty(description
+            = "The preferred horizontal alignment of the component.")
     public void setAlignmentX(float alignmentX) {
         this.alignmentX = validateAlignment(alignmentX);
         isAlignmentXSet = true;
@@ -1939,10 +1923,9 @@
      * @param inputVerifier the new input verifier
      * @since 1.3
      * @see InputVerifier
-     * @beaninfo
-     *       bound: true
-     * description: The component's input verifier.
-     */
+     */
+    @BeanProperty(description
+            = "The component's input verifier.")
     public void setInputVerifier(InputVerifier inputVerifier) {
         InputVerifier oldInputVerifier = (InputVerifier)getClientProperty(
                                          JComponent_INPUT_VERIFIER);
@@ -1967,6 +1950,7 @@
      * then invoke operations on that object to draw on the component.
      * @return this components graphics context
      */
+    @BeanProperty(bound = false)
     public Graphics getGraphics() {
         if (DEBUG_GRAPHICS_LOADED && shouldDebugGraphics() != 0) {
             DebugGraphics graphics = new DebugGraphics(super.getGraphics(),
@@ -1993,15 +1977,13 @@
       * <li>A value of 0 causes no changes to the debugging options.
       * </ul>
       * <code>debugOptions</code> is bitwise OR'd into the current value
-      *
-      * @beaninfo
-      *   preferred: true
-      *        enum: NONE_OPTION DebugGraphics.NONE_OPTION
-      *              LOG_OPTION DebugGraphics.LOG_OPTION
-      *              FLASH_OPTION DebugGraphics.FLASH_OPTION
-      *              BUFFERED_OPTION DebugGraphics.BUFFERED_OPTION
-      * description: Diagnostic options for graphics operations.
       */
+    @BeanProperty(bound = false, preferred = true, enumerationValues = {
+            "DebugGraphics.NONE_OPTION",
+            "DebugGraphics.LOG_OPTION",
+            "DebugGraphics.FLASH_OPTION",
+            "DebugGraphics.BUFFERED_OPTION"}, description
+            = "Diagnostic options for graphics operations.")
     public void setDebugGraphicsOptions(int debugOptions) {
         DebugGraphics.setDebugOptions(this, debugOptions);
     }
@@ -2278,6 +2260,7 @@
      * @return an array of <code>KeyStroke</code> objects
      * @see #registerKeyboardAction
      */
+    @BeanProperty(bound = false)
     public KeyStroke[] getRegisteredKeyStrokes() {
         int[] counts = new int[3];
         KeyStroke[][] strokes = new KeyStroke[3][];
@@ -2616,6 +2599,7 @@
      * @see #getBaseline(int, int)
      * @since 1.6
      */
+    @BeanProperty(bound = false)
     public BaselineResizeBehavior getBaselineResizeBehavior() {
         if (ui != null) {
             return ui.getBaselineResizeBehavior(this);
@@ -2666,10 +2650,8 @@
      *
      * @param aFlag  true to make the component visible; false to
      *          make it invisible
-     *
-     * @beaninfo
-     *    attribute: visualUpdate true
-     */
+     */
+    @BeanProperty(hidden = true, visualUpdate = true)
     public void setVisible(boolean aFlag) {
         if (aFlag != isVisible()) {
             super.setVisible(aFlag);
@@ -2699,13 +2681,9 @@
      * @param enabled true if this component should be enabled, false otherwise
      * @see java.awt.Component#isEnabled
      * @see java.awt.Component#isLightweight
-     *
-     * @beaninfo
-     *    preferred: true
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The enabled state of the component.
-     */
+     */
+    @BeanProperty(expert = true, preferred = true, visualUpdate = true, description
+            = "The enabled state of the component.")
     public void setEnabled(boolean enabled) {
         boolean oldEnabled = isEnabled();
         super.setEnabled(enabled);
@@ -2722,13 +2700,9 @@
      *
      * @param fg  the desired foreground <code>Color</code>
      * @see java.awt.Component#getForeground
-     *
-     * @beaninfo
-     *    preferred: true
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The foreground color of the component.
-     */
+     */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "The foreground color of the component.")
     public void setForeground(Color fg) {
         Color oldFg = getForeground();
         super.setForeground(fg);
@@ -2752,13 +2726,9 @@
      * @param bg the desired background <code>Color</code>
      * @see java.awt.Component#getBackground
      * @see #setOpaque
-     *
-     * @beaninfo
-     *    preferred: true
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The background color of the component.
-     */
+     */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "The background color of the component.")
     public void setBackground(Color bg) {
         Color oldBg = getBackground();
         super.setBackground(bg);
@@ -2773,13 +2743,9 @@
      *
      * @param font the desired <code>Font</code> for this component
      * @see java.awt.Component#getFont
-     *
-     * @beaninfo
-     *    preferred: true
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The font for the component.
-     */
+     */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "The font for the component.")
     public void setFont(Font font) {
         Font oldFont = getFont();
         super.setFont(font);
@@ -3028,10 +2994,9 @@
      * @param text  the string to display; if the text is <code>null</code>,
      *              the tool tip is turned off for this component
      * @see #TOOL_TIP_TEXT_KEY
-     * @beaninfo
-     *   preferred: true
-     * description: The text to display in a tool tip.
-     */
+     */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The text to display in a tool tip.")
     public void setToolTipText(String text) {
         String oldText = getToolTipText();
         putClientProperty(TOOL_TIP_TEXT_KEY, text);
@@ -3190,11 +3155,9 @@
      * @see #getAutoscrolls
      * @see JViewport
      * @see JScrollPane
-     *
-     * @beaninfo
-     *      expert: true
-     * description: Determines if this component automatically scrolls its contents when dragged.
-     */
+     */
+    @BeanProperty(bound = false, expert = true, description
+            = "Determines if this component automatically scrolls its contents when dragged.")
     public void setAutoscrolls(boolean autoscrolls) {
         setFlag(AUTOSCROLLS_SET, true);
         if (this.autoscrolls != autoscrolls) {
@@ -3254,11 +3217,9 @@
      * @see TransferHandler
      * @see #getTransferHandler
      * @since 1.4
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *  description: Mechanism for transfer of data to and from the component
-     */
+     */
+    @BeanProperty(hidden = true, description
+            = "Mechanism for transfer of data to and from the component")
     public void setTransferHandler(TransferHandler newHandler) {
         TransferHandler oldHandler = (TransferHandler)getClientProperty(
                                       JComponent_TRANSFER_HANDLER);
@@ -4208,8 +4169,6 @@
      *         or if any keystroke already maps to another focus traversal
      *         operation for this Component
      * @since 1.5
-     * @beaninfo
-     *       bound: true
      */
     public void
         setFocusTraversalKeys(int id, Set<? extends AWTKeyStroke> keystrokes)
@@ -4336,6 +4295,7 @@
      *
      * @return the current x coordinate of the component's origin
      */
+    @BeanProperty(bound = false)
     public int getX() { return super.getX(); }
 
 
@@ -4348,6 +4308,7 @@
      *
      * @return the current y coordinate of the component's origin
      */
+    @BeanProperty(bound = false)
     public int getY() { return super.getY(); }
 
 
@@ -4360,6 +4321,7 @@
      *
      * @return the current width of this component
      */
+    @BeanProperty(bound = false)
     public int getWidth() { return super.getWidth(); }
 
 
@@ -4372,6 +4334,7 @@
      *
      * @return the current height of this component
      */
+    @BeanProperty(bound = false)
     public int getHeight() { return super.getHeight(); }
 
     /**
@@ -4405,11 +4368,9 @@
      *
      * @param isOpaque  true if this component should be opaque
      * @see #isOpaque
-     * @beaninfo
-     *        bound: true
-     *       expert: true
-     *  description: The component's opacity
-     */
+     */
+    @BeanProperty(expert = true, description
+            = "The component's opacity")
     public void setOpaque(boolean isOpaque) {
         boolean oldValue = getFlag(IS_OPAQUE);
         setFlag(IS_OPAQUE, isOpaque);
@@ -4520,6 +4481,7 @@
      *
      * @return the visible rectangle
      */
+    @BeanProperty(bound = false)
     public Rectangle getVisibleRect() {
         Rectangle visibleRect = new Rectangle();
 
@@ -4628,6 +4590,7 @@
      *
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public synchronized VetoableChangeListener[] getVetoableChangeListeners() {
         if (vetoableChangeSupport == null) {
             return new VetoableChangeListener[0];
@@ -4645,6 +4608,7 @@
      * @return the top-level <code>Container</code> that this component is in,
      *          or <code>null</code> if not in any container
      */
+    @BeanProperty(bound = false)
     public Container getTopLevelAncestor() {
         for(Container p = this; p != null; p = p.getParent()) {
             if(p instanceof Window || p instanceof Applet) {
@@ -4711,6 +4675,7 @@
      *
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public AncestorListener[] getAncestorListeners() {
         AncestorNotifier ancestorNotifier = getAncestorNotifier();
         if (ancestorNotifier == null) {
@@ -4943,6 +4908,7 @@
      *
      * @return always returns true
      */
+    @BeanProperty(bound = false)
     public boolean isOptimizedDrawingEnabled() {
         return true;
     }
@@ -5392,6 +5358,7 @@
      * @return the <code>JRootPane</code> that contains this component,
      *          or <code>null</code> if no <code>JRootPane</code> is found
      */
+    @BeanProperty(bound = false)
     public JRootPane getRootPane() {
         return SwingUtilities.getRootPane(this);
     }
--- a/jdk/src/java.desktop/share/classes/javax/swing/JDesktopPane.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JDesktopPane.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,6 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import java.util.List;
@@ -34,16 +33,15 @@
 
 import java.awt.Component;
 import java.awt.Container;
-import java.awt.DefaultFocusTraversalPolicy;
-import java.awt.FocusTraversalPolicy;
-import java.awt.Window;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 import java.beans.PropertyVetoException;
 import java.util.Set;
 import java.util.TreeSet;
 import java.util.LinkedHashSet;
+
 /**
  * A container used to create a multiple-document interface or a virtual desktop.
  * You create <code>JInternalFrame</code> objects and add them to the
@@ -88,6 +86,7 @@
  * @author David Kloba
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI")
 @SuppressWarnings("serial") // Same-version serialization only
 public class JDesktopPane extends JLayeredPane implements Accessible
 {
@@ -163,12 +162,9 @@
      *
      * @param ui  the DesktopPaneUI L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(DesktopPaneUI ui) {
         super.setUI(ui);
     }
@@ -183,13 +179,12 @@
      * @see #LIVE_DRAG_MODE
      * @see #OUTLINE_DRAG_MODE
      *
-     * @beaninfo
-     *        bound: true
-     *  description: Dragging style for internal frame children.
-     *         enum: LIVE_DRAG_MODE JDesktopPane.LIVE_DRAG_MODE
-     *               OUTLINE_DRAG_MODE JDesktopPane.OUTLINE_DRAG_MODE
      * @since 1.3
      */
+    @BeanProperty(enumerationValues = {
+            "JDesktopPane.LIVE_DRAG_MODE",
+            "JDesktopPane.OUTLINE_DRAG_MODE"}, description
+            = "Dragging style for internal frame children.")
     public void setDragMode(int dragMode) {
         int oldDragMode = this.dragMode;
         this.dragMode = dragMode;
@@ -225,12 +220,9 @@
      * {@code LookAndFeel}.
      *
      * @param d the <code>DesktopManager</code> to use
-     *
-     * @beaninfo
-     *        bound: true
-     *  description: Desktop manager to handle the internal frames in the
-     *               desktop pane.
      */
+    @BeanProperty(description
+            = "Desktop manager to handle the internal frames in the desktop pane.")
     public void setDesktopManager(DesktopManager d) {
         DesktopManager oldValue = desktopManager;
         desktopManager = d;
@@ -256,6 +248,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -266,6 +259,7 @@
      *
      * @return an array of <code>JInternalFrame</code> objects
      */
+    @BeanProperty(bound = false)
     public JInternalFrame[] getAllFrames() {
         return getAllFrames(this).toArray(new JInternalFrame[0]);
     }
@@ -600,6 +594,7 @@
      * @return an <code>AccessibleJDesktopPane</code> that serves as the
      *         <code>AccessibleContext</code> of this <code>JDesktopPane</code>
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJDesktopPane();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JDialog.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JDialog.java	Tue Oct 27 01:45:03 2015 -0400
@@ -26,6 +26,8 @@
 
 import java.awt.*;
 import java.awt.event.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import javax.accessibility.*;
 
 /**
@@ -86,16 +88,13 @@
  * @see JRootPane
  * @see javax.swing.RootPaneContainer
  *
- * @beaninfo
- *      attribute: isContainer true
- *      attribute: containerDelegate getContentPane
- *    description: A toplevel window for creating dialog boxes.
- *
  * @author David Kloba
  * @author James Gosling
  * @author Scott Violet
  * @since 1.2
  */
+@JavaBean(defaultProperty = "JMenuBar", description = "A toplevel window for creating dialog boxes.")
+@SwingContainer(delegate = "getContentPane")
 @SuppressWarnings("serial") // Same-version serialization only
 public class JDialog extends Dialog implements WindowConstants,
                                                Accessible,
@@ -743,15 +742,12 @@
      * @see #addWindowListener
      * @see #getDefaultCloseOperation
      * @see WindowConstants
-     *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     *        enum: DO_NOTHING_ON_CLOSE WindowConstants.DO_NOTHING_ON_CLOSE
-     *              HIDE_ON_CLOSE       WindowConstants.HIDE_ON_CLOSE
-     *              DISPOSE_ON_CLOSE    WindowConstants.DISPOSE_ON_CLOSE
-     * description: The dialog's default close operation.
      */
+    @BeanProperty(preferred = true, enumerationValues = {
+            "WindowConstants.DO_NOTHING_ON_CLOSE",
+            "WindowConstants.HIDE_ON_CLOSE",
+            "WindowConstants.DISPOSE_ON_CLOSE"}, description
+            = "The dialog's default close operation.")
     public void setDefaultCloseOperation(int operation) {
         if (operation != DO_NOTHING_ON_CLOSE &&
             operation != HIDE_ON_CLOSE &&
@@ -802,12 +798,9 @@
      * @see #getTransferHandler
      * @see java.awt.Component#setDropTarget
      * @since 1.6
-     *
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *  description: Mechanism for transfer of data into the component
      */
+    @BeanProperty(hidden = true, description
+            = "Mechanism for transfer of data into the component")
     public void setTransferHandler(TransferHandler newHandler) {
         TransferHandler oldHandler = transferHandler;
         transferHandler = newHandler;
@@ -844,11 +837,9 @@
     * @param menu the menubar being placed in the dialog
     *
     * @see #getJMenuBar
-    *
-    * @beaninfo
-    *      hidden: true
-    * description: The menubar for accessing pulldown menus from this dialog.
     */
+    @BeanProperty(bound = false, hidden = true, description
+            = "The menubar for accessing pulldown menus from this dialog.")
     public void setJMenuBar(final JMenuBar menu) {
         getRootPane().setJMenuBar(menu);
     }
@@ -892,10 +883,9 @@
      * @see #setLayout
      * @see #isRootPaneCheckingEnabled
      * @see javax.swing.RootPaneContainer
-     * @beaninfo
-     *      hidden: true
-     * description: Whether the add and setLayout methods are forwarded
      */
+    @BeanProperty(hidden = true, description
+            = "Whether the add and setLayout methods are forwarded")
     protected void setRootPaneCheckingEnabled(boolean enabled) {
         rootPaneCheckingEnabled = enabled;
     }
@@ -977,6 +967,8 @@
      * @see #setRootPane
      * @see RootPaneContainer#getRootPane
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "the RootPane object for this dialog.")
     public JRootPane getRootPane() {
         return rootPane;
     }
@@ -989,10 +981,6 @@
      * @param root the {@code rootPane} object for this dialog
      *
      * @see #getRootPane
-     *
-     * @beaninfo
-     *   hidden: true
-     * description: the RootPane object for this dialog.
      */
     protected void setRootPane(JRootPane root) {
         if(rootPane != null) {
@@ -1041,12 +1029,9 @@
      *            exception) if the content pane parameter is {@code null}
      * @see #getContentPane
      * @see RootPaneContainer#setContentPane
-     *
-     * @beaninfo
-     *     hidden: true
-     *     description: The client area of the dialog where child
-     *                  components are normally inserted.
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "The client area of the dialog where child components are normally inserted.")
     public void setContentPane(Container contentPane) {
         getRootPane().setContentPane(contentPane);
     }
@@ -1073,11 +1058,9 @@
      *            exception) if the layered pane parameter is null
      * @see #getLayeredPane
      * @see RootPaneContainer#setLayeredPane
-     *
-     * @beaninfo
-     *     hidden: true
-     *     description: The pane which holds the various dialog layers.
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "The pane which holds the various dialog layers.")
     public void setLayeredPane(JLayeredPane layeredPane) {
         getRootPane().setLayeredPane(layeredPane);
     }
@@ -1101,11 +1084,9 @@
      * @param glassPane the {@code glassPane} object for this dialog
      * @see #getGlassPane
      * @see RootPaneContainer#setGlassPane
-     *
-     * @beaninfo
-     *     hidden: true
-     *     description: A transparent pane used for menu rendering.
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "A transparent pane used for menu rendering.")
     public void setGlassPane(Component glassPane) {
         getRootPane().setGlassPane(glassPane);
     }
@@ -1115,6 +1096,7 @@
      *
      * @since 1.6
      */
+    @BeanProperty(bound = false)
     public Graphics getGraphics() {
         JComponent.getGraphicsInvoked(this);
         return super.getGraphics();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Tue Oct 27 01:45:03 2015 -0400
@@ -24,15 +24,13 @@
  */
 package javax.swing;
 
-import sun.swing.SwingUtilities2;
-
 import java.awt.*;
-import java.awt.event.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.lang.reflect.*;
 import java.net.*;
 import java.util.*;
 import java.io.*;
-import java.util.*;
 
 import javax.swing.plaf.*;
 import javax.swing.text.*;
@@ -184,13 +182,11 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: A text component to edit various types of content.
- *
  * @author  Timothy Prinzing
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UIClassID", description = "A text component to edit various types of content.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JEditorPane extends JTextComponent {
 
@@ -323,6 +319,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public synchronized HyperlinkListener[] getHyperlinkListeners() {
         return listenerList.getListeners(javax.swing.event.HyperlinkListener.class);
     }
@@ -411,11 +408,9 @@
      * @exception IOException for a <code>null</code> or invalid
      *          page specification, or exception from the stream being read
      * @see #getPage
-     * @beaninfo
-     *  description: the URL used to set content
-     *        bound: true
-     *       expert: true
      */
+    @BeanProperty(expert = true, description
+            = "the URL used to set content")
     public void setPage(URL page) throws IOException {
         if (page == null) {
             throw new IOException("invalid url");
@@ -895,6 +890,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -960,11 +956,11 @@
      * @param type the non-<code>null</code> mime type for the content editing
      *   support
      * @see #getContentType
-     * @beaninfo
-     *  description: the type of content
      * @throws NullPointerException if the <code>type</code> parameter
      *          is <code>null</code>
      */
+    @BeanProperty(bound = false, description
+            = "the type of content")
     public final void setContentType(String type) {
         // The type could have optional info is part of it,
         // for example some charset info.  We need to strip that
@@ -1046,11 +1042,9 @@
      *
      * @param kit the desired editor behavior
      * @see #getEditorKit
-     * @beaninfo
-     *  description: the currently installed kit for handling content
-     *        bound: true
-     *       expert: true
      */
+    @BeanProperty(expert = true, description
+            = "the currently installed kit for handling content")
     public void setEditorKit(EditorKit kit) {
         EditorKit old = this.kit;
         isUserSetEditorKit = true;
@@ -1414,9 +1408,9 @@
      * @param t the new text to be set; if <code>null</code> the old
      *    text will be deleted
      * @see #getText
-     * @beaninfo
-     * description: the text of this component
      */
+    @BeanProperty(bound = false, description
+            = "the text of this component")
     public void setText(String t) {
         try {
             Document doc = getDocument();
@@ -1466,6 +1460,7 @@
      * @return true if a viewport should force the Scrollables width to
      * match its own, false otherwise
      */
+    @BeanProperty(bound = false)
     public boolean getScrollableTracksViewportWidth() {
         Container parent = SwingUtilities.getUnwrappedParent(this);
         if (parent instanceof JViewport) {
@@ -1489,6 +1484,7 @@
      *          <code>Scrollable</code>'s height to match its own,
      *          false otherwise
      */
+    @BeanProperty(bound = false)
     public boolean getScrollableTracksViewportHeight() {
         Container parent = SwingUtilities.getUnwrappedParent(this);
         if (parent instanceof JViewport) {
@@ -1626,6 +1622,7 @@
      * @return an AccessibleJEditorPane that serves as the
      *         AccessibleContext of this JEditorPane
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (getEditorKit() instanceof HTMLEditorKit) {
             if (accessibleContext == null || accessibleContext.getClass() !=
--- a/jdk/src/java.desktop/share/classes/javax/swing/JFileChooser.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JFileChooser.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,6 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import javax.swing.event.*;
@@ -48,6 +47,8 @@
 import java.awt.EventQueue;
 import java.awt.Toolkit;
 import java.awt.event.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeEvent;
 import java.io.InvalidObjectException;
@@ -83,13 +84,11 @@
  * href="package-summary.html#threading">Swing's Threading
  * Policy</a>.
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: A component which allows for the interactive selection of a file.
- *
  * @author Jeff Dinkins
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A component which allows for the interactive selection of a file.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Superclass is not serializable across versions
 public class JFileChooser extends JComponent implements Accessible {
 
@@ -456,11 +455,9 @@
      * @see #setTransferHandler
      * @see TransferHandler
      * @since 1.4
-     *
-     * @beaninfo
-     *  description: determines whether automatic drag handling is enabled
-     *        bound: false
      */
+    @BeanProperty(bound = false, description
+            = "determines whether automatic drag handling is enabled")
     public void setDragEnabled(boolean b) {
         checkDragEnabled(b);
         dragEnabled = b;
@@ -505,14 +502,11 @@
      * not the current directory, changes the current directory
      * to be the file's parent directory.
      *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     *
      * @see #getSelectedFile
      *
      * @param file the selected file
      */
+    @BeanProperty(preferred = true)
     public void setSelectedFile(File file) {
         File oldValue = selectedFile;
         selectedFile = file;
@@ -546,10 +540,9 @@
      * set to allow multiple selection.
      *
      * @param selectedFiles an array {@code File}s to be selected
-     * @beaninfo
-     *       bound: true
-     * description: The list of selected files if the chooser is in multiple selection mode.
      */
+    @BeanProperty(description
+            = "The list of selected files if the chooser is in multiple selection mode.")
     public void setSelectedFiles(File[] selectedFiles) {
         File[] oldValue = this.selectedFiles;
         if (selectedFiles == null || selectedFiles.length == 0) {
@@ -586,14 +579,11 @@
      * until it finds a traversable directory, or hits the root of the
      * file system.
      *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The directory that the JFileChooser is showing files of.
-     *
      * @param dir the current directory to point to
      * @see #getCurrentDirectory
      */
+    @BeanProperty(preferred = true, description
+            = "The directory that the JFileChooser is showing files of.")
     public void setCurrentDirectory(File dir) {
         File oldValue = currentDirectory;
 
@@ -881,15 +871,12 @@
      * @param b <code>false</code> if control buttons should not be
      *    shown; otherwise, <code>true</code>
      *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: Sets whether the approve &amp; cancel buttons are shown.
-     *
      * @see #getControlButtonsAreShown
      * @see #CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY
      * @since 1.3
      */
+    @BeanProperty(preferred = true, description
+            = "Sets whether the approve &amp; cancel buttons are shown.")
     public void setControlButtonsAreShown(boolean b) {
         if(controlsShown == b) {
             return;
@@ -939,19 +926,16 @@
      *
      * @exception IllegalArgumentException if <code>dialogType</code> is
      *                          not legal
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The type (open, save, custom) of the JFileChooser.
-     *        enum:
-     *              OPEN_DIALOG JFileChooser.OPEN_DIALOG
-     *              SAVE_DIALOG JFileChooser.SAVE_DIALOG
-     *              CUSTOM_DIALOG JFileChooser.CUSTOM_DIALOG
      *
      * @see #getDialogType
      * @see #setApproveButtonText
      */
     // PENDING(jeff) - fire button text change property
+    @BeanProperty(preferred = true, enumerationValues = {
+            "JFileChooser.OPEN_DIALOG",
+            "JFileChooser.SAVE_DIALOG",
+            "JFileChooser.CUSTOM_DIALOG"}, description
+            = "The type (open, save, custom) of the JFileChooser.")
     public void setDialogType(int dialogType) {
         if(this.dialogType == dialogType) {
             return;
@@ -979,14 +963,11 @@
      *
      * @param dialogTitle the new <code>String</code> for the title bar
      *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The title of the JFileChooser dialog window.
-     *
      * @see #getDialogTitle
      *
      */
+    @BeanProperty(preferred = true, description
+            = "The title of the JFileChooser dialog window.")
     public void setDialogTitle(String dialogTitle) {
         String oldValue = this.dialogTitle;
         this.dialogTitle = dialogTitle;
@@ -1016,16 +997,13 @@
      * Sets the tooltip text used in the <code>ApproveButton</code>.
      * If <code>null</code>, the UI object will determine the button's text.
      *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The tooltip text for the ApproveButton.
-     *
      * @param toolTipText the tooltip text for the approve button
      * @see #setApproveButtonText
      * @see #setDialogType
      * @see #showDialog
      */
+    @BeanProperty(preferred = true, description
+            = "The tooltip text for the ApproveButton.")
     public void setApproveButtonToolTipText(String toolTipText) {
         if(approveButtonToolTipText == toolTipText) {
             return;
@@ -1065,13 +1043,10 @@
      *
      * @param mnemonic  an integer value for the mnemonic key
      *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The mnemonic key accelerator for the ApproveButton.
-     *
      * @see #getApproveButtonMnemonic
      */
+    @BeanProperty(preferred = true, description
+            = "The mnemonic key accelerator for the ApproveButton.")
     public void setApproveButtonMnemonic(int mnemonic) {
         if(approveButtonMnemonic == mnemonic) {
            return;
@@ -1100,11 +1075,6 @@
      * Sets the text used in the <code>ApproveButton</code> in the
      * <code>FileChooserUI</code>.
      *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The text that goes in the ApproveButton.
-     *
      * @param approveButtonText the text used in the <code>ApproveButton</code>
      *
      * @see #getApproveButtonText
@@ -1112,6 +1082,8 @@
      * @see #showDialog
      */
     // PENDING(jeff) - have ui set this on dialog type change
+    @BeanProperty(preferred = true, description
+            = "The text that goes in the ApproveButton.")
     public void setApproveButtonText(String approveButtonText) {
         if(this.approveButtonText == approveButtonText) {
             return;
@@ -1148,6 +1120,7 @@
      * @see #removeChoosableFileFilter
      * @see #resetChoosableFileFilters
      */
+    @BeanProperty(bound = false)
     public FileFilter[] getChoosableFileFilters() {
         FileFilter[] filterArray = new FileFilter[filters.size()];
         filters.copyInto(filterArray);
@@ -1162,16 +1135,13 @@
      * @param filter the <code>FileFilter</code> to add to the choosable file
      *               filter list
      *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: Adds a filter to the list of user choosable file filters.
-     *
      * @see #getChoosableFileFilters
      * @see #removeChoosableFileFilter
      * @see #resetChoosableFileFilters
      * @see #setFileSelectionMode
      */
+    @BeanProperty(preferred = true, description
+            = "Adds a filter to the list of user choosable file filters.")
     public void addChoosableFileFilter(FileFilter filter) {
         if(filter != null && !filters.contains(filter)) {
             FileFilter[] oldValue = getChoosableFileFilters();
@@ -1249,6 +1219,7 @@
      *
      * @return the {@code AcceptAll} file filter
      */
+    @BeanProperty(bound = false)
     public FileFilter getAcceptAllFileFilter() {
         FileFilter filter = null;
         if(getUI() != null) {
@@ -1277,16 +1248,14 @@
     *
     * @param b a {@code boolean} which determines whether the {@code AcceptAll}
     *          file filter is an available choice in the choosable filter list
-    * @beaninfo
-    *   preferred: true
-    *       bound: true
-    * description: Sets whether the AcceptAll FileFilter is used as an available choice in the choosable filter list.
     *
     * @see #isAcceptAllFileFilterUsed
     * @see #getAcceptAllFileFilter
     * @see #setFileFilter
     * @since 1.3
     */
+    @BeanProperty(preferred = true, description
+            = "Sets whether the AcceptAll FileFilter is used as an available choice in the choosable filter list.")
     public void setAcceptAllFileFilterUsed(boolean b) {
         boolean oldValue = useAcceptAllFileFilter;
         useAcceptAllFileFilter = b;
@@ -1320,11 +1289,9 @@
      * file chooser.
      *
      * @param newAccessory the accessory component to be set
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: Sets the accessory component on the JFileChooser.
      */
+    @BeanProperty(preferred = true, description
+            = "Sets the accessory component on the JFileChooser.")
     public void setAccessory(JComponent newAccessory) {
         JComponent oldValue = accessory;
         accessory = newAccessory;
@@ -1346,17 +1313,14 @@
      *
      * @exception IllegalArgumentException  if <code>mode</code> is an
      *                          illegal file selection mode
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: Sets the types of files that the JFileChooser can choose.
-     *        enum: FILES_ONLY JFileChooser.FILES_ONLY
-     *              DIRECTORIES_ONLY JFileChooser.DIRECTORIES_ONLY
-     *              FILES_AND_DIRECTORIES JFileChooser.FILES_AND_DIRECTORIES
-     *
      *
      * @see #getFileSelectionMode
      */
+    @BeanProperty(preferred = true, enumerationValues = {
+            "JFileChooser.FILES_ONLY",
+            "JFileChooser.DIRECTORIES_ONLY",
+            "JFileChooser.FILES_AND_DIRECTORIES"}, description
+            = "Sets the types of files that the JFileChooser can choose.")
     public void setFileSelectionMode(int mode) {
         if(fileSelectionMode == mode) {
             return;
@@ -1400,6 +1364,7 @@
      * @see #setFileSelectionMode
      * @see #getFileSelectionMode
      */
+    @BeanProperty(bound = false)
     public boolean isFileSelectionEnabled() {
         return ((fileSelectionMode == FILES_ONLY) || (fileSelectionMode == FILES_AND_DIRECTORIES));
     }
@@ -1412,6 +1377,7 @@
      * @see #setFileSelectionMode
      * @see #getFileSelectionMode
      */
+    @BeanProperty(bound = false)
     public boolean isDirectorySelectionEnabled() {
         return ((fileSelectionMode == DIRECTORIES_ONLY) || (fileSelectionMode == FILES_AND_DIRECTORIES));
     }
@@ -1420,12 +1386,11 @@
      * Sets the file chooser to allow multiple file selections.
      *
      * @param b true if multiple files may be selected
-     * @beaninfo
-     *       bound: true
-     * description: Sets multiple file selection mode.
      *
      * @see #isMultiSelectionEnabled
      */
+    @BeanProperty(description
+            = "Sets multiple file selection mode.")
     public void setMultiSelectionEnabled(boolean b) {
         if(multiSelectionEnabled == b) {
             return;
@@ -1461,15 +1426,12 @@
      * in the file chooser. The job of determining which files are
      * shown is done by the <code>FileView</code>.
      *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: Sets file hiding on or off.
-     *
      * @param b the boolean value that determines whether file hiding is
      *          turned on
      * @see #isFileHidingEnabled
      */
+    @BeanProperty(preferred = true, description
+            = "Sets file hiding on or off.")
     public void setFileHidingEnabled(boolean b) {
         // Dump showFilesListener since we'll ignore it from now on
         if (showFilesListener != null) {
@@ -1485,14 +1447,11 @@
      * Sets the current file filter. The file filter is used by the
      * file chooser to filter out files from the user's view.
      *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: Sets the File Filter used to filter out files of type.
-     *
      * @param filter the new current file filter to use
      * @see #getFileFilter
      */
+    @BeanProperty(preferred = true, description
+            = "Sets the File Filter used to filter out files of type.")
     public void setFileFilter(FileFilter filter) {
         FileFilter oldValue = fileFilter;
         fileFilter = filter;
@@ -1534,13 +1493,11 @@
      * the icon that represents a file or the type description of a file.
      *
      * @param fileView a {@code FileView} to be used to retrieve UI information
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: Sets the File View used to get file type information.
      *
      * @see #getFileView
      */
+    @BeanProperty(preferred = true, description
+            = "Sets the File View used to get file type information.")
     public void setFileView(FileView fileView) {
         FileView oldValue = this.fileView;
         this.fileView = fileView;
@@ -1704,13 +1661,10 @@
      * the floppy drive and getting a list of root drives.
      * @param fsv  the new <code>FileSystemView</code>
      *
-     * @beaninfo
-     *      expert: true
-     *       bound: true
-     * description: Sets the FileSytemView used to get filesystem information.
-     *
      * @see FileSystemView
      */
+    @BeanProperty(expert = true, description
+            = "Sets the FileSytemView used to get filesystem information.")
     public void setFileSystemView(FileSystemView fsv) {
         FileSystemView oldValue = fileSystemView;
         fileSystemView = fsv;
@@ -1801,6 +1755,7 @@
      *
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public ActionListener[] getActionListeners() {
         return listenerList.getListeners(ActionListener.class);
     }
@@ -1895,10 +1850,9 @@
      * @return the string "FileChooserUI"
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        expert: true
-     *   description: A string that specifies the name of the L&amp;F class.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "A string that specifies the name of the L&amp;F class.")
     public String getUIClassID() {
         return uiClassID;
     }
@@ -1908,6 +1862,7 @@
      *
      * @return the FileChooserUI object that implements the FileChooserUI L&amp;F
      */
+    @BeanProperty(bound = false)
     public FileChooserUI getUI() {
         return (FileChooserUI) ui;
     }
@@ -2070,6 +2025,7 @@
      * @return an AccessibleJFileChooser that serves as the
      *         AccessibleContext of this JFileChooser
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJFileChooser();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JFormattedTextField.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JFormattedTextField.java	Tue Oct 27 01:45:03 2015 -0400
@@ -27,6 +27,8 @@
 import java.awt.*;
 import java.awt.event.*;
 import java.awt.im.InputContext;
+import java.beans.BeanProperty;
+import java.beans.JavaBean;
 import java.io.*;
 import java.text.*;
 import java.util.*;
@@ -176,6 +178,7 @@
  *
  * @since 1.4
  */
+@JavaBean
 @SuppressWarnings("serial") // Same-version serialization only
 public class JFormattedTextField extends JTextField {
     private static final String uiClassID = "FormattedTextFieldUI";
@@ -357,13 +360,13 @@
      * @param behavior Identifies behavior when focus is lost
      * @throws IllegalArgumentException if behavior is not one of the known
      *         values
-     * @beaninfo
-     *  enum: COMMIT         JFormattedTextField.COMMIT
-     *        COMMIT_OR_REVERT JFormattedTextField.COMMIT_OR_REVERT
-     *        REVERT         JFormattedTextField.REVERT
-     *        PERSIST        JFormattedTextField.PERSIST
-     *  description: Behavior when component loses focus
      */
+    @BeanProperty(bound = false, enumerationValues = {
+            "JFormattedTextField.COMMIT",
+            "JFormattedTextField.COMMIT_OR_REVERT",
+            "JFormattedTextField.REVERT",
+            "JFormattedTextField.PERSIST"}, description
+            = "Behavior when component loses focus")
     public void setFocusLostBehavior(int behavior) {
         if (behavior != COMMIT && behavior != COMMIT_OR_REVERT &&
             behavior != PERSIST && behavior != REVERT) {
@@ -407,12 +410,9 @@
      *
      * @param tf <code>AbstractFormatterFactory</code> used to lookup
      *          instances of <code>AbstractFormatter</code>
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: AbstractFormatterFactory, responsible for returning an
-     *              AbstractFormatter that can format the current value.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "AbstractFormatterFactory, responsible for returning an AbstractFormatter that can format the current value.")
     public void setFormatterFactory(AbstractFormatterFactory tf) {
         AbstractFormatterFactory oldFactory = factory;
 
@@ -448,10 +448,6 @@
      *
      * @see #setFormatterFactory
      * @param format AbstractFormatter to use for formatting
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: TextFormatter, responsible for formatting the current value
      */
     protected void setFormatter(AbstractFormatter format) {
         AbstractFormatter oldFormat = this.format;
@@ -474,6 +470,8 @@
      *
      * @return AbstractFormatter used for formatting
      */
+    @BeanProperty(visualUpdate = true, description
+            = "TextFormatter, responsible for formatting the current value")
     public AbstractFormatter getFormatter() {
         return format;
     }
@@ -490,11 +488,9 @@
      * This is a JavaBeans bound property.
      *
      * @param value Current value to display
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: The value to be formatted.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The value to be formatted.")
     public void setValue(Object value) {
         if (value != null && getFormatterFactory() == null) {
             setFormatterFactory(getDefaultFormatterFactory(value));
@@ -544,11 +540,9 @@
      *
      * @param isValid boolean indicating if the currently edited value is
      *        valid.
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: True indicates the edited value is valid
      */
+    @BeanProperty(visualUpdate = true, description
+            = "True indicates the edited value is valid")
     private void setEditValid(boolean isValid) {
         if (isValid != editValid) {
             editValid = isValid;
@@ -564,6 +558,7 @@
      *
      * @return true if the current value being edited is valid.
      */
+    @BeanProperty(bound = false)
     public boolean isEditValid() {
         return editValid;
     }
@@ -673,6 +668,7 @@
      *
      * @return the command list
      */
+    @BeanProperty(bound = false)
     public Action[] getActions() {
         return TextAction.augmentList(super.getActions(), defaultActions);
     }
@@ -683,6 +679,7 @@
      * @return the string "FormattedTextFieldUI"
      * @see JComponent#getUIClassID
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -695,11 +692,9 @@
      *
      * @param doc  the document to display/edit
      * @see #getDocument
-     * @beaninfo
-     *  description: the text document model
-     *        bound: true
-     *       expert: true
      */
+    @BeanProperty(expert = true, description
+            = "the text document model")
     public void setDocument(Document doc) {
         if (documentListener != null && getDocument() != null) {
             getDocument().removeDocumentListener(documentListener);
--- a/jdk/src/java.desktop/share/classes/javax/swing/JFrame.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JFrame.java	Tue Oct 27 01:45:03 2015 -0400
@@ -36,12 +36,14 @@
 import java.awt.LayoutManager;
 import java.awt.event.WindowEvent;
 
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
+
 import javax.accessibility.Accessible;
 import javax.accessibility.AccessibleContext;
 import javax.accessibility.AccessibleState;
 import javax.accessibility.AccessibleStateSet;
 
-
 /**
  * An extended version of <code>java.awt.Frame</code> that adds support for
  * the JFC/Swing component architecture.
@@ -111,16 +113,13 @@
  * @see java.awt.event.WindowListener#windowClosing
  * @see javax.swing.RootPaneContainer
  *
- * @beaninfo
- *      attribute: isContainer true
- *      attribute: containerDelegate getContentPane
- *    description: A toplevel window which can be minimized to an icon.
- *
  * @author Jeff Dinkins
  * @author Georges Saab
  * @author David Kloba
  * @since 1.2
  */
+@JavaBean(defaultProperty = "JMenuBar", description = "A toplevel window which can be minimized to an icon.")
+@SwingContainer(delegate = "getContentPane")
 @SuppressWarnings("serial") // Same-version serialization only
 public class JFrame  extends Frame implements WindowConstants,
                                               Accessible,
@@ -368,16 +367,13 @@
      *        <code>SecurityManager</code> will
      *        not allow the caller to invoke <code>System.exit</code>
      * @see        java.lang.Runtime#exit(int)
-     *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     *        enum: DO_NOTHING_ON_CLOSE WindowConstants.DO_NOTHING_ON_CLOSE
-     *              HIDE_ON_CLOSE       WindowConstants.HIDE_ON_CLOSE
-     *              DISPOSE_ON_CLOSE    WindowConstants.DISPOSE_ON_CLOSE
-     *              EXIT_ON_CLOSE       WindowConstants.EXIT_ON_CLOSE
-     * description: The frame's default close operation.
      */
+    @BeanProperty(preferred = true, enumerationValues = {
+            "WindowConstants.DO_NOTHING_ON_CLOSE",
+            "WindowConstants.HIDE_ON_CLOSE",
+            "WindowConstants.DISPOSE_ON_CLOSE",
+            "WindowConstants.EXIT_ON_CLOSE"}, description
+            = "The frame's default close operation.")
     public void setDefaultCloseOperation(int operation) {
         if (operation != DO_NOTHING_ON_CLOSE &&
             operation != HIDE_ON_CLOSE &&
@@ -440,12 +436,9 @@
      * @see #getTransferHandler
      * @see java.awt.Component#setDropTarget
      * @since 1.6
-     *
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *  description: Mechanism for transfer of data into the component
      */
+    @BeanProperty(hidden = true, description
+            = "Mechanism for transfer of data into the component")
     public void setTransferHandler(TransferHandler newHandler) {
         TransferHandler oldHandler = transferHandler;
         transferHandler = newHandler;
@@ -481,11 +474,9 @@
     * @param menubar the menubar being placed in the frame
     *
     * @see #getJMenuBar
-    *
-    * @beaninfo
-    *      hidden: true
-    * description: The menubar for accessing pulldown menus from this frame.
     */
+    @BeanProperty(bound = false, hidden = true, description
+            = "The menubar for accessing pulldown menus from this frame.")
     public void setJMenuBar(final JMenuBar menubar) {
         getRootPane().setJMenuBar(menubar);
     }
@@ -529,10 +520,9 @@
      * @see #setLayout
      * @see #isRootPaneCheckingEnabled
      * @see javax.swing.RootPaneContainer
-     * @beaninfo
-     *      hidden: true
-     * description: Whether the add and setLayout methods are forwarded
      */
+    @BeanProperty(hidden = true, description
+            = "Whether the add and setLayout methods are forwarded")
     protected void setRootPaneCheckingEnabled(boolean enabled) {
         rootPaneCheckingEnabled = enabled;
     }
@@ -616,6 +606,8 @@
      * @see #setRootPane
      * @see RootPaneContainer#getRootPane
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "the RootPane object for this frame.")
     public JRootPane getRootPane() {
         return rootPane;
     }
@@ -627,10 +619,6 @@
      * @param root the <code>rootPane</code> object for this frame
      *
      * @see #getRootPane
-     *
-     * @beaninfo
-     *   hidden: true
-     * description: the RootPane object for this frame.
      */
     protected void setRootPane(JRootPane root)
     {
@@ -684,12 +672,9 @@
      * @see #getContentPane
      * @see RootPaneContainer#setContentPane
      * @see JRootPane
-     *
-     * @beaninfo
-     *     hidden: true
-     *     description: The client area of the frame where child
-     *                  components are normally inserted.
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "The client area of the frame where child components are normally inserted.")
     public void setContentPane(Container contentPane) {
         getRootPane().setContentPane(contentPane);
     }
@@ -714,11 +699,9 @@
      *            exception) if the layered pane parameter is <code>null</code>
      * @see #getLayeredPane
      * @see RootPaneContainer#setLayeredPane
-     *
-     * @beaninfo
-     *     hidden: true
-     *     description: The pane that holds the various frame layers.
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "The pane that holds the various frame layers.")
     public void setLayeredPane(JLayeredPane layeredPane) {
         getRootPane().setLayeredPane(layeredPane);
     }
@@ -741,11 +724,9 @@
      *
      * @see #getGlassPane
      * @see RootPaneContainer#setGlassPane
-     *
-     * @beaninfo
-     *     hidden: true
-     *     description: A transparent pane used for menu rendering.
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "A transparent pane used for menu rendering.")
     public void setGlassPane(Component glassPane) {
         getRootPane().setGlassPane(glassPane);
     }
@@ -755,6 +736,7 @@
      *
      * @since 1.6
      */
+    @BeanProperty(bound = false)
     public Graphics getGraphics() {
         JComponent.getGraphicsInvoked(this);
         return super.getGraphics();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JInternalFrame.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JInternalFrame.java	Tue Oct 27 01:45:03 2015 -0400
@@ -27,8 +27,7 @@
 
 import java.awt.*;
 
-import java.beans.PropertyVetoException;
-import java.beans.PropertyChangeEvent;
+import java.beans.*;
 
 import javax.swing.event.InternalFrameEvent;
 import javax.swing.event.InternalFrameListener;
@@ -38,7 +37,7 @@
 
 import java.io.ObjectOutputStream;
 import java.io.IOException;
-import java.beans.PropertyChangeListener;
+
 import sun.awt.AppContext;
 import sun.swing.SwingUtilities2;
 
@@ -104,12 +103,9 @@
  * @author David Kloba
  * @author Rich Schiavi
  * @since 1.2
- * @beaninfo
- *      attribute: isContainer true
- *      attribute: containerDelegate getContentPane
- *      description: A frame container which is contained within
- *                   another window.
  */
+@JavaBean(defaultProperty = "JMenuBar", description = "A frame container which is contained within another window.")
+@SwingContainer(delegate = "getContentPane")
 @SuppressWarnings("serial") // Same-version serialization only
 public class JInternalFrame extends JComponent implements
         Accessible, WindowConstants,
@@ -377,12 +373,9 @@
     /**
      * Sets the UI delegate for this <code>JInternalFrame</code>.
      * @param ui  the UI delegate
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(InternalFrameUI ui) {
         boolean checkingEnabled = isRootPaneCheckingEnabled();
         try {
@@ -434,10 +427,9 @@
      *
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
-     *
-     * @beaninfo
-     *     description: UIClassID
      */
+    @BeanProperty(bound = false, description
+            = "UIClassID")
     public String getUIClassID() {
         return uiClassID;
     }
@@ -470,10 +462,9 @@
      * @see #setLayout
      * @see #isRootPaneCheckingEnabled
      * @see javax.swing.RootPaneContainer
-     * @beaninfo
-     *      hidden: true
-     * description: Whether the add and setLayout methods are forwarded
      */
+    @BeanProperty(hidden = true, description
+            = "Whether the add and setLayout methods are forwarded")
     protected void setRootPaneCheckingEnabled(boolean enabled) {
         rootPaneCheckingEnabled = enabled;
     }
@@ -595,12 +586,9 @@
      *
      * @param m  the <code>JMenuBar</code> to use in this internal frame
      * @see #getJMenuBar
-     * @beaninfo
-     *     bound: true
-     *     preferred: true
-     *     description: The menu bar for accessing pulldown menus
-     *                  from this internal frame.
      */
+    @BeanProperty(preferred = true, description
+            = "The menu bar for accessing pulldown menus from this internal frame.")
     public void setJMenuBar(JMenuBar m){
         JMenuBar oldValue = getMenuBar();
         getRootPane().setJMenuBar(m);
@@ -626,12 +614,9 @@
      * @exception java.awt.IllegalComponentStateException (a runtime
      *           exception) if the content pane parameter is <code>null</code>
      * @see RootPaneContainer#getContentPane
-     * @beaninfo
-     *     bound: true
-     *     hidden: true
-     *     description: The client area of the internal frame where child
-     *                  components are normally inserted.
      */
+    @BeanProperty(hidden = true, description
+            = "The client area of the internal frame where child components are normally inserted.")
     public void setContentPane(Container c) {
         Container oldValue = getContentPane();
         getRootPane().setContentPane(c);
@@ -658,11 +643,9 @@
      * @exception java.awt.IllegalComponentStateException (a runtime
      *           exception) if the layered pane parameter is <code>null</code>
      * @see RootPaneContainer#setLayeredPane
-     * @beaninfo
-     *     hidden: true
-     *     bound: true
-     *     description: The pane which holds the various desktop layers.
      */
+    @BeanProperty(hidden = true, description
+            = "The pane which holds the various desktop layers.")
     public void setLayeredPane(JLayeredPane layered) {
         JLayeredPane oldValue = getLayeredPane();
         getRootPane().setLayeredPane(layered);
@@ -685,11 +668,9 @@
      *
      * @param glass the glass pane for this internal frame
      * @see RootPaneContainer#getGlassPane
-     * @beaninfo
-     *     bound: true
-     *     hidden: true
-     *     description: A transparent pane used for menu rendering.
      */
+    @BeanProperty(hidden = true, description
+            = "A transparent pane used for menu rendering.")
     public void setGlassPane(Component glass) {
         Component oldValue = getGlassPane();
         getRootPane().setGlassPane(glass);
@@ -702,6 +683,8 @@
      * @return the <code>rootPane</code> property
      * @see RootPaneContainer#getRootPane
      */
+    @BeanProperty(hidden = true, description
+            = "The root pane used by this internal frame.")
     public JRootPane getRootPane() {
         return rootPane;
     }
@@ -713,10 +696,6 @@
      * This method is called by the constructor.
      *
      * @param root  the new <code>JRootPane</code> object
-     * @beaninfo
-     *     bound: true
-     *     hidden: true
-     *     description: The root pane used by this internal frame.
      */
     protected void setRootPane(JRootPane root) {
         if(rootPane != null) {
@@ -741,11 +720,9 @@
      * Sets whether this <code>JInternalFrame</code> can be closed by
      * some user action.
      * @param b a boolean value, where <code>true</code> means this internal frame can be closed
-     * @beaninfo
-     *     preferred: true
-     *           bound: true
-     *     description: Indicates whether this internal frame can be closed.
      */
+    @BeanProperty(preferred = true, description
+            = "Indicates whether this internal frame can be closed.")
     public void setClosable(boolean b) {
         Boolean oldValue = closable ? Boolean.TRUE : Boolean.FALSE;
         Boolean newValue = b ? Boolean.TRUE : Boolean.FALSE;
@@ -807,12 +784,9 @@
      * @see #setDefaultCloseOperation
      * @see #dispose
      * @see javax.swing.event.InternalFrameEvent#INTERNAL_FRAME_CLOSING
-     *
-     * @beaninfo
-     *           bound: true
-     *     constrained: true
-     *     description: Indicates whether this internal frame has been closed.
      */
+    @BeanProperty(description
+            = "Indicates whether this internal frame has been closed.")
     public void setClosed(boolean b) throws PropertyVetoException {
         if (isClosed == b) {
             return;
@@ -844,12 +818,9 @@
      * user action.
      *
      * @param b  a boolean, where <code>true</code> means this internal frame can be resized
-     * @beaninfo
-     *     preferred: true
-     *           bound: true
-     *     description: Determines whether this internal frame can be resized
-     *                  by the user.
      */
+    @BeanProperty(preferred = true, description
+            = "Determines whether this internal frame can be resized by the user.")
     public void setResizable(boolean b) {
         Boolean oldValue = resizable ? Boolean.TRUE : Boolean.FALSE;
         Boolean newValue = b ? Boolean.TRUE : Boolean.FALSE;
@@ -877,11 +848,9 @@
      * they will ignore this property.
      *
      * @param b  a boolean, where <code>true</code> means this internal frame can be iconified
-     * @beaninfo
-     *     preferred: true
-               bound: true
-     *     description: Determines whether this internal frame can be iconified.
      */
+    @BeanProperty(preferred = true, description
+            = "Determines whether this internal frame can be iconified.")
     public void setIconifiable(boolean b) {
         Boolean oldValue = iconable ? Boolean.TRUE : Boolean.FALSE;
         Boolean newValue = b ? Boolean.TRUE : Boolean.FALSE;
@@ -925,12 +894,9 @@
      *
      * @see InternalFrameEvent#INTERNAL_FRAME_ICONIFIED
      * @see InternalFrameEvent#INTERNAL_FRAME_DEICONIFIED
-     *
-     * @beaninfo
-     *           bound: true
-     *     constrained: true
-     *     description: The image displayed when this internal frame is minimized.
      */
+    @BeanProperty(description
+            = "The image displayed when this internal frame is minimized.")
     public void setIcon(boolean b) throws PropertyVetoException {
         if (isIcon == b) {
             return;
@@ -964,11 +930,9 @@
      * they will ignore this property.
      *
      * @param b <code>true</code> to specify that this internal frame should be maximizable; <code>false</code> to specify that it should not be
-     * @beaninfo
-     *         bound: true
-     *     preferred: true
-     *     description: Determines whether this internal frame can be maximized.
      */
+    @BeanProperty(preferred = true, description
+            = "Determines whether this internal frame can be maximized.")
     public void setMaximizable(boolean b) {
         Boolean oldValue = maximizable ? Boolean.TRUE : Boolean.FALSE;
         Boolean newValue = b ? Boolean.TRUE : Boolean.FALSE;
@@ -1006,11 +970,9 @@
      *           restores it
      * @exception PropertyVetoException when the attempt to set the
      *            property is vetoed by the <code>JInternalFrame</code>
-     * @beaninfo
-     *     bound: true
-     *     constrained: true
-     *     description: Indicates whether this internal frame is maximized.
      */
+    @BeanProperty(description
+            = "Indicates whether this internal frame is maximized.")
     public void setMaximum(boolean b) throws PropertyVetoException {
         if (isMaximum == b) {
             return;
@@ -1042,11 +1004,9 @@
      * @see #getTitle
      *
      * @param title  the <code>String</code> to display in the title bar
-     * @beaninfo
-     *     preferred: true
-     *     bound: true
-     *     description: The text displayed in the title bar.
      */
+    @BeanProperty(preferred = true, description
+            = "The text displayed in the title bar.")
     public void setTitle(String title) {
         String oldValue = this.title;
         this.title = title;
@@ -1076,13 +1036,9 @@
      * @see #isShowing
      * @see InternalFrameEvent#INTERNAL_FRAME_ACTIVATED
      * @see InternalFrameEvent#INTERNAL_FRAME_DEACTIVATED
-     *
-     * @beaninfo
-     *     constrained: true
-     *           bound: true
-     *     description: Indicates whether this internal frame is currently
-     *                  the active frame.
      */
+    @BeanProperty(description
+            = "Indicates whether this internal frame is currently the active frame.")
     public void setSelected(boolean selected) throws PropertyVetoException {
        // The InternalFrame may already be selected, but the focus
        // may be outside it, so restore the focus to the subcomponent
@@ -1153,10 +1109,9 @@
      *
      * @param icon the <code>Icon</code> to display in the title bar
      * @see #getFrameIcon
-     * @beaninfo
-     *           bound: true
-     *     description: The icon shown in the top-left corner of this internal frame.
      */
+    @BeanProperty(description
+            = "The icon shown in the top-left corner of this internal frame.")
   public void setFrameIcon(Icon icon) {
         Icon oldIcon = frameIcon;
         frameIcon = icon;
@@ -1214,6 +1169,7 @@
      * @return the last non-resizable <code>Cursor</code>
      * @since 1.6
      */
+    @BeanProperty(bound = false)
     public Cursor getLastCursor() {
         return lastCursor;
     }
@@ -1249,10 +1205,9 @@
      *          frame's desktop layer
      * @throws NullPointerException if {@code layer} is {@code null}
      * @see JLayeredPane
-     * @beaninfo
-     *     expert: true
-     *     description: Specifies what desktop layer is used.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "Specifies what desktop layer is used.")
     public void setLayer(Integer layer) {
         if(getParent() != null && getParent() instanceof JLayeredPane) {
             // Normally we want to do this, as it causes the LayeredPane
@@ -1280,10 +1235,9 @@
      *
      * @see #setLayer(Integer)
      * @see JLayeredPane
-     * @beaninfo
-     *     expert: true
-     *     description: Specifies what desktop layer is used.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "Specifies what desktop layer is used.")
     public void setLayer(int layer) {
       this.setLayer(Integer.valueOf(layer));
     }
@@ -1307,6 +1261,7 @@
       * @return the <code>JDesktopPane</code> this internal frame belongs to,
       *         or <code>null</code> if none is found
       */
+    @BeanProperty(bound = false)
     public JDesktopPane getDesktopPane() {
         Container p;
 
@@ -1331,10 +1286,9 @@
      *
      * @param d the <code>JDesktopIcon</code> to display on the desktop
      * @see #getDesktopIcon
-     * @beaninfo
-     *           bound: true
-     *     description: The icon shown when this internal frame is minimized.
      */
+    @BeanProperty(description
+            = "The icon shown when this internal frame is minimized.")
     public void setDesktopIcon(JDesktopIcon d) {
         JDesktopIcon oldValue = getDesktopIcon();
         desktopIcon = d;
@@ -1424,6 +1378,7 @@
      * @see #isSelected
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public Component getMostRecentFocusOwner() {
         if (isSelected()) {
             return getFocusOwner();
@@ -1538,6 +1493,7 @@
      *
      * @see #addInternalFrameListener
      */
+    @BeanProperty(bound = false)
     public InternalFrameListener[] getInternalFrameListeners() {
         return listenerList.getListeners(InternalFrameListener.class);
     }
@@ -1871,6 +1827,7 @@
      * @see java.awt.Container#isFocusCycleRoot()
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public final Container getFocusCycleRootAncestor() {
         return null;
     }
@@ -1883,6 +1840,7 @@
      * @return    <code>null</code>
      * @see       java.awt.Window#getWarningString
      */
+    @BeanProperty(bound = false)
     public final String getWarningString() {
         return null;
     }
@@ -2018,6 +1976,7 @@
      *         <code>JInternalFrame</code>
      * @see AccessibleJInternalFrame
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJInternalFrame();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JLabel.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JLabel.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,28 +22,23 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import java.awt.Component;
-import java.awt.Font;
 import java.awt.Image;
 import java.awt.*;
 import java.text.*;
 import java.awt.geom.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.Transient;
 
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
 import javax.swing.plaf.LabelUI;
 import javax.accessibility.*;
 import javax.swing.text.*;
-import javax.swing.text.html.*;
-import javax.swing.plaf.basic.*;
-import java.util.*;
-
 
 /**
  * A display area for a short text string or an image,
@@ -98,13 +93,11 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: A component that displays a short string and an icon.
- *
  * @author Hans Muller
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A component that displays a short string and an icon.")
+@SwingContainer(false)
 @SuppressWarnings("serial")
 public class JLabel extends JComponent implements SwingConstants, Accessible
 {
@@ -256,12 +249,9 @@
      *
      * @param ui  the LabelUI L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(LabelUI ui) {
         super.setUI(ui);
         // disabled icon is generated by LF so it should be unset here
@@ -277,7 +267,7 @@
      * @see JComponent#updateUI
      */
     public void updateUI() {
-        setUI((LabelUI)UIManager.getUI(this));
+        setUI((LabelUI) UIManager.getUI(this));
     }
 
 
@@ -290,6 +280,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -318,12 +309,9 @@
      * @see #setVerticalTextPosition
      * @see #setHorizontalTextPosition
      * @see #setIcon
-     * @beaninfo
-     *    preferred: true
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Defines the single line of text this component will display.
      */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "Defines the single line of text this component will display.")
     public void setText(String text) {
 
         String oldAccessibleName = null;
@@ -375,12 +363,9 @@
      * @see #setVerticalTextPosition
      * @see #setHorizontalTextPosition
      * @see #getIcon
-     * @beaninfo
-     *    preferred: true
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The icon this component will display.
      */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "The icon this component will display.")
     public void setIcon(Icon icon) {
         Icon oldValue = defaultIcon;
         defaultIcon = icon;
@@ -452,11 +437,9 @@
      * @param disabledIcon the Icon to display when the component is disabled
      * @see #getDisabledIcon
      * @see #setEnabled
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The icon to display if the label is disabled.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The icon to display if the label is disabled.")
     public void setDisabledIcon(Icon disabledIcon) {
         Icon oldValue = this.disabledIcon;
         this.disabledIcon = disabledIcon;
@@ -485,11 +468,9 @@
      * @param key  a keycode that indicates a mnemonic key
      * @see #getLabelFor
      * @see #setLabelFor
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The mnemonic keycode.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The mnemonic keycode.")
     public void setDisplayedMnemonic(int key) {
         int oldKey = mnemonic;
         mnemonic = key;
@@ -555,13 +536,9 @@
      * @param index Index into the String to underline
      * @exception IllegalArgumentException will be thrown if <code>index</code>
      *            is &gt;= length of the text, or &lt; -1
-     *
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: the index into the String to draw the keyboard character
-     *               mnemonic at
      */
+    @BeanProperty(visualUpdate = true, description
+            = "the index into the String to draw the keyboard character mnemonic at")
     public void setDisplayedMnemonicIndex(int index)
                                              throws IllegalArgumentException {
         int oldValue = mnemonicIndex;
@@ -665,12 +642,9 @@
      *
      * @param iconTextGap  the space between the icon and text properties
      * @see #getIconTextGap
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: If both the icon and text properties are set, this
-     *               property defines the space between them.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "If both the icon and text properties are set, this property defines the space between them.")
     public void setIconTextGap(int iconTextGap) {
         int oldValue = this.iconTextGap;
         this.iconTextGap = iconTextGap;
@@ -713,14 +687,12 @@
      *
      * @see SwingConstants
      * @see #getVerticalAlignment
-     * @beaninfo
-     *        bound: true
-     *         enum: TOP    SwingConstants.TOP
-     *               CENTER SwingConstants.CENTER
-     *               BOTTOM SwingConstants.BOTTOM
-     *    attribute: visualUpdate true
-     *  description: The alignment of the label's contents along the Y axis.
      */
+    @BeanProperty(visualUpdate = true, enumerationValues = {
+            "SwingConstants.TOP",
+            "SwingConstants.CENTER",
+            "SwingConstants.BOTTOM"},
+            description = "The alignment of the label's contents along the Y axis.")
     public void setVerticalAlignment(int alignment) {
         if (alignment == verticalAlignment) return;
         int oldValue = verticalAlignment;
@@ -763,16 +735,14 @@
      *
      * @see SwingConstants
      * @see #getHorizontalAlignment
-     * @beaninfo
-     *        bound: true
-     *         enum: LEFT     SwingConstants.LEFT
-     *               CENTER   SwingConstants.CENTER
-     *               RIGHT    SwingConstants.RIGHT
-     *               LEADING  SwingConstants.LEADING
-     *               TRAILING SwingConstants.TRAILING
-     *    attribute: visualUpdate true
-     *  description: The alignment of the label's content along the X axis.
      */
+    @BeanProperty(visualUpdate = true, enumerationValues = {
+            "SwingConstants.LEFT",
+            "SwingConstants.CENTER",
+            "SwingConstants.RIGHT",
+            "SwingConstants.LEADING",
+            "SwingConstants.TRAILING"}, description
+            = "The alignment of the label's content along the X axis.")
     public void setHorizontalAlignment(int alignment) {
         if (alignment == horizontalAlignment) return;
         int oldValue = horizontalAlignment;
@@ -818,15 +788,12 @@
      *
      * @see SwingConstants
      * @see #getVerticalTextPosition
-     * @beaninfo
-     *        bound: true
-     *         enum: TOP    SwingConstants.TOP
-     *               CENTER SwingConstants.CENTER
-     *               BOTTOM SwingConstants.BOTTOM
-     *       expert: true
-     *    attribute: visualUpdate true
-     *  description: The vertical position of the text relative to it's image.
      */
+    @BeanProperty(expert = true, visualUpdate = true, enumerationValues = {
+            "SwingConstants.TOP",
+            "SwingConstants.CENTER",
+            "SwingConstants.BOTTOM"},
+            description = "The vertical position of the text relative to it's image.")
     public void setVerticalTextPosition(int textPosition) {
         if (textPosition == verticalTextPosition) return;
         int old = verticalTextPosition;
@@ -870,18 +837,14 @@
      *           <code>TRAILING</code> (the default).
      *
      * @see SwingConstants
-     * @beaninfo
-     *       expert: true
-     *        bound: true
-     *         enum: LEFT     SwingConstants.LEFT
-     *               CENTER   SwingConstants.CENTER
-     *               RIGHT    SwingConstants.RIGHT
-     *               LEADING  SwingConstants.LEADING
-     *               TRAILING SwingConstants.TRAILING
-     *    attribute: visualUpdate true
-     *  description: The horizontal position of the label's text,
-     *               relative to its image.
      */
+    @BeanProperty(expert = true, visualUpdate = true, enumerationValues = {
+            "SwingConstants.LEFT",
+            "SwingConstants.CENTER",
+            "SwingConstants.RIGHT",
+            "SwingConstants.LEADING",
+            "SwingConstants.TRAILING"}, description
+            = "The horizontal position of the label's text, relative to its image.")
     public void setHorizontalTextPosition(int textPosition) {
         int old = horizontalTextPosition;
         this.horizontalTextPosition = checkHorizontalKey(textPosition,
@@ -1035,11 +998,9 @@
      *
      * @see #getDisplayedMnemonic
      * @see #setDisplayedMnemonic
-     *
-     * @beaninfo
-     *        bound: true
-     *  description: The component this is labelling.
      */
+    @BeanProperty(description
+            = "The component this is labelling.")
     public void setLabelFor(Component c) {
         Component oldC = labelFor;
         labelFor = c;
@@ -1057,10 +1018,9 @@
      * Get the AccessibleContext of this object
      *
      * @return the AccessibleContext of this object
-     * @beaninfo
-     *       expert: true
-     *  description: The AccessibleContext associated with this Label.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The AccessibleContext associated with this Label.")
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJLabel();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JLayeredPane.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JLayeredPane.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,9 @@
 import java.awt.Color;
 import java.awt.Graphics;
 import java.awt.Rectangle;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
+
 import sun.awt.SunToolkit;
 
 import javax.accessibility.*;
@@ -155,6 +158,7 @@
  * @author David Kloba
  * @since 1.2
  */
+@JavaBean(defaultProperty = "accessibleContext")
 @SuppressWarnings("serial")
 public class JLayeredPane extends JComponent implements Accessible {
     /// Watch the values in getObjectForLayer()
@@ -275,6 +279,7 @@
      * @return false if components can overlap, else true
      * @see JComponent#isOptimizedDrawingEnabled
      */
+    @BeanProperty(bound = false)
     public boolean isOptimizedDrawingEnabled() {
         return optimizedDrawingPossible;
     }
@@ -738,6 +743,7 @@
      * @return an AccessibleJLayeredPane that serves as the
      *         AccessibleContext of this JLayeredPane
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJLayeredPane();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JList.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JList.java	Tue Oct 27 01:45:03 2015 -0400
@@ -22,7 +22,6 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import java.awt.*;
@@ -34,6 +33,8 @@
 import java.util.Collections;
 import java.util.List;
 
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.beans.Transient;
@@ -44,7 +45,6 @@
 import javax.swing.text.Position;
 
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 import java.io.Serializable;
 
@@ -52,7 +52,6 @@
 import sun.swing.SwingUtilities2.Section;
 import static sun.swing.SwingUtilities2.Section.*;
 
-
 /**
  * A component that displays a list of objects and allows the user to select
  * one or more items. A separate model, {@code ListModel}, maintains the
@@ -271,13 +270,11 @@
  *
  * @param <E> the type of the elements of this list
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: A component which allows for the selection of one or more objects from a list.
- *
  * @author Hans Muller
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A component which allows for the selection of one or more objects from a list.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JList<E> extends JComponent implements Scrollable, Accessible
 {
@@ -515,12 +512,9 @@
      *
      * @param ui  the <code>ListUI</code> object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(ListUI ui) {
         super.setUI(ui);
     }
@@ -555,6 +549,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -640,11 +635,9 @@
      * @see #setFixedCellWidth
      * @see #setFixedCellHeight
      * @see JComponent#addPropertyChangeListener
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: The cell prototype value, used to compute cell width and height.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The cell prototype value, used to compute cell width and height.")
     public void setPrototypeCellValue(E prototypeCellValue) {
         E oldValue = this.prototypeCellValue;
         this.prototypeCellValue = prototypeCellValue;
@@ -685,11 +678,9 @@
      * @see #setPrototypeCellValue
      * @see #setFixedCellWidth
      * @see JComponent#addPropertyChangeListener
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: Defines a fixed cell width when greater than zero.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Defines a fixed cell width when greater than zero.")
     public void setFixedCellWidth(int width) {
         int oldValue = fixedCellWidth;
         fixedCellWidth = width;
@@ -721,11 +712,9 @@
      * @see #setPrototypeCellValue
      * @see #setFixedCellWidth
      * @see JComponent#addPropertyChangeListener
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: Defines a fixed cell height when greater than zero.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Defines a fixed cell height when greater than zero.")
     public void setFixedCellHeight(int height) {
         int oldValue = fixedCellHeight;
         fixedCellHeight = height;
@@ -763,11 +752,9 @@
      * @param cellRenderer the <code>ListCellRenderer</code>
      *                          that paints list cells
      * @see #getCellRenderer
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: The component used to draw the cells.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The component used to draw the cells.")
     public void setCellRenderer(ListCellRenderer<? super E> cellRenderer) {
         ListCellRenderer<? super E> oldValue = this.cellRenderer;
         this.cellRenderer = cellRenderer;
@@ -818,11 +805,9 @@
      * @see #setBackground
      * @see #setFont
      * @see DefaultListCellRenderer
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: The foreground color of selected cells.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The foreground color of selected cells.")
     public void setSelectionForeground(Color selectionForeground) {
         Color oldValue = this.selectionForeground;
         this.selectionForeground = selectionForeground;
@@ -865,11 +850,9 @@
      * @see #setBackground
      * @see #setFont
      * @see DefaultListCellRenderer
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: The background color of selected cells.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The background color of selected cells.")
     public void setSelectionBackground(Color selectionBackground) {
         Color oldValue = this.selectionBackground;
         this.selectionBackground = selectionBackground;
@@ -920,12 +903,9 @@
      * @see #setLayoutOrientation
      * @see JComponent#getVisibleRect
      * @see JViewport
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: The preferred number of rows to display without
-     *              requiring scrolling
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The preferred number of rows to display without requiring scrolling")
     public void setVisibleRowCount(int visibleRowCount) {
         int oldValue = this.visibleRowCount;
         this.visibleRowCount = Math.max(0, visibleRowCount);
@@ -999,14 +979,12 @@
      * @throws IllegalArgumentException if {@code layoutOrientation} isn't one of the
      *         allowable values
      * @since 1.4
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: Defines the way list cells are layed out.
-     *        enum: VERTICAL JList.VERTICAL
-     *              HORIZONTAL_WRAP JList.HORIZONTAL_WRAP
-     *              VERTICAL_WRAP JList.VERTICAL_WRAP
      */
+    @BeanProperty(visualUpdate = true, enumerationValues = {
+            "JList.VERTICAL",
+            "JList.HORIZONTAL_WRAP",
+            "JList.VERTICAL_WRAP"}, description
+            = "Defines the way list cells are layed out.")
     public void setLayoutOrientation(int layoutOrientation) {
         int oldValue = this.layoutOrientation;
         switch (layoutOrientation) {
@@ -1034,6 +1012,7 @@
      * @see #getLastVisibleIndex
      * @see JComponent#getVisibleRect
      */
+    @BeanProperty(bound = false)
     public int getFirstVisibleIndex() {
         Rectangle r = getVisibleRect();
         int first;
@@ -1064,6 +1043,7 @@
      * @see #getFirstVisibleIndex
      * @see JComponent#getVisibleRect
      */
+    @BeanProperty(bound = false)
     public int getLastVisibleIndex() {
         boolean leftToRight = this.getComponentOrientation().isLeftToRight();
         Rectangle r = getVisibleRect();
@@ -1180,11 +1160,9 @@
      * @see #setTransferHandler
      * @see TransferHandler
      * @since 1.4
-     *
-     * @beaninfo
-     *  description: determines whether automatic drag handling is enabled
-     *        bound: false
      */
+    @BeanProperty(bound = false, description
+            = "determines whether automatic drag handling is enabled")
     public void setDragEnabled(boolean b) {
         if (b && GraphicsEnvironment.isHeadless()) {
             throw new HeadlessException();
@@ -1449,6 +1427,7 @@
      * @see TransferHandler#canImport(TransferHandler.TransferSupport)
      * @since 1.6
      */
+    @BeanProperty(bound = false)
     public final DropLocation getDropLocation() {
         return dropLocation;
     }
@@ -1664,11 +1643,9 @@
      *                                          <code>null</code>
      * @see #getModel
      * @see #clearSelection
-     * @beaninfo
-     *       bound: true
-     *   attribute: visualUpdate true
-     * description: The object that contains the data to be drawn by this JList.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The object that contains the data to be drawn by this JList.")
     public void setModel(ListModel<E> model) {
         if (model == null) {
             throw new IllegalArgumentException("model must be non null");
@@ -1860,6 +1837,7 @@
      * @see #addListSelectionListener
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public ListSelectionListener[] getListSelectionListeners() {
         return listenerList.getListeners(ListSelectionListener.class);
     }
@@ -1879,10 +1857,9 @@
      * @exception IllegalArgumentException   if <code>selectionModel</code>
      *                                          is <code>null</code>
      * @see #getSelectionModel
-     * @beaninfo
-     *       bound: true
-     * description: The selection model, recording which cells are selected.
      */
+    @BeanProperty(description
+            = "The selection model, recording which cells are selected.")
     public void setSelectionModel(ListSelectionModel selectionModel) {
         if (selectionModel == null) {
             throw new IllegalArgumentException("selectionModel must be non null");
@@ -1928,12 +1905,12 @@
      * @see #getSelectionMode
      * @throws IllegalArgumentException if the selection mode isn't
      *         one of those allowed
-     * @beaninfo
-     * description: The selection mode.
-     *        enum: SINGLE_SELECTION            ListSelectionModel.SINGLE_SELECTION
-     *              SINGLE_INTERVAL_SELECTION   ListSelectionModel.SINGLE_INTERVAL_SELECTION
-     *              MULTIPLE_INTERVAL_SELECTION ListSelectionModel.MULTIPLE_INTERVAL_SELECTION
      */
+    @BeanProperty(bound = false, enumerationValues = {
+            "ListSelectionModel.SINGLE_SELECTION",
+            "ListSelectionModel.SINGLE_INTERVAL_SELECTION",
+            "ListSelectionModel.MULTIPLE_INTERVAL_SELECTION"}, description
+            = "The selection mode.")
     public void setSelectionMode(int selectionMode) {
         getSelectionModel().setSelectionMode(selectionMode);
     }
@@ -1958,6 +1935,7 @@
      * @return the anchor selection index
      * @see ListSelectionModel#getAnchorSelectionIndex
      */
+    @BeanProperty(bound = false)
     public int getAnchorSelectionIndex() {
         return getSelectionModel().getAnchorSelectionIndex();
     }
@@ -1969,9 +1947,9 @@
      *
      * @return the lead selection index
      * @see ListSelectionModel#getLeadSelectionIndex
-     * @beaninfo
-     * description: The lead selection index.
      */
+    @BeanProperty(bound = false, description
+            = "The lead selection index.")
     public int getLeadSelectionIndex() {
         return getSelectionModel().getLeadSelectionIndex();
     }
@@ -1985,6 +1963,7 @@
      * @return the smallest selected cell index, or {@code -1}
      * @see ListSelectionModel#getMinSelectionIndex
      */
+    @BeanProperty(bound = false)
     public int getMinSelectionIndex() {
         return getSelectionModel().getMinSelectionIndex();
     }
@@ -1998,6 +1977,7 @@
      * @return the largest selected cell index
      * @see ListSelectionModel#getMaxSelectionIndex
      */
+    @BeanProperty(bound = false)
     public int getMaxSelectionIndex() {
         return getSelectionModel().getMaxSelectionIndex();
     }
@@ -2028,6 +2008,7 @@
      * @see ListSelectionModel#isSelectionEmpty
      * @see #clearSelection
      */
+    @BeanProperty(bound = false)
     public boolean isSelectionEmpty() {
         return getSelectionModel().isSelectionEmpty();
     }
@@ -2202,9 +2183,9 @@
      * @see ListSelectionModel#setSelectionInterval
      * @see #isSelectedIndex
      * @see #addListSelectionListener
-     * @beaninfo
-     * description: The index of the selected cell.
      */
+    @BeanProperty(bound = false, description
+            = "The index of the selected cell.")
     public void setSelectedIndex(int index) {
         if (index >= getModel().getSize()) {
             return;
@@ -2252,6 +2233,7 @@
      * @deprecated As of JDK 1.7, replaced by {@link #getSelectedValuesList()}
      */
     @Deprecated
+    @BeanProperty(bound = false)
     public Object[] getSelectedValues() {
         ListSelectionModel sm = getSelectionModel();
         ListModel<E> dm = getModel();
@@ -2286,6 +2268,7 @@
      *
      * @since 1.7
      */
+    @BeanProperty(bound = false)
     public List<E> getSelectedValuesList() {
         ListSelectionModel sm = getSelectionModel();
         ListModel<E> dm = getModel();
@@ -2338,6 +2321,7 @@
      * @see #getModel
      * @see #addListSelectionListener
      */
+    @BeanProperty(bound = false)
     public E getSelectedValue() {
         int i = getMinSelectionIndex();
         return (i == -1) ? null : getModel().getElementAt(i);
@@ -2427,6 +2411,7 @@
      * @see #getPreferredScrollableViewportSize
      * @see #setPrototypeCellValue
      */
+    @BeanProperty(bound = false)
     public Dimension getPreferredScrollableViewportSize()
     {
         if (getLayoutOrientation() != VERTICAL) {
@@ -2764,6 +2749,7 @@
      *         width to match its own
      * @see Scrollable#getScrollableTracksViewportWidth
      */
+    @BeanProperty(bound = false)
     public boolean getScrollableTracksViewportWidth() {
         if (getLayoutOrientation() == HORIZONTAL_WRAP &&
                                       getVisibleRowCount() <= 0) {
@@ -2790,6 +2776,7 @@
      *         height to match its own
      * @see Scrollable#getScrollableTracksViewportHeight
      */
+    @BeanProperty(bound = false)
     public boolean getScrollableTracksViewportHeight() {
         if (getLayoutOrientation() == VERTICAL_WRAP &&
                      getVisibleRowCount() <= 0) {
@@ -2861,6 +2848,7 @@
      * @return an {@code AccessibleJList} that serves as the
      *         {@code AccessibleContext} of this {@code JList}
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJList();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JMenu.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JMenu.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,41 +22,34 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
-import java.awt.AWTEvent;
 import java.awt.Component;
 import java.awt.ComponentOrientation;
 import java.awt.Container;
 import java.awt.Dimension;
-import java.awt.Frame;
-import java.awt.Graphics;
 import java.awt.GraphicsConfiguration;
 import java.awt.GraphicsDevice;
 import java.awt.GraphicsEnvironment;
 import java.awt.Insets;
 import java.awt.Point;
-import java.awt.Polygon;
 import java.awt.Rectangle;
 import java.awt.Toolkit;
 import java.awt.event.*;
-import java.beans.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
+import java.beans.PropertyChangeListener;
 
 import java.util.*;
 
 import java.io.Serializable;
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
 import javax.swing.event.*;
 import javax.swing.plaf.*;
-import javax.swing.plaf.basic.*;
 import javax.accessibility.*;
 
-import java.lang.ref.WeakReference;
-
 /**
  * An implementation of a menu -- a popup window containing
  * <code>JMenuItem</code>s that
@@ -97,10 +90,6 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer true
- * description: A popup window containing menu items displayed in a menu bar.
- *
  * @author Georges Saab
  * @author David Karlton
  * @author Arnaud Weber
@@ -110,6 +99,8 @@
  * @see JPopupMenu
  * @since 1.2
  */
+@JavaBean(description = "A popup window containing menu items displayed in a menu bar.")
+@SwingContainer
 @SuppressWarnings("serial")
 public class JMenu extends JMenuItem implements Accessible,MenuElement
 {
@@ -232,6 +223,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -247,11 +239,6 @@
      *
      * @param newModel the <code>ButtonModel</code>
      * @see #getModel
-     * @beaninfo
-     * description: The menu's model
-     *       bound: true
-     *      expert: true
-     *      hidden: true
      */
     public void setModel(ButtonModel newModel) {
         ButtonModel oldModel = getModel();
@@ -285,11 +272,9 @@
      *
      * @param b  true to select (highlight) the menu; false to de-select
      *          the menu
-     * @beaninfo
-     *      description: When the menu is selected, its popup child is shown.
-     *           expert: true
-     *           hidden: true
      */
+    @BeanProperty(expert = true, hidden = true, description
+            = "When the menu is selected, its popup child is shown.")
     public void setSelected(boolean b) {
         ButtonModel model = getModel();
         boolean oldValue = model.isSelected();
@@ -323,11 +308,9 @@
      *
      * @param b  a boolean value -- true to make the menu visible,
      *           false to hide it
-     * @beaninfo
-     *      description: The popup menu's visibility
-     *           expert: true
-     *           hidden: true
      */
+    @BeanProperty(bound = false, expert = true, hidden = true, description
+            = "The popup menu's visibility")
     public void setPopupMenuVisible(boolean b) {
         if (DEBUG) {
             System.out.println("in JMenu.setPopupMenuVisible " + b);
@@ -517,10 +500,9 @@
      * @param       d the number of milliseconds to delay
      * @exception   IllegalArgumentException if <code>d</code>
      *                       is less than 0
-     * @beaninfo
-     *      description: The delay between menu selection and making the popup menu visible
-     *           expert: true
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The delay between menu selection and making the popup menu visible")
     public void setDelay(int d) {
         if (d < 0)
             throw new IllegalArgumentException("Delay must be a positive integer");
@@ -788,6 +770,7 @@
      * @return an integer equal to the number of items on the menu
      * @see #getMenuComponentCount
      */
+    @BeanProperty(bound = false)
     public int getItemCount() {
         return getMenuComponentCount();
     }
@@ -799,6 +782,7 @@
      * @return true if the menu can be torn off, else false
      * @exception  Error  if invoked -- this method is not yet implemented
      */
+    @BeanProperty(bound = false)
     public boolean isTearOff() {
         throw new Error("boolean isTearOff() {} not yet implemented");
     }
@@ -856,6 +840,7 @@
      *
      * @return an integer containing the number of components on the menu
      */
+    @BeanProperty(bound = false)
     public int getMenuComponentCount() {
         int componentCount = 0;
         if (popupMenu != null)
@@ -886,6 +871,7 @@
      * @return an array of <code>Component</code>s or an empty array
      *          if there is no popup menu
      */
+    @BeanProperty(bound = false)
     public Component[] getMenuComponents() {
         if (popupMenu != null)
             return popupMenu.getComponents();
@@ -901,6 +887,7 @@
      *         false if the menu is activated from a menu item
      *         on another menu
      */
+    @BeanProperty(bound = false)
     public boolean isTopLevelMenu() {
         return getParent() instanceof JMenuBar;
 
@@ -985,6 +972,7 @@
      *
      * @return the {@code JPopupMenu} associated with this menu
      */
+    @BeanProperty(bound = false)
     public JPopupMenu getPopupMenu() {
         ensurePopupMenuCreated();
         return popupMenu;
@@ -1016,6 +1004,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public MenuListener[] getMenuListeners() {
         return listenerList.getListeners(MenuListener.class);
     }
@@ -1208,6 +1197,7 @@
      *
      * @return an array of <code>MenuElement</code> objects
      */
+    @BeanProperty(bound = false)
     public MenuElement[] getSubElements() {
         if(popupMenu == null)
             return new MenuElement[0];
@@ -1270,11 +1260,6 @@
      *                  without navigating the menu hierarchy
      * @exception Error  if invoked -- this method is not defined for JMenu.
      *                  Use <code>setMnemonic</code> instead
-     *
-     * @beaninfo
-     *     description: The keystroke combination which will invoke the JMenuItem's
-     *                  actionlisteners without navigating the menu hierarchy
-     *          hidden: true
      */
     public void setAccelerator(KeyStroke keyStroke) {
         throw new Error("setAccelerator() is not defined for JMenu.  Use setMnemonic() instead.");
@@ -1381,6 +1366,7 @@
      * @return an AccessibleJMenu that serves as the
      *         AccessibleContext of this JMenu
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJMenu();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JMenuBar.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JMenuBar.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,27 +22,22 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import java.awt.Component;
-import java.awt.Dimension;
 import java.awt.Graphics;
 import java.awt.Insets;
-import java.awt.Point;
-import java.awt.Rectangle;
 import java.awt.event.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.Transient;
 import java.util.Vector;
-import java.util.Enumeration;
 
 import java.io.Serializable;
 import java.io.ObjectOutputStream;
 import java.io.ObjectInputStream;
 import java.io.IOException;
 
-import javax.swing.event.*;
-import javax.swing.border.Border;
 import javax.swing.plaf.*;
 import javax.accessibility.*;
 
@@ -78,9 +73,6 @@
  * of <code>JMenuBar</code> is set to <code>false</code>. To resolve this,
  * you should call the <code>JMenuBar.setFocusTraversalKeysEnabled(true)</code>
  * method.
- * @beaninfo
- *   attribute: isContainer true
- * description: A container for holding and displaying menus.
  *
  * @author Georges Saab
  * @author David Karlton
@@ -90,6 +82,8 @@
  * @see JMenuItem
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A container for holding and displaying menus.")
+@SwingContainer
 @SuppressWarnings("serial")
 public class JMenuBar extends JComponent implements Accessible,MenuElement
 {
@@ -137,12 +131,9 @@
      *
      * @param ui the new MenuBarUI L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(MenuBarUI ui) {
         super.setUI(ui);
     }
@@ -164,6 +155,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -184,10 +176,8 @@
      *
      * @param model the <code>SingleSelectionModel</code> to use
      * @see SingleSelectionModel
-     * @beaninfo
-     *       bound: true
-     * description: The selection model, recording which child is selected.
      */
+    @BeanProperty(description = "The selection model, recording which child is selected.")
     public void setSelectionModel(SingleSelectionModel model) {
         SingleSelectionModel oldValue = selectionModel;
         this.selectionModel = model;
@@ -227,6 +217,7 @@
      *
      * @return the number of items in the menu bar
      */
+    @BeanProperty(bound = false)
     public int getMenuCount() {
         return getComponentCount();
     }
@@ -304,6 +295,7 @@
      *
      * @return true if a selection has been made, else false
      */
+    @BeanProperty(bound = false)
     public boolean isSelected() {
         return selectionModel.isSelected();
     }
@@ -323,11 +315,9 @@
      * @param b if true and border property is not <code>null</code>,
      *          the border is painted.
      * @see #isBorderPainted
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Whether the border should be painted.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Whether the border should be painted.")
     public void setBorderPainted(boolean b) {
         boolean oldValue = paintBorder;
         paintBorder = b;
@@ -359,11 +349,9 @@
      *
      * @param m an Insets object containing the margin values
      * @see Insets
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The space between the menubar's border and its contents
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The space between the menubar's border and its contents")
     public void setMargin(Insets m) {
         Insets old = margin;
         this.margin = m;
@@ -423,6 +411,7 @@
      * other menu elements.
      * @return an array of menu items in the menu bar.
      */
+    @BeanProperty(bound = false)
     public MenuElement[] getSubElements() {
         MenuElement result[];
         Vector<MenuElement> tmp = new Vector<MenuElement>();
@@ -487,6 +476,7 @@
      * @return an AccessibleJMenuBar that serves as the
      *         AccessibleContext of this JMenuBar
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJMenuBar();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JMenuItem.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JMenuItem.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,13 +24,11 @@
  */
 package javax.swing;
 
-import java.util.EventListener;
 import java.awt.*;
 import java.awt.event.*;
-import java.awt.image.*;
 
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 
 import java.io.Serializable;
 import java.io.ObjectOutputStream;
@@ -38,7 +36,6 @@
 import java.io.IOException;
 
 import javax.swing.plaf.*;
-import javax.swing.plaf.basic.*;
 import javax.swing.event.*;
 import javax.accessibility.*;
 
@@ -76,10 +73,6 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: An item which can be selected in a menu.
- *
  * @author Georges Saab
  * @author David Karlton
  * @see JPopupMenu
@@ -88,6 +81,8 @@
  * @see JRadioButtonMenuItem
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UIClassID", description = "An item which can be selected in a menu.")
+@SwingContainer(false)
 @SuppressWarnings("serial")
 public class JMenuItem extends AbstractButton implements Accessible,MenuElement  {
 
@@ -232,12 +227,9 @@
      *
      * @param ui  the <code>JMenuItemUI</code> L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the LookAndFeel.")
     public void setUI(MenuItemUI ui) {
         super.setUI(ui);
     }
@@ -260,6 +252,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -272,10 +265,9 @@
      * event will not fire and the menu item will be disarmed.
      *
      * @param b true to arm the menu item so it can be selected
-     * @beaninfo
-     *    description: Mouse release will fire an action event
-     *         hidden: true
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "Mouse release will fire an action event")
     public void setArmed(boolean b) {
         ButtonModel model = getModel();
 
@@ -300,11 +292,9 @@
      * Enables or disables the menu item.
      *
      * @param b  true to enable the item
-     * @beaninfo
-     *    description: Does the component react to user interaction
-     *          bound: true
-     *      preferred: true
      */
+    @BeanProperty(preferred = true, description
+            = "The enabled state of the component.")
     public void setEnabled(boolean b) {
         // Make sure we aren't armed!
         if (!b && !UIManager.getBoolean("MenuItem.disabledAreNavigable")) {
@@ -344,13 +334,9 @@
      *
      * @param keyStroke the <code>KeyStroke</code> which will
      *          serve as an accelerator
-     * @beaninfo
-     *     description: The keystroke combination which will invoke the
-     *                  JMenuItem's actionlisteners without navigating the
-     *                  menu hierarchy
-     *           bound: true
-     *       preferred: true
      */
+    @BeanProperty(preferred = true, description
+            = "The keystroke combination which will invoke the JMenuItem's actionlisteners without navigating the menu hierarchy")
     public void setAccelerator(KeyStroke keyStroke) {
         KeyStroke oldAccelerator = accelerator;
         this.accelerator = keyStroke;
@@ -681,6 +667,7 @@
      *
      * @return an array of <code>MenuElement</code>s
      */
+    @BeanProperty(bound = false)
     public MenuElement[] getSubElements() {
         return new MenuElement[0];
     }
@@ -722,6 +709,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public MenuDragMouseListener[] getMenuDragMouseListeners() {
         return listenerList.getListeners(MenuDragMouseListener.class);
     }
@@ -752,6 +740,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public MenuKeyListener[] getMenuKeyListeners() {
         return listenerList.getListeners(MenuKeyListener.class);
     }
@@ -808,6 +797,7 @@
      * @return an <code>AccessibleJMenuItem</code> that serves as the
      *         <code>AccessibleContext</code> of this <code>JMenuItem</code>
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJMenuItem();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JOptionPane.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JOptionPane.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,6 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import java.awt.BorderLayout;
@@ -35,6 +34,8 @@
 import java.awt.Point;
 import java.awt.HeadlessException;
 import java.awt.Window;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.awt.event.WindowListener;
@@ -301,14 +302,12 @@
  *
  * @see JInternalFrame
  *
- * @beaninfo
- *      attribute: isContainer true
- *    description: A component which implements standard dialog box controls.
- *
  * @author James Gosling
  * @author Scott Violet
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A component which implements standard dialog box controls.")
+@SwingContainer
 @SuppressWarnings("serial") // Same-version serialization only
 public class JOptionPane extends JComponent implements Accessible
 {
@@ -1828,11 +1827,9 @@
      *
      * @param ui  the <code>OptionPaneUI</code> {@literal L&F} object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *       bound: true
-     *      hidden: true
-     * description: The UI object that implements the optionpane's LookAndFeel
      */
+    @BeanProperty(hidden = true, description
+            = "The UI object that implements the optionpane's LookAndFeel")
     public void setUI(OptionPaneUI ui) {
         if (this.ui != ui) {
             super.setUI(ui);
@@ -1869,6 +1866,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -1878,12 +1876,9 @@
      * Sets the option pane's message-object.
      * @param newMessage the <code>Object</code> to display
      * @see #getMessage
-     *
-     * @beaninfo
-     *   preferred: true
-     *   bound: true
-     * description: The optionpane's message object.
      */
+    @BeanProperty(preferred = true, description
+            = "The optionpane's message object.")
     public void setMessage(Object newMessage) {
         Object           oldMessage = message;
 
@@ -1907,11 +1902,9 @@
      * @param newIcon the <code>Icon</code> to display
      *
      * @see #getIcon
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The option pane's type icon.
      */
+    @BeanProperty(preferred = true, description
+            = "The option pane's type icon.")
     public void setIcon(Icon newIcon) {
         Object              oldIcon = icon;
 
@@ -1934,11 +1927,9 @@
      * @param newValue  the chosen value
      *
      * @see #getValue
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The option pane's value object.
      */
+    @BeanProperty(preferred = true, description
+            = "The option pane's value object.")
     public void setValue(Object newValue) {
         Object               oldValue = value;
 
@@ -1975,10 +1966,9 @@
      *          <code>Components</code> to add to the pane
      *
      * @see #getOptions
-     * @beaninfo
-     *       bound: true
-     * description: The option pane's options objects.
      */
+    @BeanProperty(description
+            = "The option pane's options objects.")
     public void setOptions(Object[] newOptions) {
         Object[]           oldOptions = options;
 
@@ -2012,11 +2002,9 @@
      *                         keyboard focus
      *
      * @see #getInitialValue
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The option pane's initial value object.
      */
+    @BeanProperty(preferred = true, description
+            = "The option pane's initial value object.")
     public void setInitialValue(Object newInitialValue) {
         Object            oldIV = initialValue;
 
@@ -2048,11 +2036,9 @@
      *          legal values listed above
 
      * @see #getMessageType
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The option pane's message type.
      */
+    @BeanProperty(preferred = true, description
+            = "The option pane's message type.")
     public void setMessageType(int newType) {
         checkMessageType(newType);
         int           oldType = messageType;
@@ -2097,11 +2083,9 @@
      *
      * @see #getOptionType
      * @see #setOptions
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The option pane's option type.
       */
+    @BeanProperty(preferred = true, description
+            = "The option pane's option type.")
     public void setOptionType(int newType) {
         checkOptionType(newType);
         int            oldType = optionType;
@@ -2149,10 +2133,9 @@
      * @see #setWantsInput
      * @see #setInitialSelectionValue
      * @see #getSelectionValues
-     * @beaninfo
-     *       bound: true
-     * description: The option pane's selection values.
      */
+    @BeanProperty(description
+            = "The option pane's selection values.")
     public void setSelectionValues(Object[] newValues) {
         Object[]           oldValues = selectionValues;
 
@@ -2178,10 +2161,9 @@
      * @param newValue the initially selected value
      * @see #setSelectionValues
      * @see #getInitialSelectionValue
-     * @beaninfo
-     *       bound: true
-     * description: The option pane's initial selection value object.
      */
+    @BeanProperty(description
+            = "The option pane's initial selection value object.")
     public void setInitialSelectionValue(Object newValue) {
         Object          oldValue = initialSelectionValue;
 
@@ -2215,11 +2197,9 @@
      * @see #setInitialSelectionValue
      * @see #setWantsInput
      * @see #getInputValue
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The option pane's input value object.
      */
+    @BeanProperty(preferred = true, description
+            = "The option pane's input value object.")
     public void setInputValue(Object newValue) {
         Object              oldValue = inputValue;
 
@@ -2251,6 +2231,7 @@
      *
      * @return an integer giving the maximum number of characters on a line
      */
+    @BeanProperty(bound = false)
     public int getMaxCharactersPerLineCount() {
         return Integer.MAX_VALUE;
     }
@@ -2271,11 +2252,9 @@
      *                 is provided to allow the user to input a value.
      * @see #setSelectionValues
      * @see #setInputValue
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: Flag which allows the user to input a value.
      */
+    @BeanProperty(preferred = true, description
+            = "Flag which allows the user to input a value.")
     public void setWantsInput(boolean newValue) {
         boolean            oldValue = wantsInput;
 
@@ -2525,10 +2504,9 @@
      *
      * @return an AccessibleJOptionPane that serves as the
      *         AccessibleContext of this AccessibleJOptionPane
-     * @beaninfo
-     *       expert: true
-     *  description: The AccessibleContext associated with this option pane
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The AccessibleContext associated with this option pane")
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJOptionPane();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JPanel.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JPanel.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,13 @@
 package javax.swing;
 
 import java.awt.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 
 import javax.swing.plaf.*;
 import javax.accessibility.*;
 
-import java.io.Serializable;
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
 
@@ -56,13 +56,11 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- * description: A generic lightweight container.
- *
  * @author Arnaud Weber
  * @author Steve Wilson
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A generic lightweight container.")
 @SuppressWarnings("serial") // Same-version serialization only
 public class JPanel extends JComponent implements Accessible
 {
@@ -145,12 +143,9 @@
      * @param ui  the PanelUI L&amp;F object
      * @see UIDefaults#getUI
      * @since 1.4
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(PanelUI ui) {
         super.setUI(ui);
     }
@@ -162,10 +157,9 @@
      * @return "PanelUI"
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        expert: true
-     *   description: A string that specifies the name of the L&amp;F class.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "A string that specifies the name of the L&amp;F class.")
     public String getUIClassID() {
         return uiClassID;
     }
@@ -213,6 +207,7 @@
      * @return an AccessibleJPanel that serves as the
      *         AccessibleContext of this JPanel
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJPanel();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JPasswordField.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JPasswordField.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,12 @@
 package javax.swing;
 
 import javax.swing.text.*;
-import javax.swing.plaf.*;
 import javax.accessibility.*;
 
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
-import java.io.*;
 import java.util.Arrays;
 
 /**
@@ -68,13 +67,11 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *  attribute: isContainer false
- * description: Allows the editing of a line of text but doesn't show the characters.
- *
  * @author  Timothy Prinzing
  * @since 1.2
  */
+@JavaBean(description = "Allows the editing of a line of text but doesn't show the characters.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JPasswordField extends JTextField {
 
@@ -151,6 +148,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -191,10 +189,9 @@
      * @param c the echo character to display
      * @see #echoCharIsSet
      * @see #getEchoChar
-     * @beaninfo
-     * description: character to display in place of the real characters
-     *   attribute: visualUpdate true
      */
+    @BeanProperty(bound = false, visualUpdate = true, description
+            = "character to display in place of the real characters")
     public void setEchoChar(char c) {
         echoChar = c;
         echoCharSet = true;
@@ -292,6 +289,7 @@
      *
      * @return the text
      */
+    @BeanProperty(bound = false)
     public char[] getPassword() {
         Document doc = getDocument();
         Segment txt = new Segment();
@@ -383,6 +381,7 @@
      *         <code>AccessibleContext</code> of this
      *         <code>JPasswordField</code>
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJPasswordField();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,6 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import java.awt.*;
@@ -31,21 +30,18 @@
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
-import java.beans.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
 
-import java.util.Locale;
 import java.util.Vector;
-import java.util.Hashtable;
 import javax.accessibility.*;
 import javax.swing.plaf.PopupMenuUI;
-import javax.swing.plaf.ComponentUI;
 import javax.swing.plaf.basic.BasicComboPopup;
 import javax.swing.event.*;
 
 import sun.awt.SunToolkit;
-import sun.security.util.SecurityConstants;
-
-import java.applet.Applet;
 
 /**
  * An implementation of a popup menu -- a small window that pops up
@@ -75,15 +71,13 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: A small window that pops up and displays a series of choices.
- *
  * @author Georges Saab
  * @author David Karlton
  * @author Arnaud Weber
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A small window that pops up and displays a series of choices.")
+@SwingContainer(false)
 @SuppressWarnings("serial")
 public class JPopupMenu extends JComponent implements Accessible,MenuElement {
 
@@ -210,12 +204,9 @@
      *
      * @param ui the new <code>PopupMenuUI</code> L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(PopupMenuUI ui) {
         super.setUI(ui);
     }
@@ -237,6 +228,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -274,10 +266,9 @@
      *
      * @param model the new <code>SingleSelectionModel</code>
      * @see SingleSelectionModel
-     * @beaninfo
-     * description: The selection model for the popup menu
-     *      expert: true
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The selection model for the popup menu")
     public void setSelectionModel(SingleSelectionModel model) {
         selectionModel = model;
     }
@@ -495,12 +486,11 @@
      * no matter what the value of this property.
      *
      * @param aFlag  <code>false</code> to disable lightweight popups
-     * @beaninfo
-     * description: Determines whether lightweight popups are used when possible
-     *      expert: true
      *
      * @see #isLightWeightPopupEnabled
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "Determines whether lightweight popups are used when possible")
     public void setLightWeightPopupEnabled(boolean aFlag) {
         // NOTE: this use to set the flag on a shared JPopupMenu, which meant
         // this effected ALL JPopupMenus.
@@ -534,10 +524,9 @@
      * @param label a string specifying the label for the popup menu
      *
      * @see #setLabel
-     * @beaninfo
-     * description: The label for the popup menu.
-     *       bound: true
      */
+    @BeanProperty(description
+            = "The label for the popup menu.")
     public void setLabel(String label) {
         String oldValue = this.label;
         this.label = label;
@@ -637,6 +626,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public PopupMenuListener[] getPopupMenuListeners() {
         return listenerList.getListeners(PopupMenuListener.class);
     }
@@ -669,6 +659,7 @@
      *         array if no listeners have been added
      * @since 1.5
      */
+    @BeanProperty(bound = false)
     public MenuKeyListener[] getMenuKeyListeners() {
         return listenerList.getListeners(MenuKeyListener.class);
     }
@@ -753,10 +744,9 @@
      *
      * @param b true to make the popup visible, or false to
      *          hide it
-     * @beaninfo
-     *           bound: true
-     *     description: Makes the popup visible
      */
+    @BeanProperty(description
+            = "Makes the popup visible")
     public void setVisible(boolean b) {
         if (DEBUG) {
             System.out.println("JPopupMenu.setVisible " + b);
@@ -868,9 +858,9 @@
      *          in the screen's coordinate space
      * @param y the y coordinate of the popup's new position
      *          in the screen's coordinate space
-     * @beaninfo
-     * description: The location of the popup menu.
      */
+    @BeanProperty(description
+            = "The location of the popup menu.")
     public void setLocation(int x, int y) {
         int oldX = desiredLocationX;
         int oldY = desiredLocationY;
@@ -908,10 +898,9 @@
      *
      * @param invoker the <code>Component</code> in which the popup
      *          menu is displayed
-     * @beaninfo
-     * description: The invoking component for the popup menu
-     *      expert: true
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The invoking component for the popup menu")
     public void setInvoker(Component invoker) {
         Component oldInvoker = this.invoker;
         this.invoker = invoker;
@@ -1024,9 +1013,9 @@
      *
      * @param d   the <code>Dimension</code> specifying the new size
      * of this component.
-     * @beaninfo
-     * description: The size of the popup menu
      */
+    @BeanProperty(description
+            = "The size of the popup menu")
     public void setPopupSize(Dimension d) {
         Dimension oldSize = getPreferredSize();
 
@@ -1047,9 +1036,9 @@
      *
      * @param width the new width of the Popup in pixels
      * @param height the new height of the Popup in pixels
-     * @beaninfo
-     * description: The size of the popup menu
      */
+    @BeanProperty(description
+            = "The size of the popup menu")
     public void setPopupSize(int width, int height) {
         setPopupSize(new Dimension(width, height));
     }
@@ -1059,11 +1048,9 @@
      * in a change to the selection model.
      *
      * @param sel the <code>Component</code> to select
-     * @beaninfo
-     * description: The selected component on the popup menu
-     *      expert: true
-     *      hidden: true
      */
+    @BeanProperty(expert = true, hidden = true, description
+            = "The selected component on the popup menu")
     public void setSelected(Component sel) {
         SingleSelectionModel model = getSelectionModel();
         int index = getComponentIndex(sel);
@@ -1085,9 +1072,9 @@
      *
      * @param b if true, the border is painted.
      * @see #isBorderPainted
-     * @beaninfo
-     * description: Is the border of the popup menu painted
      */
+    @BeanProperty(bound = false, description
+            = "Is the border of the popup menu painted")
     public void setBorderPainted(boolean b) {
         paintBorder = b;
         repaint();
@@ -1113,6 +1100,7 @@
      *
      * @return an <code>Insets</code> object containing the margin values.
      */
+    @BeanProperty(bound = false)
     public Insets getMargin() {
         if(margin == null) {
             return new Insets(0,0,0,0);
@@ -1198,6 +1186,7 @@
      * @return an AccessibleJPopupMenu that serves as the
      *         AccessibleContext of this JPopupMenu
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJPopupMenu();
@@ -1512,6 +1501,7 @@
      * @return an array of <code>MenuElement</code> objects
      * @see MenuElement#getSubElements
      */
+    @BeanProperty(bound = false)
     public MenuElement[] getSubElements() {
         MenuElement result[];
         Vector<MenuElement> tmp = new Vector<MenuElement>();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JProgressBar.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JProgressBar.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,25 +22,23 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
-import java.awt.Color;
 import java.awt.Graphics;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 
 import java.text.Format;
 import java.text.NumberFormat;
 
 import java.io.Serializable;
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
 import javax.swing.event.*;
 import javax.accessibility.*;
 import javax.swing.plaf.ProgressBarUI;
 
-
 /**
  * A component that visually displays the progress of some task.  As the task
  * progresses towards completion, the progress bar displays the
@@ -122,14 +120,12 @@
  * @see javax.swing.BoundedRangeModel
  * @see javax.swing.SwingWorker
  *
- * @beaninfo
- *      attribute: isContainer false
- *    description: A component that displays an integer value.
- *
  * @author Michael C. Albers
  * @author Kathy Walrath
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A component that displays an integer value.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JProgressBar extends JComponent implements SwingConstants, Accessible
 {
@@ -394,13 +390,9 @@
      * @exception      IllegalArgumentException    if <code>newOrientation</code>
      *                                              is an illegal value
      * @see #getOrientation
-     *
-     * @beaninfo
-     *    preferred: true
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Set the progress bar's orientation.
      */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "Set the progress bar's orientation.")
     public void setOrientation(int newOrientation) {
         if (orientation != newOrientation) {
             switch (newOrientation) {
@@ -453,11 +445,9 @@
      * @param   b       <code>true</code> if the progress bar should render a string
      * @see     #isStringPainted
      * @see     #setString
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Whether the progress bar should render a string.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Whether the progress bar should render a string.")
     public void setStringPainted(boolean b) {
         //PENDING: specify that string not painted when in indeterminate mode?
         //         or just leave that to the L&F?
@@ -506,11 +496,9 @@
      * @see    #getString
      * @see    #setStringPainted
      * @see    #isStringPainted
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Specifies the progress string to paint
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Specifies the progress string to paint")
     public void setString(String s){
         String oldValue = progressString;
         progressString = s;
@@ -526,6 +514,7 @@
      *
      * @return the percent complete for this progress bar
      */
+    @BeanProperty(bound = false)
     public double getPercentComplete() {
         long span = model.getMaximum() - model.getMinimum();
         double currentValue = model.getValue();
@@ -538,8 +527,6 @@
      *
      * @return the value of the <code>borderPainted</code> property
      * @see    #setBorderPainted
-     * @beaninfo
-     *  description: Does the progress bar paint its border
      */
     public boolean isBorderPainted() {
         return paintBorder;
@@ -556,11 +543,9 @@
      *                  should paint its border;
      *                  otherwise, <code>false</code>
      * @see     #isBorderPainted
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Whether the progress bar should paint its border.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Whether the progress bar should paint its border.")
     public void setBorderPainted(boolean b) {
         boolean oldValue = paintBorder;
         paintBorder = b;
@@ -601,12 +586,9 @@
      *
      * @param ui  a <code>ProgressBarUI</code> object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(ProgressBarUI ui) {
         super.setUI(ui);
     }
@@ -628,10 +610,9 @@
      * @return the string "ProgressBarUI"
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        expert: true
-     *   description: A string that specifies the name of the look-and-feel class.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "A string that specifies the name of the look-and-feel class.")
     public String getUIClassID() {
         return uiClassID;
     }
@@ -702,6 +683,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public ChangeListener[] getChangeListeners() {
         return listenerList.getListeners(ChangeListener.class);
     }
@@ -752,11 +734,9 @@
      * and is set to {@code 0}.
      *
      * @param  newModel the <code>BoundedRangeModel</code> to use
-     *
-     * @beaninfo
-     *    expert: true
-     * description: The data model used by the JProgressBar.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The data model used by the JProgressBar.")
     public void setModel(BoundedRangeModel newModel) {
         // PENDING(???) setting the same model to multiple bars is broken; listeners
         BoundedRangeModel oldModel = getModel();
@@ -841,10 +821,9 @@
      * @see     #getValue
      * @see     #addChangeListener
      * @see     BoundedRangeModel#setValue
-     * @beaninfo
-     *    preferred: true
-     *  description: The progress bar's current value.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The progress bar's current value.")
     public void setValue(int n) {
         BoundedRangeModel brm = getModel();
         int oldValue = brm.getValue();
@@ -874,10 +853,9 @@
      * @see    #getMinimum
      * @see    #addChangeListener
      * @see    BoundedRangeModel#setMinimum
-     * @beaninfo
-     *  preferred: true
-     * description: The progress bar's minimum value.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The progress bar's minimum value.")
     public void setMinimum(int n) { getModel().setMinimum(n); }
 
     /**
@@ -895,10 +873,9 @@
      * @see    #getMaximum
      * @see    #addChangeListener
      * @see    BoundedRangeModel#setMaximum
-     * @beaninfo
-     *    preferred: true
-     *  description: The progress bar's maximum value.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The progress bar's maximum value.")
     public void setMaximum(int n) { getModel().setMaximum(n); }
 
     /**
@@ -925,12 +902,6 @@
      * @see javax.swing.plaf.basic.BasicProgressBarUI
      *
      * @since 1.4
-     *
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Set whether the progress bar is indeterminate (true)
-     *               or normal (false).
      */
     public void setIndeterminate(boolean newValue) {
         boolean oldValue = indeterminate;
@@ -945,11 +916,9 @@
      * @see    #setIndeterminate
      *
      * @since 1.4
-     *
-     * @beaninfo
-     *  description: Is the progress bar indeterminate (true)
-     *               or normal (false)?
      */
+    @BeanProperty(bound = false, description
+            = "Is the progress bar indeterminate (true) or normal (false)?")
     public boolean isIndeterminate() {
         return indeterminate;
     }
@@ -1013,10 +982,9 @@
      *
      * @return an <code>AccessibleJProgressBar</code> that serves as the
      *         <code>AccessibleContext</code> of this <code>JProgressBar</code>
-     * @beaninfo
-     *       expert: true
-     *  description: The AccessibleContext associated with this ProgressBar.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The AccessibleContext associated with this ProgressBar.")
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJProgressBar();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JRadioButton.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JRadioButton.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,18 +24,15 @@
  */
 package javax.swing;
 
-import java.awt.*;
-import java.awt.event.*;
-import java.beans.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 
 import javax.swing.plaf.*;
 import javax.accessibility.*;
 
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
-
 /**
  * An implementation of a radio button -- an item that can be selected or
  * deselected, and which displays its state to the user.
@@ -78,15 +75,13 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: A component which can display it's state as selected or deselected.
- *
  * @see ButtonGroup
  * @see JCheckBox
  * @author Jeff Dinkins
  * @since 1.2
  */
+@JavaBean(description = "A component which can display it's state as selected or deselected.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JRadioButton extends JToggleButton implements Accessible {
 
@@ -204,10 +199,9 @@
      * @return String "RadioButtonUI"
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        expert: true
-     *   description: A string that specifies the name of the L&amp;F class.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "A string that specifies the name of the L&amp;F class.")
     public String getUIClassID() {
         return uiClassID;
     }
@@ -263,10 +257,9 @@
      *
      * @return an AccessibleJRadioButton that serves as the
      *         AccessibleContext of this JRadioButton
-     * @beaninfo
-     *       expert: true
-     *  description: The AccessibleContext associated with this Button
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The AccessibleContext associated with this Button")
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJRadioButton();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JRadioButtonMenuItem.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JRadioButtonMenuItem.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,17 +24,11 @@
  */
 package javax.swing;
 
-import java.util.EventListener;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
-
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
-import javax.swing.plaf.*;
 import javax.accessibility.*;
 
 /**
@@ -75,15 +69,13 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: A component within a group of menu items which can be selected.
- *
  * @author Georges Saab
  * @author David Karlton
  * @see ButtonGroup
  * @since 1.2
  */
+@JavaBean(description = "A component within a group of menu items which can be selected.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JRadioButtonMenuItem extends JMenuItem implements Accessible {
     /**
@@ -191,6 +183,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -248,6 +241,7 @@
      * @return an AccessibleJRadioButtonMenuItem that serves as the
      *         AccessibleContext of this JRadioButtonMenuItem
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJRadioButtonMenuItem();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
 import java.util.Vector;
 import java.io.Serializable;
 import javax.swing.border.*;
+
 import sun.awt.AWTAccessor;
 import sun.security.action.GetBooleanAction;
 
@@ -421,21 +422,18 @@
      *        <code>FILE_CHOOSER_DIALOG</code>, <code>QUESTION_DIALOG</code>, or
      *        <code>WARNING_DIALOG</code>.
      * @since 1.4
-     * @beaninfo
-     *        bound: true
-     *         enum: NONE                   JRootPane.NONE
-     *               FRAME                  JRootPane.FRAME
-     *               PLAIN_DIALOG           JRootPane.PLAIN_DIALOG
-     *               INFORMATION_DIALOG     JRootPane.INFORMATION_DIALOG
-     *               ERROR_DIALOG           JRootPane.ERROR_DIALOG
-     *               COLOR_CHOOSER_DIALOG   JRootPane.COLOR_CHOOSER_DIALOG
-     *               FILE_CHOOSER_DIALOG    JRootPane.FILE_CHOOSER_DIALOG
-     *               QUESTION_DIALOG        JRootPane.QUESTION_DIALOG
-     *               WARNING_DIALOG         JRootPane.WARNING_DIALOG
-     *       expert: true
-     *    attribute: visualUpdate true
-     *  description: Identifies the type of Window decorations to provide
      */
+    @BeanProperty(expert = true, visualUpdate = true, enumerationValues = {
+            "JRootPane.NONE",
+            "JRootPane.FRAME",
+            "JRootPane.PLAIN_DIALOG",
+            "JRootPane.INFORMATION_DIALOG",
+            "JRootPane.ERROR_DIALOG",
+            "JRootPane.COLOR_CHOOSER_DIALOG",
+            "JRootPane.FILE_CHOOSER_DIALOG",
+            "JRootPane.QUESTION_DIALOG",
+            "JRootPane.WARNING_DIALOG"}, description
+            = "Identifies the type of Window decorations to provide")
     public void setWindowDecorationStyle(int windowDecorationStyle) {
         if (windowDecorationStyle < 0 ||
                   windowDecorationStyle > WARNING_DIALOG) {
@@ -463,14 +461,10 @@
      *
      * @param ui  the <code>LabelUI</code> L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *      expert: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      * @since 1.3
      */
+    @BeanProperty(expert = true, hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(RootPaneUI ui) {
         super.setUI(ui);
     }
@@ -783,10 +777,9 @@
      *
      * @see JButton#isDefaultButton
      * @param defaultButton the <code>JButton</code> which is to be the default button
-     *
-     * @beaninfo
-     *  description: The button activated by default in this root pane
      */
+    @BeanProperty(description
+            = "The button activated by default in this root pane")
     public void setDefaultButton(JButton defaultButton) {
         JButton oldDefault = this.defaultButton;
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/JScrollBar.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JScrollBar.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,6 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import java.io.Serializable;
@@ -31,18 +30,16 @@
 import java.awt.Dimension;
 import java.awt.event.AdjustmentListener;
 import java.awt.event.AdjustmentEvent;
-import java.awt.Graphics;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 
 import javax.swing.event.*;
 import javax.swing.plaf.*;
 import javax.accessibility.*;
 
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
-
-
 /**
  * An implementation of a scrollbar. The user positions the knob in the
  * scrollbar to determine the contents of the viewing area. The
@@ -72,13 +69,12 @@
  * Please see {@link java.beans.XMLEncoder}.
  *
  * @see JScrollPane
- * @beaninfo
- *      attribute: isContainer false
- *    description: A component that helps determine the visible content range of an area.
  *
  * @author David Kloba
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A component that helps determine the visible content range of an area.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JScrollBar extends JComponent implements Adjustable, Accessible
 {
@@ -207,12 +203,9 @@
      * @param ui  the <code>ScrollBarUI</code> {@literal L&F} object
      * @see UIDefaults#getUI
      * @since 1.4
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel")
     public void setUI(ScrollBarUI ui) {
         super.setUI(ui);
     }
@@ -246,6 +239,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -271,14 +265,11 @@
      * @param orientation an orientation of the {@code JScrollBar}
      * @exception IllegalArgumentException if orientation is not one of VERTICAL, HORIZONTAL
      * @see #getOrientation
-     * @beaninfo
-     *    preferred: true
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The scrollbar's orientation.
-     *         enum: VERTICAL JScrollBar.VERTICAL
-     *               HORIZONTAL JScrollBar.HORIZONTAL
      */
+    @BeanProperty(preferred = true, visualUpdate = true, enumerationValues = {
+            "JScrollBar.VERTICAL",
+            "JScrollBar.HORIZONTAL"}, description
+            = "The scrollbar's orientation.")
     public void setOrientation(int orientation)
     {
         checkOrientation(orientation);
@@ -319,11 +310,9 @@
      *
      * @param newModel a new model
      * @see #getModel
-     * @beaninfo
-     *       bound: true
-     *       expert: true
-     * description: The scrollbar's BoundedRangeModel.
      */
+    @BeanProperty(expert = true, description
+            = "The scrollbar's BoundedRangeModel.")
     public void setModel(BoundedRangeModel newModel) {
         Integer oldValue = null;
         BoundedRangeModel oldModel = model;
@@ -384,11 +373,9 @@
      * and ignore this property.
      *
      * @see #getUnitIncrement
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The scrollbar's unit increment.
      */
+    @BeanProperty(preferred = true, description
+            = "The scrollbar's unit increment.")
     public void setUnitIncrement(int unitIncrement) {
         int oldValue = this.unitIncrement;
         this.unitIncrement = unitIncrement;
@@ -434,11 +421,9 @@
      * and ignore this property.
      *
      * @see #getBlockIncrement()
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The scrollbar's block increment.
      */
+    @BeanProperty(preferred = true, description
+            = "The scrollbar's block increment.")
     public void setBlockIncrement(int blockIncrement) {
         int oldValue = this.blockIncrement;
         this.blockIncrement = blockIncrement;
@@ -482,10 +467,9 @@
      *
      * @see #getValue
      * @see BoundedRangeModel#setValue
-     * @beaninfo
-     *   preferred: true
-     * description: The scrollbar's current value.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The scrollbar's current value.")
     public void setValue(int value) {
         BoundedRangeModel m = getModel();
         int oldValue = m.getValue();
@@ -518,10 +502,9 @@
      *
      * @see #getVisibleAmount
      * @see BoundedRangeModel#setExtent
-     * @beaninfo
-     *   preferred: true
-     * description: The amount of the view that is currently visible.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The amount of the view that is currently visible.")
     public void setVisibleAmount(int extent) {
         getModel().setExtent(extent);
     }
@@ -544,10 +527,9 @@
      *
      * @see #getMinimum
      * @see BoundedRangeModel#setMinimum
-     * @beaninfo
-     *   preferred: true
-     * description: The scrollbar's minimum value.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The scrollbar's minimum value.")
     public void setMinimum(int minimum) {
         getModel().setMinimum(minimum);
     }
@@ -570,10 +552,9 @@
      *
      * @see #getMaximum
      * @see BoundedRangeModel#setMaximum
-     * @beaninfo
-     *   preferred: true
-     * description: The scrollbar's maximum value.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The scrollbar's maximum value.")
     public void setMaximum(int maximum) {
         getModel().setMaximum(maximum);
     }
@@ -601,10 +582,9 @@
      *
      * @see #getValueIsAdjusting
      * @see BoundedRangeModel#setValueIsAdjusting
-     * @beaninfo
-     *      expert: true
-     * description: True if the scrollbar thumb is being dragged.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "True if the scrollbar thumb is being dragged.")
     public void setValueIsAdjusting(boolean b) {
         BoundedRangeModel m = getModel();
         boolean oldValue = m.getValueIsAdjusting();
@@ -693,6 +673,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public AdjustmentListener[] getAdjustmentListeners() {
         return listenerList.getListeners(AdjustmentListener.class);
     }
@@ -845,6 +826,7 @@
      * @return an AccessibleJScrollBar that serves as the
      *         AccessibleContext of this JScrollBar
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJScrollBar();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JScrollPane.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JScrollPane.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,6 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import javax.swing.plaf.*;
@@ -40,6 +39,8 @@
 import java.io.ObjectOutputStream;
 import java.io.IOException;
 
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.beans.Transient;
@@ -161,14 +162,11 @@
  * @see #setCorner
  * @see #setViewportBorder
  *
- * @beaninfo
- *     attribute: isContainer true
- *     attribute: containerDelegate getViewport
- *   description: A specialized container that manages a viewport, optional scrollbars and headers
- *
  * @author Hans Muller
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A specialized container that manages a viewport, optional scrollbars and headers")
+@SwingContainer(delegate = "getViewport")
 @SuppressWarnings("serial") // Same-version serialization only
 public class JScrollPane extends JComponent implements ScrollPaneConstants, Accessible
 {
@@ -360,12 +358,9 @@
      * @return the <code>ScrollPaneUI</code> object that renders this
      *                          component
      * @see #setUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public ScrollPaneUI getUI() {
         return (ScrollPaneUI)ui;
     }
@@ -403,10 +398,8 @@
      * @return the string "ScrollPaneUI"
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
-     *
-     * @beaninfo
-     *    hidden: true
      */
+    @BeanProperty(bound = false, hidden = true)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -427,9 +420,6 @@
      *                  <code>ScrollPaneLayout</code>
      * @see java.awt.Container#getLayout
      * @see java.awt.Container#setLayout
-     *
-     * @beaninfo
-     *    hidden: true
      */
     public void setLayout(LayoutManager layout) {
         if (layout instanceof ScrollPaneLayout) {
@@ -456,11 +446,9 @@
      * @see JComponent#revalidate
      * @see JComponent#isValidateRoot
      * @see java.awt.Container#isValidateRoot
-     *
-     * @beaninfo
-     *    hidden: true
      */
     @Override
+    @BeanProperty(hidden = true)
     public boolean isValidateRoot() {
         return true;
     }
@@ -489,15 +477,12 @@
      * @exception IllegalArgumentException if <code>policy</code>
      *                          is not one of the legal values shown above
      * @see #getVerticalScrollBarPolicy
-     *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The scrollpane vertical scrollbar policy
-     *        enum: VERTICAL_SCROLLBAR_AS_NEEDED ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED
-     *              VERTICAL_SCROLLBAR_NEVER ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER
-     *              VERTICAL_SCROLLBAR_ALWAYS ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS
      */
+    @BeanProperty(preferred = true, enumerationValues = {
+            "ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED",
+            "ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER",
+            "ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS"}, description
+            = "The scrollpane vertical scrollbar policy")
     public void setVerticalScrollBarPolicy(int policy) {
         switch (policy) {
         case VERTICAL_SCROLLBAR_AS_NEEDED:
@@ -537,15 +522,12 @@
      * @exception IllegalArgumentException if <code>policy</code>
      *                          is not one of the legal values shown above
      * @see #getHorizontalScrollBarPolicy
-     *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The scrollpane scrollbar policy
-     *        enum: HORIZONTAL_SCROLLBAR_AS_NEEDED ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED
-     *              HORIZONTAL_SCROLLBAR_NEVER ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER
-     *              HORIZONTAL_SCROLLBAR_ALWAYS ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS
      */
+    @BeanProperty(preferred = true, enumerationValues = {
+            "ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED",
+            "ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER",
+            "ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS"}, description
+            = "The scrollpane scrollbar policy")
     public void setHorizontalScrollBarPolicy(int policy) {
         switch (policy) {
         case HORIZONTAL_SCROLLBAR_AS_NEEDED:
@@ -587,12 +569,9 @@
      * @param viewportBorder the border to be added
      * @see #getViewportBorder
      * @see #setViewport
-     *
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: The border around the viewport.
      */
+    @BeanProperty(preferred = true, description
+            = "The border around the viewport.")
     public void setViewportBorder(Border viewportBorder) {
         Border oldValue = this.viewportBorder;
         this.viewportBorder = viewportBorder;
@@ -605,6 +584,7 @@
      *
      * @return a <code>Rectangle</code> object specifying the viewport border
      */
+    @BeanProperty(bound = false)
     public Rectangle getViewportBorderBounds()
     {
         Rectangle borderR = new Rectangle(getSize());
@@ -840,12 +820,9 @@
      * @param horizontalScrollBar the horizontal scrollbar to be added
      * @see #createHorizontalScrollBar
      * @see #getHorizontalScrollBar
-     *
-     * @beaninfo
-     *        expert: true
-     *         bound: true
-     *   description: The horizontal scrollbar.
      */
+    @BeanProperty(expert = true, description
+            = "The horizontal scrollbar.")
     public void setHorizontalScrollBar(JScrollBar horizontalScrollBar) {
         JScrollBar old = getHorizontalScrollBar();
         this.horizontalScrollBar = horizontalScrollBar;
@@ -899,12 +876,9 @@
      * @param verticalScrollBar the new vertical scrollbar to be added
      * @see #createVerticalScrollBar
      * @see #getVerticalScrollBar
-     *
-     * @beaninfo
-     *        expert: true
-     *         bound: true
-     *   description: The vertical scrollbar.
      */
+    @BeanProperty(expert = true, description
+            = "The vertical scrollbar.")
     public void setVerticalScrollBar(JScrollBar verticalScrollBar) {
         JScrollBar old = getVerticalScrollBar();
         this.verticalScrollBar = verticalScrollBar;
@@ -959,14 +933,9 @@
      * @see #createViewport
      * @see #getViewport
      * @see #setViewportView
-     *
-     * @beaninfo
-     *       expert: true
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The viewport child for this scrollpane
-     *
      */
+    @BeanProperty(expert = true, visualUpdate = true, description
+            = "The viewport child for this scrollpane")
     public void setViewport(JViewport viewport) {
         JViewport old = getViewport();
         this.viewport = viewport;
@@ -1038,12 +1007,9 @@
      *          is set to <code>null</code>
      * @see #getRowHeader
      * @see #setRowHeaderView
-     *
-     * @beaninfo
-     *        bound: true
-     *       expert: true
-     *  description: The row header child for this scrollpane
      */
+    @BeanProperty(expert = true, description
+            = "The row header child for this scrollpane")
     public void setRowHeader(JViewport rowHeader) {
         JViewport old = getRowHeader();
         this.rowHeader = rowHeader;
@@ -1105,12 +1071,9 @@
      * @param columnHeader  a {@code JViewport} which is the new column header
      * @see #getColumnHeader
      * @see #setColumnHeaderView
-     *
-     * @beaninfo
-     *        bound: true
-     *  description: The column header child for this scrollpane
-     *    attribute: visualUpdate true
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The column header child for this scrollpane")
     public void setColumnHeader(JViewport columnHeader) {
         JViewport old = getColumnHeader();
         this.columnHeader = columnHeader;
@@ -1303,10 +1266,9 @@
      * @return true if mouse wheel scrolling is enabled, false otherwise
      * @see #setWheelScrollingEnabled
      * @since 1.4
-     * @beaninfo
-     *       bound: true
-     * description: Flag for enabling/disabling mouse wheel scrolling
      */
+    @BeanProperty(description
+            = "Flag for enabling/disabling mouse wheel scrolling")
     public boolean isWheelScrollingEnabled() {return wheelScrollState;}
 
     /**
@@ -1320,10 +1282,9 @@
      * @see java.awt.event.MouseWheelEvent
      * @see java.awt.event.MouseWheelListener
      * @since 1.4
-     * @beaninfo
-     *       bound: true
-     * description: Flag for enabling/disabling mouse wheel scrolling
      */
+    @BeanProperty(description
+            = "Flag for enabling/disabling mouse wheel scrolling")
     public void setWheelScrollingEnabled(boolean handleWheel) {
         boolean old = wheelScrollState;
         wheelScrollState = handleWheel;
@@ -1424,6 +1385,7 @@
      * @return an AccessibleJScrollPane that serves as the
      *         AccessibleContext of this JScrollPane
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJScrollPane();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JSeparator.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JSeparator.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,17 +22,16 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import javax.swing.plaf.*;
 import javax.accessibility.*;
 
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
-
 /**
  * <code>JSeparator</code> provides a general purpose component for
  * implementing divider lines - most commonly used as a divider
@@ -64,14 +63,12 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *      attribute: isContainer false
- *    description: A divider between menu items.
- *
  * @author Georges Saab
  * @author Jeff Shapiro
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A divider between menu items.")
+@SwingContainer(false)
 @SuppressWarnings("serial")
 public class JSeparator extends JComponent implements SwingConstants, Accessible
 {
@@ -122,12 +119,9 @@
      *
      * @param ui  the SeparatorUI L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(SeparatorUI ui) {
         super.setUI(ui);
     }
@@ -149,6 +143,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -196,14 +191,11 @@
      *
      * @see SwingConstants
      * @see #getOrientation
-     * @beaninfo
-     *        bound: true
-     *    preferred: true
-     *         enum: HORIZONTAL SwingConstants.HORIZONTAL
-     *               VERTICAL   SwingConstants.VERTICAL
-     *    attribute: visualUpdate true
-     *  description: The orientation of the separator.
      */
+    @BeanProperty(preferred = true, visualUpdate = true, enumerationValues = {
+            "SwingConstants.HORIZONTAL",
+            "SwingConstants.VERTICAL"}, description
+            = "The orientation of the separator.")
     public void setOrientation( int orientation ) {
         if (this.orientation == orientation) {
             return;
@@ -260,6 +252,7 @@
      * @return an AccessibleJSeparator that serves as the
      *         AccessibleContext of this JSeparator
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJSeparator();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JSlider.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JSlider.java	Tue Oct 27 01:45:03 2015 -0400
@@ -22,7 +22,6 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import javax.swing.event.*;
@@ -35,8 +34,10 @@
 
 import java.awt.*;
 import java.util.*;
-import java.beans.*;
-
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
 
 /**
  * A component that lets the user graphically select a value by sliding
@@ -72,13 +73,11 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *      attribute: isContainer false
- *    description: A component that supports selecting a integer value from a range.
- *
  * @author David Kloba
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A component that supports selecting a integer value from a range.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JSlider extends JComponent implements SwingConstants, Accessible {
     /**
@@ -310,12 +309,9 @@
      *
      * @param ui the SliderUI L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the slider's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the slider's LookAndFeel.")
     public void setUI(SliderUI ui) {
         super.setUI(ui);
     }
@@ -343,6 +339,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -413,6 +410,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public ChangeListener[] getChangeListeners() {
         return listenerList.getListeners(ChangeListener.class);
     }
@@ -468,10 +466,9 @@
      *
      * @see #getModel
      * @see    BoundedRangeModel
-     * @beaninfo
-     *       bound: true
-     * description: The sliders BoundedRangeModel.
      */
+    @BeanProperty(description
+            = "The sliders BoundedRangeModel.")
     public void setModel(BoundedRangeModel newModel)
     {
         BoundedRangeModel oldModel = getModel();
@@ -527,10 +524,9 @@
      * @see     #getValue
      * @see     #addChangeListener
      * @see     BoundedRangeModel#setValue
-     * @beaninfo
-     *   preferred: true
-     * description: The sliders current value.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The sliders current value.")
     public void setValue(int n) {
         BoundedRangeModel m = getModel();
         int oldValue = m.getValue();
@@ -577,11 +573,9 @@
      * @see #getMinimum
      * @see    #addChangeListener
      * @see BoundedRangeModel#setMinimum
-     * @beaninfo
-     *       bound: true
-     *   preferred: true
-     * description: The sliders minimum value.
      */
+    @BeanProperty(preferred = true, description
+            = "The sliders minimum value.")
     public void setMinimum(int minimum) {
         int oldMin = getModel().getMinimum();
         getModel().setMinimum(minimum);
@@ -618,11 +612,9 @@
      * @see #getMaximum
      * @see #addChangeListener
      * @see BoundedRangeModel#setMaximum
-     * @beaninfo
-     *       bound: true
-     *   preferred: true
-     * description: The sliders maximum value.
      */
+    @BeanProperty(preferred = true, description
+            = "The sliders maximum value.")
     public void setMaximum(int maximum) {
         int oldMax = getModel().getMaximum();
         getModel().setMaximum(maximum);
@@ -651,10 +643,9 @@
      * @param b the new value for the {@code valueIsAdjusting} property
      * @see   #getValueIsAdjusting
      * @see   BoundedRangeModel#setValueIsAdjusting
-     * @beaninfo
-     *      expert: true
-     * description: True if the slider knob is being dragged.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "True if the slider knob is being dragged.")
     public void setValueIsAdjusting(boolean b) {
         BoundedRangeModel m = getModel();
         boolean oldValue = m.getValueIsAdjusting();
@@ -699,10 +690,9 @@
      * @param extent the new extent
      * @see   #getExtent
      * @see   BoundedRangeModel#setExtent
-     * @beaninfo
-     *      expert: true
-     * description: Size of the range covered by the knob.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "Size of the range covered by the knob.")
     public void setExtent(int extent) {
         getModel().setExtent(extent);
     }
@@ -726,15 +716,11 @@
      * @param orientation {@code HORIZONTAL} or {@code VERTICAL}
      * @throws IllegalArgumentException if orientation is not one of {@code VERTICAL}, {@code HORIZONTAL}
      * @see #getOrientation
-     * @beaninfo
-     *    preferred: true
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Set the scrollbars orientation to either VERTICAL or HORIZONTAL.
-     *         enum: VERTICAL JSlider.VERTICAL
-     *               HORIZONTAL JSlider.HORIZONTAL
-     *
      */
+    @BeanProperty(preferred = true, visualUpdate = true, enumerationValues = {
+            "JSlider.VERTICAL",
+            "JSlider.HORIZONTAL"}, description
+            = "Set the scrollbars orientation to either VERTICAL or HORIZONTAL.")
     public void setOrientation(int orientation)
     {
         checkOrientation(orientation);
@@ -828,12 +814,9 @@
      * @see #createStandardLabels(int)
      * @see #getLabelTable
      * @see #setPaintLabels
-     * @beaninfo
-     *       hidden: true
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Specifies what labels will be drawn for any given value.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "Specifies what labels will be drawn for any given value.")
     @SuppressWarnings("rawtypes")
     public void setLabelTable( Dictionary labels ) {
         Dictionary oldTable = labelTable;
@@ -1062,12 +1045,9 @@
      * By default, the value of this property is {@code false}.
      *
      * @param b  true to reverse the slider values from their normal order
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: If true reverses the slider values from their normal order
-     *
      */
+    @BeanProperty(visualUpdate = true, description
+            = "If true reverses the slider values from their normal order")
     public void setInverted( boolean b ) {
         boolean oldValue = isInverted;
         isInverted = b;
@@ -1118,12 +1098,9 @@
      * @see #setPaintTicks
      * @see #setLabelTable
      * @see #createStandardLabels(int)
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Sets the number of values between major tick marks.
-     *
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Sets the number of values between major tick marks.")
     public void setMajorTickSpacing(int n) {
         int oldValue = majorTickSpacing;
         majorTickSpacing = n;
@@ -1166,11 +1143,9 @@
      * @param  n  new value for the {@code minorTickSpacing} property
      * @see #getMinorTickSpacing
      * @see #setPaintTicks
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Sets the number of values between minor tick marks.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Sets the number of values between minor tick marks.")
     public void setMinorTickSpacing(int n) {
         int oldValue = minorTickSpacing;
         minorTickSpacing = n;
@@ -1215,10 +1190,9 @@
      *
      * @param b  true to snap the knob to the nearest tick mark
      * @see #getSnapToTicks
-     * @beaninfo
-     *       bound: true
-     * description: If true snap the knob to the nearest tick mark.
      */
+    @BeanProperty(description
+            = "If true snap the knob to the nearest tick mark.")
     public void setSnapToTicks(boolean b) {
         boolean oldValue = snapToTicks;
         snapToTicks = b;
@@ -1236,10 +1210,9 @@
      * @param b  true to snap the knob to the nearest slider value
      * @see #getSnapToValue
      * @see #setSnapToTicks
-     * @beaninfo
-     *       bound: true
-     * description: If true snap the knob to the nearest slider value.
      */
+    @BeanProperty(description
+            = "If true snap the knob to the nearest slider value.")
     void setSnapToValue(boolean b) {
         boolean oldValue = snapToValue;
         snapToValue = b;
@@ -1263,11 +1236,9 @@
      *
      * @param  b  whether or not tick marks should be painted
      * @see #getPaintTicks
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: If true tick marks are painted on the slider.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "If true tick marks are painted on the slider.")
     public void setPaintTicks(boolean b) {
         boolean oldValue = paintTicks;
         paintTicks = b;
@@ -1294,11 +1265,9 @@
      *
      * @param  b  whether or not to paint the slider track
      * @see #getPaintTrack
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: If true, the track is painted on the slider.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "If true, the track is painted on the slider.")
     public void setPaintTrack(boolean b) {
         boolean oldValue = paintTrack;
         paintTrack = b;
@@ -1336,11 +1305,9 @@
      * @see #getPaintLabels
      * @see #getLabelTable
      * @see #createStandardLabels(int)
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: If true labels are painted on the slider.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "If true labels are painted on the slider.")
     public void setPaintLabels(boolean b) {
         boolean oldValue = paintLabels;
         paintLabels = b;
@@ -1422,6 +1389,7 @@
      * @return an AccessibleJSlider that serves as the
      *         AccessibleContext of this JSlider
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJSlider();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JSpinner.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JSpinner.java	Tue Oct 27 01:45:03 2015 -0400
@@ -108,11 +108,6 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: A single line input field that lets the user select a
- *     number or an object value from an ordered set.
- *
  * @see SpinnerModel
  * @see AbstractSpinnerModel
  * @see SpinnerListModel
@@ -124,6 +119,8 @@
  * @author Lynn Monsanto (accessibility)
  * @since 1.4
  */
+@JavaBean(defaultProperty = "UI", description = "A single line input field that lets the user select a number or an object value from an ordered set.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JSpinner extends JComponent implements Accessible
 {
@@ -199,6 +196,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -273,12 +271,9 @@
      * @see #getEditor
      * @see #setEditor
      * @throws IllegalArgumentException if model is <code>null</code>
-     *
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: Model that represents the value of this spinner.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "Model that represents the value of this spinner.")
     public void setModel(SpinnerModel model) {
         if (model == null) {
             throw new IllegalArgumentException("null model");
@@ -376,6 +371,7 @@
      * @see #getPreviousValue
      * @see SpinnerModel#getNextValue
      */
+    @BeanProperty(bound = false)
     public Object getNextValue() {
         return getModel().getNextValue();
     }
@@ -436,6 +432,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public ChangeListener[] getChangeListeners() {
         return listenerList.getListeners(ChangeListener.class);
     }
@@ -484,6 +481,7 @@
      * @see #getNextValue
      * @see SpinnerModel#getPreviousValue
      */
+    @BeanProperty(bound = false)
     public Object getPreviousValue() {
         return getModel().getPreviousValue();
     }
@@ -502,12 +500,9 @@
      * @see #createEditor
      * @see #getModel
      * @throws IllegalArgumentException if editor is <code>null</code>
-     *
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: JComponent that displays the current value of the model
      */
+    @BeanProperty(visualUpdate = true, description
+            = "JComponent that displays the current value of the model")
     public void setEditor(JComponent editor) {
         if (editor == null) {
             throw new IllegalArgumentException("null editor");
@@ -1427,6 +1422,7 @@
      * @return the <code>AccessibleContext</code> for the <code>JSpinner</code>
      * @since 1.5
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJSpinner();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JSplitPane.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JSplitPane.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,12 +23,10 @@
  * questions.
  */
 
-
-
 package javax.swing;
 
-
-
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.ConstructorProperties;
 import javax.swing.plaf.*;
 import javax.accessibility.*;
@@ -36,11 +34,8 @@
 import java.awt.*;
 
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
-
-
 /**
  * <code>JSplitPane</code> is used to divide two (and only two)
  * <code>Component</code>s. The two <code>Component</code>s
@@ -99,6 +94,7 @@
  * @author Scott Violet
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI")
 @SuppressWarnings("serial") // Same-version serialization only
 public class JSplitPane extends JComponent implements Accessible
 {
@@ -365,11 +361,6 @@
      *
      * @param ui  the <code>SplitPaneUI</code> L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
     public void setUI(SplitPaneUI ui) {
         if ((SplitPaneUI)this.ui != ui) {
@@ -384,10 +375,9 @@
      * current look and feel.
      *
      * @return the <code>SplitPaneUI</code> object that renders this component
-     * @beaninfo
-     *       expert: true
-     *  description: The L&amp;F object that renders this component.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The L&amp;F object that renders this component.")
     public SplitPaneUI getUI() {
         return (SplitPaneUI)ui;
     }
@@ -412,10 +402,9 @@
      * @return the string "SplitPaneUI"
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
-     * @beaninfo
-     *       expert: true
-     *  description: A string that specifies the name of the L&amp;F class.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "A string that specifies the name of the L&amp;F class.")
     public String getUIClassID() {
         return uiClassID;
     }
@@ -425,10 +414,9 @@
      * Sets the size of the divider.
      *
      * @param newSize an integer giving the size of the divider in pixels
-     * @beaninfo
-     *        bound: true
-     *  description: The size of the divider.
      */
+    @BeanProperty(description
+            = "The size of the divider.")
     public void setDividerSize(int newSize) {
         int           oldSize = dividerSize;
 
@@ -471,10 +459,9 @@
      * Returns the component to the left (or above) the divider.
      *
      * @return the <code>Component</code> displayed in that position
-     * @beaninfo
-     *    preferred: true
-     *  description: The component to the left (or above) the divider.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The component to the left (or above) the divider.")
     public Component getLeftComponent() {
         return leftComponent;
     }
@@ -484,9 +471,9 @@
      * Sets the component above, or to the left of the divider.
      *
      * @param comp the <code>Component</code> to display in that position
-     * @beaninfo
-     *  description: The component above, or to the left of the divider.
      */
+    @BeanProperty(bound = false, description
+            = "The component above, or to the left of the divider.")
     public void setTopComponent(Component comp) {
         setLeftComponent(comp);
     }
@@ -506,10 +493,9 @@
      * Sets the component to the right (or below) the divider.
      *
      * @param comp the <code>Component</code> to display in that position
-     * @beaninfo
-     *    preferred: true
-     *  description: The component to the right (or below) the divider.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The component to the right (or below) the divider.")
     public void setRightComponent(Component comp) {
         if (comp == null) {
             if (rightComponent != null) {
@@ -536,9 +522,9 @@
      * Sets the component below, or to the right of the divider.
      *
      * @param comp the <code>Component</code> to display in that position
-     * @beaninfo
-     *  description: The component below, or to the right of the divider.
      */
+    @BeanProperty(bound = false, description
+            = "The component below, or to the right of the divider.")
     public void setBottomComponent(Component comp) {
         setRightComponent(comp);
     }
@@ -565,13 +551,11 @@
      *
      * @param newValue <code>true</code> to specify that the split pane should provide a
      *        collapse/expand widget
-     * @beaninfo
-     *        bound: true
-     *  description: UI widget on the divider to quickly
-     *               expand/collapse the divider.
      *
      * @see #isOneTouchExpandable
      */
+    @BeanProperty(description
+            = "UI widget on the divider to quickly expand/collapse the divider.")
     public void setOneTouchExpandable(boolean newValue) {
         boolean           oldValue = oneTouchExpandable;
 
@@ -600,10 +584,9 @@
      * @param newLastLocation an integer specifying the last divider location
      *        in pixels, from the left (or upper) edge of the pane to the
      *        left (or upper) edge of the divider
-     * @beaninfo
-     *        bound: true
-     *  description: The last location the divider was at.
      */
+    @BeanProperty(description
+            = "The last location the divider was at.")
     public void setLastDividerLocation(int newLastLocation) {
         int               oldLocation = lastDividerLocation;
 
@@ -635,12 +618,11 @@
      * @param orientation an integer specifying the orientation
      * @exception IllegalArgumentException if orientation is not one of:
      *        HORIZONTAL_SPLIT or VERTICAL_SPLIT.
-     * @beaninfo
-     *        bound: true
-     *  description: The orientation, or how the splitter is divided.
-     *         enum: HORIZONTAL_SPLIT JSplitPane.HORIZONTAL_SPLIT
-     *               VERTICAL_SPLIT   JSplitPane.VERTICAL_SPLIT
      */
+    @BeanProperty(enumerationValues = {
+            "JSplitPane.HORIZONTAL_SPLIT",
+            "JSplitPane.VERTICAL_SPLIT"}, description
+            = "The orientation, or how the splitter is divided.")
     public void setOrientation(int orientation) {
         if ((orientation != VERTICAL_SPLIT) &&
             (orientation != HORIZONTAL_SPLIT)) {
@@ -679,13 +661,10 @@
      *
      * @param newContinuousLayout  <code>true</code> if the components
      *        should continuously be redrawn as the divider changes position
-     * @beaninfo
-     *        bound: true
-     *  description: Whether the child components are
-     *               continuously redisplayed and laid out during
-     *               user intervention.
      * @see #isContinuousLayout
      */
+    @BeanProperty(description
+            = "Whether the child components are continuously redisplayed and laid out during user intervention.")
     public void setContinuousLayout(boolean newContinuousLayout) {
         boolean           oldCD = continuousLayout;
 
@@ -718,11 +697,9 @@
      * @param value as described above
      * @exception IllegalArgumentException if <code>value</code> is &lt; 0 or &gt; 1
      * @since 1.3
-     * @beaninfo
-     *        bound: true
-     *  description: Specifies how to distribute extra space when the split pane
-     *               resizes.
      */
+    @BeanProperty(description
+            = "Specifies how to distribute extra space when the split pane resizes.")
     public void setResizeWeight(double value) {
         if (value < 0 || value > 1) {
             throw new IllegalArgumentException("JSplitPane weight must be between 0 and 1");
@@ -773,9 +750,9 @@
      *        (bottom/right)
      * @exception IllegalArgumentException if the specified location is &lt; 0
      *            or &gt; 1.0
-     * @beaninfo
-     *  description: The location of the divider.
      */
+    @BeanProperty(description
+            = "The location of the divider.")
     public void setDividerLocation(double proportionalLocation) {
         if (proportionalLocation < 0.0 ||
            proportionalLocation > 1.0) {
@@ -802,10 +779,9 @@
      *
      * @param location an int specifying a UI-specific value (typically a
      *        pixel count)
-     * @beaninfo
-     *        bound: true
-     *  description: The location of the divider.
      */
+    @BeanProperty(description
+            = "The location of the divider.")
     public void setDividerLocation(int location) {
         int                 oldValue = dividerLocation;
 
@@ -846,9 +822,9 @@
      * @return an integer specifying a UI-specific value for the minimum
      *          location (typically a pixel count); or -1 if the UI is
      *          <code>null</code>
-     * @beaninfo
-     *  description: The minimum location of the divider from the L&amp;F.
      */
+    @BeanProperty(bound = false, description
+            = "The minimum location of the divider from the L&amp;F.")
     public int getMinimumDividerLocation() {
         SplitPaneUI         ui = getUI();
 
@@ -867,6 +843,7 @@
      *          location (typically a pixel count); or -1 if the  UI is
      *          <code>null</code>
      */
+    @BeanProperty(bound = false)
     public int getMaximumDividerLocation() {
         SplitPaneUI         ui = getUI();
 
@@ -947,11 +924,9 @@
      * @return true
      * @see JComponent#revalidate
      * @see java.awt.Container#isValidateRoot
-     *
-     * @beaninfo
-     *    hidden: true
      */
     @Override
+    @BeanProperty(hidden = true)
     public boolean isValidateRoot() {
         return true;
     }
@@ -1132,10 +1107,9 @@
      *
      * @return an AccessibleJSplitPane that serves as the
      *         AccessibleContext of this JSplitPane
-     * @beaninfo
-     *       expert: true
-     *  description: The AccessibleContext associated with this SplitPane.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The AccessibleContext associated with this SplitPane.")
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJSplitPane();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTabbedPane.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTabbedPane.java	Tue Oct 27 01:45:03 2015 -0400
@@ -22,16 +22,18 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import java.awt.*;
 import java.awt.event.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.Transient;
 import java.util.*;
 import javax.swing.event.*;
 import javax.swing.plaf.*;
 import javax.accessibility.*;
+
 import sun.swing.SwingUtilities2;
 
 import java.io.Serializable;
@@ -95,11 +97,6 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *      attribute: isContainer true
- *    description: A component which provides a tab folder metaphor for
- *                 displaying one component from a set of components.
- *
  * @author Dave Moore
  * @author Philip Milne
  * @author Amy Fowler
@@ -107,6 +104,8 @@
  * @see SingleSelectionModel
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A component which provides a tab folder metaphor for displaying one component from a set of components.")
+@SwingContainer
 @SuppressWarnings("serial") // Same-version serialization only
 public class JTabbedPane extends JComponent
        implements Serializable, Accessible, SwingConstants {
@@ -223,12 +222,9 @@
      *
      * @param ui the new UI object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the tabbedpane's LookAndFeel
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the tabbedpane's LookAndFeel")
     public void setUI(TabbedPaneUI ui) {
         super.setUI(ui);
         // disabled icons are generated by LF so they should be unset here
@@ -258,6 +254,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -315,7 +312,8 @@
      *         array if no listeners have been added
      * @since 1.4
      */
-    public ChangeListener[] getChangeListeners() {
+   @BeanProperty(bound = false)
+   public ChangeListener[] getChangeListeners() {
         return listenerList.getListeners(ChangeListener.class);
     }
 
@@ -437,10 +435,9 @@
      *
      * @param model the model to be used
      * @see #getModel
-     * @beaninfo
-     *       bound: true
-     * description: The tabbedpane's SingleSelectionModel.
      */
+    @BeanProperty(description
+            = "The tabbedpane's SingleSelectionModel.")
     public void setModel(SingleSelectionModel model) {
         SingleSelectionModel oldModel = getModel();
 
@@ -483,18 +480,13 @@
      * @param tabPlacement the placement for the tabs relative to the content
      * @exception IllegalArgumentException if tab placement value isn't one
      *                          of the above valid values
-     *
-     * @beaninfo
-     *    preferred: true
-     *        bound: true
-     *    attribute: visualUpdate true
-     *         enum: TOP JTabbedPane.TOP
-     *               LEFT JTabbedPane.LEFT
-     *               BOTTOM JTabbedPane.BOTTOM
-     *               RIGHT JTabbedPane.RIGHT
-     *  description: The tabbedpane's tab placement.
-     *
      */
+    @BeanProperty(preferred = true, visualUpdate = true, enumerationValues = {
+            "JTabbedPane.TOP",
+            "JTabbedPane.LEFT",
+            "JTabbedPane.BOTTOM",
+            "JTabbedPane.RIGHT"}, description
+            = "The tabbedpane's tab placement.")
     public void setTabPlacement(int tabPlacement) {
         checkTabPlacement(tabPlacement);
         if (this.tabPlacement != tabPlacement) {
@@ -546,16 +538,11 @@
      *                          of the above valid values
      * @see #getTabLayoutPolicy
      * @since 1.4
-     *
-     * @beaninfo
-     *    preferred: true
-     *        bound: true
-     *    attribute: visualUpdate true
-     *         enum: WRAP_TAB_LAYOUT JTabbedPane.WRAP_TAB_LAYOUT
-     *               SCROLL_TAB_LAYOUT JTabbedPane.SCROLL_TAB_LAYOUT
-     *  description: The tabbedpane's policy for laying out the tabs
-     *
      */
+    @BeanProperty(preferred = true, visualUpdate = true, enumerationValues = {
+            "JTabbedPane.WRAP_TAB_LAYOUT",
+            "JTabbedPane.SCROLL_TAB_LAYOUT"}, description
+            = "The tabbedpane's policy for laying out the tabs")
     public void setTabLayoutPolicy(int tabLayoutPolicy) {
         checkTabLayoutPolicy(tabLayoutPolicy);
         if (this.tabLayoutPolicy != tabLayoutPolicy) {
@@ -600,10 +587,9 @@
      *
      * @see #getSelectedIndex
      * @see SingleSelectionModel#setSelectedIndex
-     * @beaninfo
-     *   preferred: true
-     * description: The tabbedpane's selected tab index.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The tabbedpane's selected tab index.")
     public void setSelectedIndex(int index) {
         if (index != -1) {
             checkIndex(index);
@@ -686,10 +672,9 @@
      * @exception IllegalArgumentException if component not found in tabbed
      *          pane
      * @see #getSelectedComponent
-     * @beaninfo
-     *   preferred: true
-     * description: The tabbedpane's selected component.
      */
+    @BeanProperty(bound = false, preferred = true, description
+            = "The tabbedpane's selected component.")
     public void setSelectedComponent(Component c) {
         int index = indexOfComponent(c);
         if (index != -1) {
@@ -1096,6 +1081,7 @@
      *
      * @return an integer specifying the number of tabbed pages
      */
+    @BeanProperty(bound = false)
     public int getTabCount() {
         return pages.size();
     }
@@ -1111,6 +1097,7 @@
      *          is <code>LEFT</code> or <code>RIGHT</code>,
      *          or 0 if there is no UI set on this <code>tabbedpane</code>
      */
+    @BeanProperty(bound = false)
     public int getTabRunCount() {
         if (ui != null) {
             return ((TabbedPaneUI)ui).getTabRunCount(this);
@@ -1329,11 +1316,9 @@
      *
      * @see #getTitleAt
      * @see #setTabComponentAt
-     * @beaninfo
-     *    preferred: true
-     *    attribute: visualUpdate true
-     *  description: The title at the specified tab index.
      */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "The title at the specified tab index.")
     public void setTitleAt(int index, String title) {
         Page page = pages.get(index);
         String oldTitle =page.title;
@@ -1373,11 +1358,9 @@
      * @see #getIconAt
      * @see #getDisabledIconAt
      * @see #setTabComponentAt
-     * @beaninfo
-     *    preferred: true
-     *    attribute: visualUpdate true
-     *  description: The icon at the specified tab index.
      */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "The icon at the specified tab index.")
     public void setIconAt(int index, Icon icon) {
         Page page = pages.get(index);
         Icon oldIcon = page.icon;
@@ -1414,11 +1397,9 @@
      *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getDisabledIconAt
-     * @beaninfo
-     *    preferred: true
-     *    attribute: visualUpdate true
-     *  description: The disabled icon at the specified tab index.
      */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "The disabled icon at the specified tab index.")
     public void setDisabledIconAt(int index, Icon disabledIcon) {
         Icon oldIcon = pages.get(index).disabledIcon;
         pages.get(index).disabledIcon = disabledIcon;
@@ -1439,11 +1420,10 @@
      *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getToolTipTextAt
-     * @beaninfo
-     *    preferred: true
-     *  description: The tooltip text at the specified tab index.
      * @since 1.3
      */
+    @BeanProperty(preferred = true, description
+            = "The tooltip text at the specified tab index.")
     public void setToolTipTextAt(int index, String toolTipText) {
         String oldToolTipText = pages.get(index).tip;
         pages.get(index).tip = toolTipText;
@@ -1475,11 +1455,9 @@
      *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getBackgroundAt
-     * @beaninfo
-     *    preferred: true
-     *    attribute: visualUpdate true
-     *  description: The background color at the specified tab index.
      */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "The background color at the specified tab index.")
     public void setBackgroundAt(int index, Color background) {
         Color oldBg = pages.get(index).background;
         pages.get(index).setBackground(background);
@@ -1508,11 +1486,9 @@
      *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getForegroundAt
-     * @beaninfo
-     *    preferred: true
-     *    attribute: visualUpdate true
-     *  description: The foreground color at the specified tab index.
      */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "The foreground color at the specified tab index.")
     public void setForegroundAt(int index, Color foreground) {
         Color oldFg = pages.get(index).foreground;
         pages.get(index).setForeground(foreground);
@@ -1555,10 +1531,9 @@
      *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getComponentAt
-     * @beaninfo
-     *    attribute: visualUpdate true
-     *  description: The component at the specified tab index.
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The component at the specified tab index.")
     @SuppressWarnings("deprecation")
     public void setComponentAt(int index, Component component) {
         Page page = pages.get(index);
@@ -1635,13 +1610,9 @@
      *            title , or &lt; -1
      * @see #setMnemonicAt(int,int)
      * @see #getDisplayedMnemonicIndexAt(int)
-     *
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: the index into the String to draw the keyboard character
-     *               mnemonic at
      */
+    @BeanProperty(visualUpdate = true, description
+            = "the index into the String to draw the keyboard character mnemonic at")
     public void setDisplayedMnemonicIndexAt(int tabIndex, int mnemonicIndex) {
         checkIndex(tabIndex);
 
@@ -1675,13 +1646,9 @@
      *            of range ({@code tabIndex < 0 || tabIndex >= tab count})
      * @see #getMnemonicAt(int)
      * @see #setDisplayedMnemonicIndexAt(int,int)
-     *
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: The keyboard mnenmonic, as a KeyEvent VK constant,
-     *               for the specified tab
      */
+    @BeanProperty(visualUpdate = true, description
+            = "The keyboard mnenmonic, as a KeyEvent VK constant, for the specified tab")
     public void setMnemonicAt(int tabIndex, int mnemonic) {
         checkIndex(tabIndex);
 
@@ -1896,6 +1863,7 @@
      * @return an AccessibleJTabbedPane that serves as the
      *         AccessibleContext of this JTabbedPane
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJTabbedPane();
@@ -2397,12 +2365,10 @@
     *            added to this <code>JTabbedPane</code>
     *
     * @see #getTabComponentAt
-    * @beaninfo
-    *    preferred: true
-    *    attribute: visualUpdate true
-    *  description: The tab component at the specified tab index.
     * @since 1.6
     */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "The tab component at the specified tab index.")
     public void setTabComponentAt(int index, Component component) {
         if (component != null && indexOfComponent(component) != -1) {
             throw new IllegalArgumentException("Component is already added to this JTabbedPane");
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTable.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTable.java	Tue Oct 27 01:45:03 2015 -0400
@@ -22,7 +22,6 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import java.util.*;
@@ -32,7 +31,10 @@
 import java.awt.event.*;
 import java.awt.print.*;
 
-import java.beans.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
 
 import java.io.ObjectOutputStream;
 import java.io.ObjectInputStream;
@@ -207,11 +209,6 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- *
- * @beaninfo
- *   attribute: isContainer false
- * description: A component which displays data in a two dimensional grid.
- *
  * @author Philip Milne
  * @author Shannon Hickey (printing support)
  * @see javax.swing.table.DefaultTableModel
@@ -221,6 +218,8 @@
 /* The first versions of the JTable, contained in Swing-0.1 through
  * Swing-0.4, were written by Alan Chung.
  */
+@JavaBean(defaultProperty = "UI", description = "A component which displays data in a two dimensional grid.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JTable extends JComponent implements TableModelListener, Scrollable,
     TableColumnModelListener, ListSelectionListener, CellEditorListener,
@@ -894,10 +893,9 @@
      *
      * @param   tableHeader                       new tableHeader
      * @see     #getTableHeader
-     * @beaninfo
-     *  bound: true
-     *  description: The JTableHeader instance which renders the column headers.
-     */
+     */
+    @BeanProperty(description
+            = "The JTableHeader instance which renders the column headers.")
     public void setTableHeader(JTableHeader tableHeader) {
         if (this.tableHeader != tableHeader) {
             JTableHeader old = this.tableHeader;
@@ -933,10 +931,9 @@
      * @exception IllegalArgumentException      if <code>rowHeight</code> is
      *                                          less than 1
      * @see     #getRowHeight
-     * @beaninfo
-     *  bound: true
-     *  description: The height of the specified row.
-     */
+     */
+    @BeanProperty(description
+            = "The height of the specified row.")
     public void setRowHeight(int rowHeight) {
         if (rowHeight <= 0) {
             throw new IllegalArgumentException("New row height less than 1");
@@ -979,11 +976,10 @@
      * @param   rowHeight                       new row height, in pixels
      * @exception IllegalArgumentException      if <code>rowHeight</code> is
      *                                          less than 1
-     * @beaninfo
-     *  bound: true
-     *  description: The height in pixels of the cells in <code>row</code>
      * @since 1.3
      */
+    @BeanProperty(description
+            = "The height in pixels of the cells in <code>row</code>")
     public void setRowHeight(int row, int rowHeight) {
         if (rowHeight <= 0) {
             throw new IllegalArgumentException("New row height less than 1");
@@ -1010,10 +1006,9 @@
      *
      * @param  rowMargin  the number of pixels between cells in a row
      * @see     #getRowMargin
-     * @beaninfo
-     *  bound: true
-     *  description: The amount of space between cells.
-     */
+     */
+    @BeanProperty(description
+            = "The amount of space between cells.")
     public void setRowMargin(int rowMargin) {
         int old = this.rowMargin;
         this.rowMargin = rowMargin;
@@ -1041,10 +1036,9 @@
      *                                  specifying the new width
      *                                  and height between cells
      * @see     #getIntercellSpacing
-     * @beaninfo
-     *  description: The spacing between the cells,
-     *               drawn in the background color of the JTable.
-     */
+     */
+    @BeanProperty(bound = false, description
+            = "The spacing between the cells, drawn in the background color of the JTable.")
     public void setIntercellSpacing(Dimension intercellSpacing) {
         // Set the rowMargin here and columnMargin in the TableColumnModel
         setRowMargin(intercellSpacing.height);
@@ -1071,10 +1065,9 @@
      * @param   gridColor                       the new color of the grid lines
      * @exception IllegalArgumentException      if <code>gridColor</code> is <code>null</code>
      * @see     #getGridColor
-     * @beaninfo
-     *  bound: true
-     *  description: The grid color.
-     */
+     */
+    @BeanProperty(description
+            = "The grid color.")
     public void setGridColor(Color gridColor) {
         if (gridColor == null) {
             throw new IllegalArgumentException("New color is null");
@@ -1108,9 +1101,9 @@
      *
      * @see     #setShowVerticalLines
      * @see     #setShowHorizontalLines
-     * @beaninfo
-     *  description: The color used to draw the grid lines.
-     */
+     */
+    @BeanProperty(description
+            = "The color used to draw the grid lines.")
     public void setShowGrid(boolean showGrid) {
         setShowHorizontalLines(showGrid);
         setShowVerticalLines(showGrid);
@@ -1127,10 +1120,9 @@
      * @see     #getShowHorizontalLines
      * @see     #setShowGrid
      * @see     #setShowVerticalLines
-     * @beaninfo
-     *  bound: true
-     *  description: Whether horizontal lines should be drawn in between the cells.
-     */
+     */
+    @BeanProperty(description
+            = "Whether horizontal lines should be drawn in between the cells.")
     public void setShowHorizontalLines(boolean showHorizontalLines) {
         boolean old = this.showHorizontalLines;
         this.showHorizontalLines = showHorizontalLines;
@@ -1148,10 +1140,9 @@
      * @see     #getShowVerticalLines
      * @see     #setShowGrid
      * @see     #setShowHorizontalLines
-     * @beaninfo
-     *  bound: true
-     *  description: Whether vertical lines should be drawn in between the cells.
-     */
+     */
+    @BeanProperty(description
+            = "Whether vertical lines should be drawn in between the cells.")
     public void setShowVerticalLines(boolean showVerticalLines) {
         boolean old = this.showVerticalLines;
         this.showVerticalLines = showVerticalLines;
@@ -1198,15 +1189,14 @@
      *
      * @see     #getAutoResizeMode
      * @see     #doLayout
-     * @beaninfo
-     *  bound: true
-     *  description: Whether the columns should adjust themselves automatically.
-     *        enum: AUTO_RESIZE_OFF                JTable.AUTO_RESIZE_OFF
-     *              AUTO_RESIZE_NEXT_COLUMN        JTable.AUTO_RESIZE_NEXT_COLUMN
-     *              AUTO_RESIZE_SUBSEQUENT_COLUMNS JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS
-     *              AUTO_RESIZE_LAST_COLUMN        JTable.AUTO_RESIZE_LAST_COLUMN
-     *              AUTO_RESIZE_ALL_COLUMNS        JTable.AUTO_RESIZE_ALL_COLUMNS
-     */
+     */
+    @BeanProperty(enumerationValues = {
+            "JTable.AUTO_RESIZE_OFF",
+            "JTable.AUTO_RESIZE_NEXT_COLUMN",
+            "JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS",
+            "JTable.AUTO_RESIZE_LAST_COLUMN",
+            "JTable.AUTO_RESIZE_ALL_COLUMNS"}, description
+            = "Whether the columns should adjust themselves automatically.")
     public void setAutoResizeMode(int mode) {
         if (isValidAutoResizeMode(mode)) {
             int old = autoResizeMode;
@@ -1248,10 +1238,9 @@
      * @param   autoCreateColumnsFromModel   true if <code>JTable</code> should automatically create columns
      * @see     #getAutoCreateColumnsFromModel
      * @see     #createDefaultColumnsFromModel
-     * @beaninfo
-     *  bound: true
-     *  description: Automatically populates the columnModel when a new TableModel is submitted.
-     */
+     */
+    @BeanProperty(description
+            = "Automatically populates the columnModel when a new TableModel is submitted.")
     public void setAutoCreateColumnsFromModel(boolean autoCreateColumnsFromModel) {
         if (this.autoCreateColumnsFromModel != autoCreateColumnsFromModel) {
             boolean old = this.autoCreateColumnsFromModel;
@@ -1442,11 +1431,9 @@
      * @see #setTransferHandler
      * @see TransferHandler
      * @since 1.4
-     *
-     * @beaninfo
-     *  description: determines whether automatic drag handling is enabled
-     *        bound: false
-     */
+     */
+    @BeanProperty(bound = false, description
+            = "determines whether automatic drag handling is enabled")
     public void setDragEnabled(boolean b) {
         checkDragEnabled(b);
         dragEnabled = b;
@@ -1834,6 +1821,7 @@
      * @see TransferHandler#canImport(TransferHandler.TransferSupport)
      * @since 1.6
      */
+    @BeanProperty(bound = false)
     public final DropLocation getDropLocation() {
         return dropLocation;
     }
@@ -1853,12 +1841,10 @@
      * @param autoCreateRowSorter whether or not a {@code RowSorter}
      *        should be automatically created
      * @see javax.swing.table.TableRowSorter
-     * @beaninfo
-     *        bound: true
-     *    preferred: true
-     *  description: Whether or not to turn on sorting by default.
      * @since 1.6
      */
+    @BeanProperty(preferred = true, description
+            = "Whether or not to turn on sorting by default.")
     public void setAutoCreateRowSorter(boolean autoCreateRowSorter) {
         boolean oldValue = this.autoCreateRowSorter;
         this.autoCreateRowSorter = autoCreateRowSorter;
@@ -1889,12 +1875,10 @@
      * is true.
      *
      * @param update whether or not to update the selection on sorting
-     * @beaninfo
-     *        bound: true
-     *       expert: true
-     *  description: Whether or not to update the selection on sorting
      * @since 1.6
      */
+    @BeanProperty(expert = true, description
+            = "Whether or not to update the selection on sorting")
     public void setUpdateSelectionOnSort(boolean update) {
         if (updateSelectionOnSort != update) {
             updateSelectionOnSort = update;
@@ -1929,11 +1913,10 @@
      * @param sorter the <code>RowSorter</code>; <code>null</code> turns
      *        sorting off
      * @see javax.swing.table.TableRowSorter
-     * @beaninfo
-     *        bound: true
-     *  description: The table's RowSorter
      * @since 1.6
      */
+    @BeanProperty(description
+            = "The table's RowSorter")
     public void setRowSorter(RowSorter<? extends TableModel> sorter) {
         RowSorter<? extends TableModel> oldRowSorter = null;
         if (sortManager != null) {
@@ -1985,12 +1968,12 @@
      *
      * @param selectionMode the mode used by the row and column selection models
      * @see JList#setSelectionMode
-     * @beaninfo
-     * description: The selection mode used by the row and column selection models.
-     *        enum: SINGLE_SELECTION            ListSelectionModel.SINGLE_SELECTION
-     *              SINGLE_INTERVAL_SELECTION   ListSelectionModel.SINGLE_INTERVAL_SELECTION
-     *              MULTIPLE_INTERVAL_SELECTION ListSelectionModel.MULTIPLE_INTERVAL_SELECTION
-     */
+     */
+    @BeanProperty(enumerationValues = {
+            "ListSelectionModel.SINGLE_SELECTION",
+            "ListSelectionModel.SINGLE_INTERVAL_SELECTION",
+            "ListSelectionModel.MULTIPLE_INTERVAL_SELECTION"}, description
+            = "The selection mode used by the row and column selection models.")
     public void setSelectionMode(int selectionMode) {
         clearSelection();
         getSelectionModel().setSelectionMode(selectionMode);
@@ -2002,11 +1985,9 @@
      *
      * @param rowSelectionAllowed   true if this model will allow row selection
      * @see #getRowSelectionAllowed
-     * @beaninfo
-     *  bound: true
-     *    attribute: visualUpdate true
-     *  description: If true, an entire row is selected for each selected cell.
-     */
+     */
+    @BeanProperty(visualUpdate = true, description
+            = "If true, an entire row is selected for each selected cell.")
     public void setRowSelectionAllowed(boolean rowSelectionAllowed) {
         boolean old = this.rowSelectionAllowed;
         this.rowSelectionAllowed = rowSelectionAllowed;
@@ -2031,11 +2012,9 @@
      *
      * @param columnSelectionAllowed   true if this model will allow column selection
      * @see #getColumnSelectionAllowed
-     * @beaninfo
-     *  bound: true
-     *    attribute: visualUpdate true
-     *  description: If true, an entire column is selected for each selected cell.
-     */
+     */
+    @BeanProperty(visualUpdate = true, description
+            = "If true, an entire column is selected for each selected cell.")
     public void setColumnSelectionAllowed(boolean columnSelectionAllowed) {
         boolean old = columnModel.getColumnSelectionAllowed();
         columnModel.setColumnSelectionAllowed(columnSelectionAllowed);
@@ -2069,12 +2048,9 @@
      *                                  selection is allowed
      * @see #getCellSelectionEnabled
      * @see #isCellSelected
-     * @beaninfo
-     *  bound: true
-     *    attribute: visualUpdate true
-     *  description: Select a rectangular region of cells rather than
-     *               rows or columns.
-     */
+     */
+    @BeanProperty(visualUpdate = true, description
+            = "Select a rectangular region of cells rather than rows or columns.")
     public void setCellSelectionEnabled(boolean cellSelectionEnabled) {
         setRowSelectionAllowed(cellSelectionEnabled);
         setColumnSelectionAllowed(cellSelectionEnabled);
@@ -2262,6 +2238,7 @@
      * Returns the index of the first selected row, -1 if no row is selected.
      * @return the index of the first selected row
      */
+    @BeanProperty(bound = false)
     public int getSelectedRow() {
         return selectionModel.getMinSelectionIndex();
     }
@@ -2271,6 +2248,7 @@
      * -1 if no column is selected.
      * @return the index of the first selected column
      */
+    @BeanProperty(bound = false)
     public int getSelectedColumn() {
         return columnModel.getSelectionModel().getMinSelectionIndex();
     }
@@ -2282,6 +2260,7 @@
      *         or an empty array if no row is selected
      * @see #getSelectedRow
      */
+    @BeanProperty(bound = false)
     public int[] getSelectedRows() {
         int iMin = selectionModel.getMinSelectionIndex();
         int iMax = selectionModel.getMaxSelectionIndex();
@@ -2309,6 +2288,7 @@
      *         or an empty array if no column is selected
      * @see #getSelectedColumn
      */
+    @BeanProperty(bound = false)
     public int[] getSelectedColumns() {
         return columnModel.getSelectedColumns();
     }
@@ -2318,6 +2298,7 @@
      *
      * @return the number of selected rows, 0 if no rows are selected
      */
+    @BeanProperty(bound = false)
     public int getSelectedRowCount() {
         int iMin = selectionModel.getMinSelectionIndex();
         int iMax = selectionModel.getMaxSelectionIndex();
@@ -2336,6 +2317,7 @@
      *
      * @return the number of selected columns, 0 if no columns are selected
      */
+    @BeanProperty(bound = false)
     public int getSelectedColumnCount() {
         return columnModel.getSelectedColumnCount();
     }
@@ -2523,10 +2505,9 @@
      * @see #setForeground
      * @see #setBackground
      * @see #setFont
-     * @beaninfo
-     *       bound: true
-     * description: A default foreground color for selected cells.
-     */
+     */
+    @BeanProperty(description
+            = "A default foreground color for selected cells.")
     public void setSelectionForeground(Color selectionForeground) {
         Color old = this.selectionForeground;
         this.selectionForeground = selectionForeground;
@@ -2561,10 +2542,9 @@
      * @see #setForeground
      * @see #setBackground
      * @see #setFont
-     * @beaninfo
-     *       bound: true
-     * description: A default background color for selected cells.
-     */
+     */
+    @BeanProperty(description
+            = "A default background color for selected cells.")
     public void setSelectionBackground(Color selectionBackground) {
         Color old = this.selectionBackground;
         this.selectionBackground = selectionBackground;
@@ -2680,6 +2660,7 @@
      * @return the number of rows shown in the <code>JTable</code>
      * @see #getColumnCount
      */
+    @BeanProperty(bound = false)
     public int getRowCount() {
         RowSorter<?> sorter = getRowSorter();
         if (sorter != null) {
@@ -2696,6 +2677,7 @@
      * @see #getRowCount
      * @see #removeColumn
      */
+    @BeanProperty(bound = false)
     public int getColumnCount() {
         return getColumnModel().getColumnCount();
     }
@@ -3564,6 +3546,7 @@
      * @see     #editingColumn
      * @see     #editingRow
      */
+    @BeanProperty(bound = false)
     public boolean isEditing() {
         return cellEditor != null;
     }
@@ -3574,6 +3557,7 @@
      *
      * @return  Component handling editing session
      */
+    @BeanProperty(bound = false)
     public Component getEditorComponent() {
         return editorComp;
     }
@@ -3620,12 +3604,9 @@
      *
      * @param ui  the TableUI L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
-     */
+     */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(TableUI ui) {
         if (this.ui != ui) {
             super.setUI(ui);
@@ -3681,6 +3662,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -3697,10 +3679,9 @@
      * @param  dataModel the new data source for this table
      * @throws IllegalArgumentException if {@code dataModel} is {@code null}
      * @see #getModel
-     * @beaninfo
-     *  bound: true
-     *  description: The model that is the source of the data for this view.
-     */
+     */
+    @BeanProperty(description
+            = "The model that is the source of the data for this view.")
     public void setModel(final TableModel dataModel) {
         if (dataModel == null) {
             throw new IllegalArgumentException("Cannot set a null TableModel");
@@ -3743,10 +3724,9 @@
      * @param  columnModel the new data source for this table
      * @throws IllegalArgumentException if {@code columnModel} is {@code null}
      * @see #getColumnModel
-     * @beaninfo
-     *  bound: true
-     *  description: The object governing the way columns appear in the view.
-     */
+     */
+    @BeanProperty(description
+            = "The object governing the way columns appear in the view.")
     public void setColumnModel(final TableColumnModel columnModel) {
         if (columnModel == null) {
             throw new IllegalArgumentException("Cannot set a null ColumnModel");
@@ -3788,10 +3768,9 @@
      * @throws IllegalArgumentException if {@code selectionModel} is
      *         {@code null}
      * @see #getSelectionModel
-     * @beaninfo
-     *      bound: true
-     *      description: The selection model for rows.
-     */
+     */
+    @BeanProperty(description
+            = "The selection model for rows.")
     public void setSelectionModel(final ListSelectionModel selectionModel) {
         if (selectionModel == null) {
             throw new IllegalArgumentException("Cannot set a null SelectionModel");
@@ -4784,9 +4763,9 @@
      * @param size  a <code>Dimension</code> object specifying the <code>preferredSize</code> of a
      *              <code>JViewport</code> whose view is this table
      * @see Scrollable#getPreferredScrollableViewportSize
-     * @beaninfo
-     * description: The preferred size of the viewport.
-     */
+     */
+    @BeanProperty(bound = false, description
+            = "The preferred size of the viewport.")
     public void setPreferredScrollableViewportSize(Dimension size) {
         preferredViewportSize = size;
     }
@@ -5222,6 +5201,7 @@
      *   to <code>AUTO_RESIZE_OFF</code>, otherwise returns true
      * @see Scrollable#getScrollableTracksViewportWidth
      */
+    @BeanProperty(bound = false)
     public boolean getScrollableTracksViewportWidth() {
         return !(autoResizeMode == AUTO_RESIZE_OFF);
     }
@@ -5239,6 +5219,7 @@
      * @see #setFillsViewportHeight
      * @see #getFillsViewportHeight
      */
+    @BeanProperty(bound = false)
     public boolean getScrollableTracksViewportHeight() {
         Container parent = SwingUtilities.getUnwrappedParent(this);
         return getFillsViewportHeight()
@@ -5260,11 +5241,9 @@
      * @see #getFillsViewportHeight
      * @see #getScrollableTracksViewportHeight
      * @since 1.6
-     * @beaninfo
-     *      bound: true
-     *      description: Whether or not this table is always made large enough
-     *                   to fill the height of an enclosing viewport
-     */
+     */
+    @BeanProperty(description
+            = "Whether or not this table is always made large enough to fill the height of an enclosing viewport")
     public void setFillsViewportHeight(boolean fillsViewportHeight) {
         boolean old = this.fillsViewportHeight;
         this.fillsViewportHeight = fillsViewportHeight;
@@ -5661,10 +5640,9 @@
      *
      * @param anEditor the active cell editor
      * @see #cellEditor
-     * @beaninfo
-     *  bound: true
-     *  description: The table's active cell editor.
-     */
+     */
+    @BeanProperty(description
+            = "The table's active cell editor.")
     public void setCellEditor(TableCellEditor anEditor) {
         TableCellEditor oldEditor = cellEditor;
         cellEditor = anEditor;
@@ -6656,6 +6634,7 @@
      * @return an AccessibleJTable that serves as the
      *         AccessibleContext of this JTable
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJTable();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTextArea.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTextArea.java	Tue Oct 27 01:45:03 2015 -0400
@@ -25,17 +25,12 @@
 package javax.swing;
 
 import java.awt.*;
-import java.awt.event.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import javax.swing.text.*;
-import javax.swing.plaf.*;
 import javax.accessibility.*;
 
-import java.util.Collections;
-import java.util.Set;
-import java.util.StringTokenizer;
-
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
 /**
@@ -116,15 +111,13 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: A multi-line area that displays plain text.
- *
  * @author  Timothy Prinzing
  * @see JTextPane
  * @see JEditorPane
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UIClassID", description = "A multi-line area that displays plain text.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JTextArea extends JTextComponent {
 
@@ -237,6 +230,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -260,11 +254,9 @@
      *
      * @param size number of characters to expand to
      * @see #getTabSize
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: the number of characters to expand tabs to
      */
+    @BeanProperty(preferred = true, description
+            = "the number of characters to expand tabs to")
     public void setTabSize(int size) {
         Document doc = getDocument();
         if (doc != null) {
@@ -302,11 +294,9 @@
      *
      * @param wrap indicates if lines should be wrapped
      * @see #getLineWrap
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: should lines be wrapped
      */
+    @BeanProperty(preferred = true, description
+            = "should lines be wrapped")
     public void setLineWrap(boolean wrap) {
         boolean old = this.wrap;
         this.wrap = wrap;
@@ -336,11 +326,9 @@
      * @param word indicates if word boundaries should be used
      *   for line wrapping
      * @see #getWrapStyleWord
-     * @beaninfo
-     *   preferred: false
-     *       bound: true
-     * description: should wrapping occur at word boundaries
      */
+    @BeanProperty(description
+            = "should wrapping occur at word boundaries")
     public void setWrapStyleWord(boolean word) {
         boolean old = this.word;
         this.word = word;
@@ -388,6 +376,7 @@
      *
      * @return the number of lines &gt; 0
      */
+    @BeanProperty(bound = false)
     public int getLineCount() {
         Element map = getDocument().getDefaultRootElement();
         return map.getElementCount();
@@ -531,9 +520,9 @@
      * @param rows the number of rows &gt;= 0
      * @exception IllegalArgumentException if rows is less than 0
      * @see #getRows
-     * @beaninfo
-     * description: the number of rows preferred for display
      */
+    @BeanProperty(bound = false, description
+            = "the number of rows preferred for display")
     public void setRows(int rows) {
         int oldVal = this.rows;
         if (rows < 0) {
@@ -575,9 +564,9 @@
      * @param columns the number of columns &gt;= 0
      * @exception IllegalArgumentException if columns is less than 0
      * @see #getColumns
-     * @beaninfo
-     * description: the number of columns preferred for display
      */
+    @BeanProperty(bound = false, description
+            = "the number of columns preferred for display")
     public void setColumns(int columns) {
         int oldVal = this.columns;
         if (columns < 0) {
@@ -680,6 +669,7 @@
      * @return true if a viewport should force the Scrollables width
      * to match its own.
      */
+    @BeanProperty(bound = false)
     public boolean getScrollableTracksViewportWidth() {
         return (wrap) ? true : super.getScrollableTracksViewportWidth();
     }
@@ -693,6 +683,7 @@
      * @return The preferredSize of a JViewport whose view is this Scrollable.
      * @see JViewport#getPreferredSize
      */
+    @BeanProperty(bound = false)
     public Dimension getPreferredScrollableViewportSize() {
         Dimension size = super.getPreferredScrollableViewportSize();
         size = (size == null) ? new Dimension(400,400) : size;
@@ -766,6 +757,7 @@
      * @return an AccessibleJTextArea that serves as the
      *         AccessibleContext of this JTextArea
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJTextArea();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTextField.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTextField.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,18 +24,17 @@
  */
 package javax.swing;
 
-import sun.swing.SwingUtilities2;
-
 import java.awt.*;
 import java.awt.event.*;
-import java.beans.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
 import javax.swing.text.*;
-import javax.swing.plaf.*;
 import javax.swing.event.*;
 import javax.accessibility.*;
 
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 import java.io.Serializable;
 
@@ -152,16 +151,14 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: A component which allows for the editing of a single line of text.
- *
  * @author  Timothy Prinzing
  * @see #setActionCommand
  * @see JPasswordField
  * @see #addActionListener
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UIClassID", description = "A component which allows for the editing of a single line of text.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JTextField extends JTextComponent implements SwingConstants {
 
@@ -253,6 +250,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -266,11 +264,9 @@
      *
      * @param doc  the document to display/edit
      * @see #getDocument
-     * @beaninfo
-     *  description: the text document model
-     *        bound: true
-     *       expert: true
      */
+    @BeanProperty(expert = true, description
+            = "the text document model")
     public void setDocument(Document doc) {
         if (doc != null) {
             doc.putProperty("filterNewlines", Boolean.TRUE);
@@ -332,14 +328,14 @@
      * @param alignment the alignment
      * @exception IllegalArgumentException if <code>alignment</code>
      *  is not a valid key
-     * @beaninfo
-     *   preferred: true
-     *       bound: true
-     * description: Set the field alignment to LEFT, CENTER, RIGHT,
-     *              LEADING (the default) or TRAILING
-     *        enum: LEFT JTextField.LEFT CENTER JTextField.CENTER RIGHT JTextField.RIGHT
-     *              LEADING JTextField.LEADING TRAILING JTextField.TRAILING
      */
+     @BeanProperty(preferred = true, enumerationValues = {
+             "JTextField.LEFT",
+             "JTextField.CENTER",
+             "JTextField.RIGHT",
+             "JTextField.LEADING",
+             "JTextField.TRAILING"}, description
+             = "Set the field alignment to LEFT, CENTER, RIGHT, LEADING (the default) or TRAILING")
      public void setHorizontalAlignment(int alignment) {
         if (alignment == horizontalAlignment) return;
         int oldValue = horizontalAlignment;
@@ -382,9 +378,9 @@
      * @param columns the number of columns &gt;= 0
      * @exception IllegalArgumentException if <code>columns</code>
      *          is less than 0
-     * @beaninfo
-     * description: the number of columns preferred for display
      */
+    @BeanProperty(bound = false, description
+            = "the number of columns preferred for display")
     public void setColumns(int columns) {
         int oldVal = this.columns;
         if (columns < 0) {
@@ -476,6 +472,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public synchronized ActionListener[] getActionListeners() {
         return listenerList.getListeners(ActionListener.class);
     }
@@ -559,11 +556,9 @@
      * @see #configurePropertiesFromAction
      * @see #createActionPropertyChangeListener
      * @see #actionPropertyChanged
-     * @beaninfo
-     *        bound: true
-     *    attribute: visualUpdate true
-     *  description: the Action instance connected with this ActionEvent source
      */
+    @BeanProperty(visualUpdate = true, description
+            = "the Action instance connected with this ActionEvent source")
     public void setAction(Action a) {
         Action oldValue = getAction();
         if (action==null || !action.equals(a)) {
@@ -712,6 +707,7 @@
      *
      * @return the command list
      */
+    @BeanProperty(bound = false)
     public Action[] getActions() {
         return TextAction.augmentList(super.getActions(), defaultActions);
     }
@@ -742,6 +738,7 @@
      * @return the visibility
      * @see BoundedRangeModel
      */
+    @BeanProperty(bound = false)
     public BoundedRangeModel getHorizontalVisibility() {
         return visibility;
     }
@@ -926,6 +923,7 @@
      * @return an <code>AccessibleJTextField</code> that serves as the
      *         <code>AccessibleContext</code> of this <code>JTextField</code>
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJTextField();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTextPane.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTextPane.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,12 @@
 package javax.swing;
 
 import java.awt.*;
-import java.awt.event.ActionEvent;
-
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
 import javax.swing.text.*;
-import javax.swing.event.*;
-import javax.swing.plaf.*;
 
 /**
  * A text component that can be marked up with attributes that are
@@ -72,14 +69,12 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer true
- * description: A text component that can be marked up with attributes that are graphically represented.
- *
  * @author  Timothy Prinzing
  * @see javax.swing.text.StyledEditorKit
  * @since 1.2
  */
+@JavaBean(description = "A text component that can be marked up with attributes that are graphically represented.")
+@SwingContainer
 @SuppressWarnings("serial") // Same-version serialization only
 public class JTextPane extends JEditorPane {
 
@@ -120,6 +115,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -338,6 +334,7 @@
      *
      * @return the attributes, or <code>null</code>
      */
+    @BeanProperty(bound = false)
     public AttributeSet getCharacterAttributes() {
         StyledDocument doc = getStyledDocument();
         Element run = doc.getCharacterElement(getCaretPosition());
@@ -379,6 +376,7 @@
      *
      * @return the attributes
      */
+    @BeanProperty(bound = false)
     public AttributeSet getParagraphAttributes() {
         StyledDocument doc = getStyledDocument();
         Element paragraph = doc.getParagraphElement(getCaretPosition());
@@ -410,6 +408,7 @@
      *
      * @return the attributes
      */
+    @BeanProperty(bound = false)
     public MutableAttributeSet getInputAttributes() {
         return getStyledEditorKit().getInputAttributes();
     }
--- a/jdk/src/java.desktop/share/classes/javax/swing/JToggleButton.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JToggleButton.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,16 +26,15 @@
 
 import java.awt.*;
 import java.awt.event.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 
-import javax.swing.event.*;
 import javax.swing.plaf.*;
 import javax.accessibility.*;
 
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
-
 /**
  * An implementation of a two-state button.
  * The <code>JRadioButton</code> and <code>JCheckBox</code> classes
@@ -68,15 +67,13 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer false
- * description: An implementation of a two-state button.
- *
  * @see JRadioButton
  * @see JCheckBox
  * @author Jeff Dinkins
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UIClassID", description = "An implementation of a two-state button.")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public class JToggleButton extends AbstractButton implements Accessible {
 
@@ -195,9 +192,9 @@
      * @return String "ToggleButtonUI"
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
-     * @beaninfo
-     *  description: A string that specifies the name of the L&amp;F class
      */
+    @BeanProperty(bound = false, description
+            = "A string that specifies the name of the L&amp;F class")
     public String getUIClassID() {
         return uiClassID;
     }
@@ -362,10 +359,9 @@
      *
      * @return an AccessibleJToggleButton that serves as the
      *         AccessibleContext of this JToggleButton
-     * @beaninfo
-     *       expert: true
-     *  description: The AccessibleContext associated with this ToggleButton.
      */
+    @BeanProperty(bound = false, expert = true, description
+            = "The AccessibleContext associated with this ToggleButton.")
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJToggleButton();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JToolBar.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JToolBar.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,31 +22,26 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
-import java.awt.Color;
 import java.awt.Component;
-import java.awt.ComponentOrientation;
 import java.awt.Container;
 import java.awt.Dimension;
 import java.awt.Graphics;
 import java.awt.Insets;
 import java.awt.LayoutManager;
 import java.awt.LayoutManager2;
-import java.awt.event.*;
-import java.beans.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
 
-import javax.swing.border.Border;
 import javax.swing.plaf.*;
 import javax.accessibility.*;
 
 import java.io.Serializable;
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
-import java.util.Hashtable;
-
 
 /**
  * <code>JToolBar</code> provides a component that is useful for
@@ -78,15 +73,13 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *   attribute: isContainer true
- * description: A component which displays commonly used controls or Actions.
- *
  * @author Georges Saab
  * @author Jeff Shapiro
  * @see Action
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A component which displays commonly used controls or Actions.")
+@SwingContainer
 @SuppressWarnings("serial") // Same-version serialization only
 public class JToolBar extends JComponent implements SwingConstants, Accessible
 {
@@ -175,12 +168,9 @@
      *
      * @param ui  the <code>ToolBarUI</code> L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(ToolBarUI ui) {
         super.setUI(ui);
     }
@@ -212,6 +202,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -266,11 +257,9 @@
       * @param m an <code>Insets</code> object that defines the space
       *         between the border and the buttons
       * @see Insets
-      * @beaninfo
-      * description: The margin between the tool bar's border and contents
-      *       bound: true
-      *      expert: true
       */
+     @BeanProperty(expert = true, description
+             = "The margin between the tool bar's border and contents")
      public void setMargin(Insets m)
      {
          Insets old = margin;
@@ -317,11 +306,9 @@
       *
       * @param b if true, the border is painted
       * @see #isBorderPainted
-      * @beaninfo
-      * description: Does the tool bar paint its borders?
-      *       bound: true
-      *      expert: true
       */
+     @BeanProperty(expert = true, description
+             = "Does the tool bar paint its borders?")
      public void setBorderPainted(boolean b)
      {
          if ( paintBorder != b )
@@ -376,11 +363,9 @@
       * @param b if <code>true</code>, the tool bar can be moved;
       *          <code>false</code> otherwise
       * @see #isFloatable
-      * @beaninfo
-      * description: Can the tool bar be made to float by the user?
-      *       bound: true
-      *   preferred: true
       */
+     @BeanProperty(preferred = true, description
+             = "Can the tool bar be made to float by the user?")
     public void setFloatable( boolean b )
     {
         if ( floatable != b )
@@ -418,13 +403,11 @@
      * @exception IllegalArgumentException if orientation is neither
      *          <code>HORIZONTAL</code> nor <code>VERTICAL</code>
      * @see #getOrientation
-     * @beaninfo
-     * description: The current orientation of the tool bar
-     *       bound: true
-     *   preferred: true
-     *        enum: HORIZONTAL SwingConstants.HORIZONTAL
-     *              VERTICAL   SwingConstants.VERTICAL
      */
+    @BeanProperty(preferred = true, enumerationValues = {
+            "SwingConstants.HORIZONTAL",
+            "SwingConstants.VERTICAL"}, description
+            = "The current orientation of the tool bar")
     public void setOrientation( int o )
     {
         checkOrientation( o );
@@ -451,12 +434,9 @@
      *
      * @param rollover true for rollover toolbar buttons; otherwise false
      * @since 1.4
-     * @beaninfo
-     *        bound: true
-     *    preferred: true
-     *    attribute: visualUpdate true
-     *  description: Will draw rollover button borders in the toolbar.
      */
+    @BeanProperty(preferred = true, visualUpdate = true, description
+            = "Will draw rollover button borders in the toolbar.")
     public void setRollover(boolean rollover) {
         putClientProperty("JToolBar.isRollover",
                           rollover ? Boolean.TRUE : Boolean.FALSE);
@@ -836,6 +816,7 @@
      * @return an AccessibleJToolBar that serves as the
      *         AccessibleContext of this JToolBar
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJToolBar();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JToolTip.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JToolTip.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,11 @@
 
 
 package javax.swing;
+
 import javax.swing.plaf.*;
 import javax.accessibility.*;
 
+import java.beans.BeanProperty;
 import java.io.ObjectOutputStream;
 import java.io.ObjectInputStream;
 import java.io.IOException;
@@ -121,11 +123,9 @@
      * The string <code>tipText</code> may be <code>null</code>.
      *
      * @param tipText the <code>String</code> to display
-     * @beaninfo
-     *    preferred: true
-     *        bound: true
-     *  description: Sets the text of the tooltip
      */
+    @BeanProperty(preferred = true, description
+            = "Sets the text of the tooltip")
     public void setTipText(String tipText) {
         String oldValue = this.tipText;
         this.tipText = tipText;
@@ -156,10 +156,9 @@
      *
      * @param c the <code>JComponent</code> being described
      * @see JComponent#createToolTip
-     * @beaninfo
-     *       bound: true
-     * description: Sets the component that the tooltip describes.
      */
+    @BeanProperty(description
+            = "Sets the component that the tooltip describes.")
     public void setComponent(JComponent c) {
         JComponent oldValue = this.component;
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTree.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTree.java	Tue Oct 27 01:45:03 2015 -0400
@@ -22,12 +22,15 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing;
 
 import java.awt.*;
 import java.awt.event.*;
-import java.beans.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
+import java.beans.ConstructorProperties;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
 import java.io.*;
 import java.util.*;
 import javax.swing.event.*;
@@ -35,11 +38,11 @@
 import javax.swing.tree.*;
 import javax.swing.text.Position;
 import javax.accessibility.*;
+
 import sun.swing.SwingUtilities2;
 import sun.swing.SwingUtilities2.Section;
 import static sun.swing.SwingUtilities2.Section.*;
 
-
 /**
  * <a name="jtree_description"></a>
  * A control that displays a set of hierarchical data as an outline.
@@ -134,15 +137,14 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *</p>
- * @beaninfo
- *   attribute: isContainer false
- * description: A component that displays a set of hierarchical data as an outline.
  *
  * @author Rob Davis
  * @author Ray Ryan
  * @author Scott Violet
  * @since 1.2
  */
+@JavaBean(defaultProperty = "UI", description = "A component that displays a set of hierarchical data as an outline.")
+@SwingContainer(false)
 @SuppressWarnings("serial")
 public class JTree extends JComponent implements Scrollable, Accessible
 {
@@ -687,12 +689,9 @@
      *
      * @param ui  the <code>TreeUI</code> L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(TreeUI ui) {
         if (this.ui != ui) {
             settingUI = true;
@@ -728,6 +727,7 @@
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      */
+    @BeanProperty(bound = false)
     public String getUIClassID() {
         return uiClassID;
     }
@@ -750,11 +750,9 @@
      * This is a bound property.
      *
      * @param x  the <code>TreeCellRenderer</code> that is to render each cell
-     * @beaninfo
-     *        bound: true
-     *  description: The TreeCellRenderer that will be used to draw
-     *               each cell.
      */
+    @BeanProperty(description
+            = "The TreeCellRenderer that will be used to draw each cell.")
     public void setCellRenderer(TreeCellRenderer x) {
         TreeCellRenderer oldValue = cellRenderer;
 
@@ -771,10 +769,9 @@
      * This is a bound property.
       *
       * @param flag  a boolean value, true if the tree is editable
-      * @beaninfo
-      *        bound: true
-      *  description: Whether the tree is editable.
       */
+    @BeanProperty(description
+            = "Whether the tree is editable.")
     public void setEditable(boolean flag) {
         boolean                 oldValue = this.editable;
 
@@ -806,11 +803,9 @@
      * This is a bound property.
      *
      * @param cellEditor the <code>TreeCellEditor</code> to use
-     * @beaninfo
-     *        bound: true
-     *  description: The cell editor. A null value implies the tree
-     *               cannot be edited.
      */
+    @BeanProperty(description
+            = "The cell editor. A null value implies the tree cannot be edited.")
     public void setCellEditor(TreeCellEditor cellEditor) {
         TreeCellEditor        oldEditor = this.cellEditor;
 
@@ -844,10 +839,9 @@
      * This is a bound property.
      *
      * @param newModel the <code>TreeModel</code> that is to provide the data
-     * @beaninfo
-     *        bound: true
-     *  description: The TreeModel that will provide the data.
      */
+    @BeanProperty(description
+            = "The TreeModel that will provide the data.")
     public void setModel(TreeModel newModel) {
         clearSelection();
 
@@ -903,11 +897,9 @@
      *
      * @param rootVisible true if the root node of the tree is to be displayed
      * @see #rootVisible
-     * @beaninfo
-     *        bound: true
-     *  description: Whether or not the root node
-     *               from the TreeModel is visible.
      */
+    @BeanProperty(description
+            = "Whether or not the root node from the TreeModel is visible.")
     public void setRootVisible(boolean rootVisible) {
         boolean                oldValue = this.rootVisible;
 
@@ -932,11 +924,9 @@
      *                 otherwise, <code>false</code>
      * @see #showsRootHandles
      * @see #getShowsRootHandles
-     * @beaninfo
-     *        bound: true
-     *  description: Whether the node handles are to be
-     *               displayed.
      */
+    @BeanProperty(description
+            = "Whether the node handles are to be displayed.")
     public void setShowsRootHandles(boolean newValue) {
         boolean                oldValue = showsRootHandles;
         TreeModel              model = getModel();
@@ -970,10 +960,9 @@
      * This is a bound property.
      *
      * @param rowHeight the height of each cell, in pixels
-     * @beaninfo
-     *        bound: true
-     *  description: The height of each cell.
      */
+    @BeanProperty(description
+            = "The height of each cell.")
     public void setRowHeight(int rowHeight)
     {
         int                oldValue = this.rowHeight;
@@ -1001,6 +990,7 @@
      *
      * @return true if the height of each row is a fixed size
      */
+    @BeanProperty(bound = false)
     public boolean isFixedRowHeight()
     {
         return (rowHeight > 0);
@@ -1015,11 +1005,9 @@
      *
      * @param newValue true to suggest a large model to the UI
      * @see #largeModel
-     * @beaninfo
-     *        bound: true
-     *  description: Whether the UI should use a
-     *               large model.
      */
+    @BeanProperty(description
+            = "Whether the UI should use a large model.")
     public void setLargeModel(boolean newValue) {
         boolean                oldValue = largeModel;
 
@@ -1048,12 +1036,10 @@
      * @param newValue true means that <code>stopCellEditing</code> is invoked
      *        when editing is interrupted, and data is saved; false means that
      *        <code>cancelCellEditing</code> is invoked, and changes are lost
-     * @beaninfo
-     *        bound: true
-     *  description: Determines what happens when editing is interrupted,
-     *               selecting another node in the tree, a change in the
-     *               tree's data, or some other means.
      */
+    @BeanProperty(description
+            = "Determines what happens when editing is interrupted, selecting another node in the tree, "
+            + "a change in the tree's data, or some other means.")
     public void setInvokesStopCellEditing(boolean newValue) {
         boolean                  oldValue = invokesStopCellEditing;
 
@@ -1090,11 +1076,9 @@
      * @param newValue <code>false</code> to disable scrolling on expansion;
      *                 <code>true</code> to enable it
      * @see #getScrollsOnExpand
-     *
-     * @beaninfo
-     *        bound: true
-     *  description: Indicates if a node descendant should be scrolled when expanded.
      */
+    @BeanProperty(description
+            = "Indicates if a node descendant should be scrolled when expanded.")
     public void setScrollsOnExpand(boolean newValue) {
         boolean           oldValue = scrollsOnExpand;
 
@@ -1121,10 +1105,9 @@
      *
      * @param clickCount the number of mouse clicks to get a node expanded or closed
      * @since 1.3
-     * @beaninfo
-     *        bound: true
-     *  description: Number of clicks before a node will expand/collapse.
      */
+    @BeanProperty(description
+            = "Number of clicks before a node will expand/collapse.")
     public void setToggleClickCount(int clickCount) {
         int         oldCount = toggleClickCount;
 
@@ -1160,11 +1143,9 @@
      * @param newValue the new value for <code>expandsSelectedPaths</code>
      *
      * @since 1.3
-     * @beaninfo
-     *        bound: true
-     *  description: Indicates whether changes to the selection should make
-     *               the parent of the path visible.
      */
+    @BeanProperty(description
+            = "Indicates whether changes to the selection should make the parent of the path visible.")
     public void setExpandsSelectedPaths(boolean newValue) {
         boolean         oldValue = expandsSelectedPaths;
 
@@ -1212,11 +1193,9 @@
      * @see #setTransferHandler
      * @see TransferHandler
      * @since 1.4
-     *
-     * @beaninfo
-     *  description: determines whether automatic drag handling is enabled
-     *        bound: false
      */
+    @BeanProperty(bound = false, description
+            = "determines whether automatic drag handling is enabled")
     public void setDragEnabled(boolean b) {
         checkDragEnabled(b);
         dragEnabled = b;
@@ -1505,6 +1484,7 @@
      * @see TransferHandler#canImport(TransferHandler.TransferSupport)
      * @since 1.6
      */
+    @BeanProperty(bound = false)
     public final DropLocation getDropLocation() {
         return dropLocation;
     }
@@ -1635,6 +1615,7 @@
      *
      * @return the number of viewable nodes
      */
+    @BeanProperty(bound = false)
     public int getRowCount() {
         TreeUI            tree = getUI();
 
@@ -1677,10 +1658,9 @@
      *
      * @param newPath  the new lead path
      * @since 1.3
-     * @beaninfo
-     *        bound: true
-     *  description: Lead selection path
      */
+    @BeanProperty(description
+            = "Lead selection path")
     public void setLeadSelectionPath(TreePath newPath) {
         TreePath          oldValue = leadPath;
 
@@ -1705,10 +1685,9 @@
      *
      * @param newPath  the new anchor path
      * @since 1.3
-     * @beaninfo
-     *        bound: true
-     *  description: Anchor selection path
      */
+    @BeanProperty(description
+            = "Anchor selection path")
     public void setAnchorSelectionPath(TreePath newPath) {
         TreePath          oldValue = anchorPath;
 
@@ -1828,6 +1807,7 @@
      *         <code>null</code> if nothing is selected
      * @see TreePath#getLastPathComponent
      */
+    @BeanProperty(bound = false)
     public Object getLastSelectedPathComponent() {
         TreePath     selPath = getSelectionModel().getSelectionPath();
 
@@ -1894,6 +1874,7 @@
      *
      * @return the number of nodes selected
      */
+    @BeanProperty(bound = false)
     public int getSelectionCount() {
         return selectionModel.getSelectionCount();
     }
@@ -1904,6 +1885,7 @@
      *
      * @return the smallest selected row
      */
+    @BeanProperty(bound = false)
     public int getMinSelectionRow() {
         return getSelectionModel().getMinSelectionRow();
     }
@@ -1914,6 +1896,7 @@
      *
      * @return the largest selected row
      */
+    @BeanProperty(bound = false)
     public int getMaxSelectionRow() {
         return getSelectionModel().getMaxSelectionRow();
     }
@@ -1925,6 +1908,7 @@
      *          where 0 is the first row in the display; or -1
      *          if <code>leadPath</code> is <code>null</code>
      */
+    @BeanProperty(bound = false)
     public int getLeadSelectionRow() {
         TreePath leadPath = getLeadSelectionPath();
 
@@ -2198,6 +2182,7 @@
      *          <code>null</code> if <code>row &lt; 0</code>
      *          or <code>row &gt;= getRowCount()</code>
      */
+    @BeanProperty(bound = false)
     public TreePath getPathForRow(int row) {
         TreeUI                  tree = getUI();
 
@@ -2368,6 +2353,7 @@
      * @return true if the user is currently editing a node
      * @see #getSelectionPath
      */
+    @BeanProperty(bound = false)
     public boolean isEditing() {
         TreeUI                  tree = getUI();
 
@@ -2430,6 +2416,7 @@
      *
      * @return  the <code>TreePath</code> for the node being edited
      */
+    @BeanProperty(bound = false)
     public TreePath getEditingPath() {
         TreeUI                  tree = getUI();
 
@@ -2457,10 +2444,9 @@
      * @param selectionModel the <code>TreeSelectionModel</code> to use,
      *          or <code>null</code> to disable selections
      * @see TreeSelectionModel
-     * @beaninfo
-     *        bound: true
-     *  description: The tree's selection model.
      */
+    @BeanProperty(description
+            = "The tree's selection model.")
     public void setSelectionModel(TreeSelectionModel selectionModel) {
         if(selectionModel == null)
             selectionModel = EmptySelectionModel.sharedInstance();
@@ -2700,6 +2686,7 @@
      *
      * @return true if the selection is currently empty
      */
+    @BeanProperty(bound = false)
     public boolean isSelectionEmpty() {
         return getSelectionModel().isSelectionEmpty();
     }
@@ -2738,6 +2725,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public TreeExpansionListener[] getTreeExpansionListeners() {
         return listenerList.getListeners(TreeExpansionListener.class);
     }
@@ -2770,6 +2758,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public TreeWillExpandListener[] getTreeWillExpandListeners() {
         return listenerList.getListeners(TreeWillExpandListener.class);
     }
@@ -2929,6 +2918,7 @@
      *         array if no listeners have been added
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public TreeSelectionListener[] getTreeSelectionListeners() {
         return listenerList.getListeners(TreeSelectionListener.class);
     }
@@ -2980,10 +2970,9 @@
      * This is a bound property.
      *
      * @param newCount the number of rows to display
-     * @beaninfo
-     *        bound: true
-     *  description: The number of rows that are to be displayed.
      */
+    @BeanProperty(description
+            = "The number of rows that are to be displayed.")
     public void setVisibleRowCount(int newCount) {
         int                 oldCount = visibleRowCount;
 
@@ -3459,6 +3448,7 @@
      *
      * @return a <code>Dimension</code> object containing the preferred size
      */
+    @BeanProperty(bound = false)
     public Dimension getPreferredScrollableViewportSize() {
         int                 width = getPreferredSize().width;
         int                 visRows = getVisibleRowCount();
@@ -3565,6 +3555,7 @@
      * @return whether the tree should track the width of the viewport
      * @see Scrollable#getScrollableTracksViewportWidth
      */
+    @BeanProperty(bound = false)
     public boolean getScrollableTracksViewportWidth() {
         Container parent = SwingUtilities.getUnwrappedParent(this);
         if (parent instanceof JViewport) {
@@ -3582,6 +3573,7 @@
      * @return whether the tree should track the height of the viewport
      * @see Scrollable#getScrollableTracksViewportHeight
      */
+    @BeanProperty(bound = false)
     public boolean getScrollableTracksViewportHeight() {
         Container parent = SwingUtilities.getUnwrappedParent(this);
         if (parent instanceof JViewport) {
@@ -4160,6 +4152,7 @@
      * @return an AccessibleJTree that serves as the
      *         AccessibleContext of this JTree
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJTree();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JViewport.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JViewport.java	Tue Oct 27 01:45:03 2015 -0400
@@ -28,6 +28,7 @@
 import java.awt.*;
 import java.awt.event.*;
 import java.awt.peer.ComponentPeer;
+import java.beans.BeanProperty;
 import java.beans.Transient;
 import javax.swing.plaf.ViewportUI;
 
@@ -300,13 +301,10 @@
      *
      * @param ui  the <code>ViewportUI</code> L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      * @since 1.3
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(ViewportUI ui) {
         super.setUI(ui);
     }
@@ -588,9 +586,8 @@
      * @param insets the <code>Insets</code> object which can be reused
      * @return this viewports inset values
      * @see #getInsets
-     * @beaninfo
-     *   expert: true
      */
+    @BeanProperty(expert = true)
     public final Insets getInsets(Insets insets) {
         insets.left = insets.top = insets.right = insets.bottom = 0;
         return insets;
@@ -861,15 +858,13 @@
       * @see #BACKINGSTORE_SCROLL_MODE
       * @see #SIMPLE_SCROLL_MODE
       *
-      * @beaninfo
-      *        bound: false
-      *  description: Method of moving contents for incremental scrolls.
-      *         enum: BLIT_SCROLL_MODE JViewport.BLIT_SCROLL_MODE
-      *               BACKINGSTORE_SCROLL_MODE JViewport.BACKINGSTORE_SCROLL_MODE
-      *               SIMPLE_SCROLL_MODE JViewport.SIMPLE_SCROLL_MODE
-      *
       * @since 1.3
       */
+    @BeanProperty(bound = false, enumerationValues = {
+            "JViewport.BLIT_SCROLL_MODE",
+            "JViewport.BACKINGSTORE_SCROLL_MODE",
+            "JViewport.SIMPLE_SCROLL_MODE"}, description
+            = "Method of moving contents for incremental scrolls.")
     public void setScrollMode(int mode) {
         scrollMode = mode;
         backingStore = mode == BACKINGSTORE_SCROLL_MODE;
--- a/jdk/src/java.desktop/share/classes/javax/swing/JWindow.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JWindow.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,8 @@
 
 import java.awt.*;
 import java.awt.event.*;
-import java.beans.PropertyChangeListener;
-import java.util.Locale;
-import java.util.Vector;
-import java.io.Serializable;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 
 import javax.accessibility.*;
 
@@ -83,14 +81,11 @@
  *
  * @see JRootPane
  *
- * @beaninfo
- *      attribute: isContainer true
- *      attribute: containerDelegate getContentPane
- *    description: A toplevel window which has no system border or controls.
- *
  * @author David Kloba
  * @since 1.2
  */
+@JavaBean(defaultProperty = "accessibleContext", description = "A toplevel window which has no system border or controls.")
+@SwingContainer(delegate = "getContentPane")
 @SuppressWarnings("serial")
 public class JWindow extends Window implements Accessible,
                                                RootPaneContainer,
@@ -328,12 +323,9 @@
      * @see #getTransferHandler
      * @see java.awt.Component#setDropTarget
      * @since 1.6
-     *
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *  description: Mechanism for transfer of data into the component
      */
+    @BeanProperty(hidden = true, description
+            = "Mechanism for transfer of data into the component")
     public void setTransferHandler(TransferHandler newHandler) {
         TransferHandler oldHandler = transferHandler;
         transferHandler = newHandler;
@@ -376,10 +368,9 @@
      * @see #setLayout
      * @see #isRootPaneCheckingEnabled
      * @see javax.swing.RootPaneContainer
-     * @beaninfo
-     *      hidden: true
-     * description: Whether the add and setLayout methods are forwarded
      */
+    @BeanProperty(hidden = true, description
+            = "Whether the add and setLayout methods are forwarded")
     protected void setRootPaneCheckingEnabled(boolean enabled) {
         rootPaneCheckingEnabled = enabled;
     }
@@ -463,6 +454,8 @@
      * @see #setRootPane
      * @see RootPaneContainer#getRootPane
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "the RootPane object for this window.")
     public JRootPane getRootPane() {
         return rootPane;
     }
@@ -474,10 +467,6 @@
      *
      * @param root the new <code>rootPane</code> property
      * @see #getRootPane
-     *
-     * @beaninfo
-     *        hidden: true
-     *   description: the RootPane object for this window.
      */
     protected void setRootPane(JRootPane root) {
         if(rootPane != null) {
@@ -519,12 +508,9 @@
      *            exception) if the content pane parameter is <code>null</code>
      * @see #getContentPane
      * @see RootPaneContainer#setContentPane
-     *
-     * @beaninfo
-     *     hidden: true
-     *     description: The client area of the window where child
-     *                  components are normally inserted.
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "The client area of the window where child components are normally inserted.")
     public void setContentPane(Container contentPane) {
         getRootPane().setContentPane(contentPane);
     }
@@ -550,11 +536,9 @@
      *            exception) if the content pane parameter is <code>null</code>
      * @see #getLayeredPane
      * @see RootPaneContainer#setLayeredPane
-     *
-     * @beaninfo
-     *     hidden: true
-     *     description: The pane which holds the various window layers.
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "The pane which holds the various window layers.")
     public void setLayeredPane(JLayeredPane layeredPane) {
         getRootPane().setLayeredPane(layeredPane);
     }
@@ -577,11 +561,9 @@
      *
      * @see #getGlassPane
      * @see RootPaneContainer#setGlassPane
-     *
-     * @beaninfo
-     *     hidden: true
-     *     description: A transparent pane used for menu rendering.
      */
+    @BeanProperty(bound = false, hidden = true, description
+            = "A transparent pane used for menu rendering.")
     public void setGlassPane(Component glassPane) {
         getRootPane().setGlassPane(glassPane);
     }
@@ -591,6 +573,7 @@
      *
      * @since 1.6
      */
+    @BeanProperty(bound = false)
     public Graphics getGraphics() {
         JComponent.getGraphicsInvoked(this);
         return super.getGraphics();
--- a/jdk/src/java.desktop/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 package javax.swing.colorchooser;
 
 import java.awt.*;
+import java.beans.BeanProperty;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import javax.swing.*;
@@ -222,13 +223,10 @@
      * <p>The default value is {@code true}.
      *
      * @param b true if the transparency of a color can be selected
-     *
-     * @beaninfo
-     *       bound: true
-     * description: Sets the transparency of a color selection on or off.
-     *
      * @see #isColorTransparencySelectionEnabled()
      */
+    @BeanProperty(description
+            = "Sets the transparency of a color selection on or off.")
     public void setColorTransparencySelectionEnabled(boolean b){
     }
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java	Tue Oct 27 01:45:03 2015 -0400
@@ -22,7 +22,6 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing.table;
 
 import sun.swing.table.DefaultTableCellHeaderRenderer;
@@ -36,14 +35,13 @@
 import javax.swing.plaf.*;
 import javax.accessibility.*;
 
+import java.beans.BeanProperty;
 import java.beans.PropertyChangeListener;
 import java.beans.Transient;
 
 import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
 import java.io.IOException;
 
-
 /**
  * This is the object which manages the header of the <code>JTable</code>.
  * <p>
@@ -167,10 +165,9 @@
     /**
      *  Sets the table associated with this header.
      *  @param  table   the new table
-     *  @beaninfo
-     *   bound: true
-     *   description: The table associated with this header.
      */
+    @BeanProperty(description
+            = "The table associated with this header.")
     public void setTable(JTable table) {
         JTable old = this.table;
         this.table = table;
@@ -191,10 +188,9 @@
      * @param   reorderingAllowed       true if the table view should allow
      *                                  reordering; otherwise false
      * @see     #getReorderingAllowed
-     * @beaninfo
-     *  bound: true
-     *  description: Whether the user can drag column headers to reorder columns.
      */
+    @BeanProperty(description
+            = "Whether the user can drag column headers to reorder columns.")
     public void setReorderingAllowed(boolean reorderingAllowed) {
         boolean old = this.reorderingAllowed;
         this.reorderingAllowed = reorderingAllowed;
@@ -219,10 +215,9 @@
      * @param   resizingAllowed         true if table view should allow
      *                                  resizing
      * @see     #getResizingAllowed
-     * @beaninfo
-     *  bound: true
-     *  description: Whether the user can resize columns by dragging between headers.
      */
+    @BeanProperty(description
+            = "Whether the user can resize columns by dragging between headers.")
     public void setResizingAllowed(boolean resizingAllowed) {
         boolean old = this.resizingAllowed;
         this.resizingAllowed = resizingAllowed;
@@ -516,10 +511,9 @@
      * @exception IllegalArgumentException
      *                          if <code>newModel</code> is <code>null</code>
      * @see     #getColumnModel
-     * @beaninfo
-     *  bound: true
-     *  description: The object governing the way columns appear in the view.
      */
+    @BeanProperty(description
+            = "The object governing the way columns appear in the view.")
     public void setColumnModel(TableColumnModel columnModel) {
         if (columnModel == null) {
             throw new IllegalArgumentException("Cannot set a null ColumnModel");
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/TableColumn.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/TableColumn.java	Tue Oct 27 01:45:03 2015 -0400
@@ -26,6 +26,7 @@
 package javax.swing.table;
 
 import java.awt.Component;
+import java.beans.BeanProperty;
 import java.beans.PropertyChangeListener;
 import java.io.Serializable;
 
@@ -308,10 +309,9 @@
      * <code>TableColumn</code>. As the <code>TableColumn</code>
      * is moved around in the view the model index remains constant.
      * @param  modelIndex  the new modelIndex
-     * @beaninfo
-     *  bound: true
-     *  description: The model index.
      */
+    @BeanProperty(description
+            = "The model index.")
     public void setModelIndex(int modelIndex) {
         int old = this.modelIndex;
         this.modelIndex = modelIndex;
@@ -335,10 +335,9 @@
      *
      * @param      identifier           an identifier for this column
      * @see        #getIdentifier
-     * @beaninfo
-     *  bound: true
-     *  description: A unique identifier for this column.
      */
+    @BeanProperty(description
+            = "A unique identifier for this column.")
     public void setIdentifier(Object identifier) {
         Object old = this.identifier;
         this.identifier = identifier;
@@ -369,10 +368,9 @@
      * is <code>null</code>.
      * @param headerValue  the new headerValue
      * @see       #getHeaderValue
-     * @beaninfo
-     *  bound: true
-     *  description: The text to be used by the header renderer.
      */
+    @BeanProperty(description
+            = "The text to be used by the header renderer.")
     public void setHeaderValue(Object headerValue) {
         Object old = this.headerValue;
         this.headerValue = headerValue;
@@ -405,10 +403,9 @@
      * @param headerRenderer  the new headerRenderer
      *
      * @see       #getHeaderRenderer
-     * @beaninfo
-     *  bound: true
-     *  description: The header renderer.
      */
+    @BeanProperty(description
+            = "The header renderer.")
     public void setHeaderRenderer(TableCellRenderer headerRenderer) {
         TableCellRenderer old = this.headerRenderer;
         this.headerRenderer = headerRenderer;
@@ -437,10 +434,9 @@
      *
      * @param cellRenderer  the new cellRenderer
      * @see     #getCellRenderer
-     * @beaninfo
-     *  bound: true
-     *  description: The renderer to use for cell values.
      */
+    @BeanProperty(description
+            = "The renderer to use for cell values.")
     public void setCellRenderer(TableCellRenderer cellRenderer) {
         TableCellRenderer old = this.cellRenderer;
         this.cellRenderer = cellRenderer;
@@ -471,10 +467,9 @@
      *
      * @param cellEditor  the new cellEditor
      * @see     #getCellEditor
-     * @beaninfo
-     *  bound: true
-     *  description: The editor to use for cell values.
      */
+    @BeanProperty(description
+            = "The editor to use for cell values.")
     public void setCellEditor(TableCellEditor cellEditor){
         TableCellEditor old = this.cellEditor;
         this.cellEditor = cellEditor;
@@ -515,10 +510,9 @@
      * @see     #setMaxWidth
      * @see     #setPreferredWidth
      * @see     JTable#doLayout()
-     * @beaninfo
-     *  bound: true
-     *  description: The width of the column.
      */
+    @BeanProperty(description
+            = "The width of the column.")
     public void setWidth(int width) {
         int old = this.width;
         this.width = Math.min(Math.max(width, minWidth), maxWidth);
@@ -549,10 +543,9 @@
      * @param  preferredWidth the new preferred width
      * @see     #getPreferredWidth
      * @see     JTable#doLayout()
-     * @beaninfo
-     *  bound: true
-     *  description: The preferred width of the column.
      */
+    @BeanProperty(description
+            = "The preferred width of the column.")
     public void setPreferredWidth(int preferredWidth) {
         int old = this.preferredWidth;
         this.preferredWidth = Math.min(Math.max(preferredWidth, minWidth), maxWidth);
@@ -588,10 +581,9 @@
      * @see     #getMinWidth
      * @see     #setPreferredWidth
      * @see     #setMaxWidth
-     * @beaninfo
-     *  bound: true
-     *  description: The minimum width of the column.
      */
+    @BeanProperty(description
+            = "The minimum width of the column.")
     public void setMinWidth(int minWidth) {
         int old = this.minWidth;
         this.minWidth = Math.max(Math.min(minWidth, maxWidth), 0);
@@ -633,10 +625,9 @@
      * @see     #getMaxWidth
      * @see     #setPreferredWidth
      * @see     #setMinWidth
-     * @beaninfo
-     *  bound: true
-     *  description: The maximum width of the column.
      */
+    @BeanProperty(description
+            = "The maximum width of the column.")
     public void setMaxWidth(int maxWidth) {
         int old = this.maxWidth;
         this.maxWidth = Math.max(minWidth, maxWidth);
@@ -667,10 +658,9 @@
      *
      * @param isResizable  if true, resizing is allowed; otherwise false
      * @see     #getResizable
-     * @beaninfo
-     *  bound: true
-     *  description: Whether or not this column can be resized.
      */
+    @BeanProperty(description
+            = "Whether or not this column can be resized.")
     public void setResizable(boolean isResizable) {
         boolean old = this.isResizable;
         this.isResizable = isResizable;
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java	Tue Oct 27 01:45:03 2015 -0400
@@ -29,6 +29,8 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
 import java.beans.Transient;
 import java.util.HashMap;
 import java.util.Hashtable;
@@ -276,9 +278,6 @@
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
- * @beaninfo
- *     attribute: isContainer false
- *
  * @author  Timothy Prinzing
  * @author Igor Kushnirskiy (printing support)
  * @see Document
@@ -291,6 +290,8 @@
  * @see View
  * @see ViewFactory
  */
+@JavaBean(defaultProperty = "UI")
+@SwingContainer(false)
 @SuppressWarnings("serial") // Same-version serialization only
 public abstract class JTextComponent extends JComponent implements Scrollable, Accessible
 {
@@ -375,6 +376,7 @@
      *
      * @since 1.4
      */
+    @BeanProperty(bound = false)
     public CaretListener[] getCaretListeners() {
         return listenerList.getListeners(CaretListener.class);
     }
@@ -409,11 +411,9 @@
      *
      * @param doc  the document to display/edit
      * @see #getDocument
-     * @beaninfo
-     *  description: the text document model
-     *        bound: true
-     *       expert: true
      */
+    @BeanProperty(expert = true, description
+            = "the text document model")
     public void setDocument(Document doc) {
         Document old = model;
 
@@ -496,6 +496,7 @@
      *
      * @return the command list
      */
+    @BeanProperty(bound = false)
     public Action[] getActions() {
         return getUI().getEditorKit(this).getActions();
     }
@@ -511,10 +512,9 @@
      * A PropertyChange event ("margin") is sent to all listeners.
      *
      * @param m the space between the border and the text
-     * @beaninfo
-     *  description: desired space between the border and text area
-     *        bound: true
      */
+    @BeanProperty(description
+            = "desired space between the border and text area")
     public void setMargin(Insets m) {
         Insets old = margin;
         margin = m;
@@ -576,11 +576,9 @@
      *
      * @param c the caret
      * @see #getCaret
-     * @beaninfo
-     *  description: the caret used to select/navigate
-     *        bound: true
-     *       expert: true
      */
+    @BeanProperty(expert = true, description
+            = "the caret used to select/navigate")
     public void setCaret(Caret c) {
         if (caret != null) {
             caret.removeChangeListener(caretEvent);
@@ -614,11 +612,9 @@
      *
      * @param h the highlighter
      * @see #getHighlighter
-     * @beaninfo
-     *  description: object responsible for background highlights
-     *        bound: true
-     *       expert: true
      */
+    @BeanProperty(expert = true, description
+            = "object responsible for background highlights")
     public void setHighlighter(Highlighter h) {
         if (highlighter != null) {
             highlighter.deinstall(this);
@@ -640,10 +636,9 @@
      *
      * @param map the keymap
      * @see #getKeymap
-     * @beaninfo
-     *  description: set of key event to action bindings to use
-     *        bound: true
      */
+    @BeanProperty(description
+            = "set of key event to action bindings to use")
     public void setKeymap(Keymap map) {
         Keymap old = keymap;
         keymap = map;
@@ -679,11 +674,9 @@
      * @see #setTransferHandler
      * @see TransferHandler
      * @since 1.4
-     *
-     * @beaninfo
-     *  description: determines whether automatic drag handling is enabled
-     *        bound: false
      */
+    @BeanProperty(bound = false, description
+            = "determines whether automatic drag handling is enabled")
     public void setDragEnabled(boolean b) {
         checkDragEnabled(b);
         dragEnabled = b;
@@ -955,6 +948,7 @@
      * @see TransferHandler#canImport(TransferHandler.TransferSupport)
      * @since 1.6
      */
+    @BeanProperty(bound = false)
     public final DropLocation getDropLocation() {
         return dropLocation;
     }
@@ -1220,11 +1214,9 @@
      *
      * @param c the color
      * @see #getCaretColor
-     * @beaninfo
-     *  description: the color used to render the caret
-     *        bound: true
-     *    preferred: true
      */
+    @BeanProperty(preferred = true, description
+            = "the color used to render the caret")
     public void setCaretColor(Color c) {
         Color old = caretColor;
         caretColor = c;
@@ -1249,11 +1241,9 @@
      *
      * @param c the color
      * @see #getSelectionColor
-     * @beaninfo
-     *  description: color used to render selection background
-     *        bound: true
-     *    preferred: true
      */
+    @BeanProperty(preferred = true, description
+            = "color used to render selection background")
     public void setSelectionColor(Color c) {
         Color old = selectionColor;
         selectionColor = c;
@@ -1278,11 +1268,9 @@
      *
      * @param c the color
      * @see #getSelectedTextColor
-     * @beaninfo
-     *  description: color used to render selected text
-     *        bound: true
-     *    preferred: true
      */
+    @BeanProperty(preferred = true, description
+            = "color used to render selected text")
     public void setSelectedTextColor(Color c) {
         Color old = selectedTextColor;
         selectedTextColor = c;
@@ -1306,11 +1294,9 @@
      *
      * @param c the color
      * @see #getDisabledTextColor
-     * @beaninfo
-     *  description: color used to render disabled text
-     *        bound: true
-     *    preferred: true
      */
+    @BeanProperty(preferred = true, description
+            = "color used to render disabled text")
     public void setDisabledTextColor(Color c) {
         Color old = disabledTextColor;
         disabledTextColor = c;
@@ -1535,10 +1521,9 @@
      *
      * @param aKey the key
      * @see #getFocusAccelerator
-     * @beaninfo
-     *  description: accelerator character used to grab focus
-     *        bound: true
      */
+    @BeanProperty(description
+            = "accelerator character used to grab focus")
     public void setFocusAccelerator(char aKey) {
         aKey = Character.toUpperCase(aKey);
         char old = focusAccelerator;
@@ -1632,9 +1617,9 @@
      * @exception    IllegalArgumentException if the value supplied
      *               for <code>position</code> is less than zero or greater
      *               than the component's text length
-     * @beaninfo
-     * description: the caret position
      */
+    @BeanProperty(bound = false, description
+            = "the caret position")
     public void setCaretPosition(int position) {
         Document doc = getDocument();
         if (doc != null) {
@@ -1672,9 +1657,9 @@
      * @param t the new text to be set
      * @see #getText
      * @see DefaultCaret
-     * @beaninfo
-     * description: the text of this component
      */
+    @BeanProperty(bound = false, description
+            = "the text of this component")
     public void setText(String t) {
         try {
             Document doc = getDocument();
@@ -1724,6 +1709,7 @@
      *  have a valid mapping into the document for some reason
      * @see #setText
      */
+    @BeanProperty(bound = false)
     public String getSelectedText() {
         String txt = null;
         int p0 = Math.min(caret.getDot(), caret.getMark());
@@ -1758,10 +1744,9 @@
      *
      * @param b the boolean to be set
      * @see #isEditable
-     * @beaninfo
-     * description: specifies if the text can be edited
-     *       bound: true
      */
+    @BeanProperty(description
+            = "specifies if the text can be edited")
     public void setEditable(boolean b) {
         if (b != editable) {
             boolean oldVal = editable;
@@ -1795,9 +1780,9 @@
      * implementation which is where the actual selection is maintained.
      *
      * @param selectionStart the start position of the text &ge; 0
-     * @beaninfo
-     * description: starting location of the selection.
      */
+    @BeanProperty(bound = false, description
+            = "starting location of the selection.")
     public void setSelectionStart(int selectionStart) {
         /* Route through select method to enforce consistent policy
          * between selectionStart and selectionEnd.
@@ -1828,9 +1813,9 @@
      * implementation which is where the actual selection is maintained.
      *
      * @param selectionEnd the end position of the text &ge; 0
-     * @beaninfo
-     * description: ending location of the selection.
      */
+    @BeanProperty(bound = false, description
+            = "ending location of the selection.")
     public void setSelectionEnd(int selectionEnd) {
         /* Route through select method to enforce consistent policy
          * between selectionStart and selectionEnd.
@@ -1946,6 +1931,7 @@
      * @return the <code>preferredSize</code> of a <code>JViewport</code>
      * whose view is this <code>Scrollable</code>
      */
+    @BeanProperty(bound = false)
     public Dimension getPreferredScrollableViewportSize() {
         return getPreferredSize();
     }
@@ -2029,6 +2015,7 @@
      * @return true if a viewport should force the <code>Scrollable</code>s
      *   width to match its own
      */
+    @BeanProperty(bound = false)
     public boolean getScrollableTracksViewportWidth() {
         Container parent = SwingUtilities.getUnwrappedParent(this);
         if (parent instanceof JViewport) {
@@ -2050,6 +2037,7 @@
      * @return true if a viewport should force the Scrollables height
      *   to match its own
      */
+    @BeanProperty(bound = false)
     public boolean getScrollableTracksViewportHeight() {
         Container parent = SwingUtilities.getUnwrappedParent(this);
         if (parent instanceof JViewport) {
@@ -2484,6 +2472,7 @@
      *         <code>AccessibleContext</code> of this
      *         <code>JTextComponent</code>
      */
+    @BeanProperty(bound = false)
     public AccessibleContext getAccessibleContext() {
         if (accessibleContext == null) {
             accessibleContext = new AccessibleJTextComponent();
@@ -4539,6 +4528,7 @@
     //
     // Overrides this method to become an active input method client.
     //
+    @BeanProperty(bound = false)
     public InputMethodRequests getInputMethodRequests() {
         if (inputMethodRequestsHandler == null) {
             inputMethodRequestsHandler = new InputMethodRequestsHandler();
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/AbstractLayoutCache.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/AbstractLayoutCache.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,12 +22,11 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing.tree;
 
 import javax.swing.event.TreeModelEvent;
-import java.awt.Dimension;
 import java.awt.Rectangle;
+import java.beans.BeanProperty;
 import java.util.Enumeration;
 
 /**
@@ -112,11 +111,9 @@
      *
      * @param rootVisible true if the root node of the tree is to be displayed
      * @see #rootVisible
-     * @beaninfo
-     *        bound: true
-     *  description: Whether or not the root node
-     *               from the TreeModel is visible.
      */
+    @BeanProperty(description
+            = "Whether or not the root node from the TreeModel is visible.")
     public void setRootVisible(boolean rootVisible) {
         this.rootVisible = rootVisible;
     }
@@ -137,10 +134,9 @@
      * queried for each row's height.
      *
      * @param rowHeight the height of each cell, in pixels
-     * @beaninfo
-     *        bound: true
-     *  description: The height of each cell.
      */
+    @BeanProperty(description
+            = "The height of each cell.")
     public void setRowHeight(int rowHeight) {
         this.rowHeight = rowHeight;
     }
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Tue Oct 27 01:45:03 2015 -0400
@@ -22,7 +22,6 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing.tree;
 
 import javax.swing.*;
@@ -31,6 +30,7 @@
 import javax.swing.plaf.FontUIResource;
 import java.awt.*;
 import java.awt.event.*;
+import java.beans.BeanProperty;
 import java.util.EventObject;
 
 /**
@@ -592,12 +592,9 @@
          * @param border the border to be rendered for this component
          * @see Border
          * @see CompoundBorder
-         * @beaninfo
-         *        bound: true
-         *    preferred: true
-         *    attribute: visualUpdate true
-         *  description: The component's border.
          */
+        @BeanProperty(preferred = true, visualUpdate = true, description
+                = "The component's border.")
         public void setBorder(Border border) {
             super.setBorder(border);
             this.border = border;
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/VariableHeightLayoutCache.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/VariableHeightLayoutCache.java	Tue Oct 27 01:45:03 2015 -0400
@@ -22,11 +22,11 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.swing.tree;
 
 import javax.swing.event.TreeModelEvent;
 import java.awt.Rectangle;
+import java.beans.BeanProperty;
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.NoSuchElementException;
@@ -103,10 +103,9 @@
      * Sets the <code>TreeModel</code> that will provide the data.
      *
      * @param newModel the <code>TreeModel</code> that is to provide the data
-     * @beaninfo
-     *        bound: true
-     *  description: The TreeModel that will provide the data.
      */
+    @BeanProperty(description
+            = "The TreeModel that will provide the data.")
     public void setModel(TreeModel newModel) {
         super.setModel(newModel);
         rebuild(false);
@@ -118,11 +117,9 @@
      *
      * @param rootVisible true if the root node of the tree is to be displayed
      * @see #rootVisible
-     * @beaninfo
-     *        bound: true
-     *  description: Whether or not the root node
-     *               from the TreeModel is visible.
      */
+    @BeanProperty(description
+            = "Whether or not the root node from the TreeModel is visible.")
     public void setRootVisible(boolean rootVisible) {
         if(isRootVisible() != rootVisible && root != null) {
             if(rootVisible) {
@@ -151,10 +148,9 @@
      * queried for each row's height.
      *
      * @param rowHeight the height of each cell, in pixels
-     * @beaninfo
-     *        bound: true
-     *  description: The height of each cell.
      */
+    @BeanProperty(description
+            = "The height of each cell.")
     public void setRowHeight(int rowHeight) {
         if(rowHeight != getRowHeight()) {
             super.setRowHeight(rowHeight);
--- a/jdk/src/java.desktop/share/classes/sun/applet/AppletClassLoader.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/applet/AppletClassLoader.java	Tue Oct 27 01:45:03 2015 -0400
@@ -33,6 +33,7 @@
 import java.net.MalformedURLException;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.io.EOFException;
 import java.io.File;
 import java.io.FilePermission;
 import java.io.IOException;
@@ -51,7 +52,6 @@
 import java.security.PermissionCollection;
 import sun.awt.AppContext;
 import sun.awt.SunToolkit;
-import sun.misc.IOUtils;
 import sun.misc.ManagedLocalsThread;
 import sun.net.www.ParseUtil;
 import sun.security.util.SecurityConstants;
@@ -334,7 +334,9 @@
 
         byte[] b;
         try {
-            b = IOUtils.readFully(in, len, true);
+            b = in.readAllBytes();
+            if (len != -1 && b.length != len)
+                throw new EOFException("Expected:" + len + ", read:" + b.length);
         } finally {
             in.close();
         }
--- a/jdk/src/java.desktop/share/classes/sun/awt/AppContext.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/awt/AppContext.java	Tue Oct 27 01:45:03 2015 -0400
@@ -525,7 +525,10 @@
         }
 
         // Then, we stop any remaining Threads
-        this.threadGroup.stop();
+        AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
+            threadGroup.stop();
+            return null;
+        });
 
         // Next, we sleep 10ms at a time, waiting for all of the active
         // Threads in the ThreadGroup to die.
--- a/jdk/src/java.desktop/share/classes/sun/awt/OSInfo.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/awt/OSInfo.java	Tue Oct 27 01:45:03 2015 -0400
@@ -56,6 +56,7 @@
     public static final WindowsVersion WINDOWS_XP = new WindowsVersion(5, 1);
     public static final WindowsVersion WINDOWS_2003 = new WindowsVersion(5, 2);
     public static final WindowsVersion WINDOWS_VISTA = new WindowsVersion(6, 0);
+    public static final WindowsVersion WINDOWS_7 = new WindowsVersion(6, 1);
 
     private static final String OS_NAME = "os.name";
     private static final String OS_VERSION = "os.version";
@@ -70,6 +71,7 @@
         windowsVersionMap.put(WINDOWS_XP.toString(), WINDOWS_XP);
         windowsVersionMap.put(WINDOWS_2003.toString(), WINDOWS_2003);
         windowsVersionMap.put(WINDOWS_VISTA.toString(), WINDOWS_VISTA);
+        windowsVersionMap.put(WINDOWS_VISTA.toString(), WINDOWS_7);
     }
 
     private static final PrivilegedAction<OSType> osTypeAction = new PrivilegedAction<OSType>() {
--- a/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Tue Oct 27 01:45:03 2015 -0400
@@ -651,16 +651,20 @@
 
 
     @SuppressWarnings("deprecation")
-    static final SoftCache imgCache = new SoftCache();
+    static final SoftCache fileImgCache = new SoftCache();
+
+    @SuppressWarnings("deprecation")
+    static final SoftCache urlImgCache = new SoftCache();
 
     static Image getImageFromHash(Toolkit tk, URL url) {
         checkPermissions(url);
-        synchronized (imgCache) {
-            Image img = (Image)imgCache.get(url);
+        synchronized (urlImgCache) {
+            String key = url.toString();
+            Image img = (Image)urlImgCache.get(key);
             if (img == null) {
                 try {
                     img = tk.createImage(new URLImageSource(url));
-                    imgCache.put(url, img);
+                    urlImgCache.put(key, img);
                 } catch (Exception e) {
                 }
             }
@@ -671,12 +675,12 @@
     static Image getImageFromHash(Toolkit tk,
                                                String filename) {
         checkPermissions(filename);
-        synchronized (imgCache) {
-            Image img = (Image)imgCache.get(filename);
+        synchronized (fileImgCache) {
+            Image img = (Image)fileImgCache.get(filename);
             if (img == null) {
                 try {
                     img = tk.createImage(new FileImageSource(filename));
-                    imgCache.put(filename, img);
+                    fileImgCache.put(filename, img);
                 } catch (Exception e) {
                 }
             }
@@ -696,28 +700,29 @@
 
     protected Image getImageWithResolutionVariant(String fileName,
             String resolutionVariantName) {
-        synchronized (imgCache) {
+        synchronized (fileImgCache) {
             Image image = getImageFromHash(this, fileName);
             if (image instanceof MultiResolutionImage) {
                 return image;
             }
             Image resolutionVariant = getImageFromHash(this, resolutionVariantName);
             image = createImageWithResolutionVariant(image, resolutionVariant);
-            imgCache.put(fileName, image);
+            fileImgCache.put(fileName, image);
             return image;
         }
     }
 
     protected Image getImageWithResolutionVariant(URL url,
             URL resolutionVariantURL) {
-        synchronized (imgCache) {
+        synchronized (urlImgCache) {
             Image image = getImageFromHash(this, url);
             if (image instanceof MultiResolutionImage) {
                 return image;
             }
             Image resolutionVariant = getImageFromHash(this, resolutionVariantURL);
             image = createImageWithResolutionVariant(image, resolutionVariant);
-            imgCache.put(url, image);
+            String key = url.toString();
+            urlImgCache.put(key, image);
             return image;
         }
     }
@@ -828,8 +833,13 @@
         return null;
     }
 
-    protected static boolean imageCached(Object key) {
-        return imgCache.containsKey(key);
+    protected static boolean imageCached(String fileName) {
+        return fileImgCache.containsKey(fileName);
+    }
+
+    protected static boolean imageCached(URL url) {
+        String key = url.toString();
+        return urlImgCache.containsKey(key);
     }
 
     protected static boolean imageExists(String filename) {
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/BufferedImageGraphicsConfig.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/BufferedImageGraphicsConfig.java	Tue Oct 27 01:45:03 2015 -0400
@@ -67,7 +67,6 @@
     GraphicsDevice gd;
     ColorModel model;
     Raster raster;
-    int width, height;
 
     public BufferedImageGraphicsConfig(BufferedImage bufImg, Component comp) {
         if (comp == null) {
@@ -78,8 +77,6 @@
         }
         this.model = bufImg.getColorModel();
         this.raster = bufImg.getRaster().createCompatibleWritableRaster(1, 1);
-        this.width = bufImg.getWidth();
-        this.height = bufImg.getHeight();
     }
 
     /**
@@ -168,6 +165,6 @@
     }
 
     public Rectangle getBounds() {
-        return new Rectangle(0, 0, width, height);
+        return new Rectangle(0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE);
     }
 }
--- a/jdk/src/java.desktop/share/native/libfontmanager/freetypeScaler.c	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/freetypeScaler.c	Tue Oct 27 01:45:03 2015 -0400
@@ -60,6 +60,7 @@
     JNIEnv* env;
     FT_Library library;
     FT_Face face;
+    FT_Stream faceStream;
     jobject font2D;
     jobject directBuffer;
 
@@ -107,16 +108,10 @@
     if (scalerInfo == NULL)
         return;
 
-    //apparently Done_Face will only close the stream
-    // but will not relase the memory of stream structure.
-    // We need to free it explicitly to avoid leak.
-    //Direct access to the stream field might be not ideal solution as
-    // it is considred to be "private".
-    //Alternatively we could have stored pointer to the structure
-    // in the scalerInfo but this will increase size of the structure
-    // for no good reason
-    stream = scalerInfo->face->stream;
-
+    // FT_Done_Face always closes the stream, but only frees the memory
+    // of the data structure if it was internally allocated by FT.
+    // We hold on to a pointer to the stream structure if we provide it
+    // ourselves, so that we can free it here.
     FT_Done_Face(scalerInfo->face);
     FT_Done_FreeType(scalerInfo->library);
 
@@ -128,10 +123,9 @@
         free(scalerInfo->fontData);
     }
 
-   if (stream != NULL) {
-        free(stream);
-   }
-
+    if (scalerInfo->faceStream != NULL) {
+        free(scalerInfo->faceStream);
+    }
     free(scalerInfo);
 }
 
@@ -302,6 +296,9 @@
                                          &ft_open_args,
                                          indexInCollection,
                                          &scalerInfo->face);
+                    if (!error) {
+                        scalerInfo->faceStream = ftstream;
+                    }
                 }
                 if (error || scalerInfo->directBuffer == NULL) {
                     free(ftstream);
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -76,14 +76,14 @@
     }
 
     if (flags & irfMarkFirst) {
-        firstGlyph = currGlyph;
+        firstGlyph = (le_uint32)currGlyph;
     }
 
     if (flags & irfMarkLast) {
-        lastGlyph = currGlyph;
+        lastGlyph = (le_uint32)currGlyph;
     }
 
-    doRearrangementAction(glyphStorage, (IndicRearrangementVerb) (flags & irfVerbMask));
+    doRearrangementAction(glyphStorage, (IndicRearrangementVerb) (flags & irfVerbMask), success);
 
     if (!(flags & irfDontAdvance)) {
         // XXX: Should handle reverse too...
@@ -97,18 +97,29 @@
 {
 }
 
-void IndicRearrangementProcessor::doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb) const
+void IndicRearrangementProcessor::doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb, LEErrorCode &success) const
 {
     LEGlyphID a, b, c, d;
     le_int32 ia, ib, ic, id, ix, x;
-    LEErrorCode success = LE_NO_ERROR;
+
+    if (LE_FAILURE(success)) return;
+
+    if (verb == irvNoAction) {
+        return;
+    }
+    if (firstGlyph > lastGlyph) {
+        success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+        return;
+    }
 
     switch(verb)
     {
-    case irvNoAction:
+    case irvxA:
+        if (firstGlyph == lastGlyph) break;
+        if (firstGlyph + 1 < firstGlyph) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
         break;
-
-    case irvxA:
+        }
         a = glyphStorage[firstGlyph];
         ia = glyphStorage.getCharIndex(firstGlyph, success);
         x = firstGlyph + 1;
@@ -125,6 +136,11 @@
         break;
 
     case irvDx:
+        if (firstGlyph == lastGlyph) break;
+        if (lastGlyph - 1 > lastGlyph) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         d = glyphStorage[lastGlyph];
         id = glyphStorage.getCharIndex(lastGlyph, success);
         x = lastGlyph - 1;
@@ -153,6 +169,11 @@
         break;
 
     case irvxAB:
+        if ((firstGlyph + 2 < firstGlyph) ||
+            (lastGlyph - firstGlyph < 1)) { // difference == 1 is a no-op, < 1 is an error.
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
         ia = glyphStorage.getCharIndex(firstGlyph, success);
@@ -174,6 +195,11 @@
         break;
 
     case irvxBA:
+        if ((firstGlyph + 2 < firstGlyph) ||
+            (lastGlyph - firstGlyph < 1)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
         ia = glyphStorage.getCharIndex(firstGlyph, success);
@@ -195,6 +221,11 @@
         break;
 
     case irvCDx:
+        if ((lastGlyph - 2 > lastGlyph) ||
+            (lastGlyph - firstGlyph < 1)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         c = glyphStorage[lastGlyph - 1];
         d = glyphStorage[lastGlyph];
         ic = glyphStorage.getCharIndex(lastGlyph - 1, success);
@@ -216,6 +247,11 @@
         break;
 
     case irvDCx:
+        if ((lastGlyph - 2 > lastGlyph) ||
+            (lastGlyph - firstGlyph < 1)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         c = glyphStorage[lastGlyph - 1];
         d = glyphStorage[lastGlyph];
         ic = glyphStorage.getCharIndex(lastGlyph - 1, success);
@@ -237,6 +273,11 @@
         break;
 
     case irvCDxA:
+        if ((lastGlyph - 2 > lastGlyph) ||
+            (lastGlyph - firstGlyph < 2)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         c = glyphStorage[lastGlyph - 1];
         d = glyphStorage[lastGlyph];
@@ -262,6 +303,11 @@
         break;
 
     case irvDCxA:
+        if ((lastGlyph - 2 > lastGlyph) ||
+            (lastGlyph - firstGlyph < 2)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         c = glyphStorage[lastGlyph - 1];
         d = glyphStorage[lastGlyph];
@@ -287,6 +333,11 @@
         break;
 
     case irvDxAB:
+        if ((firstGlyph + 2 < firstGlyph) ||
+            (lastGlyph - firstGlyph < 2)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
         d = glyphStorage[lastGlyph];
@@ -312,6 +363,11 @@
         break;
 
     case irvDxBA:
+        if ((firstGlyph + 2 < firstGlyph) ||
+            (lastGlyph - firstGlyph < 2)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
         d = glyphStorage[lastGlyph];
@@ -337,6 +393,10 @@
         break;
 
     case irvCDxAB:
+        if (lastGlyph - firstGlyph < 3) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
 
@@ -359,6 +419,10 @@
         break;
 
     case irvCDxBA:
+        if (lastGlyph - firstGlyph < 3) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
 
@@ -381,6 +445,10 @@
         break;
 
     case irvDCxAB:
+        if (lastGlyph - firstGlyph < 3) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
 
@@ -403,6 +471,10 @@
         break;
 
     case irvDCxBA:
+        if (lastGlyph - firstGlyph < 3) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
 
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor.h	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor.h	Tue Oct 27 01:45:03 2015 -0400
@@ -56,7 +56,7 @@
 
     virtual void endStateTable();
 
-    void doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb) const;
+    void doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb, LEErrorCode &success) const;
 
     IndicRearrangementProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success);
     virtual ~IndicRearrangementProcessor();
@@ -76,8 +76,8 @@
     static UClassID getStaticClassID();
 
 protected:
-    le_int32 firstGlyph;
-    le_int32 lastGlyph;
+    le_uint32 firstGlyph;
+    le_uint32 lastGlyph;
 
     LEReferenceTo<IndicRearrangementSubtableHeader> indicRearrangementSubtableHeader;
     LEReferenceToArrayOf<IndicRearrangementStateEntry> entryTable;
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor2.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor2.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -74,14 +74,14 @@
     }
 
     if (flags & irfMarkFirst) {
-        firstGlyph = currGlyph;
+        firstGlyph = (le_uint32)currGlyph;
     }
 
     if (flags & irfMarkLast) {
-        lastGlyph = currGlyph;
+        lastGlyph = (le_uint32)currGlyph;
     }
 
-    doRearrangementAction(glyphStorage, (IndicRearrangementVerb) (flags & irfVerbMask));
+    doRearrangementAction(glyphStorage, (IndicRearrangementVerb) (flags & irfVerbMask), success);
 
     if (!(flags & irfDontAdvance)) {
         currGlyph += dir;
@@ -94,18 +94,29 @@
 {
 }
 
-void IndicRearrangementProcessor2::doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb) const
+void IndicRearrangementProcessor2::doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb, LEErrorCode &success) const
 {
     LEGlyphID a, b, c, d;
     le_int32 ia, ib, ic, id, ix, x;
-    LEErrorCode success = LE_NO_ERROR;
+
+    if (LE_FAILURE(success)) return;
+
+    if (verb == irvNoAction) {
+        return;
+    }
+    if (firstGlyph > lastGlyph) {
+        success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+        return;
+    }
 
     switch(verb)
     {
-    case irvNoAction:
+    case irvxA:
+        if (firstGlyph == lastGlyph) break;
+        if (firstGlyph + 1 < firstGlyph) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
         break;
-
-    case irvxA:
+        }
         a = glyphStorage[firstGlyph];
         ia = glyphStorage.getCharIndex(firstGlyph, success);
         x = firstGlyph + 1;
@@ -122,6 +133,11 @@
         break;
 
     case irvDx:
+        if (firstGlyph == lastGlyph) break;
+        if (lastGlyph - 1 > lastGlyph) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         d = glyphStorage[lastGlyph];
         id = glyphStorage.getCharIndex(lastGlyph, success);
         x = lastGlyph - 1;
@@ -150,6 +166,11 @@
         break;
 
     case irvxAB:
+        if ((firstGlyph + 2 < firstGlyph) ||
+            (lastGlyph - firstGlyph < 1)) { // difference == 1 is a no-op, < 1 is an error.
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
         ia = glyphStorage.getCharIndex(firstGlyph, success);
@@ -171,6 +192,11 @@
         break;
 
     case irvxBA:
+        if ((firstGlyph + 2 < firstGlyph) ||
+            (lastGlyph - firstGlyph < 1)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
         ia = glyphStorage.getCharIndex(firstGlyph, success);
@@ -192,6 +218,11 @@
         break;
 
     case irvCDx:
+        if ((lastGlyph - 2 > lastGlyph) ||
+            (lastGlyph - firstGlyph < 1)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         c = glyphStorage[lastGlyph - 1];
         d = glyphStorage[lastGlyph];
         ic = glyphStorage.getCharIndex(lastGlyph - 1, success);
@@ -213,6 +244,11 @@
         break;
 
     case irvDCx:
+        if ((lastGlyph - 2 > lastGlyph) ||
+            (lastGlyph - firstGlyph < 1)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         c = glyphStorage[lastGlyph - 1];
         d = glyphStorage[lastGlyph];
         ic = glyphStorage.getCharIndex(lastGlyph - 1, success);
@@ -234,6 +270,11 @@
         break;
 
     case irvCDxA:
+        if ((lastGlyph - 2 > lastGlyph) ||
+            (lastGlyph - firstGlyph < 2)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         c = glyphStorage[lastGlyph - 1];
         d = glyphStorage[lastGlyph];
@@ -259,6 +300,11 @@
         break;
 
     case irvDCxA:
+        if ((lastGlyph - 2 > lastGlyph) ||
+            (lastGlyph - firstGlyph < 2)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         c = glyphStorage[lastGlyph - 1];
         d = glyphStorage[lastGlyph];
@@ -284,6 +330,11 @@
         break;
 
     case irvDxAB:
+        if ((firstGlyph + 2 < firstGlyph) ||
+            (lastGlyph - firstGlyph < 2)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
         d = glyphStorage[lastGlyph];
@@ -309,6 +360,11 @@
         break;
 
     case irvDxBA:
+        if ((firstGlyph + 2 < firstGlyph) ||
+            (lastGlyph - firstGlyph < 2)) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
         d = glyphStorage[lastGlyph];
@@ -334,6 +390,10 @@
         break;
 
     case irvCDxAB:
+        if (lastGlyph - firstGlyph < 3) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
 
@@ -356,6 +416,10 @@
         break;
 
     case irvCDxBA:
+        if (lastGlyph - firstGlyph < 3) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
 
@@ -378,6 +442,10 @@
         break;
 
     case irvDCxAB:
+        if (lastGlyph - firstGlyph < 3) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
 
@@ -400,6 +468,10 @@
         break;
 
     case irvDCxBA:
+        if (lastGlyph - firstGlyph < 3) {
+            success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+            break;
+        }
         a = glyphStorage[firstGlyph];
         b = glyphStorage[firstGlyph + 1];
 
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor2.h	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/IndicRearrangementProcessor2.h	Tue Oct 27 01:45:03 2015 -0400
@@ -56,7 +56,7 @@
 
     virtual void endStateTable();
 
-    void doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb) const;
+    void doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb, LEErrorCode &success) const;
 
     IndicRearrangementProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success);
     virtual ~IndicRearrangementProcessor2();
@@ -76,8 +76,8 @@
     static UClassID getStaticClassID();
 
 protected:
-    le_int32 firstGlyph;
-    le_int32 lastGlyph;
+    le_uint32 firstGlyph;
+    le_uint32 lastGlyph;
 
     LEReferenceToArrayOf<IndicRearrangementStateEntry2> entryTable;
     LEReferenceTo<IndicRearrangementSubtableHeader2> indicRearrangementSubtableHeader;
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/LookupTables.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/LookupTables.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -91,6 +91,10 @@
     LEReferenceTo<LookupSingle> entry(base, success, entries);
     LEReferenceTo<LookupSingle> trial(entry, success, extra);
 
+    if (!LE_SUCCESS(success)) {
+        return NULL;
+    }
+
     if (SWAPW(trial->glyph) <= ttGlyph) {
         entry = trial;
     }
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/MorphTables.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/MorphTables.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -75,6 +75,7 @@
                     return;
                 }
                 subtableHeader.addOffset(length, success);
+                if (LE_FAILURE(success)) break;
             }
             SubtableCoverage coverage = SWAPW(subtableHeader->coverage);
             FeatureFlags subtableFeatures = SWAPL(subtableHeader->subtableFeatures);
@@ -91,6 +92,8 @@
 {
     SubtableProcessor *processor = NULL;
 
+    if (LE_FAILURE(success)) return;
+
     switch (SWAPW(coverage) & scfTypeMask)
     {
     case mstIndicRearrangement:
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/MorphTables2.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/MorphTables2.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -197,6 +197,7 @@
                   return;
               }
               subtableHeader.addOffset(length, success); // Don't addOffset for the last entry.
+              if (LE_FAILURE(success)) break;
             }
             le_uint32 coverage = SWAPL(subtableHeader->coverage);
             FeatureFlags subtableFeatures = SWAPL(subtableHeader->subtableFeatures);
@@ -212,6 +213,8 @@
 {
     SubtableProcessor2 *processor = NULL;
 
+    if (LE_FAILURE(success)) return;
+
     switch (SWAPL(coverage) & scfTypeMask2)
     {
     case mstIndicRearrangement:
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/SegmentArrayProcessor.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/SegmentArrayProcessor.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -63,6 +63,8 @@
     le_int32 glyphCount = glyphStorage.getGlyphCount();
     le_int32 glyph;
 
+    if (LE_FAILURE(success)) return;
+
     for (glyph = 0; glyph < glyphCount; glyph += 1) {
         LEGlyphID thisGlyph = glyphStorage[glyph];
         const LookupSegment *lookupSegment = segmentArrayLookupTable->lookupSegment(segmentArrayLookupTable, segments, thisGlyph, success);
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/SegmentArrayProcessor2.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/SegmentArrayProcessor2.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -63,6 +63,8 @@
     le_int32 glyphCount = glyphStorage.getGlyphCount();
     le_int32 glyph;
 
+    if (LE_FAILURE(success)) return;
+
     for (glyph = 0; glyph < glyphCount; glyph += 1) {
         LEGlyphID thisGlyph = glyphStorage[glyph];
         // lookupSegment already range checked by lookupSegment() function.
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/SegmentSingleProcessor2.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/SegmentSingleProcessor2.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -64,6 +64,8 @@
     le_int32 glyphCount = glyphStorage.getGlyphCount();
     le_int32 glyph;
 
+    if (LE_FAILURE(success)) return;
+
     for (glyph = 0; glyph < glyphCount; glyph += 1) {
         LEGlyphID thisGlyph = glyphStorage[glyph];
         const LookupSegment *lookupSegment = segmentSingleLookupTable->lookupSegment(segmentSingleLookupTable, segments, thisGlyph, success);
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/SimpleArrayProcessor2.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/SimpleArrayProcessor2.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -61,10 +61,11 @@
 
 void SimpleArrayProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
 {
-    if (LE_FAILURE(success)) return;
     le_int32 glyphCount = glyphStorage.getGlyphCount();
     le_int32 glyph;
 
+    if (LE_FAILURE(success)) return;
+
     for (glyph = 0; glyph < glyphCount; glyph += 1) {
         LEGlyphID thisGlyph = glyphStorage[glyph];
         if (LE_GET_GLYPH(thisGlyph) < 0xFFFF) {
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/SingleTableProcessor.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/SingleTableProcessor.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -63,6 +63,8 @@
     le_int32 glyph;
     le_int32 glyphCount = glyphStorage.getGlyphCount();
 
+    if (LE_FAILURE(success)) return;
+
     for (glyph = 0; glyph < glyphCount; glyph += 1) {
       const LookupSingle *lookupSingle = singleTableLookupTable->lookupSingle(singleTableLookupTable, entries, glyphStorage[glyph], success);
 
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java	Tue Oct 27 01:45:03 2015 -0400
@@ -792,8 +792,8 @@
         XToolkit.awtLock();
         try {
             updateSizeHints(rec.x, rec.y, rec.width, rec.height);
-            XlibWrapper.XResizeWindow(XToolkit.getDisplay(), getShell(), rec.width, rec.height);
-            XlibWrapper.XMoveWindow(XToolkit.getDisplay(), getShell(), rec.x, rec.y);
+            XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), getShell(),
+                            rec.x, rec.y, rec.width, rec.height);
         }
         finally {
             XToolkit.awtUnlock();
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -4058,14 +4058,19 @@
     return (HWND)NULL;
 }
 
-/* Call DefWindowProc for the focus proxy, if any */
+/* Redirects message to the focus proxy, if any */
 void AwtComponent::CallProxyDefWindowProc(UINT message, WPARAM wParam,
     LPARAM lParam, LRESULT &retVal, MsgRouting &mr)
 {
     if (mr != mrConsume)  {
         HWND proxy = GetProxyFocusOwner();
         if (proxy != NULL && ::IsWindowEnabled(proxy)) {
-            retVal = ComCtl32Util::GetInstance().DefWindowProc(NULL, proxy, message, wParam, lParam);
+            if (proxy != GetHWnd()) {
+                retVal = ::SendMessage(proxy, message, wParam, lParam);
+            } else {
+                retVal = ComCtl32Util::GetInstance().DefWindowProc(NULL,
+                                                proxy, message, wParam, lParam);
+            }
             mr = mrConsume;
         }
     }
--- a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java	Tue Oct 27 01:45:03 2015 -0400
@@ -32,8 +32,14 @@
 import java.lang.ref.ReferenceQueue;
 import java.lang.ref.WeakReference;
 import java.util.concurrent.ConcurrentHashMap;
+import java.nio.file.Paths;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.locks.ReentrantLock;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 import jdk.internal.misc.JavaAWTAccess;
 import jdk.internal.misc.SharedSecrets;
 import sun.misc.ManagedLocalsThread;
@@ -57,37 +63,28 @@
  * <p>
  * At startup the LogManager class is located using the
  * java.util.logging.manager system property.
+ *
+ * <h3>LogManager Configuration</h3>
+ *
+ * A LogManager initializes the logging configuration via
+ * the {@link #readConfiguration()} method during LogManager initialization.
+ * By default, LogManager default configuration is used.
+ * The logging configuration read by LogManager must be in the
+ * {@linkplain Properties properties file} format.
  * <p>
  * The LogManager defines two optional system properties that allow control over
- * the initial configuration:
+ * the initial configuration, as specified in the {@link #readConfiguration()}
+ * method:
  * <ul>
  * <li>"java.util.logging.config.class"
  * <li>"java.util.logging.config.file"
  * </ul>
- * These two properties may be specified on the command line to the "java"
+ * <p>
+ * These two system properties may be specified on the command line to the "java"
  * command, or as system property definitions passed to JNI_CreateJavaVM.
  * <p>
- * If the "java.util.logging.config.class" property is set, then the
- * property value is treated as a class name.  The given class will be
- * loaded, an object will be instantiated, and that object's constructor
- * is responsible for reading in the initial configuration.  (That object
- * may use other system properties to control its configuration.)  The
- * alternate configuration class can use {@code readConfiguration(InputStream)}
- * to define properties in the LogManager.
- * <p>
- * If "java.util.logging.config.class" property is <b>not</b> set,
- * then the "java.util.logging.config.file" system property can be used
- * to specify a properties file (in java.util.Properties format). The
- * initial logging configuration will be read from this file.
- * <p>
- * If neither of these properties is defined then the LogManager uses its
- * default configuration. The default configuration is typically loaded from the
- * properties file "{@code conf/logging.properties}" in the Java installation
- * directory.
- * <p>
- * The properties for loggers and Handlers will have names starting
- * with the dot-separated name for the handler or logger.
- * <p>
+ * The {@linkplain Properties properties} for loggers and Handlers will have
+ * names starting with the dot-separated name for the handler or logger.<br>
  * The global logging properties may include:
  * <ul>
  * <li>A property "handlers".  This defines a whitespace or comma separated
@@ -788,7 +785,7 @@
             // instantiation of the handler is done in the LogManager.addLogger
             // implementation as a handler class may be only visible to LogManager
             // subclass for the custom log manager case
-            processParentHandlers(logger, name);
+            processParentHandlers(logger, name, VisitedLoggers.NEVER);
 
             // Find the new node and its parent.
             LogNode node = getNode(name);
@@ -836,7 +833,8 @@
 
         // If logger.getUseParentHandlers() returns 'true' and any of the logger's
         // parents have levels or handlers defined, make sure they are instantiated.
-        private void processParentHandlers(final Logger logger, final String name) {
+        private void processParentHandlers(final Logger logger, final String name,
+               Predicate<Logger> visited) {
             final LogManager owner = getOwner();
             AccessController.doPrivileged(new PrivilegedAction<Void>() {
                 @Override
@@ -862,7 +860,9 @@
                     owner.getProperty(pname + ".handlers") != null) {
                     // This pname has a level/handlers definition.
                     // Make sure it exists.
-                    demandLogger(pname, null, null);
+                    if (visited.test(demandLogger(pname, null, null))) {
+                        break;
+                    }
                 }
                 ix = ix2+1;
             }
@@ -942,48 +942,64 @@
     private void loadLoggerHandlers(final Logger logger, final String name,
                                     final String handlersPropertyName)
     {
-        AccessController.doPrivileged(new PrivilegedAction<Object>() {
+        AccessController.doPrivileged(new PrivilegedAction<Void>() {
             @Override
-            public Object run() {
-                String names[] = parseClassNames(handlersPropertyName);
-                final boolean ensureCloseOnReset = names.length > 0
-                    && getBooleanProperty(handlersPropertyName + ".ensureCloseOnReset",true);
-
-                int count = 0;
-                for (String type : names) {
-                    try {
-                        Class<?> clz = ClassLoader.getSystemClassLoader().loadClass(type);
-                        Handler hdl = (Handler) clz.newInstance();
-                        // Check if there is a property defining the
-                        // this handler's level.
-                        String levs = getProperty(type + ".level");
-                        if (levs != null) {
-                            Level l = Level.findLevel(levs);
-                            if (l != null) {
-                                hdl.setLevel(l);
-                            } else {
-                                // Probably a bad level. Drop through.
-                                System.err.println("Can't set level for " + type);
-                            }
-                        }
-                        // Add this Handler to the logger
-                        logger.addHandler(hdl);
-                        if (++count == 1 && ensureCloseOnReset) {
-                            // add this logger to the closeOnResetLoggers list.
-                            closeOnResetLoggers.addIfAbsent(CloseOnReset.create(logger));
-                        }
-                    } catch (Exception ex) {
-                        System.err.println("Can't load log handler \"" + type + "\"");
-                        System.err.println("" + ex);
-                        ex.printStackTrace();
-                    }
-                }
-
+            public Void run() {
+                setLoggerHandlers(logger, name, handlersPropertyName,
+                    createLoggerHandlers(name, handlersPropertyName));
                 return null;
             }
         });
     }
 
+    private void setLoggerHandlers(final Logger logger, final String name,
+                                   final String handlersPropertyName,
+                                   List<Handler> handlers)
+    {
+        final boolean ensureCloseOnReset = ! handlers.isEmpty()
+                    && getBooleanProperty(handlersPropertyName + ".ensureCloseOnReset",true);
+        int count = 0;
+        for (Handler hdl : handlers) {
+            logger.addHandler(hdl);
+            if (++count == 1 && ensureCloseOnReset) {
+                // add this logger to the closeOnResetLoggers list.
+                closeOnResetLoggers.addIfAbsent(CloseOnReset.create(logger));
+            }
+        }
+    }
+
+    private List<Handler> createLoggerHandlers(final String name, final String handlersPropertyName)
+    {
+        String names[] = parseClassNames(handlersPropertyName);
+        List<Handler> handlers = new ArrayList<>(names.length);
+        for (String type : names) {
+            try {
+                Class<?> clz = ClassLoader.getSystemClassLoader().loadClass(type);
+                Handler hdl = (Handler) clz.newInstance();
+                // Check if there is a property defining the
+                // this handler's level.
+                String levs = getProperty(type + ".level");
+                if (levs != null) {
+                    Level l = Level.findLevel(levs);
+                    if (l != null) {
+                        hdl.setLevel(l);
+                    } else {
+                        // Probably a bad level. Drop through.
+                        System.err.println("Can't set level for " + type);
+                    }
+                }
+                // Add this Handler to the logger
+                handlers.add(hdl);
+            } catch (Exception ex) {
+                System.err.println("Can't load log handler \"" + type + "\"");
+                System.err.println("" + ex);
+                ex.printStackTrace();
+            }
+        }
+
+        return handlers;
+    }
+
 
     // loggerRefQueue holds LoggerWeakRef objects for Logger objects
     // that have been GC'ed.
@@ -1242,21 +1258,48 @@
     }
 
     /**
-     * Reinitialize the logging properties and reread the logging configuration.
+     * Reads and initializes the logging configuration.
+     * <p>
+     * If the "java.util.logging.config.class" system property is set, then the
+     * property value is treated as a class name.  The given class will be
+     * loaded, an object will be instantiated, and that object's constructor
+     * is responsible for reading in the initial configuration.  (That object
+     * may use other system properties to control its configuration.)  The
+     * alternate configuration class can use {@code readConfiguration(InputStream)}
+     * to define properties in the LogManager.
      * <p>
-     * The same rules are used for locating the configuration properties
-     * as are used at startup.  So normally the logging properties will
-     * be re-read from the same file that was used at startup.
-     * <P>
-     * Any log level definitions in the new configuration file will be
-     * applied using Logger.setLevel(), if the target Logger exists.
+     * If "java.util.logging.config.class" system property is <b>not</b> set,
+     * then this method will read the initial configuration from a properties
+     * file and calls the {@link #readConfiguration(InputStream)} method to initialize
+     * the configuration. The "java.util.logging.config.file" system property can be used
+     * to specify the properties file that will be read as the initial configuration;
+     * if not set, then the LogManager default configuration is used.
+     * The default configuration is typically loaded from the
+     * properties file "{@code conf/logging.properties}" in the Java installation
+     * directory.
+     *
      * <p>
      * Any {@linkplain #addConfigurationListener registered configuration
      * listener} will be invoked after the properties are read.
      *
-     * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have LoggingPermission("control").
-     * @exception  IOException if there are IO problems reading the configuration.
+     * @apiNote This {@code readConfiguration} method should only be used for
+     * initializing the configuration during LogManager initialization or
+     * used with the "java.util.logging.config.class" property.
+     * When this method is called after loggers have been created, and
+     * the "java.util.logging.config.class" system property is not set, all
+     * existing loggers will be {@linkplain #reset() reset}. Then any
+     * existing loggers that have a level property specified in the new
+     * configuration stream will be {@linkplain
+     * Logger#setLevel(java.util.logging.Level) set} to the specified log level.
+     * <p>
+     * To properly update the logging configuration, use the
+     * {@link #updateConfiguration(java.util.function.Function)} or
+     * {@link #updateConfiguration(java.io.InputStream, java.util.function.Function)}
+     * methods instead.
+     *
+     * @throws   SecurityException  if a security manager exists and if
+     *              the caller does not have LoggingPermission("control").
+     * @throws   IOException if there are IO problems reading the configuration.
      */
     public void readConfiguration() throws IOException, SecurityException {
         checkPermission();
@@ -1284,20 +1327,24 @@
             }
         }
 
+        String fname = getConfigurationFileName();
+        try (final InputStream in = new FileInputStream(fname)) {
+            final BufferedInputStream bin = new BufferedInputStream(in);
+            readConfiguration(bin);
+        }
+    }
+
+    String getConfigurationFileName() throws IOException {
         String fname = System.getProperty("java.util.logging.config.file");
         if (fname == null) {
             fname = System.getProperty("java.home");
             if (fname == null) {
                 throw new Error("Can't find java.home ??");
             }
-            File f = new File(fname, "conf");
-            f = new File(f, "logging.properties");
-            fname = f.getCanonicalPath();
+            fname = Paths.get(fname, "conf", "logging.properties")
+                    .toAbsolutePath().normalize().toString();
         }
-        try (final InputStream in = new FileInputStream(fname)) {
-            final BufferedInputStream bin = new BufferedInputStream(in);
-            readConfiguration(bin);
-        }
+        return fname;
     }
 
     /**
@@ -1305,9 +1352,17 @@
      * <p>
      * For all named loggers, the reset operation removes and closes
      * all Handlers and (except for the root logger) sets the level
-     * to null.  The root logger's level is set to Level.INFO.
+     * to {@code null}. The root logger's level is set to {@code Level.INFO}.
      *
-     * @exception  SecurityException  if a security manager exists and if
+     * @apiNote Calling this method also clears the LogManager {@linkplain
+     * #getProperty(java.lang.String) properties}. The {@link
+     * #updateConfiguration(java.util.function.Function)
+     * updateConfiguration(Function)} or
+     * {@link #updateConfiguration(java.io.InputStream, java.util.function.Function)
+     * updateConfiguration(InputStream, Function)} method can be used to
+     * properly update to a new configuration.
+     *
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have LoggingPermission("control").
      */
 
@@ -1421,18 +1476,32 @@
     }
 
     /**
-     * Reinitialize the logging properties and reread the logging configuration
-     * from the given stream, which should be in java.util.Properties format.
+     * Reads and initializes the logging configuration from the given input stream.
+     *
+     * <p>
      * Any {@linkplain #addConfigurationListener registered configuration
      * listener} will be invoked after the properties are read.
      * <p>
-     * Any log level definitions in the new configuration file will be
-     * applied using Logger.setLevel(), if the target Logger exists.
+     * @apiNote This {@code readConfiguration} method should only be used for
+     * initializing the configuration during LogManager initialization or
+     * used with the "java.util.logging.config.class" property.
+     * When this method is called after loggers have been created, all
+     * existing loggers will be {@linkplain #reset() reset}. Then any
+     * existing loggers that have a level property specified in the
+     * given input stream will be {@linkplain
+     * Logger#setLevel(java.util.logging.Level) set} to the specified log level.
+     * <p>
+     * To properly update the logging configuration, use the
+     * {@link #updateConfiguration(java.util.function.Function)} or
+     * {@link #updateConfiguration(java.io.InputStream, java.util.function.Function)}
+     * method instead.
      *
-     * @param ins       stream to read properties from
-     * @exception  SecurityException  if a security manager exists and if
+     * @param ins  stream to read properties from
+     * @throws  SecurityException  if a security manager exists and if
      *             the caller does not have LoggingPermission("control").
-     * @exception  IOException if there are problems reading from the stream.
+     * @throws  IOException if there are problems reading from the stream,
+     *             or the given stream is not in the
+     *             {@linkplain java.util.Properties properties file} format.
      */
     public void readConfiguration(InputStream ins) throws IOException, SecurityException {
         checkPermission();
@@ -1506,6 +1575,633 @@
         invokeConfigurationListeners();
     }
 
+    // This enum enumerate the configuration properties that will be
+    // updated on existing loggers when the configuration is updated
+    // with LogManager.updateConfiguration().
+    //
+    // Note that this works properly only for the global LogManager - as
+    // Handler and its subclasses get their configuration from
+    // LogManager.getLogManager().
+    //
+    static enum ConfigProperty {
+        LEVEL(".level"), HANDLERS(".handlers"), USEPARENT(".useParentHandlers");
+        final String suffix;
+        final int length;
+        private ConfigProperty(String suffix) {
+            this.suffix = Objects.requireNonNull(suffix);
+            length = suffix.length();
+        }
+
+        public boolean handleKey(String key) {
+            if (this == HANDLERS && suffix.substring(1).equals(key)) return true;
+            if (this == HANDLERS && suffix.equals(key)) return false;
+            return key.endsWith(suffix);
+        }
+        String key(String loggerName) {
+            if (this == HANDLERS && (loggerName == null || loggerName.isEmpty())) {
+                return suffix.substring(1);
+            }
+            return loggerName + suffix;
+        }
+        String loggerName(String key) {
+            assert key.equals(suffix.substring(1)) && this == HANDLERS || key.endsWith(suffix);
+            if (this == HANDLERS && suffix.substring(1).equals(key)) return "";
+            return key.substring(0, key.length() - length);
+        }
+
+        /**
+         * If the property is one that should be updated on existing loggers by
+         * updateConfiguration, returns the name of the logger for which the
+         * property is configured. Otherwise, returns null.
+         * @param property a property key in 'props'
+         * @return the name of the logger on which the property is to be set,
+         *         if the property is one that should be updated on existing
+         *         loggers, {@code null} otherwise.
+         */
+        static String getLoggerName(String property) {
+            for (ConfigProperty p : ConfigProperty.ALL) {
+                if (p.handleKey(property)) {
+                    return p.loggerName(property);
+                }
+            }
+            return null; // Not a property that should be updated.
+        }
+
+        /**
+         * Find the ConfigProperty corresponding to the given
+         * property key (may find none).
+         * @param property a property key in 'props'
+         * @return An optional containing a ConfigProperty object,
+         *         if the property is one that should be updated on existing
+         *         loggers, empty otherwise.
+         */
+        static Optional<ConfigProperty> find(String property) {
+            return ConfigProperty.ALL.stream()
+                    .filter(p -> p.handleKey(property))
+                    .findFirst();
+         }
+
+        /**
+         * Returns true if the given property is one that should be updated
+         * on existing loggers.
+         * Used to filter property name streams.
+         * @param property a property key from the configuration.
+         * @return true if this property is of interest for updateConfiguration.
+         */
+        static boolean matches(String property) {
+            return find(property).isPresent();
+        }
+
+        /**
+         * Returns true if the new property value is different from the old,
+         * and therefore needs to be updated on existing loggers.
+         * @param k a property key in the configuration
+         * @param previous the old configuration
+         * @param next the new configuration
+         * @return true if the property is changing value between the two
+         *         configurations.
+         */
+        static boolean needsUpdating(String k, Properties previous, Properties next) {
+            final String p = trim(previous.getProperty(k, null));
+            final String n = trim(next.getProperty(k, null));
+            return ! Objects.equals(p,n);
+        }
+
+        /**
+         * Applies the mapping function for the given key to the next
+         * configuration.
+         * If the mapping function is null then this method does nothing.
+         * Otherwise, it calls the mapping function to compute the value
+         * that should be associated with {@code key} in the resulting
+         * configuration, and applies it to {@code next}.
+         * If the mapping function returns {@code null} the key is removed
+         * from {@code next}.
+         *
+         * @param k a property key in the configuration
+         * @param previous the old configuration
+         * @param next the new configuration (modified by this function)
+         * @param remappingFunction the mapping function.
+         */
+        static void merge(String k, Properties previous, Properties next,
+                          BiFunction<String, String, String> mappingFunction) {
+            String p = trim(previous.getProperty(k, null));
+            String n = trim(next.getProperty(k, null));
+            String mapped = trim(mappingFunction.apply(p,n));
+            if (!Objects.equals(n, mapped)) {
+                if (mapped == null) {
+                    next.remove(k);
+                } else {
+                    next.setProperty(k, mapped);
+                }
+            }
+        }
+
+        private static final EnumSet<ConfigProperty> ALL =
+                EnumSet.allOf(ConfigProperty.class);
+    }
+
+    // trim the value if not null.
+    private static String trim(String value) {
+        return value == null ? null : value.trim();
+    }
+
+    /**
+     * An object that keep track of loggers we have already visited.
+     * Used when updating configuration, to avoid processing the same logger
+     * twice.
+     */
+    static final class VisitedLoggers implements Predicate<Logger> {
+        final IdentityHashMap<Logger,Boolean> visited;
+        private VisitedLoggers(IdentityHashMap<Logger,Boolean> visited) {
+            this.visited = visited;
+        }
+        VisitedLoggers() {
+            this(new IdentityHashMap<>());
+        }
+        @Override
+        public boolean test(Logger logger) {
+            return visited != null && visited.put(logger, Boolean.TRUE) != null;
+        }
+        public void clear() {
+            if (visited != null) visited.clear();
+        }
+
+        // An object that considers that no logger has ever been visited.
+        // This is used when processParentHandlers is called from
+        // LoggerContext.addLocalLogger
+        static final VisitedLoggers NEVER = new VisitedLoggers(null);
+    }
+
+
+    /**
+     * Type of the modification for a given property. One of SAME, ADDED, CHANGED,
+     * or REMOVED.
+     */
+    static enum ModType {
+        SAME,    // property had no value in the old and new conf, or had the
+                 // same value in both.
+        ADDED,   // property had no value in the old conf, but has one in the new.
+        CHANGED, // property has a different value in the old conf and the new conf.
+        REMOVED; // property has no value in the new conf, but had one in the old.
+        static ModType of(String previous, String next) {
+            if (previous == null && next != null) {
+                return ADDED;
+            }
+            if (next == null && previous != null) {
+                return REMOVED;
+            }
+            if (!Objects.equals(trim(previous), trim(next))) {
+                return CHANGED;
+            }
+            return SAME;
+        }
+    }
+
+    /**
+     * Updates the logging configuration.
+     * <p>
+     * If the "java.util.logging.config.file" system property is set,
+     * then the property value specifies the properties file to be read
+     * as the new configuration. Otherwise, the LogManager default
+     * configuration is used.
+     * <br>The default configuration is typically loaded from the
+     * properties file "{@code conf/logging.properties}" in the
+     * Java installation directory.
+     * <p>
+     * This method reads the new configuration and calls the {@link
+     * #updateConfiguration(java.io.InputStream, java.util.function.Function)
+     * updateConfiguration(ins, mapper)} method to
+     * update the configuration.
+     *
+     * @apiNote
+     * This method updates the logging configuration from reading
+     * a properties file and ignores the "java.util.logging.config.class"
+     * system property.  The "java.util.logging.config.class" property is
+     * only used by the {@link #readConfiguration()}  method to load a custom
+     * configuration class as an initial configuration.
+     *
+     * @param mapper a functional interface that takes a configuration
+     *   key <i>k</i> and returns a function <i>f(o,n)</i> whose returned
+     *   value will be applied to the resulting configuration. The
+     *   function <i>f</i> may return {@code null} to indicate that the property
+     *   <i>k</i> will not be added to the resulting configuration.
+     *   <br>
+     *   If {@code mapper} is {@code null} then {@code (k) -> ((o, n) -> n)} is
+     *   assumed.
+     *   <br>
+     *   For each <i>k</i>, the mapped function <i>f</i> will
+     *   be invoked with the value associated with <i>k</i> in the old
+     *   configuration (i.e <i>o</i>) and the value associated with
+     *   <i>k</i> in the new configuration (i.e. <i>n</i>).
+     *   <br>A {@code null} value for <i>o</i> or <i>n</i> indicates that no
+     *   value was present for <i>k</i> in the corresponding configuration.
+     *
+     * @throws  SecurityException  if a security manager exists and if
+     *          the caller does not have LoggingPermission("control"), or
+     *          does not have the permissions required to set up the
+     *          configuration (e.g. open file specified for FileHandlers
+     *          etc...)
+     *
+     * @throws  NullPointerException  if {@code mapper} returns a {@code null}
+     *         function when invoked.
+     *
+     * @throws  IOException if there are problems reading from the
+     *          logging configuration file.
+     *
+     * @see #updateConfiguration(java.io.InputStream, java.util.function.Function)
+     */
+    public void updateConfiguration(Function<String, BiFunction<String,String,String>> mapper)
+            throws IOException {
+        checkPermission();
+        ensureLogManagerInitialized();
+        drainLoggerRefQueueBounded();
+
+        String fname = getConfigurationFileName();
+        try (final InputStream in = new FileInputStream(fname)) {
+            final BufferedInputStream bin = new BufferedInputStream(in);
+            updateConfiguration(bin, mapper);
+        }
+    }
+
+    /**
+     * Updates the logging configuration.
+     * <p>
+     * For each configuration key in the {@linkplain
+     * #getProperty(java.lang.String) existing configuration} and
+     * the given input stream configuration, the given {@code mapper} function
+     * is invoked to map from the configuration key to a function,
+     * <i>f(o,n)</i>, that takes the old value and new value and returns
+     * the resulting value to be applied in the resulting configuration,
+     * as specified in the table below.
+     * <p>Let <i>k</i> be a configuration key in the old or new configuration,
+     * <i>o</i> be the old value (i.e. the value associated
+     * with <i>k</i> in the old configuration), <i>n</i> be the
+     * new value (i.e. the value associated with <i>k</i> in the new
+     * configuration), and <i>f</i> be the function returned
+     * by {@code mapper.apply(}<i>k</i>{@code )}: then <i>v = f(o,n)</i> is the
+     * resulting value. If <i>v</i> is not {@code null}, then a property
+     * <i>k</i> with value <i>v</i> will be added to the resulting configuration.
+     * Otherwise, it will be omitted.
+     * <br>A {@code null} value may be passed to function
+     * <i>f</i> to indicate that the corresponding configuration has no
+     * configuration key <i>k</i>.
+     * The function <i>f</i> may return {@code null} to indicate that
+     * there will be no value associated with <i>k</i> in the resulting
+     * configuration.
+     * <p>
+     * If {@code mapper} is {@code null}, then <i>v</i> will be set to
+     * <i>n</i>.
+     * <p>
+     * LogManager {@linkplain #getProperty(java.lang.String) properties} are
+     * updated with the resulting value in the resulting configuration.
+     * <p>
+     * The registered {@linkplain #addConfigurationListener configuration
+     * listeners} will be invoked after the configuration is successfully updated.
+     * <br><br>
+     * <table summary="Updating configuration properties">
+     * <tr>
+     * <th>Property</th>
+     * <th>Resulting Behavior</th>
+     * </tr>
+     * <tr>
+     * <td valign="top">{@code <logger>.level}</td>
+     * <td>
+     * <ul>
+     *   <li>If the resulting configuration defines a level for a logger and
+     *       if the resulting level is different than the level specified in the
+     *       the old configuration, or not specified in
+     *       the old configuration, then if the logger exists or if children for
+     *       that logger exist, the level for that logger will be updated,
+     *       and the change propagated to any existing logger children.
+     *       This may cause the logger to be created, if necessary.
+     *   </li>
+     *   <li>If the old configuration defined a level for a logger, and the
+     *       resulting configuration doesn't, then this change will not be
+     *       propagated to existing loggers, if any.
+     *       To completely replace a configuration - the caller should therefore
+     *       call {@link #reset() reset} to empty the current configuration,
+     *       before calling {@code updateConfiguration}.
+     *   </li>
+     * </ul>
+     * </td>
+     * <tr>
+     * <td valign="top">{@code <logger>.useParentHandlers}</td>
+     * <td>
+     * <ul>
+     *   <li>If either the resulting or the old value for the useParentHandlers
+     *       property is not null, then if the logger exists or if children for
+     *       that logger exist, that logger will be updated to the resulting
+     *       value.
+     *       The value of the useParentHandlers property is the value specified
+     *       in the configuration; if not specified, the default is true.
+     *   </li>
+     * </ul>
+     * </td>
+     * </tr>
+     * <tr>
+     * <td valign="top">{@code <logger>.handlers}</td>
+     * <td>
+     * <ul>
+     *   <li>If the resulting configuration defines a list of handlers for a
+     *       logger, and if the resulting list is different than the list
+     *       specified in the old configuration for that logger (that could be
+     *       empty), then if the logger exists or its children exist, the
+     *       handlers associated with that logger are closed and removed and
+     *       the new handlers will be created per the resulting configuration
+     *       and added to that logger, creating that logger if necessary.
+     *   </li>
+     *   <li>If the old configuration defined some handlers for a logger, and
+     *       the resulting configuration doesn't, if that logger exists,
+     *       its handlers will be removed and closed.
+     *   </li>
+     *   <li>Changing the list of handlers on an existing logger will cause all
+     *       its previous handlers to be removed and closed, regardless of whether
+     *       they had been created from the configuration or programmatically.
+     *       The old handlers will be replaced by new handlers, if any.
+     *   </li>
+     * </ul>
+     * </td>
+     * </tr>
+     * <tr>
+     * <td valign="top">{@code <handler-name>.*}</td>
+     * <td>
+     * <ul>
+     *   <li>Properties configured/changed on handler classes will only affect
+     *       newly created handlers. If a node is configured with the same list
+     *       of handlers in the old and the resulting configuration, then these
+     *       handlers will remain unchanged.
+     *   </li>
+     * </ul>
+     * </td>
+     * </tr>
+     * <tr>
+     * <td valign="top">{@code config} and any other property</td>
+     * <td>
+     * <ul>
+     *   <li>The resulting value for these property will be stored in the
+     *   LogManager properties, but {@code updateConfiguration} will not parse
+     *   or process their values.
+     *   </li>
+     * </ul>
+     * </td>
+     * </tr>
+     * </table>
+     * <p>
+     * <em>Example mapper functions:</em>
+     * <br><br>
+     * <ul>
+     * <li>Replace all logging properties with the new configuration:
+     * <br><br>{@code     (k) -> ((o, n) -> n)}:
+     * <br><br>this is equivalent to passing a null {@code mapper} parameter.
+     * </li>
+     * <li>Merge the new configuration and old configuration and use the
+     * new value if <i>k</i> exists in the new configuration:
+     * <br><br>{@code     (k) -> ((o, n) -> n == null ? o : n)}:
+     * <br><br>as if merging two collections as follows:
+     * {@code result.putAll(oldc); result.putAll(newc)}.<br></li>
+     * <li>Merge the new configuration and old configuration and use the old
+     * value if <i>k</i> exists in the old configuration:
+     * <br><br>{@code     (k) -> ((o, n) -> o == null ? n : o)}:
+     * <br><br>as if merging two collections as follows:
+     * {@code result.putAll(newc); result.putAll(oldc)}.<br></li>
+     * <li>Replace all properties with the new configuration except the handler
+     * property to configure Logger's handler that is not root logger:
+     * <br>
+     * <pre>{@code (k) -> k.endsWith(".handlers")}
+     *      {@code     ? ((o, n) -> (o == null ? n : o))}
+     *      {@code     : ((o, n) -> n)}</pre>
+     * </li>
+     * </ul>
+     * <p>
+     * To completely reinitialize a configuration, an application can first call
+     * {@link #reset() reset} to fully remove the old configuration, followed by
+     * {@code updateConfiguration} to initialize the new configuration.
+     *
+     * @param ins    a stream to read properties from
+     * @param mapper a functional interface that takes a configuration
+     *   key <i>k</i> and returns a function <i>f(o,n)</i> whose returned
+     *   value will be applied to the resulting configuration. The
+     *   function <i>f</i> may return {@code null} to indicate that the property
+     *   <i>k</i> will not be added to the resulting configuration.
+     *   <br>
+     *   If {@code mapper} is {@code null} then {@code (k) -> ((o, n) -> n)} is
+     *   assumed.
+     *   <br>
+     *   For each <i>k</i>, the mapped function <i>f</i> will
+     *   be invoked with the value associated with <i>k</i> in the old
+     *   configuration (i.e <i>o</i>) and the value associated with
+     *   <i>k</i> in the new configuration (i.e. <i>n</i>).
+     *   <br>A {@code null} value for <i>o</i> or <i>n</i> indicates that no
+     *   value was present for <i>k</i> in the corresponding configuration.
+     *
+     * @throws  SecurityException if a security manager exists and if
+     *          the caller does not have LoggingPermission("control"), or
+     *          does not have the permissions required to set up the
+     *          configuration (e.g. open files specified for FileHandlers)
+     *
+     * @throws  NullPointerException if {@code ins} is null or if
+     *          {@code mapper} returns a null function when invoked.
+     *
+     * @throws  IOException if there are problems reading from the stream,
+     *          or the given stream is not in the
+     *          {@linkplain java.util.Properties properties file} format.
+     */
+    public void updateConfiguration(InputStream ins,
+            Function<String, BiFunction<String,String,String>> mapper)
+            throws IOException {
+        checkPermission();
+        ensureLogManagerInitialized();
+        drainLoggerRefQueueBounded();
+
+        final Properties previous;
+        final Set<String> updatePropertyNames;
+        List<LoggerContext> cxs = Collections.emptyList();
+        final VisitedLoggers visited = new VisitedLoggers();
+        final Properties next = new Properties();
+
+        try {
+            // Load the properties
+            next.load(ins);
+        } catch (IllegalArgumentException x) {
+            // props.load may throw an IllegalArgumentException if the stream
+            // contains malformed Unicode escape sequences.
+            // We wrap that in an IOException as updateConfiguration is
+            // specified to throw IOException if there are problems reading
+            // from the stream.
+            // Note: new IOException(x.getMessage(), x) allow us to get a more
+            // concise error message than new IOException(x);
+            throw new IOException(x.getMessage(), x);
+        }
+
+        if (globalHandlersState == STATE_SHUTDOWN) return;
+
+        // exclusive lock: readConfiguration/reset/updateConfiguration can't
+        //           run concurrently.
+        // configurationLock.writeLock().lock();
+        configurationLock.lock();
+        try {
+            if (globalHandlersState == STATE_SHUTDOWN) return;
+            previous = props;
+
+            // Builds a TreeSet of all (old and new) property names.
+            updatePropertyNames =
+                    Stream.concat(previous.stringPropertyNames().stream(),
+                                  next.stringPropertyNames().stream())
+                        .collect(Collectors.toCollection(TreeSet::new));
+
+            if (mapper != null) {
+                // mapper will potentially modify the content of
+                // 'next', so we need to call it before affecting props=next.
+                // give a chance to the mapper to control all
+                // properties - not just those we will reset.
+                updatePropertyNames.stream()
+                        .forEachOrdered(k -> ConfigProperty
+                                .merge(k, previous, next,
+                                       Objects.requireNonNull(mapper.apply(k))));
+            }
+
+            props = next;
+
+            // allKeys will contain all keys:
+            //    - which correspond to a configuration property we are interested in
+            //      (first filter)
+            //    - whose value needs to be updated (because it's new, removed, or
+            //      different) in the resulting configuration (second filter)
+            final Stream<String> allKeys = updatePropertyNames.stream()
+                    .filter(ConfigProperty::matches)
+                    .filter(k -> ConfigProperty.needsUpdating(k, previous, next));
+
+            // Group configuration properties by logger name
+            // We use a TreeMap so that parent loggers will be visited before
+            // child loggers.
+            final Map<String, TreeSet<String>> loggerConfigs =
+                    allKeys.collect(Collectors.groupingBy(ConfigProperty::getLoggerName,
+                                    TreeMap::new,
+                                    Collectors.toCollection(TreeSet::new)));
+
+            if (!loggerConfigs.isEmpty()) {
+                cxs = contexts();
+            }
+            final List<Logger> loggers = cxs.isEmpty()
+                    ? Collections.emptyList() : new ArrayList<>(cxs.size());
+            for (Map.Entry<String, TreeSet<String>> e : loggerConfigs.entrySet()) {
+                // This can be a logger name, or something else...
+                // The only thing we know is that we found a property
+                //    we are interested in.
+                // For instance, if we found x.y.z.level, then x.y.z could be
+                // a logger, but it could also be a handler class...
+                // Anyway...
+                final String name = e.getKey();
+                final Set<String> properties = e.getValue();
+                loggers.clear();
+                for (LoggerContext cx : cxs) {
+                    Logger l = cx.findLogger(name);
+                    if (l != null && !visited.test(l)) {
+                        loggers.add(l);
+                    }
+                }
+                if (loggers.isEmpty()) continue;
+                for (String pk : properties) {
+                    ConfigProperty cp = ConfigProperty.find(pk).get();
+                    String p = previous.getProperty(pk, null);
+                    String n = next.getProperty(pk, null);
+
+                    // Determines the type of modification.
+                    ModType mod = ModType.of(p, n);
+
+                    // mod == SAME means that the two values are equals, there
+                    // is nothing to do. Usually, this should not happen as such
+                    // properties should have been filtered above.
+                    // It could happen however if the properties had
+                    // trailing/leading whitespaces.
+                    if (mod == ModType.SAME) continue;
+
+                    switch (cp) {
+                        case LEVEL:
+                            if (mod == ModType.REMOVED) continue;
+                            Level level = Level.findLevel(trim(n));
+                            if (level != null) {
+                                if (name.isEmpty()) {
+                                    rootLogger.setLevel(level);
+                                }
+                                for (Logger l : loggers) {
+                                    if (!name.isEmpty() || l != rootLogger) {
+                                        l.setLevel(level);
+                                    }
+                                }
+                            }
+                            break;
+                        case USEPARENT:
+                            if (!name.isEmpty()) {
+                                boolean useParent = getBooleanProperty(pk, true);
+                                if (n != null || p != null) {
+                                    // reset the flag only if the previous value
+                                    // or the new value are not null.
+                                    for (Logger l : loggers) {
+                                        l.setUseParentHandlers(useParent);
+                                    }
+                                }
+                            }
+                            break;
+                        case HANDLERS:
+                            List<Handler> hdls = null;
+                            if (name.isEmpty()) {
+                                // special handling for the root logger.
+                                globalHandlersState = STATE_READING_CONFIG;
+                                try {
+                                    closeHandlers(rootLogger);
+                                    globalHandlersState = STATE_UNINITIALIZED;
+                                } catch (Throwable t) {
+                                    globalHandlersState = STATE_INITIALIZED;
+                                    throw t;
+                                }
+                            }
+                            for (Logger l : loggers) {
+                                if (l == rootLogger) continue;
+                                closeHandlers(l);
+                                if (mod == ModType.REMOVED) {
+                                    closeOnResetLoggers.removeIf(c -> c.logger == l);
+                                    continue;
+                                }
+                                if (hdls == null) {
+                                    hdls = name.isEmpty()
+                                            ? Arrays.asList(rootLogger.getHandlers())
+                                            : createLoggerHandlers(name, pk);
+                                }
+                                setLoggerHandlers(l, name, pk, hdls);
+                            }
+                            break;
+                        default: break;
+                    }
+                }
+            }
+        } finally {
+            configurationLock.unlock();
+            visited.clear();
+        }
+
+        // Now ensure that if an existing logger has acquired a new parent
+        // in the configuration, this new parent will be created - if needed,
+        // and added to the context of the existing child.
+        //
+        drainLoggerRefQueueBounded();
+        for (LoggerContext cx : cxs) {
+            for (Enumeration<String> names = cx.getLoggerNames() ; names.hasMoreElements();) {
+                String name = names.nextElement();
+                if (name.isEmpty()) continue;  // don't need to process parents on root.
+                Logger l = cx.findLogger(name);
+                if (l != null && !visited.test(l)) {
+                    // should pass visited here to cut the processing when
+                    // reaching a logger already visited.
+                    cx.processParentHandlers(l, name, visited);
+                }
+            }
+        }
+
+        // We changed the configuration: invoke configuration listeners
+        invokeConfigurationListeners();
+    }
+
     /**
      * Get the value of a logging property.
      * The method returns null if the property is not found.
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,7 +45,6 @@
 import javax.management.ImmutableDescriptor;
 import javax.management.MBeanAttributeInfo;
 import com.sun.jmx.remote.util.EnvHelp;
-import sun.reflect.misc.ConstructorUtil;
 import sun.reflect.misc.MethodUtil;
 import sun.reflect.misc.ReflectUtil;
 
@@ -692,8 +691,9 @@
     private static <T> T convertFromString(String s, OpenType<T> openType) {
         Class<T> c;
         try {
-            ReflectUtil.checkPackageAccess(openType.safeGetClassName());
-            c = cast(Class.forName(openType.safeGetClassName()));
+            String className = openType.safeGetClassName();
+            ReflectUtil.checkPackageAccess(className);
+            c = cast(Class.forName(className));
         } catch (ClassNotFoundException e) {
             throw new NoClassDefFoundError(e.toString());  // can't happen
         }
@@ -761,11 +761,15 @@
         Class<?> stringArrayClass;
         Class<?> targetArrayClass;
         try {
+            String baseClassName = baseType.safeGetClassName();
+
+            // check access to the provided base type class name and bail out early
+            ReflectUtil.checkPackageAccess(baseClassName);
+
             stringArrayClass =
                 Class.forName(squareBrackets + "Ljava.lang.String;");
             targetArrayClass =
-                Class.forName(squareBrackets + "L" + baseType.safeGetClassName() +
-                              ";");
+                Class.forName(squareBrackets + "L" + baseClassName + ";");
         } catch (ClassNotFoundException e) {
             throw new NoClassDefFoundError(e.toString());  // can't happen
         }
--- a/jdk/src/java.management/share/classes/sun/management/LazyCompositeData.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.management/share/classes/sun/management/LazyCompositeData.java	Tue Oct 27 01:45:03 2015 -0400
@@ -27,6 +27,7 @@
 
 import java.io.Serializable;
 import java.util.*;
+import javax.management.openmbean.ArrayType;
 import javax.management.openmbean.CompositeData;
 import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.OpenType;
@@ -48,39 +49,48 @@
     private CompositeData compositeData;
 
     // Implementation of the CompositeData interface
+    @Override
     public boolean containsKey(String key) {
         return compositeData().containsKey(key);
     }
 
+    @Override
     public boolean containsValue(Object value) {
         return compositeData().containsValue(value);
     }
 
+    @Override
     public boolean equals(Object obj) {
         return compositeData().equals(obj);
     }
 
+    @Override
     public Object get(String key) {
         return compositeData().get(key);
     }
 
+    @Override
     public Object[] getAll(String[] keys) {
         return compositeData().getAll(keys);
     }
 
+    @Override
     public CompositeType getCompositeType() {
         return compositeData().getCompositeType();
     }
 
+    @Override
     public int hashCode() {
         return compositeData().hashCode();
     }
 
+    @Override
     public String toString() {
         /** FIXME: What should this be?? */
         return compositeData().toString();
     }
 
+    @Override
     public Collection<?> values() {
         return compositeData().values();
     }
@@ -126,27 +136,31 @@
         if (cd == null)
             throw new IllegalArgumentException("Null CompositeData");
 
-        return ((Boolean) cd.get(itemName)).booleanValue();
+        return ((Boolean) cd.get(itemName));
     }
 
     public static long getLong(CompositeData cd, String itemName) {
         if (cd == null)
             throw new IllegalArgumentException("Null CompositeData");
 
-        return ((Long) cd.get(itemName)).longValue();
+        return ((Long) cd.get(itemName));
     }
 
     public static int getInt(CompositeData cd, String itemName) {
         if (cd == null)
             throw new IllegalArgumentException("Null CompositeData");
 
-        return ((Integer) cd.get(itemName)).intValue();
+        return ((Integer) cd.get(itemName));
     }
 
     /**
      * Compares two CompositeTypes and returns true if
      * all items in type1 exist in type2 and their item types
      * are the same.
+     * @param type1 the base composite type
+     * @param type2 the checked composite type
+     * @return {@code true} if all items in type1 exist in type2 and their item
+     *         types are the same.
      */
     protected static boolean isTypeMatched(CompositeType type1, CompositeType type2) {
         if (type1 == type2) return true;
@@ -159,24 +173,9 @@
         if (!type2.keySet().containsAll(allItems))
             return false;
 
-        for (String item: allItems) {
-            OpenType<?> ot1 = type1.getType(item);
-            OpenType<?> ot2 = type2.getType(item);
-            if (ot1 instanceof CompositeType) {
-                if (! (ot2 instanceof CompositeType))
-                    return false;
-                if (!isTypeMatched((CompositeType) ot1, (CompositeType) ot2))
-                    return false;
-            } else if (ot1 instanceof TabularType) {
-                if (! (ot2 instanceof TabularType))
-                    return false;
-                if (!isTypeMatched((TabularType) ot1, (TabularType) ot2))
-                    return false;
-            } else if (!ot1.equals(ot2)) {
-                return false;
-            }
-        }
-        return true;
+        return allItems.stream().allMatch(
+            item -> isTypeMatched(type1.getType(item), type2.getType(item))
+        );
     }
 
     protected static boolean isTypeMatched(TabularType type1, TabularType type2) {
@@ -192,5 +191,41 @@
         return isTypeMatched(type1.getRowType(), type2.getRowType());
     }
 
+    protected static boolean isTypeMatched(ArrayType<?> type1, ArrayType<?> type2) {
+        if (type1 == type2) return true;
+
+        int dim1 = type1.getDimension();
+        int dim2 = type2.getDimension();
+
+        // check if the array dimensions are the same
+        if (dim1 != dim2)
+            return false;
+
+        return isTypeMatched(type1.getElementOpenType(), type2.getElementOpenType());
+    }
+
+    private static boolean isTypeMatched(OpenType<?> ot1, OpenType<?> ot2) {
+        if (ot1 instanceof CompositeType) {
+            if (! (ot2 instanceof CompositeType))
+                return false;
+            if (!isTypeMatched((CompositeType) ot1, (CompositeType) ot2))
+                return false;
+        } else if (ot1 instanceof TabularType) {
+            if (! (ot2 instanceof TabularType))
+                return false;
+            if (!isTypeMatched((TabularType) ot1, (TabularType) ot2))
+                return false;
+        } else if (ot1 instanceof ArrayType) {
+            if (! (ot2 instanceof ArrayType))
+                return false;
+            if (!isTypeMatched((ArrayType<?>) ot1, (ArrayType<?>) ot2)) {
+                return false;
+            }
+        } else if (!ot1.equals(ot2)) {
+            return false;
+        }
+        return true;
+    }
+
     private static final long serialVersionUID = -2190411934472666714L;
 }
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java	Tue Oct 27 01:45:03 2015 -0400
@@ -45,7 +45,6 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.InvocationTargetException;
 import java.util.Arrays;
-import sun.misc.IOUtils;
 import javax.net.SocketFactory;
 
 /**
@@ -862,7 +861,7 @@
                     }
 
                     // read in seqlen bytes
-                    byte[] left = IOUtils.readFully(in, seqlen, false);
+                    byte[] left = readFully(in, seqlen);
                     inbuf = Arrays.copyOf(inbuf, offset + left.length);
                     System.arraycopy(left, 0, inbuf, offset, left.length);
                     offset += left.length;
@@ -957,6 +956,31 @@
         }
     }
 
+    private static byte[] readFully(InputStream is, int length)
+        throws IOException
+    {
+        byte[] buf = new byte[Math.min(length, 8192)];
+        int nread = 0;
+        while (nread < length) {
+            int bytesToRead;
+            if (nread >= buf.length) {  // need to allocate a larger buffer
+                bytesToRead = Math.min(length - nread, buf.length + 8192);
+                if (buf.length < nread + bytesToRead) {
+                    buf = Arrays.copyOf(buf, nread + bytesToRead);
+                }
+            } else {
+                bytesToRead = buf.length - nread;
+            }
+            int count = is.read(buf, nread, bytesToRead);
+            if (count < 0) {
+                if (buf.length != nread)
+                    buf = Arrays.copyOf(buf, nread);
+                break;
+            }
+            nread += count;
+        }
+        return buf;
+    }
 
     // This code must be uncommented to run the LdapAbandonTest.
     /*public void sendSearchReqs(String dn, int numReqs) {
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/package.html	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/package.html	Tue Oct 27 01:45:03 2015 -0400
@@ -2,7 +2,7 @@
 <html>
 <head>
 <!--
-Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
 This code is free software; you can redistribute it and/or modify it
@@ -88,5 +88,3 @@
 
 </body>
 </html>
-<body>
-</body>
--- a/jdk/src/java.rmi/share/classes/java/rmi/server/RemoteObjectInvocationHandler.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.rmi/share/classes/java/rmi/server/RemoteObjectInvocationHandler.java	Tue Oct 27 01:45:03 2015 -0400
@@ -145,6 +145,14 @@
     public Object invoke(Object proxy, Method method, Object[] args)
         throws Throwable
     {
+        if (! Proxy.isProxyClass(proxy.getClass())) {
+            throw new IllegalArgumentException("not a proxy");
+        }
+
+        if (Proxy.getInvocationHandler(proxy) != this) {
+            throw new IllegalArgumentException("handler mismatch");
+        }
+
         if (method.getDeclaringClass() == Object.class) {
             return invokeObjectMethod(proxy, method, args);
         } else if ("finalize".equals(method.getName()) && method.getParameterCount() == 0) {
@@ -168,11 +176,13 @@
 
         } else if (name.equals("equals")) {
             Object obj = args[0];
+            InvocationHandler hdlr;
             return
                 proxy == obj ||
                 (obj != null &&
                  Proxy.isProxyClass(obj.getClass()) &&
-                 equals(Proxy.getInvocationHandler(obj)));
+                 (hdlr = Proxy.getInvocationHandler(obj)) instanceof RemoteObjectInvocationHandler &&
+                 this.equals(hdlr));
 
         } else if (name.equals("toString")) {
             return proxyToString(proxy);
--- a/jdk/src/java.rmi/share/classes/sun/rmi/transport/DGCClient.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/transport/DGCClient.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 
 import java.lang.ref.PhantomReference;
 import java.lang.ref.ReferenceQueue;
+import java.net.SocketPermission;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.HashMap;
@@ -45,6 +46,10 @@
 import sun.rmi.server.UnicastRef;
 import sun.rmi.server.Util;
 
+import java.security.AccessControlContext;
+import java.security.Permissions;
+import java.security.ProtectionDomain;
+
 /**
  * DGCClient implements the client-side of the RMI distributed garbage
  * collection system.
@@ -109,6 +114,18 @@
     /** ObjID for server-side DGC object */
     private static final ObjID dgcID = new ObjID(ObjID.DGC_ID);
 
+    /**
+     * An AccessControlContext with only socket permissions,
+     * suitable for an RMIClientSocketFactory.
+     */
+    private static final AccessControlContext SOCKET_ACC;
+    static {
+        Permissions perms = new Permissions();
+        perms.add(new SocketPermission("*", "connect,resolve"));
+        ProtectionDomain[] pd = { new ProtectionDomain(null, perms) };
+        SOCKET_ACC = new AccessControlContext(pd);
+    }
+
     /*
      * Disallow anyone from creating one of these.
      */
@@ -566,13 +583,19 @@
                         }
                     }
 
-                    if (needRenewal) {
-                        makeDirtyCall(refsToDirty, sequenceNum);
-                    }
+                    boolean needRenewal_ = needRenewal;
+                    Set<RefEntry> refsToDirty_ = refsToDirty;
+                    long sequenceNum_ = sequenceNum;
+                    AccessController.doPrivileged((PrivilegedAction<Void>)() -> {
+                        if (needRenewal_) {
+                            makeDirtyCall(refsToDirty_, sequenceNum_);
+                        }
 
-                    if (!pendingCleans.isEmpty()) {
-                        makeCleanCalls();
-                    }
+                        if (!pendingCleans.isEmpty()) {
+                            makeCleanCalls();
+                        }
+                        return null;
+                    }, SOCKET_ACC);
                 } while (!removed || !pendingCleans.isEmpty());
             }
         }
--- a/jdk/src/java.rmi/share/classes/sun/rmi/transport/DGCImpl.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/transport/DGCImpl.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
  */
 package sun.rmi.transport;
 
+import java.net.SocketPermission;
 import java.rmi.Remote;
 import java.rmi.RemoteException;
 import java.rmi.dgc.DGC;
@@ -33,8 +34,11 @@
 import java.rmi.server.ObjID;
 import java.rmi.server.RemoteServer;
 import java.rmi.server.ServerNotActiveException;
+import java.security.AccessControlContext;
 import java.security.AccessController;
+import java.security.Permissions;
 import java.security.PrivilegedAction;
+import java.security.ProtectionDomain;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.HashMap;
@@ -294,8 +298,19 @@
                             Util.createProxy(DGCImpl.class,
                                              new UnicastRef(ref), true);
                         disp.setSkeleton(dgc);
-                        Target target =
-                            new Target(dgc, disp, stub, dgcID, true);
+
+                        Permissions perms = new Permissions();
+                        perms.add(new SocketPermission("*", "accept,resolve"));
+                        ProtectionDomain[] pd = { new ProtectionDomain(null, perms) };
+                        AccessControlContext acceptAcc = new AccessControlContext(pd);
+
+                        Target target = AccessController.doPrivileged(
+                            new PrivilegedAction<Target>() {
+                                public Target run() {
+                                    return new Target(dgc, disp, stub, dgcID, true);
+                                }
+                            }, acceptAcc);
+
                         ObjectTable.putTarget(target);
                     } catch (RemoteException e) {
                         throw new Error(
--- a/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java	Tue Oct 27 01:45:03 2015 -0400
@@ -100,9 +100,16 @@
      * <p>If the input name does not contain a realm, the default realm
      * is used. The default realm can be specified either in a Kerberos
      * configuration file or via the java.security.krb5.realm
-     * system property. For more information,
+     * system property. For more information, see
      * <a href="../../../../../technotes/guides/security/jgss/tutorials/index.html">
-     * Kerberos Requirements </a>
+     * Kerberos Requirements</a>. Additionally, if a security manager is
+     * installed, a {@link ServicePermission} must be granted and the service
+     * principal of the permission must minimally be inside the
+     * {@code KerberosPrincipal}'s realm. For example, if the result of
+     * {@code new KerberosPrincipal("user")} is {@code user@EXAMPLE.COM},
+     * then a {@code ServicePermission} with service principal
+     * {@code host/www.example.com@EXAMPLE.COM} (and any action)
+     * must be granted.
      *
      * @param name the principal name
      * @throws IllegalArgumentException if name is improperly
@@ -110,20 +117,12 @@
      * the realm to use and the default realm is not specified
      * in either a Kerberos configuration file or via the
      * java.security.krb5.realm system property.
+     * @throws SecurityException if a security manager is installed and
+     * {@code name} does not contain the realm to use, and a proper
+     * {@link ServicePermission} as described above is not granted.
      */
     public KerberosPrincipal(String name) {
-
-        PrincipalName krb5Principal = null;
-
-        try {
-            // Appends the default realm if it is missing
-            krb5Principal = new PrincipalName(name, KRB_NT_PRINCIPAL);
-        } catch (KrbException e) {
-            throw new IllegalArgumentException(e.getMessage());
-        }
-        nameType = KRB_NT_PRINCIPAL;  // default name type
-        fullName = krb5Principal.toString();
-        realm = krb5Principal.getRealmString();
+        this(name, KRB_NT_PRINCIPAL);
     }
 
     /**
@@ -138,12 +137,19 @@
      * name type, KRB_NT_PRINCIPAL where <i>duke</i>
      * represents a principal, and <i>FOO.COM</i> represents a realm).
      *
-     * <p> If the input name does not contain a realm, the default realm
+     * <p>If the input name does not contain a realm, the default realm
      * is used. The default realm can be specified either in a Kerberos
      * configuration file or via the java.security.krb5.realm
      * system property. For more information, see
      * <a href="../../../../../technotes/guides/security/jgss/tutorials/index.html">
-     * Kerberos Requirements</a>.
+     * Kerberos Requirements</a>. Additionally, if a security manager is
+     * installed, a {@link ServicePermission} must be granted and the service
+     * principal of the permission must minimally be inside the
+     * {@code KerberosPrincipal}'s realm. For example, if the result of
+     * {@code new KerberosPrincipal("user")} is {@code user@EXAMPLE.COM},
+     * then a {@code ServicePermission} with service principal
+     * {@code host/www.example.com@EXAMPLE.COM} (and any action)
+     * must be granted.
      *
      * @param name the principal name
      * @param nameType the name type of the principal
@@ -152,6 +158,9 @@
      * or if name does not contain the realm to use and the default
      * realm is not specified in either a Kerberos configuration
      * file or via the java.security.krb5.realm system property.
+     * @throws SecurityException if a security manager is installed and
+     * {@code name} does not contain the realm to use, and a proper
+     * {@link ServicePermission} as described above is not granted.
      */
 
     public KerberosPrincipal(String name, int nameType) {
@@ -165,6 +174,18 @@
             throw new IllegalArgumentException(e.getMessage());
         }
 
+        if (krb5Principal.isRealmDeduced() && !Realm.AUTODEDUCEREALM) {
+            SecurityManager sm = System.getSecurityManager();
+            if (sm != null) {
+                try {
+                    sm.checkPermission(new ServicePermission(
+                            "@" + krb5Principal.getRealmAsString(), "-"));
+                } catch (SecurityException se) {
+                    // Swallow the actual exception to hide info
+                    throw new SecurityException("Cannot read realm info");
+                }
+            }
+        }
         this.nameType = nameType;
         fullName = krb5Principal.toString();
         realm = krb5Principal.getRealmString();
--- a/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/ServicePermission.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/ServicePermission.java	Tue Oct 27 01:45:03 2015 -0400
@@ -51,7 +51,7 @@
  * used within.
  * <p>
  * The service principal name is the canonical name of the
- * {@code KereberosPrincipal} supplying the service, that is
+ * {@code KerberosPrincipal} supplying the service, that is
  * the KerberosPrincipal represents a Kerberos service
  * principal. This name is treated in a case sensitive manner.
  * An asterisk may appear by itself, to signify any service principal.
@@ -62,6 +62,10 @@
  * permission also implies that the TGT can be obtained by an
  * Authentication Service exchange.
  * <p>
+ * Granting this permission also implies creating {@link KerberosPrincipal}
+ * or {@link org.ietf.jgss.GSSName GSSName} without providing a Kerberos
+ * realm, as long as the permission's service principal is in this realm.
+ * <p>
  * The possible actions are:
  *
  * <pre>
@@ -146,6 +150,9 @@
      * @param action the action string
      */
     public ServicePermission(String servicePrincipal, String action) {
+        // Note: servicePrincipal can be "@REALM" which means any principal in
+        // this realm implies it. action can be "-" which means any
+        // action implies it.
         super(servicePrincipal);
         init(servicePrincipal, getMask(action));
     }
@@ -208,7 +215,9 @@
 
     boolean impliesIgnoreMask(ServicePermission p) {
         return ((this.getName().equals("*")) ||
-                this.getName().equals(p.getName()));
+                this.getName().equals(p.getName()) ||
+                (p.getName().startsWith("@") &&
+                        this.getName().endsWith(p.getName())));
     }
 
     /**
@@ -318,7 +327,10 @@
     /**
      * Convert an action string to an integer actions mask.
      *
-     * @param action the action string
+     * Note: if action is "-", action will be NONE, which means any
+     * action implies it.
+     *
+     * @param action the action string.
      * @return the action mask
      */
     private static int getMask(String action) {
@@ -335,9 +347,11 @@
 
         char[] a = action.toCharArray();
 
+        if (a.length == 1 && a[0] == '-') {
+            return mask;
+        }
+
         int i = a.length - 1;
-        if (i < 0)
-            return mask;
 
         while (i != -1) {
             char c;
@@ -501,6 +515,17 @@
         ServicePermission np = (ServicePermission) permission;
         int desired = np.getMask();
 
+        if (desired == 0) {
+            for (Permission p: perms.values()) {
+                ServicePermission sp = (ServicePermission)p;
+                if (sp.impliesIgnoreMask(np)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+
         // first, check for wildcard principal
         ServicePermission x = (ServicePermission)perms.get("*");
         if (x != null) {
--- a/jdk/src/java.security.jgss/share/classes/org/ietf/jgss/GSSName.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/org/ietf/jgss/GSSName.java	Tue Oct 27 01:45:03 2015 -0400
@@ -81,6 +81,18 @@
  *                      GSSName.NT_EXPORT_NAME);
  *
  * </pre>
+ * If a security manager is installed, in order to create a {@code GSSName}
+ * that contains a Kerberos name element without providing its realm,
+ * a {@link javax.security.auth.kerberos.ServicePermission ServicePermission}
+ * must be granted and the service principal of the permission must minimally
+ * be inside the Kerberos name element's realm. For example, if the result of
+ * {@link GSSManager#createName(String, Oid) createName("user", NT_USER_NAME)}
+ * contains a Kerberos name element {@code user@EXAMPLE.COM}, then
+ * a {@code ServicePermission} with service principal
+ * {@code host/www.example.com@EXAMPLE.COM} (and any action) must be granted.
+ * Otherwise, the creation will throw a {@link GSSException} containing the
+ * {@code GSSException.FAILURE} error code.
+ *
  * @see #export()
  * @see #equals(GSSName)
  * @see GSSManager#createName(String, Oid)
--- a/jdk/src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5NameElement.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5NameElement.java	Tue Oct 27 01:45:03 2015 -0400
@@ -28,7 +28,10 @@
 import org.ietf.jgss.*;
 import sun.security.jgss.spi.*;
 import sun.security.krb5.PrincipalName;
+import sun.security.krb5.Realm;
 import sun.security.krb5.KrbException;
+
+import javax.security.auth.kerberos.ServicePermission;
 import java.io.UnsupportedEncodingException;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
@@ -126,6 +129,18 @@
             throw new GSSException(GSSException.BAD_NAME, -1, e.getMessage());
         }
 
+        if (principalName.isRealmDeduced() && !Realm.AUTODEDUCEREALM) {
+            SecurityManager sm = System.getSecurityManager();
+            if (sm != null) {
+                try {
+                    sm.checkPermission(new ServicePermission(
+                            "@" + principalName.getRealmAsString(), "-"));
+                } catch (SecurityException se) {
+                    // Do not chain the actual exception to hide info
+                    throw new GSSException(GSSException.FAILURE);
+                }
+            }
+        }
         return new Krb5NameElement(principalName, gssNameStr, gssNameType);
     }
 
--- a/jdk/src/java.security.jgss/share/classes/sun/security/jgss/wrapper/GSSNameElement.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/jgss/wrapper/GSSNameElement.java	Tue Oct 27 01:45:03 2015 -0400
@@ -30,6 +30,7 @@
 import java.security.Security;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
+import sun.security.krb5.Realm;
 import sun.security.jgss.GSSUtil;
 import sun.security.util.ObjectIdentifier;
 import sun.security.util.DerInputStream;
@@ -38,6 +39,8 @@
 import sun.security.jgss.GSSExceptionImpl;
 import sun.security.jgss.spi.GSSNameSpi;
 
+import javax.security.auth.kerberos.ServicePermission;
+
 /**
  * This class is essentially a wrapper class for the gss_name_t
  * structure of the native GSS library.
@@ -150,6 +153,26 @@
         pName = cStub.importName(name, nameType);
         setPrintables();
 
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null && !Realm.AUTODEDUCEREALM) {
+            String krbName = getKrbName();
+            int atPos = krbName.lastIndexOf('@');
+            if (atPos != -1) {
+                String atRealm = krbName.substring(atPos);
+                if (nameType.equals(GSSUtil.NT_GSS_KRB5_PRINCIPAL)
+                        && new String(nameBytes).endsWith(atRealm)) {
+                    // Created from Kerberos name with realm, no need to check
+                } else {
+                    try {
+                        sm.checkPermission(new ServicePermission(atRealm, "-"));
+                    } catch (SecurityException se) {
+                        // Do not chain the actual exception to hide info
+                        throw new GSSException(GSSException.FAILURE);
+                    }
+                }
+            }
+        }
+
         SunNativeProvider.debug("Imported " + printableName + " w/ type " +
                                 printableType);
     }
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbServiceLocator.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbServiceLocator.java	Tue Oct 27 01:45:03 2015 -0400
@@ -25,6 +25,11 @@
 
 package sun.security.krb5;
 
+import sun.security.krb5.internal.Krb5;
+
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
 import java.util.Arrays;
 import java.util.Hashtable;
 import java.util.Random;
@@ -52,6 +57,8 @@
 
     private static final Random random = new Random();
 
+    private static final boolean DEBUG = Krb5.DEBUG;
+
     private KrbServiceLocator() {
     }
 
@@ -62,8 +69,7 @@
      * Information on the mapping of DNS hostnames and domain names
      * to Kerberos realms is stored using DNS TXT records
      *
-     * @param domainName A string domain name.
-     * @param environment The possibly null environment of the context.
+     * @param realmName A string realm name.
      * @return An ordered list of hostports for the Kerberos service or null if
      *          the service has not been located.
      */
@@ -81,8 +87,18 @@
             if (!(ctx instanceof DirContext)) {
                 return null; // cannot create a DNS context
             }
-            Attributes attrs =
-                ((DirContext)ctx).getAttributes(dnsUrl, SRV_TXT_ATTR);
+            Attributes attrs = null;
+            try {
+                // both connect and accept are needed since DNS is thru UDP
+                attrs = AccessController.doPrivileged(
+                        (PrivilegedExceptionAction<Attributes>)
+                                () -> ((DirContext)ctx).getAttributes(
+                                        dnsUrl, SRV_TXT_ATTR),
+                        null,
+                        new java.net.SocketPermission("*", "connect,accept"));
+            } catch (PrivilegedActionException e) {
+                throw (NamingException)e.getCause();
+            }
             Attribute attr;
 
             if (attrs != null && ((attr = attrs.get(SRV_TXT)) != null)) {
@@ -124,7 +140,8 @@
      * Queries DNS for a list of KERBEROS Service Location Records (SRV) for a
      * given domain name.
      *
-     * @param domainName A string domain name.
+     * @param realmName A string realm name.
+     * @param protocol the protocol string, can be "_udp" or "_tcp"
      * @return An ordered list of hostports for the Kerberos service or null if
      *          the service has not been located.
      */
@@ -142,8 +159,20 @@
             if (!(ctx instanceof DirContext)) {
                 return null; // cannot create a DNS context
             }
-            Attributes attrs =
-                ((DirContext)ctx).getAttributes(dnsUrl, SRV_RR_ATTR);
+
+            Attributes attrs = null;
+            try {
+                // both connect and accept are needed since DNS is thru UDP
+                attrs = AccessController.doPrivileged(
+                        (PrivilegedExceptionAction<Attributes>)
+                                () -> ((DirContext)ctx).getAttributes(
+                                        dnsUrl, SRV_RR_ATTR),
+                        null,
+                        new java.net.SocketPermission("*", "connect,accept"));
+            } catch (PrivilegedActionException e) {
+                throw (NamingException)e.getCause();
+            }
+
             Attribute attr;
 
             if (attrs != null && ((attr = attrs.get(SRV_RR)) != null)) {
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/PrincipalName.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/PrincipalName.java	Tue Oct 27 01:45:03 2015 -0400
@@ -123,6 +123,13 @@
      */
     private final Realm nameRealm;      // not null
 
+
+    /**
+     * When constructing a PrincipalName, whether the realm is included in
+     * the input, or deduced from default realm or domain-realm mapping.
+     */
+    private final boolean realmDeduced;
+
     // cached default salt, not used in clone
     private transient String salt = null;
 
@@ -143,6 +150,7 @@
         this.nameType = nameType;
         this.nameStrings = nameStrings.clone();
         this.nameRealm = nameRealm;
+        this.realmDeduced = false;
     }
 
     // This method is called by Windows NativeCred.c
@@ -150,11 +158,6 @@
         this(KRB_NT_UNKNOWN, nameParts, new Realm(realm));
     }
 
-    public PrincipalName(String[] nameParts, int type)
-            throws IllegalArgumentException, RealmException {
-        this(type, nameParts, Realm.getDefault());
-    }
-
     // Validate a nameStrings argument
     private static void validateNameStrings(String[] ns) {
         if (ns == null) {
@@ -226,7 +229,7 @@
      * <a href="http://www.ietf.org/rfc/rfc4120.txt">
      * http://www.ietf.org/rfc/rfc4120.txt</a>.
      *
-     * @param encoding a Der-encoded data.
+     * @param encoding DER-encoded PrincipalName (without Realm)
      * @param realm the realm for this name
      * @exception Asn1Exception if an error occurs while decoding
      * an ASN1 encoded data.
@@ -240,6 +243,7 @@
         if (realm == null) {
             throw new IllegalArgumentException("Null realm not allowed");
         }
+        realmDeduced = false;
         nameRealm = realm;
         DerValue der;
         if (encoding == null) {
@@ -394,6 +398,10 @@
         if (realm == null) {
             realm = Realm.parseRealmAtSeparator(name);
         }
+
+        // No realm info from parameter and string, must deduce later
+        realmDeduced = realm == null;
+
         switch (type) {
         case KRB_NT_SRV_HST:
             if (nameParts.length >= 2) {
@@ -413,8 +421,8 @@
                                 hostName.toLowerCase(Locale.ENGLISH)+".")) {
                         hostName = canonicalized;
                     }
-                } catch (UnknownHostException e) {
-                    // no canonicalization, use old
+                } catch (UnknownHostException | SecurityException e) {
+                    // not canonicalized or no permission to do so, use old
                 }
                 nameParts[1] = hostName.toLowerCase(Locale.ENGLISH);
             }
@@ -681,4 +689,7 @@
         return result;
     }
 
+    public boolean isRealmDeduced() {
+        return realmDeduced;
+    }
 }
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Realm.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Realm.java	Tue Oct 27 01:45:03 2015 -0400
@@ -46,6 +46,12 @@
  * This class is immutable.
  */
 public class Realm implements Cloneable {
+
+    public static final boolean AUTODEDUCEREALM =
+        java.security.AccessController.doPrivileged(
+                new sun.security.action.GetBooleanAction(
+                        "sun.security.krb5.autodeducerealm"));
+
     private final String realm; // not null nor empty
 
     public Realm(String name) throws RealmException {
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/NetClient.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/NetClient.java	Tue Oct 27 01:45:03 2015 -0400
@@ -31,10 +31,9 @@
 
 package sun.security.krb5.internal;
 
-import sun.misc.IOUtils;
-
 import java.io.*;
 import java.net.*;
+import sun.security.util.IOUtils;
 
 public abstract class NetClient implements AutoCloseable {
     public static NetClient getInstance(String protocol, String hostname, int port,
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/CCacheInputStream.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/CCacheInputStream.java	Tue Oct 27 01:45:03 2015 -0400
@@ -36,10 +36,10 @@
 import java.util.List;
 import java.util.StringTokenizer;
 
-import sun.misc.IOUtils;
 import sun.security.krb5.*;
 import sun.security.krb5.internal.*;
 import sun.security.krb5.internal.util.KrbDataInputStream;
+import sun.security.util.IOUtils;
 
 /**
  * This class extends KrbDataInputStream. It is used for parsing FCC-format
@@ -146,8 +146,9 @@
         }
         try {
             return new PrincipalName(
+                    type,
                     result.toArray(new String[result.size()]),
-                    type);
+                    Realm.getDefault());
         } catch (RealmException re) {
             return null;
         }
--- a/jdk/src/java.security.sasl/share/classes/javax/security/sasl/Sasl.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.security.sasl/share/classes/javax/security/sasl/Sasl.java	Tue Oct 27 01:45:03 2015 -0400
@@ -310,6 +310,13 @@
      * for information about how to install and configure security service
      *  providers.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param mechanisms The non-null list of mechanism names to try. Each is the
      * IANA-registered name of a SASL mechanism. (e.g. "GSSAPI", "CRAM-MD5").
      * @param authorizationId The possibly null protocol-dependent
@@ -452,6 +459,13 @@
      * for information about how to install and configure security
      * service providers.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param mechanism The non-null mechanism name. It must be an
      * IANA-registered name of a SASL mechanism. (e.g. "GSSAPI", "CRAM-MD5").
      * @param protocol The non-null string name of the protocol for which
--- a/jdk/src/java.smartcardio/share/classes/javax/smartcardio/TerminalFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.smartcardio/share/classes/javax/smartcardio/TerminalFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -229,6 +229,13 @@
      * specified parameters Object. The type of parameters
      * needed may vary between different types of <code>TerminalFactory</code>s.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param type the type of the requested TerminalFactory
      * @param params the parameters to pass to the TerminalFactorySpi
      *   implementation, or null if no parameters are needed
--- a/jdk/src/java.sql/share/classes/java/sql/Statement.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.sql/share/classes/java/sql/Statement.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
 
 package java.sql;
 
+import java.util.regex.Pattern;
+import static java.util.stream.Collectors.joining;
+
 /**
  * <P>The object used for executing a static SQL statement
  * and returning the results it produces.
@@ -1367,4 +1370,154 @@
             throws SQLException {
         throw new SQLFeatureNotSupportedException("executeLargeUpdate not implemented");
     }
+
+    // JDBC 4.3
+
+    /**
+     * Returns a {@code String} enclosed in single quotes. Any occurrence of a
+     * single quote within the string will be replaced by two single quotes.
+     *
+     * <blockquote>
+     * <table border = 1 cellspacing=0 cellpadding=5 >
+     * <caption>Examples of the conversion:</caption>
+     * <tr><th>Value</th><th>Result</th></tr>
+     * <tr> <td align='center'>Hello</td> <td align='center'>'Hello'</td> </tr>
+     * <tr> <td align='center'>G'Day</td> <td align='center'>'G''Day'</td> </tr>
+     * <tr> <td align='center'>'G''Day'</td>
+     * <td align='center'>'''G''''Day'''</td> </tr>
+     * <tr> <td align='center'>I'''M</td> <td align='center'>'I''''''M'</td>
+     * </tr>
+     *
+     * </table>
+     * </blockquote>
+     * @implNote
+     * JDBC driver implementations may need to provide their own implementation
+     * of this method in order to meet the requirements of the underlying
+     * datasource.
+     * @param val a character string
+     * @return A string enclosed by single quotes with every single quote
+     * converted to two single quotes
+     * @throws NullPointerException if val is null
+     */
+     default String enquoteLiteral(String val) {
+         return "'" + val.replace("'", "''") +  "'";
+    }
+
+
+     /**
+     * Returns a SQL identifier. If {@code identifier} is a simple SQL identifier:
+     * <ul>
+     * <li>Return the original value if {@code alwaysQuote} is
+     * {@code false}</li>
+     * <li>Return a delimited identifier if {@code alwaysQuote} is
+     * {@code true}</li>
+     * </ul>
+     *
+     * If {@code identifier} is not a simple SQL identifier, {@code identifier} will be
+     * enclosed in double quotes if not already present. If the datasource does
+     * not support double quotes for delimited identifiers, the
+     * identifier should be enclosed by the string returned from
+     * {@link DatabaseMetaData#getIdentifierQuoteString}.  If the datasource
+     * does not support delimited identifiers, a
+     * {@code SQLFeatureNotSupportedException} should be thrown.
+     * <p>
+     * A {@code SQLException} will be thrown if {@code identifier} contains any
+     * characters invalid in a delimited identifier or the identifier length is
+     * invalid for the datasource.
+     *
+     * @implSpec
+     * The default implementation uses the following criteria to
+     * determine a valid simple SQL identifier:
+     * <ul>
+     * <li>The string is not enclosed in double quotes</li>
+     * <li>The first character is an alphabetic character from a through z, or
+     * from A through Z</li>
+     * <li>The name only contains alphanumeric characters or the character "_"</li>
+     * </ul>
+     *
+     * The default implementation will throw a {@code SQLException} if:
+     * <ul>
+     * <li>{@code identifier} contains a null character or double quote, and is not
+     * a simple SQL identifier.</li>
+     * <li>The length of {@code identifier} is less than 1 or greater than 128 characters
+     * </ul>
+     * <blockquote>
+     * <table border = 1 cellspacing=0 cellpadding=5 >
+     * <caption>Examples of the conversion:</caption>
+     * <tr>
+     * <th>identifier</th>
+     * <th>alwaysQuote</th>
+     * <th>Result</th></tr>
+     * <tr>
+     * <td align='center'>Hello</td>
+     * <td align='center'>false</td>
+     * <td align='center'>Hello</td>
+     * </tr>
+     * <tr>
+     * <td align='center'>Hello</td>
+     * <td align='center'>true</td>
+     * <td align='center'>"Hello"</td>
+     * </tr>
+     * <tr>
+     * <td align='center'>G'Day</td>
+     * <td align='center'>false</td>
+     * <td align='center'>"G'Day"</td>
+     * </tr>
+     * <tr>
+     * <td align='center'>"Bruce Wayne"</td>
+     * <td align='center'>false</td>
+     * <td align='center'>"Bruce Wayne"</td>
+     * </tr>
+     * <tr>
+     * <td align='center'>"Bruce Wayne"</td>
+     * <td align='center'>true</td>
+     * <td align='center'>"Bruce Wayne"</td>
+     * </tr>
+     * <tr>
+     * <td align='center'>GoodDay$</td>
+     * <td align='center'>false</td>
+     * <td align='center'>"GoodDay$"</td>
+     * </tr>
+     * <tr>
+     * <td align='center'>Hello"World</td>
+     * <td align='center'>false</td>
+     * <td align='center'>SQLException</td>
+     * </tr>
+     * <tr>
+     * <td align='center'>"Hello"World"</td>
+     * <td align='center'>false</td>
+     * <td align='center'>SQLException</td>
+     * </tr>
+     * </table>
+     * </blockquote>
+     * @implNote
+     * JDBC driver implementations may need to provide their own implementation
+     * of this method in order to meet the requirements of the underlying
+     * datasource.
+     * @param identifier a SQL identifier
+     * @param alwaysQuote indicates if a simple SQL identifier should be
+     * returned as a quoted identifier
+     * @return A simple SQL identifier or a delimited identifier
+     * @throws SQLException if identifier is not a valid identifier
+     * @throws SQLFeatureNotSupportedException if the datasource does not support
+     * delimited identifiers
+     * @throws NullPointerException if identifier is null
+     */
+    default String enquoteIdentifier(String identifier, boolean alwaysQuote) throws SQLException {
+        int len = identifier.length();
+        if (len < 1 || len > 128) {
+            throw new SQLException("Invalid name");
+        }
+        if (Pattern.compile("[\\p{Alpha}][\\p{Alnum}_]+").matcher(identifier).matches()) {
+            return alwaysQuote ?  "\"" + identifier + "\"" : identifier;
+        }
+        if (identifier.matches("^\".+\"$")) {
+            identifier = identifier.substring(1, len - 1);
+        }
+        if (Pattern.compile("[^\u0000\"]+").matcher(identifier).matches()) {
+            return "\"" + identifier + "\"";
+        } else {
+            throw new SQLException("Invalid name");
+        }
+    }
 }
--- a/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/TransformService.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/TransformService.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -136,6 +136,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param algorithm the URI of the algorithm
      * @param mechanismType the type of the XML processing mechanism and
      *   representation
--- a/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/XMLSignatureFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/XMLSignatureFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -173,6 +173,13 @@
      * <p>Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param mechanismType the type of the XML processing mechanism and
      *    representation. See the <a
      *    href="../../../../../technotes/guides/security/xmldsig/overview.html#Service%20Provider">
--- a/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/keyinfo/KeyInfoFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/keyinfo/KeyInfoFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -129,6 +129,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @param mechanismType the type of the XML processing mechanism and
      *    representation. See the <a
      *    href="../../../../../../technotes/guides/security/xmldsig/overview.html#Service%20Provider">
@@ -263,6 +270,13 @@
      * <p> Note that the list of registered providers may be retrieved via
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
+     * @implNote
+     * The JDK Reference Implementation additionally uses the
+     * {@code jdk.security.provider.preferred} property to determine
+     * the preferred provider order for the specified algorithm. This
+     * may be different than the order of providers returned by
+     * {@link Security#getProviders() Security.getProviders()}.
+     *
      * @return a new <code>KeyInfoFactory</code>
      * @throws NoSuchMechanismException if no <code>Provider</code> supports a
      *    <code>KeyInfoFactory</code> implementation for the DOM mechanism
--- a/jdk/src/jdk.accessibility/windows/native/common/AccessBridgeDebug.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/jdk.accessibility/windows/native/common/AccessBridgeDebug.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -36,39 +36,6 @@
 extern "C" {
 #endif
 
-/**
- * print a GetLastError message
- */
-char *printError(char *msg) {
-    LPVOID lpMsgBuf = NULL;
-    static char retbuf[256];
-
-    if (msg != NULL) {
-        strncpy((char *)retbuf, msg, sizeof(retbuf));
-    }
-    if (!FormatMessage(
-                       FORMAT_MESSAGE_ALLOCATE_BUFFER |
-                       FORMAT_MESSAGE_FROM_SYSTEM |
-                       FORMAT_MESSAGE_IGNORE_INSERTS,
-                       NULL,
-                       GetLastError(),
-                       MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
-                       (LPTSTR) &lpMsgBuf,
-                       0,
-                       NULL ))
-        {
-            PrintDebugString("  %s: FormatMessage failed", msg);
-        } else {
-            PrintDebugString("  %s: %s", msg, (char *)lpMsgBuf);
-        }
-    if (lpMsgBuf != NULL) {
-        strncat((char *)retbuf, ": ", sizeof(retbuf) - strlen(retbuf) - 1);
-        strncat((char *)retbuf, (char *)lpMsgBuf, sizeof(retbuf) - strlen(retbuf) - 1);
-    }
-    return (char *)retbuf;
-}
-
-
     /**
      * Send debugging info to the appropriate place
      */
--- a/jdk/src/jdk.accessibility/windows/native/common/AccessBridgeDebug.h	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/jdk.accessibility/windows/native/common/AccessBridgeDebug.h	Tue Oct 27 01:45:03 2015 -0400
@@ -49,7 +49,6 @@
 extern "C" {
 #endif
 
-    char *printError(char *msg);
     void PrintDebugString(char *msg, ...);
     void PrintJavaDebugString(char *msg, ...);
     void wPrintJavaDebugString(wchar_t *msg, ...);
--- a/jdk/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -184,8 +184,8 @@
 
 int modify(bool enable) {
     errno_t error = 0;
-    char path[512];
-    char tempPath[512];
+    char path[_MAX_PATH];
+    char tempPath[_MAX_PATH];
     // Get the path for %USERPROFILE%
     char *profilePath;
     size_t len;
@@ -195,11 +195,27 @@
         perror("Error");
         return error;
     }
-    strcpy_s(path, profilePath);
-    strcat_s(path, "\\.accessibility.properties");
-    strcpy_s(tempPath, profilePath);
-    strcat_s(tempPath, "\\.acce$$ibility.properties");
+    const char acc_props1[] = "\\.accessibility.properties";
+    const char acc_props2[] = "\\.acce$$ibility.properties";
+    // len must be 234 or less (233 characters)
+    // sizeof(path) is 260 (room for 259 characters)
+    // sizeof(acc_props1) is 27 (26 characters)
+    // path will hold 233 path characters plus 26 file characters plus 1 null character)
+    // if len - 1 > 233 then error
+    if ( len - 1 > sizeof(path) - sizeof(acc_props1) ||
+         len - 1 > sizeof(tempPath) - sizeof(acc_props2) ) {
+        printf("The USERPROFILE environment variable is too long.\n");
+        printf("It must be no longer than 233 characters.\n");
+        return 123;
+     }
+    path[0] = 0;
+    strcat_s(path, _MAX_PATH, profilePath);
+    strcat_s(path, acc_props1);
+    tempPath[0] = 0;
+    strcat_s(tempPath, _MAX_PATH, profilePath);
+    strcat_s(tempPath, acc_props2);
     free(profilePath);
+    profilePath = 0;
     // Open the original file.  If it doesn't exist and this is an enable request then create it.
     error = fopen_s(&origFile, path, "r");
     if (error) {
@@ -471,5 +487,9 @@
         } else {
             printf("disabled.\n");
         }
+        // Use exit so test case can sense for error.
+        if (error != 0) {
+            exit(error);
+        }
     }
 }
--- a/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp	Tue Oct 27 01:45:03 2015 -0400
@@ -262,34 +262,6 @@
     theWindowsAccessBridge = this;
     isVMInstanceChainInUse = false;
 
-
-    // notify the user if new JVMs are found
-    /*
-      newJVMs = (char **)malloc(MAX_NEW_JVMS_FOUND);
-      for (int i = 0; i < MAX_NEW_JVMS_FOUND; i++) {
-      newJVMs[i] = (char *)malloc(SHORT_STRING_SIZE);
-      newJVMs[i][0] = 0;
-      }
-
-      BOOL newJ2SEFound = findNewJVMs(J2SE_REG_PATH, newJVMs);
-      BOOL newJ2REFound = TRUE; // findNewJVMs(J2RE_REG_PATH, newJVMs);
-
-      if (newJ2SEFound || newJ2REFound) {
-
-      int result = DialogBox(windowsInstance,
-      "FOUNDNEWJVMDIALOG",
-      NULL,
-      (DLGPROC)newJVMFoundDialogProc);
-      if (result < 0) {
-      printError("DialogBox failed");
-      }
-
-      PrintDebugString("  FOUNDNEWJVMDIALOG: result = %d", result);
-
-      ShowWindow((HWND)result, SW_SHOW);
-      }
-    */
-
     ShowWindow(theDialogWindow, SW_SHOW);
 }
 
--- a/jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/SunPKCS11.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/SunPKCS11.java	Tue Oct 27 01:45:03 2015 -0400
@@ -106,9 +106,9 @@
     public Provider configure(String configArg) throws InvalidParameterException {
         final String newConfigName = checkNull(configArg);
         try {
-            return AccessController.doPrivileged(new PrivilegedExceptionAction<Provider>() {
+            return AccessController.doPrivileged(new PrivilegedExceptionAction<>() {
                 @Override
-                public Provider run() throws Exception {
+                public SunPKCS11 run() throws Exception {
                     return new SunPKCS11(new Config(newConfigName));
                 }
             });
@@ -119,6 +119,11 @@
         }
     }
 
+    @Override
+    public boolean isConfigured() {
+        return (config != null);
+    }
+
     private static <T> T checkNull(T obj) {
         if (obj == null) {
             throw new NullPointerException();
@@ -1142,8 +1147,10 @@
      * @param handler the <code>CallbackHandler</code> used by
      *  this provider to communicate with the caller
      *
-     * @exception LoginException if the login operation fails
-     * @exception SecurityException if the does not pass a security check for
+     * @throws IllegalStateException if the provider requires configuration
+     * and Provider.configure has not been called
+     * @throws LoginException if the login operation fails
+     * @throws SecurityException if the does not pass a security check for
      *  <code>SecurityPermission("authProvider.<i>name</i>")</code>,
      *  where <i>name</i> is the value returned by
      *  this provider's <code>getName</code> method
@@ -1151,8 +1158,11 @@
     public void login(Subject subject, CallbackHandler handler)
         throws LoginException {
 
+        if (!isConfigured()) {
+            throw new IllegalStateException("Configuration is required");
+        }
+
         // security check
-
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
             if (debug != null) {
@@ -1271,16 +1281,21 @@
     /**
      * Log out from this provider
      *
-     * @exception LoginException if the logout operation fails
-     * @exception SecurityException if the does not pass a security check for
+     * @throws IllegalStateException if the provider requires configuration
+     * and Provider.configure has not been called
+     * @throws LoginException if the logout operation fails
+     * @throws SecurityException if the does not pass a security check for
      *  <code>SecurityPermission("authProvider.<i>name</i>")</code>,
      *  where <i>name</i> is the value returned by
      *  this provider's <code>getName</code> method
      */
     public void logout() throws LoginException {
 
+        if (!isConfigured()) {
+            throw new IllegalStateException("Configuration is required");
+        }
+
         // security check
-
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
             sm.checkPermission
@@ -1353,7 +1368,9 @@
      * @param handler a <code>CallbackHandler</code> for obtaining
      *          authentication information, which may be <code>null</code>
      *
-     * @exception SecurityException if the caller does not pass a
+     * @throws IllegalStateException if the provider requires configuration
+     * and Provider.configure has not been called
+     * @throws SecurityException if the caller does not pass a
      *  security check for
      *  <code>SecurityPermission("authProvider.<i>name</i>")</code>,
      *  where <i>name</i> is the value returned by
@@ -1361,8 +1378,11 @@
      */
     public void setCallbackHandler(CallbackHandler handler) {
 
+        if (!isConfigured()) {
+            throw new IllegalStateException("Configuration is required");
+        }
+
         // security check
-
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
             sm.checkPermission
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/en/GB/TimeZoneNames_en_GB.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/en/GB/TimeZoneNames_en_GB.java	Tue Oct 27 01:45:03 2015 -0400
@@ -47,7 +47,8 @@
     protected final Object[][] getContents() {
         return new Object[][] {
             {"Europe/London", new String[] {"Greenwich Mean Time", "GMT",
-                                            "British Summer Time", "BST"}},
+                                            "British Summer Time", "BST",
+                                            "British Time", "BT"}},
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/hi/TimeZoneNames_hi.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/hi/TimeZoneNames_hi.java	Tue Oct 27 01:45:03 2015 -0400
@@ -40,7 +40,8 @@
             {"Asia/Calcutta",
                 new String[] {
                     "\u092d\u093e\u0930\u0924\u0940\u092f \u0938\u092e\u092f", "IST",
-                    "\u092d\u093e\u0930\u0924\u0940\u092f \u0938\u092e\u092f", "IST"
+                    "\u092d\u093e\u0930\u0924\u0940\u092f \u0938\u092e\u092f", "IST",
+                    "\u092d\u093e\u0930\u0924\u0940\u092f \u0938\u092e\u092f", "IT"
                 }
             },
         };
--- a/jdk/test/ProblemList.txt	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/ProblemList.txt	Tue Oct 27 01:45:03 2015 -0400
@@ -133,6 +133,9 @@
 # 8029891
 java/lang/ClassLoader/deadlock/GetResource.java                 generic-all
 
+# 8131129
+java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java        windows-all
+
 ############################################################################
 
 # jdk_instrument
@@ -297,6 +300,9 @@
 # 8074580
 sun/security/pkcs11/rsa/TestKeyPairGenerator.java               generic-all
 
+# 8139860
+com/oracle/security/ucrypto/TestRSA.java			solaris-all
+
 ############################################################################
 
 # jdk_sound
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/AppContext/ApplicationThreadsStop/ApplicationThreadsStop.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.AWTException;
+import java.awt.Frame;
+import java.awt.Robot;
+
+import sun.awt.AppContext;
+import sun.awt.SunToolkit;
+
+/**
+ * @test
+ * @bug 8136858
+ * @modules java.desktop/sun.awt
+ * @run main/othervm/java.security.policy=java.policy -Djava.security.manager ApplicationThreadsStop
+ */
+public final class ApplicationThreadsStop implements Runnable {
+
+    private static AppContext contextToDispose;
+    private static Thread thread;
+
+    public static void main(final String[] args) throws Exception {
+        ThreadGroup tg = new ThreadGroup("TestThreadGroup");
+        Thread t = new Thread(tg, new ApplicationThreadsStop());
+        t.start();
+        t.join();
+        contextToDispose.dispose();
+        // wait for appcontext to be destroyed
+        Thread.sleep(10000);
+        if(thread.isAlive()){
+            throw new RuntimeException("Thread is alive");
+        }
+    }
+
+    @Override
+    public void run() {
+        contextToDispose = SunToolkit.createNewAppContext();
+        Frame f = new Frame();
+        f.setSize(300, 300);
+        f.setLocationRelativeTo(null);
+        f.setVisible(true);
+        thread = new Thread(() -> {
+            while(true);
+        });
+        thread.start();
+        sync();
+    }
+
+    private static void sync() {
+        try {
+            new Robot().waitForIdle();
+        } catch (AWTException e) {
+            throw new RuntimeException(e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/AppContext/ApplicationThreadsStop/java.policy	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,5 @@
+grant {
+    permission java.lang.RuntimePermission "accessClassInPackage.sun.awt";
+    permission java.awt.AWTPermission "createRobot";
+    permission java.util.PropertyPermission "AWT.EventQueueClass", "read";
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/FontClass/FontDisposer/FontDisposeTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.font.FontRenderContext;
+import java.awt.image.BufferedImage;
+import java.io.FileInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+import sun.font.Font2DHandle;
+import sun.font.Font2D;
+import sun.font.FontScaler;
+import sun.font.Type1Font;
+
+/**
+ * @bug 8132985
+ * @summary Tests to verify Type1 Font scaler dispose crashes
+ * @modules java.desktop/sun.font
+ */
+public class FontDisposeTest
+{
+    public static void main(String[] args) throws Exception
+    {
+        // The bug only happens with Type 1 fonts. The Ghostscript font files
+        // should be commonly available. From distro pacakge or
+        //  ftp://ftp.gnu.org/gnu/ghostscript/gnu-gs-fonts-other-6.0.tar.gz
+        // Pass pfa/pfb font file as argument
+        String path = args[0];
+
+        // Load
+        InputStream stream = new FileInputStream(path);
+        Font font = Font.createFont(Font.TYPE1_FONT,stream);
+
+        // Ensure native bits have been generated
+        BufferedImage img = new BufferedImage(100,100,
+                                 BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = img.createGraphics();
+        FontRenderContext frc = g2d.getFontRenderContext();
+
+        font.getLineMetrics("derp",frc);
+
+        // Force disposal -
+        // System.gc() is not sufficient.
+        Field font2DHandleField = Font.class.getDeclaredField("font2DHandle");
+        font2DHandleField.setAccessible(true);
+        sun.font.Font2DHandle font2DHandle =
+                      (sun.font.Font2DHandle)font2DHandleField.get(font);
+
+        sun.font.Font2D font2D = font2DHandle.font2D;
+        sun.font.Type1Font type1Font = (sun.font.Type1Font)font2D;
+
+        Method getScalerMethod =
+        sun.font.Type1Font.class.getDeclaredMethod("getScaler");
+        getScalerMethod.setAccessible(true);
+        sun.font.FontScaler scaler =
+                  (sun.font.FontScaler)getScalerMethod.invoke(type1Font);
+
+        // dispose should not crash due to double free
+        scaler.dispose();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Frame/FrameResize/ShowChildWhileResizingTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+   @bug 8079595
+   @summary Resizing dialog which is JWindow parent makes JVM crash
+   @author Semyon Sadetsky
+  */
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.InputEvent;
+
+public class ShowChildWhileResizingTest {
+
+    private static Window dialog;
+    private static Timer timer;
+    private static Point point;
+
+    public static void main(String[] args) throws Exception {
+        dialog = new Frame();
+        dialog.add(new JPanel());
+        dialog.setVisible(true);
+        dialog.setBounds(100, 100, 200, 200);
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                final Window dependentWindow = new JWindow(dialog);
+                JPanel panel = new JPanel();
+                panel.add(new JButton("button"));
+                dependentWindow.add(panel);
+                dependentWindow.setVisible(true);
+                dependentWindow.setBounds(0, 0, 50, 50);
+                timer = new Timer(100, new ActionListener() {
+                    @Override
+                    public void actionPerformed(ActionEvent e) {
+                        dependentWindow
+                                .setVisible(!dependentWindow.isVisible());
+                    }
+                });
+                timer.start();
+            }
+
+        });
+
+        Robot robot = new Robot();
+        robot.setAutoDelay(5);
+        robot.delay(300);
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                point = dialog.getLocationOnScreen();
+            }
+        });
+        robot.mouseMove(point.x + 200 - dialog.getInsets().right/2,
+                point.y + 200 - dialog.getInsets().bottom/2);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        for(int i = 0; i < 100; i++) {
+            robot.mouseMove(point.x + 200 + i, point.y + 200 + i);
+        }
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        timer.stop();
+        dialog.dispose();
+        System.out.println("ok");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Graphics2D/DeviceBounds.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.awt.*;
+import java.awt.image.BufferedImage;
+
+/**
+ * @test
+ * @bug 8072682
+ * @summary Graphics.getDeviceConfiguration().getBounds returns wrong width/height
+ * @run main DeviceBounds
+ */
+public class DeviceBounds {
+    public static void main(String[] args) {
+        // NB: all images have the same type
+        BufferedImage[] images = new BufferedImage[] {
+                new BufferedImage(200, 200, BufferedImage.TYPE_3BYTE_BGR),
+                new BufferedImage(400, 400, BufferedImage.TYPE_3BYTE_BGR),
+                new BufferedImage(100, 100, BufferedImage.TYPE_3BYTE_BGR)
+        };
+        int count = 0;
+        for (BufferedImage i : images) {
+            Graphics2D g = i.createGraphics();
+            Rectangle bounds[] = new Rectangle[images.length];
+            bounds[count] = g.getDeviceConfiguration().getBounds();
+            System.out.println(bounds[count]);
+
+            g.dispose();
+            if (bounds[count].width != Integer.MAX_VALUE) {
+                throw new RuntimeException("Wrong getBounds");
+            }
+            count++;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/TextArea/TextAreaEditing/TextAreaEditing.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ @test
+ @bug 8040322
+ @summary Test TextArea APIs replaceRange, insert, append & setText
+ @run main TextAreaEditing
+ */
+
+import java.awt.Frame;
+import java.awt.TextArea;
+
+public class TextAreaEditing {
+
+    private int testFailCount;
+    private boolean isTestFail;
+    private StringBuilder testFailMessage;
+
+    private Frame mainFrame;
+    private TextArea textArea;
+
+    private TextAreaEditing() {
+        testFailMessage = new StringBuilder();
+        mainFrame = new Frame();
+        mainFrame.setSize(200, 200);
+
+        textArea = new TextArea();
+        mainFrame.add(textArea);
+        mainFrame.setVisible(true);
+    }
+
+    private void dispose() {
+        if (mainFrame != null) {
+            mainFrame.dispose();
+        }
+    }
+
+    public static void main(String[] s) {
+        TextAreaEditing textArea = new TextAreaEditing();
+        textArea.testReplaceRange();
+        textArea.testInsert();
+        textArea.testAppend();
+        textArea.checkFailures();
+        textArea.dispose();
+    }
+
+    private void testReplaceRange() {
+        textArea.setText(null);
+        textArea.replaceRange("Replace", 0, 0);
+        textArea.setText(null);
+        checkTest("");
+
+        textArea.setText("SetText");
+        textArea.replaceRange("Replace", 0, 3);
+        checkTest("ReplaceText");
+
+        textArea.replaceRange("String", textArea.getText().length(),
+                textArea.getText().length());
+        checkTest("ReplaceTextString");
+
+        textArea.replaceRange("String", 0, 0);
+        checkTest("StringReplaceTextString");
+
+        textArea.replaceRange("replaceRange", 0, textArea.getText().length());
+        checkTest("replaceRange");
+    }
+
+    private void testInsert() {
+        textArea.setText(null);
+        textArea.insert("Insert", 0);
+        textArea.setText("");
+        checkTest("");
+
+        textArea.setText("SetText");
+        textArea.insert("Insert", 3);
+        checkTest("SetInsertText");
+
+        textArea.insert("Insert", 0);
+        checkTest("InsertSetInsertText");
+
+        textArea.insert("Insert", textArea.getText().length());
+        checkTest("InsertSetInsertTextInsert");
+    }
+
+    private void testAppend() {
+        textArea.setText(null);
+        textArea.append("Append");
+        textArea.setText(null);
+        checkTest("");
+
+        textArea.setText("SetText");
+        textArea.append("Append");
+        checkTest("SetTextAppend");
+
+        textArea.append("");
+        checkTest("SetTextAppend");
+        textArea.setText("");
+        checkTest("");
+    }
+
+    private void checkTest(String str) {
+        if (str != null && !str.equals(textArea.getText())) {
+            testFailMessage.append("TestFail line : ");
+            testFailMessage.append(Thread.currentThread().getStackTrace()[2].
+                    getLineNumber());
+            testFailMessage.append(" TextArea string : \"");
+            testFailMessage.append(textArea.getText());
+            testFailMessage.append("\" does not match expected string : \"");
+            testFailMessage.append(str).append("\"");
+            testFailMessage.append(System.getProperty("line.separator"));
+            testFailCount++;
+            isTestFail = true;
+        }
+    }
+
+    private void checkFailures() {
+        if (isTestFail) {
+            testFailMessage.insert(0, "Test Fail count : " + testFailCount
+                    + System.getProperty("line.separator"));
+            dispose();
+            throw new RuntimeException(testFailMessage.toString());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/ObjectInputStream/TestObjectStreamClass.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 8135043
+ * @summary ObjectStreamClass.getField(String) too restrictive
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.ObjectStreamClass;
+import java.io.Serializable;
+
+public class TestObjectStreamClass {
+
+    public static void main(String[] args) throws Exception {
+        ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
+        ObjectOutputStream output = new ObjectOutputStream(byteOutput);
+        output.writeObject(new TestClass());
+
+        ByteArrayInputStream bais = new ByteArrayInputStream(byteOutput.toByteArray());
+        TestObjectInputStream input = new TestObjectInputStream(bais);
+        input.readObject();
+
+        ObjectStreamClass osc = input.getDescriptor();
+
+        // All OSC public API methods should complete without throwing.
+        osc.getName();
+        osc.forClass();
+        osc.getField("str");
+        osc.getFields();
+        osc.getSerialVersionUID();
+        osc.toString();
+    }
+
+    static class TestClass implements Serializable {
+        String str = "hello world";
+    }
+
+    static class TestObjectInputStream extends ObjectInputStream {
+        private ObjectStreamClass objectStreamClass;
+
+        public TestObjectInputStream(InputStream in) throws IOException {
+            super(in);
+        }
+
+        public ObjectStreamClass getDescriptor()
+            throws IOException, ClassNotFoundException
+        {
+            return objectStreamClass;
+        }
+
+        public ObjectStreamClass readClassDescriptor()
+            throws IOException, ClassNotFoundException
+        {
+            objectStreamClass = super.readClassDescriptor();
+            return objectStreamClass;
+        }
+    }
+}
--- a/jdk/test/java/lang/Character/CheckProp.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/Character/CheckProp.java	Tue Oct 27 01:45:03 2015 -0400
@@ -24,7 +24,7 @@
 
 /**
  * @test
- * @bug 7037261 7070436 7198195 8032446
+ * @bug 7037261 7070436 7198195 8032446 8072600
  * @summary  Check j.l.Character.isLowerCase/isUppercase/isAlphabetic/isIdeographic
  */
 
--- a/jdk/test/java/lang/Character/CheckScript.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/Character/CheckScript.java	Tue Oct 27 01:45:03 2015 -0400
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 6945564 6959267 7033561 7070436 7198195 8032446
+ * @bug 6945564 6959267 7033561 7070436 7198195 8032446 8072600
  * @summary  Check that the j.l.Character.UnicodeScript
  */
 
--- a/jdk/test/java/lang/Character/PropList.txt	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/Character/PropList.txt	Tue Oct 27 01:45:03 2015 -0400
@@ -1,8 +1,8 @@
-# PropList-7.0.0.txt
-# Date: 2014-02-19, 15:51:26 GMT [MD]
+# PropList-8.0.0.txt
+# Date: 2015-05-16, 17:50:38 GMT [MD]
 #
 # Unicode Character Database
-# Copyright (c) 1991-2014 Unicode, Inc.
+# Copyright (c) 1991-2015 Unicode, Inc.
 # For terms of use, see http://www.unicode.org/terms_of_use.html
 # For documentation, see http://www.unicode.org/reports/tr44/
 
@@ -189,18 +189,22 @@
 11141..11143  ; Terminal_Punctuation # Po   [3] CHAKMA DANDA..CHAKMA QUESTION MARK
 111C5..111C6  ; Terminal_Punctuation # Po   [2] SHARADA DANDA..SHARADA DOUBLE DANDA
 111CD         ; Terminal_Punctuation # Po       SHARADA SUTRA MARK
+111DE..111DF  ; Terminal_Punctuation # Po   [2] SHARADA SECTION MARK-1..SHARADA SECTION MARK-2
 11238..1123C  ; Terminal_Punctuation # Po   [5] KHOJKI DANDA..KHOJKI DOUBLE SECTION MARK
+112A9         ; Terminal_Punctuation # Po       MULTANI SECTION MARK
 115C2..115C5  ; Terminal_Punctuation # Po   [4] SIDDHAM DANDA..SIDDHAM SEPARATOR BAR
-115C9         ; Terminal_Punctuation # Po       SIDDHAM END OF TEXT MARK
+115C9..115D7  ; Terminal_Punctuation # Po  [15] SIDDHAM END OF TEXT MARK..SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES
 11641..11642  ; Terminal_Punctuation # Po   [2] MODI DANDA..MODI DOUBLE DANDA
+1173C..1173E  ; Terminal_Punctuation # Po   [3] AHOM SIGN SMALL SECTION..AHOM SIGN RULAI
 12470..12474  ; Terminal_Punctuation # Po   [5] CUNEIFORM PUNCTUATION SIGN OLD ASSYRIAN WORD DIVIDER..CUNEIFORM PUNCTUATION SIGN DIAGONAL QUADCOLON
 16A6E..16A6F  ; Terminal_Punctuation # Po   [2] MRO DANDA..MRO DOUBLE DANDA
 16AF5         ; Terminal_Punctuation # Po       BASSA VAH FULL STOP
 16B37..16B39  ; Terminal_Punctuation # Po   [3] PAHAWH HMONG SIGN VOS THOM..PAHAWH HMONG SIGN CIM CHEEM
 16B44         ; Terminal_Punctuation # Po       PAHAWH HMONG SIGN XAUS
 1BC9F         ; Terminal_Punctuation # Po       DUPLOYAN PUNCTUATION CHINOOK FULL STOP
+1DA87..1DA8A  ; Terminal_Punctuation # Po   [4] SIGNWRITING COMMA..SIGNWRITING COLON
 
-# Total code points: 214
+# Total code points: 238
 
 # ================================================
 
@@ -425,7 +429,7 @@
 081B..0823    ; Other_Alphabetic # Mn   [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A
 0825..0827    ; Other_Alphabetic # Mn   [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U
 0829..082C    ; Other_Alphabetic # Mn   [4] SAMARITAN VOWEL SIGN LONG I..SAMARITAN VOWEL SIGN SUKUN
-08E4..08E9    ; Other_Alphabetic # Mn   [6] ARABIC CURLY FATHA..ARABIC CURLY KASRATAN
+08E3..08E9    ; Other_Alphabetic # Mn   [7] ARABIC TURNED DAMMA BELOW..ARABIC CURLY KASRATAN
 08F0..0902    ; Other_Alphabetic # Mn  [19] ARABIC OPEN FATHATAN..DEVANAGARI SIGN ANUSVARA
 0903          ; Other_Alphabetic # Mc       DEVANAGARI SIGN VISARGA
 093A          ; Other_Alphabetic # Mn       DEVANAGARI VOWEL SIGN OE
@@ -560,8 +564,6 @@
 1930..1931    ; Other_Alphabetic # Mc   [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA
 1932          ; Other_Alphabetic # Mn       LIMBU SMALL LETTER ANUSVARA
 1933..1938    ; Other_Alphabetic # Mc   [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA
-19B0..19C0    ; Other_Alphabetic # Mc  [17] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE VOWEL SIGN IY
-19C8..19C9    ; Other_Alphabetic # Mc   [2] NEW TAI LUE TONE MARK-1..NEW TAI LUE TONE MARK-2
 1A17..1A18    ; Other_Alphabetic # Mn   [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U
 1A19..1A1A    ; Other_Alphabetic # Mc   [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O
 1A1B          ; Other_Alphabetic # Mn       BUGINESE VOWEL SIGN AE
@@ -605,7 +607,7 @@
 24B6..24E9    ; Other_Alphabetic # So  [52] CIRCLED LATIN CAPITAL LETTER A..CIRCLED LATIN SMALL LETTER Z
 2DE0..2DFF    ; Other_Alphabetic # Mn  [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS
 A674..A67B    ; Other_Alphabetic # Mn   [8] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC LETTER OMEGA
-A69F          ; Other_Alphabetic # Mn       COMBINING CYRILLIC LETTER IOTIFIED E
+A69E..A69F    ; Other_Alphabetic # Mn   [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E
 A823..A824    ; Other_Alphabetic # Mc   [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I
 A825..A826    ; Other_Alphabetic # Mn   [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E
 A827          ; Other_Alphabetic # Mc       SYLOTI NAGRI VOWEL SIGN OO
@@ -672,7 +674,7 @@
 112DF         ; Other_Alphabetic # Mn       KHUDAWADI SIGN ANUSVARA
 112E0..112E2  ; Other_Alphabetic # Mc   [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II
 112E3..112E8  ; Other_Alphabetic # Mn   [6] KHUDAWADI VOWEL SIGN U..KHUDAWADI VOWEL SIGN AU
-11301         ; Other_Alphabetic # Mn       GRANTHA SIGN CANDRABINDU
+11300..11301  ; Other_Alphabetic # Mn   [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU
 11302..11303  ; Other_Alphabetic # Mc   [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA
 1133E..1133F  ; Other_Alphabetic # Mc   [2] GRANTHA VOWEL SIGN AA..GRANTHA VOWEL SIGN I
 11340         ; Other_Alphabetic # Mn       GRANTHA VOWEL SIGN II
@@ -693,6 +695,7 @@
 115B8..115BB  ; Other_Alphabetic # Mc   [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU
 115BC..115BD  ; Other_Alphabetic # Mn   [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA
 115BE         ; Other_Alphabetic # Mc       SIDDHAM SIGN VISARGA
+115DC..115DD  ; Other_Alphabetic # Mn   [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU
 11630..11632  ; Other_Alphabetic # Mc   [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II
 11633..1163A  ; Other_Alphabetic # Mn   [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI
 1163B..1163C  ; Other_Alphabetic # Mc   [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU
@@ -704,6 +707,11 @@
 116AD         ; Other_Alphabetic # Mn       TAKRI VOWEL SIGN AA
 116AE..116AF  ; Other_Alphabetic # Mc   [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II
 116B0..116B5  ; Other_Alphabetic # Mn   [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU
+1171D..1171F  ; Other_Alphabetic # Mn   [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA
+11720..11721  ; Other_Alphabetic # Mc   [2] AHOM VOWEL SIGN A..AHOM VOWEL SIGN AA
+11722..11725  ; Other_Alphabetic # Mn   [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU
+11726         ; Other_Alphabetic # Mc       AHOM VOWEL SIGN E
+11727..1172A  ; Other_Alphabetic # Mn   [4] AHOM VOWEL SIGN AW..AHOM VOWEL SIGN AM
 16B30..16B36  ; Other_Alphabetic # Mn   [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM
 16F51..16F7E  ; Other_Alphabetic # Mc  [46] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN NG
 1BC9E         ; Other_Alphabetic # Mn       DUPLOYAN DOUBLE MARK
@@ -720,15 +728,16 @@
 3021..3029    ; Ideographic # Nl   [9] HANGZHOU NUMERAL ONE..HANGZHOU NUMERAL NINE
 3038..303A    ; Ideographic # Nl   [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY
 3400..4DB5    ; Ideographic # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5
-4E00..9FCC    ; Ideographic # Lo [20941] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FCC
+4E00..9FD5    ; Ideographic # Lo [20950] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FD5
 F900..FA6D    ; Ideographic # Lo [366] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA6D
 FA70..FAD9    ; Ideographic # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
 20000..2A6D6  ; Ideographic # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6
 2A700..2B734  ; Ideographic # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734
 2B740..2B81D  ; Ideographic # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D
+2B820..2CEA1  ; Ideographic # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1
 2F800..2FA1D  ; Ideographic # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
 
-# Total code points: 75633
+# Total code points: 81404
 
 # ================================================
 
@@ -773,7 +782,7 @@
 07EB..07F3    ; Diacritic # Mn   [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE
 07F4..07F5    ; Diacritic # Lm   [2] NKO HIGH TONE APOSTROPHE..NKO LOW TONE APOSTROPHE
 0818..0819    ; Diacritic # Mn   [2] SAMARITAN MARK OCCLUSION..SAMARITAN MARK DAGESH
-08E4..08FE    ; Diacritic # Mn  [27] ARABIC CURLY FATHA..ARABIC DAMMA WITH DOT
+08E3..08FE    ; Diacritic # Mn  [28] ARABIC TURNED DAMMA BELOW..ARABIC DAMMA WITH DOT
 093C          ; Diacritic # Mn       DEVANAGARI SIGN NUKTA
 094D          ; Diacritic # Mn       DEVANAGARI SIGN VIRAMA
 0951..0954    ; Diacritic # Mn   [4] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI ACUTE ACCENT
@@ -877,7 +886,7 @@
 ABEC          ; Diacritic # Mc       MEETEI MAYEK LUM IYEK
 ABED          ; Diacritic # Mn       MEETEI MAYEK APUN IYEK
 FB1E          ; Diacritic # Mn       HEBREW POINT JUDEO-SPANISH VARIKA
-FE20..FE2D    ; Diacritic # Mn  [14] COMBINING LIGATURE LEFT HALF..COMBINING CONJOINING MACRON BELOW
+FE20..FE2F    ; Diacritic # Mn  [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF
 FF3E          ; Diacritic # Sk       FULLWIDTH CIRCUMFLEX ACCENT
 FF40          ; Diacritic # Sk       FULLWIDTH GRAVE ACCENT
 FF70          ; Diacritic # Lm       HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
@@ -889,6 +898,7 @@
 11133..11134  ; Diacritic # Mn   [2] CHAKMA VIRAMA..CHAKMA MAAYYAA
 11173         ; Diacritic # Mn       MAHAJANI SIGN NUKTA
 111C0         ; Diacritic # Mc       SHARADA SIGN VIRAMA
+111CA..111CC  ; Diacritic # Mn   [3] SHARADA SIGN NUKTA..SHARADA EXTRA SHORT VOWEL MARK
 11235         ; Diacritic # Mc       KHOJKI SIGN VIRAMA
 11236         ; Diacritic # Mn       KHOJKI SIGN NUKTA
 112E9..112EA  ; Diacritic # Mn   [2] KHUDAWADI SIGN NUKTA..KHUDAWADI SIGN VIRAMA
@@ -901,6 +911,7 @@
 1163F         ; Diacritic # Mn       MODI SIGN VIRAMA
 116B6         ; Diacritic # Mc       TAKRI SIGN VIRAMA
 116B7         ; Diacritic # Mn       TAKRI SIGN NUKTA
+1172B         ; Diacritic # Mn       AHOM SIGN KILLER
 16AF0..16AF4  ; Diacritic # Mn   [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE
 16F8F..16F92  ; Diacritic # Mn   [4] MIAO TONE RIGHT..MIAO TONE BELOW
 16F93..16F9F  ; Diacritic # Lm  [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8
@@ -911,7 +922,7 @@
 1D1AA..1D1AD  ; Diacritic # Mn   [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO
 1E8D0..1E8D6  ; Diacritic # Mn   [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS
 
-# Total code points: 766
+# Total code points: 773
 
 # ================================================
 
@@ -1053,7 +1064,7 @@
 # ================================================
 
 3400..4DB5    ; Unified_Ideograph # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5
-4E00..9FCC    ; Unified_Ideograph # Lo [20941] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FCC
+4E00..9FD5    ; Unified_Ideograph # Lo [20950] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FD5
 FA0E..FA0F    ; Unified_Ideograph # Lo   [2] CJK COMPATIBILITY IDEOGRAPH-FA0E..CJK COMPATIBILITY IDEOGRAPH-FA0F
 FA11          ; Unified_Ideograph # Lo       CJK COMPATIBILITY IDEOGRAPH-FA11
 FA13..FA14    ; Unified_Ideograph # Lo   [2] CJK COMPATIBILITY IDEOGRAPH-FA13..CJK COMPATIBILITY IDEOGRAPH-FA14
@@ -1064,8 +1075,9 @@
 20000..2A6D6  ; Unified_Ideograph # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6
 2A700..2B734  ; Unified_Ideograph # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734
 2B740..2B81D  ; Unified_Ideograph # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D
+2B820..2CEA1  ; Unified_Ideograph # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1
 
-# Total code points: 74617
+# Total code points: 80388
 
 # ================================================
 
@@ -1094,9 +1106,9 @@
 2329          ; Deprecated # Ps       LEFT-POINTING ANGLE BRACKET
 232A          ; Deprecated # Pe       RIGHT-POINTING ANGLE BRACKET
 E0001         ; Deprecated # Cf       LANGUAGE TAG
-E0020..E007F  ; Deprecated # Cf  [96] TAG SPACE..CANCEL TAG
+E007F         ; Deprecated # Cf       CANCEL TAG
 
-# Total code points: 111
+# Total code points: 16
 
 # ================================================
 
@@ -1138,11 +1150,13 @@
 
 0E40..0E44    ; Logical_Order_Exception # Lo   [5] THAI CHARACTER SARA E..THAI CHARACTER SARA AI MAIMALAI
 0EC0..0EC4    ; Logical_Order_Exception # Lo   [5] LAO VOWEL SIGN E..LAO VOWEL SIGN AI
+19B5..19B7    ; Logical_Order_Exception # Lo   [3] NEW TAI LUE VOWEL SIGN E..NEW TAI LUE VOWEL SIGN O
+19BA          ; Logical_Order_Exception # Lo       NEW TAI LUE VOWEL SIGN AY
 AAB5..AAB6    ; Logical_Order_Exception # Lo   [2] TAI VIET VOWEL E..TAI VIET VOWEL O
 AAB9          ; Logical_Order_Exception # Lo       TAI VIET VOWEL UEA
 AABB..AABC    ; Logical_Order_Exception # Lo   [2] TAI VIET VOWEL AUE..TAI VIET VOWEL AY
 
-# Total code points: 15
+# Total code points: 19
 
 # ================================================
 
@@ -1213,18 +1227,22 @@
 11141..11143  ; STerm # Po   [3] CHAKMA DANDA..CHAKMA QUESTION MARK
 111C5..111C6  ; STerm # Po   [2] SHARADA DANDA..SHARADA DOUBLE DANDA
 111CD         ; STerm # Po       SHARADA SUTRA MARK
+111DE..111DF  ; STerm # Po   [2] SHARADA SECTION MARK-1..SHARADA SECTION MARK-2
 11238..11239  ; STerm # Po   [2] KHOJKI DANDA..KHOJKI DOUBLE DANDA
 1123B..1123C  ; STerm # Po   [2] KHOJKI SECTION MARK..KHOJKI DOUBLE SECTION MARK
+112A9         ; STerm # Po       MULTANI SECTION MARK
 115C2..115C3  ; STerm # Po   [2] SIDDHAM DANDA..SIDDHAM DOUBLE DANDA
-115C9         ; STerm # Po       SIDDHAM END OF TEXT MARK
+115C9..115D7  ; STerm # Po  [15] SIDDHAM END OF TEXT MARK..SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES
 11641..11642  ; STerm # Po   [2] MODI DANDA..MODI DOUBLE DANDA
+1173C..1173E  ; STerm # Po   [3] AHOM SIGN SMALL SECTION..AHOM SIGN RULAI
 16A6E..16A6F  ; STerm # Po   [2] MRO DANDA..MRO DOUBLE DANDA
 16AF5         ; STerm # Po       BASSA VAH FULL STOP
 16B37..16B38  ; STerm # Po   [2] PAHAWH HMONG SIGN VOS THOM..PAHAWH HMONG SIGN VOS TSHAB CEEB
 16B44         ; STerm # Po       PAHAWH HMONG SIGN XAUS
 1BC9F         ; STerm # Po       DUPLOYAN PUNCTUATION CHINOOK FULL STOP
+1DA88         ; STerm # Po       SIGNWRITING FULL STOP
 
-# Total code points: 99
+# Total code points: 120
 
 # ================================================
 
@@ -1432,7 +1450,9 @@
 2BBD..2BC8    ; Pattern_Syntax # So  [12] BALLOT BOX WITH LIGHT X..BLACK MEDIUM RIGHT-POINTING TRIANGLE CENTRED
 2BC9          ; Pattern_Syntax # Cn       <reserved-2BC9>
 2BCA..2BD1    ; Pattern_Syntax # So   [8] TOP HALF BLACK CIRCLE..UNCERTAINTY SIGN
-2BD2..2BFF    ; Pattern_Syntax # Cn  [46] <reserved-2BD2>..<reserved-2BFF>
+2BD2..2BEB    ; Pattern_Syntax # Cn  [26] <reserved-2BD2>..<reserved-2BEB>
+2BEC..2BEF    ; Pattern_Syntax # So   [4] LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS..DOWNWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS
+2BF0..2BFF    ; Pattern_Syntax # Cn  [16] <reserved-2BF0>..<reserved-2BFF>
 2E00..2E01    ; Pattern_Syntax # Po   [2] RIGHT ANGLE SUBSTITUTION MARKER..RIGHT ANGLE DOTTED SUBSTITUTION MARKER
 2E02          ; Pattern_Syntax # Pi       LEFT SUBSTITUTION BRACKET
 2E03          ; Pattern_Syntax # Pf       RIGHT SUBSTITUTION BRACKET
--- a/jdk/test/java/lang/Character/PropertyValueAliases.txt	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/Character/PropertyValueAliases.txt	Tue Oct 27 01:45:03 2015 -0400
@@ -1,8 +1,8 @@
-# PropertyValueAliases-7.0.0.txt
-# Date: 2014-05-14, 23:55:16 GMT [MD]
+# PropertyValueAliases-8.0.0.txt
+# Date: 2015-03-11, 22:29:33 GMT [MD]
 #
 # Unicode Character Database
-# Copyright (c) 1991-2014 Unicode, Inc.
+# Copyright (c) 1991-2015 Unicode, Inc.
 # For terms of use, see http://www.unicode.org/terms_of_use.html
 # For documentation, see http://www.unicode.org/reports/tr44/
 #
@@ -77,6 +77,7 @@
 age; 6.2                              ; V6_2
 age; 6.3                              ; V6_3
 age; 7.0                              ; V7_0
+age; 8.0                              ; V8_0
 age; NA                               ; Unassigned
 
 # Alphabetic (Alpha)
@@ -138,8 +139,10 @@
 # Block (blk)
 
 blk; Aegean_Numbers                   ; Aegean_Numbers
+blk; Ahom                             ; Ahom
 blk; Alchemical                       ; Alchemical_Symbols
 blk; Alphabetic_PF                    ; Alphabetic_Presentation_Forms
+blk; Anatolian_Hieroglyphs            ; Anatolian_Hieroglyphs
 blk; Ancient_Greek_Music              ; Ancient_Greek_Musical_Notation
 blk; Ancient_Greek_Numbers            ; Ancient_Greek_Numbers
 blk; Ancient_Symbols                  ; Ancient_Symbols
@@ -173,6 +176,7 @@
 blk; Chakma                           ; Chakma
 blk; Cham                             ; Cham
 blk; Cherokee                         ; Cherokee
+blk; Cherokee_Sup                     ; Cherokee_Supplement
 blk; CJK                              ; CJK_Unified_Ideographs
 blk; CJK_Compat                       ; CJK_Compatibility
 blk; CJK_Compat_Forms                 ; CJK_Compatibility_Forms
@@ -182,6 +186,7 @@
 blk; CJK_Ext_B                        ; CJK_Unified_Ideographs_Extension_B
 blk; CJK_Ext_C                        ; CJK_Unified_Ideographs_Extension_C
 blk; CJK_Ext_D                        ; CJK_Unified_Ideographs_Extension_D
+blk; CJK_Ext_E                        ; CJK_Unified_Ideographs_Extension_E
 blk; CJK_Radicals_Sup                 ; CJK_Radicals_Supplement
 blk; CJK_Strokes                      ; CJK_Strokes
 blk; CJK_Symbols                      ; CJK_Symbols_And_Punctuation
@@ -208,6 +213,7 @@
 blk; Dingbats                         ; Dingbats
 blk; Domino                           ; Domino_Tiles
 blk; Duployan                         ; Duployan
+blk; Early_Dynastic_Cuneiform         ; Early_Dynastic_Cuneiform
 blk; Egyptian_Hieroglyphs             ; Egyptian_Hieroglyphs
 blk; Elbasan                          ; Elbasan
 blk; Emoticons                        ; Emoticons
@@ -234,6 +240,7 @@
 blk; Half_Marks                       ; Combining_Half_Marks
 blk; Hangul                           ; Hangul_Syllables
 blk; Hanunoo                          ; Hanunoo
+blk; Hatran                           ; Hatran
 blk; Hebrew                           ; Hebrew
 blk; High_PU_Surrogates               ; High_Private_Use_Surrogates
 blk; High_Surrogates                  ; High_Surrogates
@@ -303,6 +310,7 @@
 blk; Modifier_Tone_Letters            ; Modifier_Tone_Letters
 blk; Mongolian                        ; Mongolian
 blk; Mro                              ; Mro
+blk; Multani                          ; Multani
 blk; Music                            ; Musical_Symbols
 blk; Myanmar                          ; Myanmar
 blk; Myanmar_Ext_A                    ; Myanmar_Extended_A
@@ -315,6 +323,7 @@
 blk; OCR                              ; Optical_Character_Recognition
 blk; Ogham                            ; Ogham
 blk; Ol_Chiki                         ; Ol_Chiki
+blk; Old_Hungarian                    ; Old_Hungarian
 blk; Old_Italic                       ; Old_Italic
 blk; Old_North_Arabian                ; Old_North_Arabian
 blk; Old_Permic                       ; Old_Permic
@@ -359,7 +368,9 @@
 blk; Sup_PUA_A                        ; Supplementary_Private_Use_Area_A
 blk; Sup_PUA_B                        ; Supplementary_Private_Use_Area_B
 blk; Sup_Punctuation                  ; Supplemental_Punctuation
+blk; Sup_Symbols_And_Pictographs      ; Supplemental_Symbols_And_Pictographs
 blk; Super_And_Sub                    ; Superscripts_And_Subscripts
+blk; Sutton_SignWriting               ; Sutton_SignWriting
 blk; Syloti_Nagri                     ; Syloti_Nagri
 blk; Syriac                           ; Syriac
 blk; Tagalog                          ; Tagalog
@@ -709,22 +720,22 @@
 Ideo; N                               ; No                               ; F                                ; False
 Ideo; Y                               ; Yes                              ; T                                ; True
 
-# Indic_Matra_Category (InMC)
+# Indic_Positional_Category (InPC)
 
-InMC; Bottom                          ; Bottom
-InMC; Bottom_And_Right                ; Bottom_And_Right
-InMC; Left                            ; Left
-InMC; Left_And_Right                  ; Left_And_Right
-InMC; NA                              ; NA
-InMC; Overstruck                      ; Overstruck
-InMC; Right                           ; Right
-InMC; Top                             ; Top
-InMC; Top_And_Bottom                  ; Top_And_Bottom
-InMC; Top_And_Bottom_And_Right        ; Top_And_Bottom_And_Right
-InMC; Top_And_Left                    ; Top_And_Left
-InMC; Top_And_Left_And_Right          ; Top_And_Left_And_Right
-InMC; Top_And_Right                   ; Top_And_Right
-InMC; Visual_Order_Left               ; Visual_Order_Left
+InPC; Bottom                          ; Bottom
+InPC; Bottom_And_Right                ; Bottom_And_Right
+InPC; Left                            ; Left
+InPC; Left_And_Right                  ; Left_And_Right
+InPC; NA                              ; NA
+InPC; Overstruck                      ; Overstruck
+InPC; Right                           ; Right
+InPC; Top                             ; Top
+InPC; Top_And_Bottom                  ; Top_And_Bottom
+InPC; Top_And_Bottom_And_Right        ; Top_And_Bottom_And_Right
+InPC; Top_And_Left                    ; Top_And_Left
+InPC; Top_And_Left_And_Right          ; Top_And_Left_And_Right
+InPC; Top_And_Right                   ; Top_And_Right
+InPC; Visual_Order_Left               ; Visual_Order_Left
 
 # Indic_Syllabic_Category (InSC)
 
@@ -736,11 +747,14 @@
 InSC; Consonant_Dead                  ; Consonant_Dead
 InSC; Consonant_Final                 ; Consonant_Final
 InSC; Consonant_Head_Letter           ; Consonant_Head_Letter
+InSC; Consonant_Killer                ; Consonant_Killer
 InSC; Consonant_Medial                ; Consonant_Medial
 InSC; Consonant_Placeholder           ; Consonant_Placeholder
 InSC; Consonant_Preceding_Repha       ; Consonant_Preceding_Repha
+InSC; Consonant_Prefixed              ; Consonant_Prefixed
 InSC; Consonant_Subjoined             ; Consonant_Subjoined
 InSC; Consonant_Succeeding_Repha      ; Consonant_Succeeding_Repha
+InSC; Consonant_With_Stacker          ; Consonant_With_Stacker
 InSC; Gemination_Mark                 ; Gemination_Mark
 InSC; Invisible_Stacker               ; Invisible_Stacker
 InSC; Joiner                          ; Joiner
@@ -752,6 +766,7 @@
 InSC; Other                           ; Other
 InSC; Pure_Killer                     ; Pure_Killer
 InSC; Register_Shifter                ; Register_Shifter
+InSC; Syllable_Modifier               ; Syllable_Modifier
 InSC; Tone_Letter                     ; Tone_Letter
 InSC; Tone_Mark                       ; Tone_Mark
 InSC; Virama                          ; Virama
@@ -1099,6 +1114,7 @@
 # Script (sc)
 
 sc ; Aghb                             ; Caucasian_Albanian
+sc ; Ahom                             ; Ahom
 sc ; Arab                             ; Arabic
 sc ; Armi                             ; Imperial_Aramaic
 sc ; Armn                             ; Armenian
@@ -1137,10 +1153,13 @@
 sc ; Hang                             ; Hangul
 sc ; Hani                             ; Han
 sc ; Hano                             ; Hanunoo
+sc ; Hatr                             ; Hatran
 sc ; Hebr                             ; Hebrew
 sc ; Hira                             ; Hiragana
+sc ; Hluw                             ; Anatolian_Hieroglyphs
 sc ; Hmng                             ; Pahawh_Hmong
 sc ; Hrkt                             ; Katakana_Or_Hiragana
+sc ; Hung                             ; Old_Hungarian
 sc ; Ital                             ; Old_Italic
 sc ; Java                             ; Javanese
 sc ; Kali                             ; Kayah_Li
@@ -1171,6 +1190,7 @@
 sc ; Mong                             ; Mongolian
 sc ; Mroo                             ; Mro
 sc ; Mtei                             ; Meetei_Mayek
+sc ; Mult                             ; Multani
 sc ; Mymr                             ; Myanmar
 sc ; Narb                             ; Old_North_Arabian
 sc ; Nbat                             ; Nabataean
@@ -1194,6 +1214,7 @@
 sc ; Samr                             ; Samaritan
 sc ; Sarb                             ; Old_South_Arabian
 sc ; Saur                             ; Saurashtra
+sc ; Sgnw                             ; SignWriting
 sc ; Shaw                             ; Shavian
 sc ; Shrd                             ; Sharada
 sc ; Sidd                             ; Siddham
--- a/jdk/test/java/lang/Character/Scripts.txt	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/Character/Scripts.txt	Tue Oct 27 01:45:03 2015 -0400
@@ -1,10 +1,16 @@
-# Scripts-7.0.0.txt
-# Date: 2014-05-15, 00:11:35 GMT [MD]
+# Scripts-8.0.0.txt
+# Date: 2015-03-11, 22:29:42 GMT [MD]
 #
 # Unicode Character Database
-# Copyright (c) 1991-2014 Unicode, Inc.
+# Copyright (c) 1991-2015 Unicode, Inc.
 # For terms of use, see http://www.unicode.org/terms_of_use.html
 # For documentation, see http://www.unicode.org/reports/tr44/
+# For more information, see:
+#   UAX #24, Unicode Script Property: http://www.unicode.org/reports/tr24/
+#     Especially the sections:
+#       http://www.unicode.org/reports/tr24/#Assignment_Script_Values
+#       http://www.unicode.org/reports/tr24/#Assignment_ScriptX_Values
+#
 
 # ================================================
 
@@ -89,7 +95,6 @@
 061C          ; Common # Cf       ARABIC LETTER MARK
 061F          ; Common # Po       ARABIC QUESTION MARK
 0640          ; Common # Lm       ARABIC TATWEEL
-0660..0669    ; Common # Nd  [10] ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE
 06DD          ; Common # Cf       ARABIC END OF AYAH
 0964..0965    ; Common # Po   [2] DEVANAGARI DANDA..DEVANAGARI DOUBLE DANDA
 0E3F          ; Common # Sc       THAI CURRENCY SYMBOL BAHT
@@ -148,7 +153,7 @@
 208A..208C    ; Common # Sm   [3] SUBSCRIPT PLUS SIGN..SUBSCRIPT EQUALS SIGN
 208D          ; Common # Ps       SUBSCRIPT LEFT PARENTHESIS
 208E          ; Common # Pe       SUBSCRIPT RIGHT PARENTHESIS
-20A0..20BD    ; Common # Sc  [30] EURO-CURRENCY SIGN..RUBLE SIGN
+20A0..20BE    ; Common # Sc  [31] EURO-CURRENCY SIGN..LARI SIGN
 2100..2101    ; Common # So   [2] ACCOUNT OF..ADDRESSED TO THE SUBJECT
 2102          ; Common # L&       DOUBLE-STRUCK CAPITAL C
 2103..2106    ; Common # So   [4] DEGREE CELSIUS..CADA UNA
@@ -182,6 +187,7 @@
 214F          ; Common # So       SYMBOL FOR SAMARITAN SOURCE
 2150..215F    ; Common # No  [16] VULGAR FRACTION ONE SEVENTH..FRACTION NUMERATOR ONE
 2189          ; Common # No       VULGAR FRACTION ZERO THIRDS
+218A..218B    ; Common # So   [2] TURNED DIGIT TWO..TURNED DIGIT THREE
 2190..2194    ; Common # Sm   [5] LEFTWARDS ARROW..LEFT RIGHT ARROW
 2195..2199    ; Common # So   [5] UP DOWN ARROW..SOUTH WEST ARROW
 219A..219B    ; Common # Sm   [2] LEFTWARDS ARROW WITH STROKE..RIGHTWARDS ARROW WITH STROKE
@@ -304,6 +310,7 @@
 2B98..2BB9    ; Common # So  [34] THREE-D TOP-LIGHTED LEFTWARDS EQUILATERAL ARROWHEAD..UP ARROWHEAD IN A RECTANGLE BOX
 2BBD..2BC8    ; Common # So  [12] BALLOT BOX WITH LIGHT X..BLACK MEDIUM RIGHT-POINTING TRIANGLE CENTRED
 2BCA..2BD1    ; Common # So   [8] TOP HALF BLACK CIRCLE..UNCERTAINTY SIGN
+2BEC..2BEF    ; Common # So   [4] LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS..DOWNWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS
 2E00..2E01    ; Common # Po   [2] RIGHT ANGLE SUBSTITUTION MARKER..RIGHT ANGLE DOTTED SUBSTITUTION MARKER
 2E02          ; Common # Pi       LEFT SUBSTITUTION BRACKET
 2E03          ; Common # Pf       RIGHT SUBSTITUTION BRACKET
@@ -512,7 +519,7 @@
 1D173..1D17A  ; Common # Cf   [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE
 1D183..1D184  ; Common # So   [2] MUSICAL SYMBOL ARPEGGIATO UP..MUSICAL SYMBOL ARPEGGIATO DOWN
 1D18C..1D1A9  ; Common # So  [30] MUSICAL SYMBOL RINFORZANDO..MUSICAL SYMBOL DEGREE SLASH
-1D1AE..1D1DD  ; Common # So  [48] MUSICAL SYMBOL PEDAL MARK..MUSICAL SYMBOL PES SUBPUNCTIS
+1D1AE..1D1E8  ; Common # So  [59] MUSICAL SYMBOL PEDAL MARK..MUSICAL SYMBOL KIEVAN FLAT SIGN
 1D300..1D356  ; Common # So  [87] MONOGRAM FOR EARTH..TETRAGRAM FOR FOSTERING
 1D360..1D371  ; Common # No  [18] COUNTING ROD UNIT DIGIT ONE..COUNTING ROD TENS DIGIT NINE
 1D400..1D454  ; Common # L&  [85] MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL ITALIC SMALL G
@@ -571,16 +578,11 @@
 1F210..1F23A  ; Common # So  [43] SQUARED CJK UNIFIED IDEOGRAPH-624B..SQUARED CJK UNIFIED IDEOGRAPH-55B6
 1F240..1F248  ; Common # So   [9] TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-672C..TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6557
 1F250..1F251  ; Common # So   [2] CIRCLED IDEOGRAPH ADVANTAGE..CIRCLED IDEOGRAPH ACCEPT
-1F300..1F32C  ; Common # So  [45] CYCLONE..WIND BLOWING FACE
-1F330..1F37D  ; Common # So  [78] CHESTNUT..FORK AND KNIFE WITH PLATE
-1F380..1F3CE  ; Common # So  [79] RIBBON..RACING CAR
-1F3D4..1F3F7  ; Common # So  [36] SNOW CAPPED MOUNTAIN..LABEL
-1F400..1F4FE  ; Common # So [255] RAT..PORTABLE STEREO
-1F500..1F54A  ; Common # So  [75] TWISTED RIGHTWARDS ARROWS..DOVE OF PEACE
-1F550..1F579  ; Common # So  [42] CLOCK FACE ONE OCLOCK..JOYSTICK
+1F300..1F3FA  ; Common # So [251] CYCLONE..AMPHORA
+1F3FB..1F3FF  ; Common # Sk   [5] EMOJI MODIFIER FITZPATRICK TYPE-1-2..EMOJI MODIFIER FITZPATRICK TYPE-6
+1F400..1F579  ; Common # So [378] RAT..JOYSTICK
 1F57B..1F5A3  ; Common # So  [41] LEFT HAND TELEPHONE RECEIVER..BLACK DOWN POINTING BACKHAND INDEX
-1F5A5..1F642  ; Common # So [158] DESKTOP COMPUTER..SLIGHTLY SMILING FACE
-1F645..1F6CF  ; Common # So [139] FACE WITH NO GOOD GESTURE..BED
+1F5A5..1F6D0  ; Common # So [300] DESKTOP COMPUTER..PLACE OF WORSHIP
 1F6E0..1F6EC  ; Common # So  [13] HAMMER AND WRENCH..AIRPLANE ARRIVING
 1F6F0..1F6F3  ; Common # So   [4] SATELLITE..PASSENGER SHIP
 1F700..1F773  ; Common # So [116] ALCHEMICAL SYMBOL FOR QUINTESSENCE..ALCHEMICAL SYMBOL FOR HALF OUNCE
@@ -590,10 +592,13 @@
 1F850..1F859  ; Common # So  [10] LEFTWARDS SANS-SERIF ARROW..UP DOWN SANS-SERIF ARROW
 1F860..1F887  ; Common # So  [40] WIDE-HEADED LEFTWARDS LIGHT BARB ARROW..WIDE-HEADED SOUTH WEST VERY HEAVY BARB ARROW
 1F890..1F8AD  ; Common # So  [30] LEFTWARDS TRIANGLE ARROWHEAD..WHITE ARROW SHAFT WIDTH TWO THIRDS
+1F910..1F918  ; Common # So   [9] ZIPPER-MOUTH FACE..SIGN OF THE HORNS
+1F980..1F984  ; Common # So   [5] CRAB..UNICORN FACE
+1F9C0         ; Common # So       CHEESE WEDGE
 E0001         ; Common # Cf       LANGUAGE TAG
 E0020..E007F  ; Common # Cf  [96] TAG SPACE..CANCEL TAG
 
-# Total code points: 7129
+# Total code points: 7179
 
 # ================================================
 
@@ -635,20 +640,21 @@
 A770          ; Latin # Lm       MODIFIER LETTER US
 A771..A787    ; Latin # L&  [23] LATIN SMALL LETTER DUM..LATIN SMALL LETTER INSULAR T
 A78B..A78E    ; Latin # L&   [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT
+A78F          ; Latin # Lo       LATIN LETTER SINOLOGICAL DOT
 A790..A7AD    ; Latin # L&  [30] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN CAPITAL LETTER L WITH BELT
-A7B0..A7B1    ; Latin # L&   [2] LATIN CAPITAL LETTER TURNED K..LATIN CAPITAL LETTER TURNED T
+A7B0..A7B7    ; Latin # L&   [8] LATIN CAPITAL LETTER TURNED K..LATIN SMALL LETTER OMEGA
 A7F7          ; Latin # Lo       LATIN EPIGRAPHIC LETTER SIDEWAYS I
 A7F8..A7F9    ; Latin # Lm   [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE
 A7FA          ; Latin # L&       LATIN LETTER SMALL CAPITAL TURNED M
 A7FB..A7FF    ; Latin # Lo   [5] LATIN EPIGRAPHIC LETTER REVERSED F..LATIN EPIGRAPHIC LETTER ARCHAIC M
 AB30..AB5A    ; Latin # L&  [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG
 AB5C..AB5F    ; Latin # Lm   [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK
-AB64          ; Latin # L&       LATIN SMALL LETTER INVERTED ALPHA
+AB60..AB64    ; Latin # L&   [5] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER INVERTED ALPHA
 FB00..FB06    ; Latin # L&   [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST
 FF21..FF3A    ; Latin # L&  [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z
 FF41..FF5A    ; Latin # L&  [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z
 
-# Total code points: 1338
+# Total code points: 1349
 
 # ================================================
 
@@ -731,9 +737,10 @@
 A67F          ; Cyrillic # Lm       CYRILLIC PAYEROK
 A680..A69B    ; Cyrillic # L&  [28] CYRILLIC CAPITAL LETTER DWE..CYRILLIC SMALL LETTER CROSSED O
 A69C..A69D    ; Cyrillic # Lm   [2] MODIFIER LETTER CYRILLIC HARD SIGN..MODIFIER LETTER CYRILLIC SOFT SIGN
-A69F          ; Cyrillic # Mn       COMBINING CYRILLIC LETTER IOTIFIED E
-
-# Total code points: 431
+A69E..A69F    ; Cyrillic # Mn   [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E
+FE2E..FE2F    ; Cyrillic # Mn   [2] COMBINING CYRILLIC TITLO LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF
+
+# Total code points: 434
 
 # ================================================
 
@@ -788,6 +795,7 @@
 0620..063F    ; Arabic # Lo  [32] ARABIC LETTER KASHMIRI YEH..ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE
 0641..064A    ; Arabic # Lo  [10] ARABIC LETTER FEH..ARABIC LETTER YEH
 0656..065F    ; Arabic # Mn  [10] ARABIC SUBSCRIPT ALEF..ARABIC WAVY HAMZA BELOW
+0660..0669    ; Arabic # Nd  [10] ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE
 066A..066D    ; Arabic # Po   [4] ARABIC PERCENT SIGN..ARABIC FIVE POINTED STAR
 066E..066F    ; Arabic # Lo   [2] ARABIC LETTER DOTLESS BEH..ARABIC LETTER DOTLESS QAF
 0671..06D3    ; Arabic # Lo  [99] ARABIC LETTER ALEF WASLA..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE
@@ -806,8 +814,8 @@
 06FD..06FE    ; Arabic # So   [2] ARABIC SIGN SINDHI AMPERSAND..ARABIC SIGN SINDHI POSTPOSITION MEN
 06FF          ; Arabic # Lo       ARABIC LETTER HEH WITH INVERTED V
 0750..077F    ; Arabic # Lo  [48] ARABIC LETTER BEH WITH THREE DOTS HORIZONTALLY BELOW..ARABIC LETTER KAF WITH TWO DOTS ABOVE
-08A0..08B2    ; Arabic # Lo  [19] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER ZAIN WITH INVERTED V ABOVE
-08E4..08FF    ; Arabic # Mn  [28] ARABIC CURLY FATHA..ARABIC MARK SIDEWAYS NOON GHUNNA
+08A0..08B4    ; Arabic # Lo  [21] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER KAF WITH DOT BELOW
+08E3..08FF    ; Arabic # Mn  [29] ARABIC TURNED DAMMA BELOW..ARABIC MARK SIDEWAYS NOON GHUNNA
 FB50..FBB1    ; Arabic # Lo  [98] ARABIC LETTER ALEF WASLA ISOLATED FORM..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM
 FBB2..FBC1    ; Arabic # Sk  [16] ARABIC SYMBOL DOT ABOVE..ARABIC SYMBOL SMALL TAH BELOW
 FBD3..FD3D    ; Arabic # Lo [363] ARABIC LETTER NG ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM
@@ -854,7 +862,7 @@
 1EEAB..1EEBB  ; Arabic # Lo  [17] ARABIC MATHEMATICAL DOUBLE-STRUCK LAM..ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN
 1EEF0..1EEF1  ; Arabic # Sm   [2] ARABIC MATHEMATICAL OPERATOR MEEM WITH HAH WITH TATWEEL..ARABIC MATHEMATICAL OPERATOR HAH WITH DAL
 
-# Total code points: 1244
+# Total code points: 1257
 
 # ================================================
 
@@ -902,8 +910,10 @@
 A8F2..A8F7    ; Devanagari # Lo   [6] DEVANAGARI SIGN SPACING CANDRABINDU..DEVANAGARI SIGN CANDRABINDU AVAGRAHA
 A8F8..A8FA    ; Devanagari # Po   [3] DEVANAGARI SIGN PUSHPIKA..DEVANAGARI CARET
 A8FB          ; Devanagari # Lo       DEVANAGARI HEADSTROKE
-
-# Total code points: 152
+A8FC          ; Devanagari # Po       DEVANAGARI SIGN SIDDHAM
+A8FD          ; Devanagari # Lo       DEVANAGARI JAIN OM
+
+# Total code points: 154
 
 # ================================================
 
@@ -987,8 +997,9 @@
 0AE6..0AEF    ; Gujarati # Nd  [10] GUJARATI DIGIT ZERO..GUJARATI DIGIT NINE
 0AF0          ; Gujarati # Po       GUJARATI ABBREVIATION SIGN
 0AF1          ; Gujarati # Sc       GUJARATI RUPEE SIGN
-
-# Total code points: 84
+0AF9          ; Gujarati # Lo       GUJARATI LETTER ZHA
+
+# Total code points: 85
 
 # ================================================
 
@@ -1064,14 +1075,14 @@
 0C46..0C48    ; Telugu # Mn   [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI
 0C4A..0C4D    ; Telugu # Mn   [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA
 0C55..0C56    ; Telugu # Mn   [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK
-0C58..0C59    ; Telugu # Lo   [2] TELUGU LETTER TSA..TELUGU LETTER DZA
+0C58..0C5A    ; Telugu # Lo   [3] TELUGU LETTER TSA..TELUGU LETTER RRRA
 0C60..0C61    ; Telugu # Lo   [2] TELUGU LETTER VOCALIC RR..TELUGU LETTER VOCALIC LL
 0C62..0C63    ; Telugu # Mn   [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL
 0C66..0C6F    ; Telugu # Nd  [10] TELUGU DIGIT ZERO..TELUGU DIGIT NINE
 0C78..0C7E    ; Telugu # No   [7] TELUGU FRACTION DIGIT ZERO FOR ODD POWERS OF FOUR..TELUGU FRACTION DIGIT THREE FOR EVEN POWERS OF FOUR
 0C7F          ; Telugu # So       TELUGU SIGN TUUMU
 
-# Total code points: 95
+# Total code points: 96
 
 # ================================================
 
@@ -1115,14 +1126,14 @@
 0D4D          ; Malayalam # Mn       MALAYALAM SIGN VIRAMA
 0D4E          ; Malayalam # Lo       MALAYALAM LETTER DOT REPH
 0D57          ; Malayalam # Mc       MALAYALAM AU LENGTH MARK
-0D60..0D61    ; Malayalam # Lo   [2] MALAYALAM LETTER VOCALIC RR..MALAYALAM LETTER VOCALIC LL
+0D5F..0D61    ; Malayalam # Lo   [3] MALAYALAM LETTER ARCHAIC II..MALAYALAM LETTER VOCALIC LL
 0D62..0D63    ; Malayalam # Mn   [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL
 0D66..0D6F    ; Malayalam # Nd  [10] MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE
 0D70..0D75    ; Malayalam # No   [6] MALAYALAM NUMBER TEN..MALAYALAM FRACTION THREE QUARTERS
 0D79          ; Malayalam # So       MALAYALAM DATE MARK
 0D7A..0D7F    ; Malayalam # Lo   [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K
 
-# Total code points: 99
+# Total code points: 100
 
 # ================================================
 
@@ -1358,9 +1369,11 @@
 
 # ================================================
 
-13A0..13F4    ; Cherokee # Lo  [85] CHEROKEE LETTER A..CHEROKEE LETTER YV
-
-# Total code points: 85
+13A0..13F5    ; Cherokee # L&  [86] CHEROKEE LETTER A..CHEROKEE LETTER MV
+13F8..13FD    ; Cherokee # L&   [6] CHEROKEE SMALL LETTER YE..CHEROKEE SMALL LETTER MV
+AB70..ABBF    ; Cherokee # L&  [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA
+
+# Total code points: 172
 
 # ================================================
 
@@ -1472,15 +1485,16 @@
 3038..303A    ; Han # Nl   [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY
 303B          ; Han # Lm       VERTICAL IDEOGRAPHIC ITERATION MARK
 3400..4DB5    ; Han # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5
-4E00..9FCC    ; Han # Lo [20941] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FCC
+4E00..9FD5    ; Han # Lo [20950] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FD5
 F900..FA6D    ; Han # Lo [366] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA6D
 FA70..FAD9    ; Han # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
 20000..2A6D6  ; Han # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6
 2A700..2B734  ; Han # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734
 2B740..2B81D  ; Han # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D
+2B820..2CEA1  ; Han # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1
 2F800..2FA1D  ; Han # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
 
-# Total code points: 75963
+# Total code points: 81734
 
 # ================================================
 
@@ -1680,9 +1694,7 @@
 # ================================================
 
 1980..19AB    ; New_Tai_Lue # Lo  [44] NEW TAI LUE LETTER HIGH QA..NEW TAI LUE LETTER LOW SUA
-19B0..19C0    ; New_Tai_Lue # Mc  [17] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE VOWEL SIGN IY
-19C1..19C7    ; New_Tai_Lue # Lo   [7] NEW TAI LUE LETTER FINAL V..NEW TAI LUE LETTER FINAL B
-19C8..19C9    ; New_Tai_Lue # Mc   [2] NEW TAI LUE TONE MARK-1..NEW TAI LUE TONE MARK-2
+19B0..19C9    ; New_Tai_Lue # Lo  [26] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE TONE MARK-2
 19D0..19D9    ; New_Tai_Lue # Nd  [10] NEW TAI LUE DIGIT ZERO..NEW TAI LUE DIGIT NINE
 19DA          ; New_Tai_Lue # No       NEW TAI LUE THAM DIGIT ONE
 19DE..19DF    ; New_Tai_Lue # So   [2] NEW TAI LUE SIGN LAE..NEW TAI LUE SIGN LAEV
@@ -1770,11 +1782,12 @@
 
 # ================================================
 
-12000..12398  ; Cuneiform # Lo [921] CUNEIFORM SIGN A..CUNEIFORM SIGN UM TIMES ME
+12000..12399  ; Cuneiform # Lo [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U
 12400..1246E  ; Cuneiform # Nl [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM
 12470..12474  ; Cuneiform # Po   [5] CUNEIFORM PUNCTUATION SIGN OLD ASSYRIAN WORD DIVIDER..CUNEIFORM PUNCTUATION SIGN DIAGONAL QUADCOLON
-
-# Total code points: 1037
+12480..12543  ; Cuneiform # Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU
+
+# Total code points: 1234
 
 # ================================================
 
@@ -2151,9 +2164,12 @@
 # ================================================
 
 109A0..109B7  ; Meroitic_Cursive # Lo  [24] MEROITIC CURSIVE LETTER A..MEROITIC CURSIVE LETTER DA
+109BC..109BD  ; Meroitic_Cursive # No   [2] MEROITIC CURSIVE FRACTION ELEVEN TWELFTHS..MEROITIC CURSIVE FRACTION ONE HALF
 109BE..109BF  ; Meroitic_Cursive # Lo   [2] MEROITIC CURSIVE LOGOGRAM RMT..MEROITIC CURSIVE LOGOGRAM IMN
-
-# Total code points: 26
+109C0..109CF  ; Meroitic_Cursive # No  [16] MEROITIC CURSIVE NUMBER ONE..MEROITIC CURSIVE NUMBER SEVENTY
+109D2..109FF  ; Meroitic_Cursive # No  [46] MEROITIC CURSIVE NUMBER ONE HUNDRED..MEROITIC CURSIVE FRACTION TEN TWELFTHS
+
+# Total code points: 90
 
 # ================================================
 
@@ -2180,12 +2196,16 @@
 111B6..111BE  ; Sharada # Mn   [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O
 111BF..111C0  ; Sharada # Mc   [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA
 111C1..111C4  ; Sharada # Lo   [4] SHARADA SIGN AVAGRAHA..SHARADA OM
-111C5..111C8  ; Sharada # Po   [4] SHARADA DANDA..SHARADA SEPARATOR
+111C5..111C9  ; Sharada # Po   [5] SHARADA DANDA..SHARADA SANDHI MARK
+111CA..111CC  ; Sharada # Mn   [3] SHARADA SIGN NUKTA..SHARADA EXTRA SHORT VOWEL MARK
 111CD         ; Sharada # Po       SHARADA SUTRA MARK
 111D0..111D9  ; Sharada # Nd  [10] SHARADA DIGIT ZERO..SHARADA DIGIT NINE
 111DA         ; Sharada # Lo       SHARADA EKAM
-
-# Total code points: 85
+111DB         ; Sharada # Po       SHARADA SIGN SIDDHAM
+111DC         ; Sharada # Lo       SHARADA HEADSTROKE
+111DD..111DF  ; Sharada # Po   [3] SHARADA CONTINUATION SIGN..SHARADA SECTION MARK-2
+
+# Total code points: 94
 
 # ================================================
 
@@ -2243,7 +2263,7 @@
 
 # ================================================
 
-11301         ; Grantha # Mn       GRANTHA SIGN CANDRABINDU
+11300..11301  ; Grantha # Mn   [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU
 11302..11303  ; Grantha # Mc   [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA
 11305..1130C  ; Grantha # Lo   [8] GRANTHA LETTER A..GRANTHA LETTER VOCALIC L
 1130F..11310  ; Grantha # Lo   [2] GRANTHA LETTER EE..GRANTHA LETTER AI
@@ -2258,13 +2278,14 @@
 11341..11344  ; Grantha # Mc   [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR
 11347..11348  ; Grantha # Mc   [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI
 1134B..1134D  ; Grantha # Mc   [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA
+11350         ; Grantha # Lo       GRANTHA OM
 11357         ; Grantha # Mc       GRANTHA AU LENGTH MARK
 1135D..11361  ; Grantha # Lo   [5] GRANTHA SIGN PLUTA..GRANTHA LETTER VOCALIC LL
 11362..11363  ; Grantha # Mc   [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL
 11366..1136C  ; Grantha # Mn   [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX
 11370..11374  ; Grantha # Mn   [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA
 
-# Total code points: 83
+# Total code points: 85
 
 # ================================================
 
@@ -2407,9 +2428,11 @@
 115BC..115BD  ; Siddham # Mn   [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA
 115BE         ; Siddham # Mc       SIDDHAM SIGN VISARGA
 115BF..115C0  ; Siddham # Mn   [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA
-115C1..115C9  ; Siddham # Po   [9] SIDDHAM SIGN SIDDHAM..SIDDHAM END OF TEXT MARK
-
-# Total code points: 72
+115C1..115D7  ; Siddham # Po  [23] SIDDHAM SIGN SIDDHAM..SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES
+115D8..115DB  ; Siddham # Lo   [4] SIDDHAM LETTER THREE-CIRCLE ALTERNATE I..SIDDHAM LETTER ALTERNATE U
+115DC..115DD  ; Siddham # Mn   [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU
+
+# Total code points: 92
 
 # ================================================
 
@@ -2448,4 +2471,69 @@
 
 # Total code points: 84
 
+# ================================================
+
+11700..11719  ; Ahom # Lo  [26] AHOM LETTER KA..AHOM LETTER JHA
+1171D..1171F  ; Ahom # Mn   [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA
+11720..11721  ; Ahom # Mc   [2] AHOM VOWEL SIGN A..AHOM VOWEL SIGN AA
+11722..11725  ; Ahom # Mn   [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU
+11726         ; Ahom # Mc       AHOM VOWEL SIGN E
+11727..1172B  ; Ahom # Mn   [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER
+11730..11739  ; Ahom # Nd  [10] AHOM DIGIT ZERO..AHOM DIGIT NINE
+1173A..1173B  ; Ahom # No   [2] AHOM NUMBER TEN..AHOM NUMBER TWENTY
+1173C..1173E  ; Ahom # Po   [3] AHOM SIGN SMALL SECTION..AHOM SIGN RULAI
+1173F         ; Ahom # So       AHOM SYMBOL VI
+
+# Total code points: 57
+
+# ================================================
+
+14400..14646  ; Anatolian_Hieroglyphs # Lo [583] ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A530
+
+# Total code points: 583
+
+# ================================================
+
+108E0..108F2  ; Hatran # Lo  [19] HATRAN LETTER ALEPH..HATRAN LETTER QOPH
+108F4..108F5  ; Hatran # Lo   [2] HATRAN LETTER SHIN..HATRAN LETTER TAW
+108FB..108FF  ; Hatran # No   [5] HATRAN NUMBER ONE..HATRAN NUMBER ONE HUNDRED
+
+# Total code points: 26
+
+# ================================================
+
+11280..11286  ; Multani # Lo   [7] MULTANI LETTER A..MULTANI LETTER GA
+11288         ; Multani # Lo       MULTANI LETTER GHA
+1128A..1128D  ; Multani # Lo   [4] MULTANI LETTER CA..MULTANI LETTER JJA
+1128F..1129D  ; Multani # Lo  [15] MULTANI LETTER NYA..MULTANI LETTER BA
+1129F..112A8  ; Multani # Lo  [10] MULTANI LETTER BHA..MULTANI LETTER RHA
+112A9         ; Multani # Po       MULTANI SECTION MARK
+
+# Total code points: 38
+
+# ================================================
+
+10C80..10CB2  ; Old_Hungarian # L&  [51] OLD HUNGARIAN CAPITAL LETTER A..OLD HUNGARIAN CAPITAL LETTER US
+10CC0..10CF2  ; Old_Hungarian # L&  [51] OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US
+10CFA..10CFF  ; Old_Hungarian # No   [6] OLD HUNGARIAN NUMBER ONE..OLD HUNGARIAN NUMBER ONE THOUSAND
+
+# Total code points: 108
+
+# ================================================
+
+1D800..1D9FF  ; SignWriting # So [512] SIGNWRITING HAND-FIST INDEX..SIGNWRITING HEAD
+1DA00..1DA36  ; SignWriting # Mn  [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN
+1DA37..1DA3A  ; SignWriting # So   [4] SIGNWRITING AIR BLOW SMALL ROTATIONS..SIGNWRITING BREATH EXHALE
+1DA3B..1DA6C  ; SignWriting # Mn  [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT
+1DA6D..1DA74  ; SignWriting # So   [8] SIGNWRITING SHOULDER HIP SPINE..SIGNWRITING TORSO-FLOORPLANE TWISTING
+1DA75         ; SignWriting # Mn       SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS
+1DA76..1DA83  ; SignWriting # So  [14] SIGNWRITING LIMB COMBINATION..SIGNWRITING LOCATION DEPTH
+1DA84         ; SignWriting # Mn       SIGNWRITING LOCATION HEAD NECK
+1DA85..1DA86  ; SignWriting # So   [2] SIGNWRITING LOCATION TORSO..SIGNWRITING LOCATION LIMBS DIGITS
+1DA87..1DA8B  ; SignWriting # Po   [5] SIGNWRITING COMMA..SIGNWRITING PARENTHESIS
+1DA9B..1DA9F  ; SignWriting # Mn   [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6
+1DAA1..1DAAF  ; SignWriting # Mn  [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16
+
+# Total code points: 672
+
 # EOF
--- a/jdk/test/java/lang/Math/CubeRootTests.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/Math/CubeRootTests.java	Tue Oct 27 01:45:03 2015 -0400
@@ -24,7 +24,7 @@
 /*
  * @test
  * @library /lib/testlibrary/
- * @build jdk.testlibrary.*
+ * @build jdk.testlibrary.RandomFactory
  * @run main CubeRootTests
  * @bug 4347132 4939441 8078672
  * @summary Tests for {Math, StrictMath}.cbrt (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/lang/Math/HypotTests.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/Math/HypotTests.java	Tue Oct 27 01:45:03 2015 -0400
@@ -24,7 +24,7 @@
 /*
  * @test
  * @library /lib/testlibrary/
- * @build jdk.testlibrary.*
+ * @build jdk.testlibrary.RandomFactory
  * @run main HypotTests
  * @bug 4851638 4939441 8078672
  * @summary Tests for {Math, StrictMath}.hypot (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/lang/Math/IeeeRecommendedTests.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/Math/IeeeRecommendedTests.java	Tue Oct 27 01:45:03 2015 -0400
@@ -24,7 +24,7 @@
 /*
  * @test
  * @library /lib/testlibrary/
- * @build jdk.testlibrary.*
+ * @build jdk.testlibrary.RandomFactory
  * @run main IeeeRecommendedTests
  * @bug 4860891 4826732 4780454 4939441 4826652 8078672
  * @summary Tests for IEEE 754[R] recommended functions and similar methods (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/lang/Math/Log1pTests.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/Math/Log1pTests.java	Tue Oct 27 01:45:03 2015 -0400
@@ -24,7 +24,7 @@
 /*
  * @test
  * @library /lib/testlibrary/
- * @build jdk.testlibrary.*
+ * @build jdk.testlibrary.RandomFactory
  * @run main Log1pTests
  * @bug 4851638 4939441 8078672
  * @summary Tests for {Math, StrictMath}.log1p (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java	Tue Oct 27 01:45:03 2015 -0400
@@ -23,7 +23,7 @@
 
 /*
  *  @test
- *  @bug 6741606 7146431 8000450 8019830 8022945 8027144 8041633
+ *  @bug 6741606 7146431 8000450 8019830 8022945 8027144 8041633 8078427
  *  @summary Make sure all restricted packages listed in the package.access
  *           property in the java.security file are blocked
  *  @run main/othervm CheckPackageAccess
--- a/jdk/test/java/lang/SecurityManager/RestrictedPackages.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/SecurityManager/RestrictedPackages.java	Tue Oct 27 01:45:03 2015 -0400
@@ -66,6 +66,7 @@
         "com.sun.org.apache.xalan.internal.xsltc.util.",
         "com.sun.org.apache.xml.internal.res.",
         "com.sun.org.apache.xml.internal.security.",
+        "com.sun.org.apache.xml.internal.serializer.dom3.",
         "com.sun.org.apache.xml.internal.serializer.utils.",
         "com.sun.org.apache.xml.internal.utils.",
         "com.sun.org.glassfish.",
--- a/jdk/test/java/lang/StrictMath/CubeRootTests.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/StrictMath/CubeRootTests.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,20 @@
 
 /*
  * @test
- * @bug 4347132
+ * @bug 4347132 8136799
+ * @key randomness
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.RandomFactory
+ * @build Tests
+ * @build FdlibmTranslit
+ * @build CubeRootTests
+ * @run main CubeRootTests
  * @summary Tests specifically for StrictMath.cbrt
  * @author Joseph D. Darcy
  */
 
+import jdk.testlibrary.RandomFactory;
+
 /**
  * The tests in ../Math/CubeRootTests.java test properties that should
  * hold for any cube root implementation, including the FDLIBM-based
@@ -42,6 +51,19 @@
 public class CubeRootTests {
     private CubeRootTests(){}
 
+    public static void main(String [] argv) {
+        int failures = 0;
+
+        failures += testCubeRoot();
+        failures += testAgainstTranslit();
+
+        if (failures > 0) {
+            System.err.println("Testing the cube root incurred "
+                               + failures + " failures.");
+            throw new RuntimeException();
+        }
+    }
+
     static int testCubeRootCase(double input, double expected) {
         int failures=0;
 
@@ -458,16 +480,44 @@
         return failures;
     }
 
+    // Initialize shared random number generator
+    private static java.util.Random random = RandomFactory.getRandom();
 
-    public static void main(String [] argv) {
+    /**
+     * Test StrictMath.cbrt against transliteration port of cbrt.
+     */
+    private static int testAgainstTranslit() {
         int failures = 0;
+        double x;
 
-        failures += testCubeRoot();
+        // Test just above subnormal threshold...
+        x = Double.MIN_NORMAL;
+        failures += testRange(x, Math.ulp(x), 1000);
+
+        // ... and just below subnormal threshold ...
+        x =  Math.nextDown(Double.MIN_NORMAL);
+        failures += testRange(x, -Math.ulp(x), 1000);
 
-        if (failures > 0) {
-            System.err.println("Testing the cube root incurred "
-                               + failures + " failures.");
-            throw new RuntimeException();
+        // ... and near zero.
+        failures += testRange(0.0, Double.MIN_VALUE, 1000);
+
+        x = Tests.createRandomDouble(random);
+
+        // Make the increment twice the ulp value in case the random
+        // value is near an exponent threshold. Don't worry about test
+        // elements overflowing to infinity if the starting value is
+        // near Double.MAX_VALUE.
+        failures += testRange(x, 2.0 * Math.ulp(x), 1000);
+
+        return failures;
+    }
+
+    private static int testRange(double start, double increment, int count) {
+        int failures = 0;
+        double x = start;
+        for (int i = 0; i < count; i++, x += increment) {
+            failures += testCubeRootCase(x, FdlibmTranslit.Cbrt.compute(x));
         }
+        return failures;
     }
 }
--- a/jdk/test/java/lang/StrictMath/FdlibmTranslit.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/StrictMath/FdlibmTranslit.java	Tue Oct 27 01:45:03 2015 -0400
@@ -73,6 +73,67 @@
     }
 
     /**
+     * cbrt(x)
+     * Return cube root of x
+     */
+    public static class Cbrt {
+        // unsigned
+        private static final int B1 = 715094163; /* B1 = (682-0.03306235651)*2**20 */
+        private static final int B2 = 696219795; /* B2 = (664-0.03306235651)*2**20 */
+
+        private static final double C =  5.42857142857142815906e-01; /* 19/35     = 0x3FE15F15, 0xF15F15F1 */
+        private static final double D = -7.05306122448979611050e-01; /* -864/1225 = 0xBFE691DE, 0x2532C834 */
+        private static final double E =  1.41428571428571436819e+00; /* 99/70     = 0x3FF6A0EA, 0x0EA0EA0F */
+        private static final double F =  1.60714285714285720630e+00; /* 45/28     = 0x3FF9B6DB, 0x6DB6DB6E */
+        private static final double G =  3.57142857142857150787e-01; /* 5/14      = 0x3FD6DB6D, 0xB6DB6DB7 */
+
+        public static strictfp double compute(double x) {
+            int     hx;
+            double  r, s, t=0.0, w;
+            int sign; // unsigned
+
+            hx = __HI(x);           // high word of x
+            sign = hx & 0x80000000;             // sign= sign(x)
+            hx  ^= sign;
+            if (hx >= 0x7ff00000)
+                return (x+x); // cbrt(NaN,INF) is itself
+            if ((hx | __LO(x)) == 0)
+                return(x);          // cbrt(0) is itself
+
+            x = __HI(x, hx);   // x <- |x|
+            // rough cbrt to 5 bits
+            if (hx < 0x00100000) {               // subnormal number
+                t = __HI(t, 0x43500000);          // set t= 2**54
+                t *= x;
+                t = __HI(t, __HI(t)/3+B2);
+            } else {
+                t = __HI(t, hx/3+B1);
+            }
+
+            // new cbrt to 23 bits, may be implemented in single precision
+            r = t * t/x;
+            s = C + r*t;
+            t *= G + F/(s + E + D/s);
+
+            // chopped to 20 bits and make it larger than cbrt(x)
+            t = __LO(t, 0);
+            t = __HI(t, __HI(t)+0x00000001);
+
+
+            // one step newton iteration to 53 bits with error less than 0.667 ulps
+            s = t * t;          // t*t is exact
+            r = x / s;
+            w = t + t;
+            r= (r - t)/(w + r);  // r-s is exact
+            t= t + t*r;
+
+            // retore the sign bit
+            t = __HI(t, __HI(t) | sign);
+            return(t);
+        }
+    }
+
+    /**
      * hypot(x,y)
      *
      * Method :
--- a/jdk/test/java/lang/StrictMath/HypotTests.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/lang/StrictMath/HypotTests.java	Tue Oct 27 01:45:03 2015 -0400
@@ -27,7 +27,7 @@
  * @key randomness
  * @summary Tests for StrictMath.hypot
  * @library /lib/testlibrary/
- * @build jdk.testlibrary.*
+ * @build jdk.testlibrary.RandomFactory
  * @build Tests
  * @build FdlibmTranslit
  * @build HypotTests
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/InetAddress/getOriginalHostName.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8133196
+ * @summary test functionality of getOriginalHostName(InetAddress)
+ * @modules java.base/jdk.internal.misc
+ */
+
+import java.io.*;
+import java.net.InetAddress;
+
+import jdk.internal.misc.JavaNetInetAddressAccess;
+import jdk.internal.misc.SharedSecrets;
+
+public class getOriginalHostName {
+
+    private static final JavaNetInetAddressAccess jna =
+        SharedSecrets.getJavaNetInetAddressAccess();
+
+    public static void main(String[] args) throws Exception {
+        final String HOST = "dummyserver.java.net";
+        InetAddress ia = null;
+        ia = InetAddress.getByName(HOST);
+        testInetAddress(ia, HOST);
+        ia = InetAddress.getByName("255.255.255.0");
+        testInetAddress(ia, null);
+        ia = InetAddress.getByAddress(new byte[]{1,1,1,1});
+        testInetAddress(ia, null);
+        ia = InetAddress.getLocalHost();
+        testInetAddress(ia, ia.getHostName());
+        ia = InetAddress.getLoopbackAddress();
+        testInetAddress(ia, ia.getHostName());
+    }
+
+
+    private static void testInetAddress(InetAddress ia, String expected)
+        throws Exception {
+
+        System.out.println("Testing InetAddress: " + ia);
+        System.out.println("Expecting original hostname of : " + expected);
+        String origHostName = jna.getOriginalHostName(ia);
+        System.out.println("via JavaNetAccess: " + origHostName);
+        if (origHostName == null && expected != null) {
+            throw new RuntimeException("Unexpected null. Testing:" + expected);
+        } else if (expected != null && !origHostName.equals(expected)) {
+            throw new RuntimeException("Unexpected hostname :" + origHostName);
+        } else if (expected == null && origHostName != null) {
+            throw new RuntimeException("Unexpected origHostName: " + origHostName);
+        }
+    }
+}
--- a/jdk/test/java/net/MulticastSocket/MultiDead.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/net/MulticastSocket/MultiDead.java	Tue Oct 27 01:45:03 2015 -0400
@@ -35,11 +35,17 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.concurrent.CountDownLatch;
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import jdk.testlibrary.JDKToolLauncher;
+import jdk.testlibrary.Utils;
 
 public class MultiDead {
     private static final int THREAD_PAIR_COUNT = 4;
     private static final int CHILDREN_COUNT = 20;
+    // at least 2.5 seconds for a child to complete
+    private static final long CHILD_TIMEOUT = 2500;
+    private static final long TIMEOUT =
+        Utils.adjustTimeout(CHILDREN_COUNT * CHILD_TIMEOUT * 2);
 
     public static void main(String[] args) throws Throwable {
         if (args.length == 0 || args[0].equals("parent")) {
@@ -65,6 +71,7 @@
             for (int i = 0; i < CHILDREN_COUNT; ++i) {
                 System.out.println("child #" + (i + 1) + " of " +
                         CHILDREN_COUNT);
+                long start = System.nanoTime();
                 try {
                     child.set(pb.start());
                     child.get().waitFor();
@@ -74,11 +81,18 @@
                 } catch (Exception e) {
                     throw new RuntimeException(e);
                 }
+                if (System.nanoTime() - start >
+                        MILLISECONDS.toNanos(CHILD_TIMEOUT)) {
+                    System.err.println("Machine is too slow, " +
+                            "skipping the test...");
+                    break;
+                }
             }
         });
 
         th.start();
-        th.join(CHILDREN_COUNT * 1000); // 1 sec for a child to complete
+        th.join(TIMEOUT);
+
         stopFlag.set(true);
         if (th.isAlive()) {
             if (child.get() != null) {
--- a/jdk/test/java/rmi/registry/readTest/readTest.sh	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/rmi/registry/readTest/readTest.sh	Tue Oct 27 01:45:03 2015 -0400
@@ -27,6 +27,7 @@
 # @build TestLibrary
 # @summary remove java.rmi.server.codebase property parsing from registyimpl
 # @run shell readTest.sh
+# @key intermittent
 
 OS=`uname -s`
 VER=`uname -r`
--- a/jdk/test/java/security/PermissionCollection/AddToReadOnlyPermissionCollection.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/security/PermissionCollection/AddToReadOnlyPermissionCollection.java	Tue Oct 27 01:45:03 2015 -0400
@@ -107,11 +107,11 @@
 
     static void tryFilePC() throws Exception {
         try {
-            FilePermission p0 = new FilePermission("/home/foobar","read");
+            FilePermission p0 = new FilePermission("/tmp/foobar","read");
             PermissionCollection pc = p0.newPermissionCollection();
             pc.setReadOnly();   // this should lock out future adds
             //
-            FilePermission p1 = new FilePermission("/home/quux","read");
+            FilePermission p1 = new FilePermission("/tmp/quux","read");
             pc.add(p1);
             throw new
                 Exception("Failed...FilePermission added to readonly FilePermissionCollection.");
--- a/jdk/test/java/security/PermissionCollection/Concurrent.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/security/PermissionCollection/Concurrent.java	Tue Oct 27 01:45:03 2015 -0400
@@ -166,9 +166,9 @@
         new AllPermission(), new AllPermission()};
 
     private static final Permission[] filep = new Permission[]{
-        new FilePermission("/home/foobar", "read"),
-        new FilePermission("/home/foo", "write"),
-        new FilePermission("/home/foobar", "read,write"),
+        new FilePermission("/tmp/foobar", "read"),
+        new FilePermission("/tmp/foo", "write"),
+        new FilePermission("/tmp/foobar", "read,write"),
             };
 
     private static final Permission[] sockp = new Permission[]{
--- a/jdk/test/java/security/PermissionCollection/PermissionCollectionStreamTest.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/security/PermissionCollection/PermissionCollectionStreamTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -50,9 +50,9 @@
                 {
                         "FilePermission",
                         new Permission[]{
-                                new FilePermission("/home/foobar", "read"),
-                                new FilePermission("/home/foo", "write"),
-                                new FilePermission("/home/foobar", "read,write"),
+                                new FilePermission("/tmp/foobar", "read"),
+                                new FilePermission("/tmp/foo", "write"),
+                                new FilePermission("/tmp/foobar", "read,write"),
                         }
                 },
         };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/sql/testng/test/sql/CallableStatementTests.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.sql;
+
+import org.testng.annotations.BeforeMethod;
+import util.StubCallableStatement;
+
+public class CallableStatementTests extends PreparedStatementTests {
+
+    @BeforeMethod
+    public void setUpMethod() throws Exception {
+        stmt = new StubCallableStatement();
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/sql/testng/test/sql/PreparedStatementTests.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.sql;
+
+import org.testng.annotations.BeforeMethod;
+import util.StubPreparedStatement;
+
+public class PreparedStatementTests extends StatementTests {
+
+    @BeforeMethod
+    public void setUpMethod() throws Exception {
+        stmt = new StubPreparedStatement();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/sql/testng/test/sql/StatementTests.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.sql;
+
+import java.sql.SQLException;
+import static org.testng.Assert.assertEquals;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import util.BaseTest;
+import util.StubStatement;
+
+public class StatementTests extends BaseTest {
+
+    protected StubStatement stmt;
+
+    @BeforeMethod
+    public void setUpMethod() throws Exception {
+        stmt = new StubStatement();
+    }
+
+    /*
+     * Verify that enquoteLiteral creates a  valid literal and converts every
+     * single quote to two single quotes
+     */
+    @Test(dataProvider = "validEnquotedLiteralValues")
+    public void test00(String s, String expected) {
+        assertEquals(stmt.enquoteLiteral(s), expected);
+    }
+
+    /*
+     * Validate a NullPointerException is thrown if the string passed to
+     * enquoteLiteral is null
+     */
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test01() {
+        stmt.enquoteLiteral(null);
+
+    }
+
+    /*
+     * Validate that enquoteIdentifier returns the expected value
+     */
+    @Test(dataProvider = "validIdentifierValues")
+    public void test02(String s, boolean alwaysQuote, String expected) throws SQLException {
+        assertEquals(stmt.enquoteIdentifier(s, alwaysQuote), expected);
+
+    }
+
+    /*
+     * Validate that a SQLException is thrown for values that are not valid
+     * for a SQL identifier
+     */
+    @Test(dataProvider = "invalidIdentifierValues",
+            expectedExceptions = SQLException.class)
+    public void test03(String s, boolean alwaysQuote) throws SQLException {
+        stmt.enquoteIdentifier(s, alwaysQuote);
+
+    }
+
+    /*
+     * Validate a NullPointerException is thrown is the string passed to
+     * enquoteIdentiifer is null
+     */
+    @Test(dataProvider = "trueFalse",
+            expectedExceptions = NullPointerException.class)
+    public void test04(boolean alwaysQuote) throws SQLException {
+        stmt.enquoteIdentifier(null, alwaysQuote);
+
+    }
+
+    /*
+     * DataProvider used to provide strings that will be used to validate
+     * that enquoteLiteral converts a string to a literal and every instance of
+     * a single quote will be converted into two single quotes in the literal.
+     */
+    @DataProvider(name = "validEnquotedLiteralValues")
+    protected Object[][] validEnquotedLiteralValues() {
+        return new Object[][]{
+            {"Hello", "'Hello'"},
+            {"G'Day", "'G''Day'"},
+            {"'G''Day'", "'''G''''Day'''"},
+            {"I'''M", "'I''''''M'"},
+            {"The Dark Knight", "'The Dark Knight'"}
+
+        };
+    }
+
+    /*
+     * DataProvider used to provide strings that will be used to validate
+     * that enqouteIdentifier returns a simple SQL Identifier or a double
+     * quoted identifier
+     */
+    @DataProvider(name = "validIdentifierValues")
+    protected Object[][] validEnquotedIdentifierValues() {
+        return new Object[][]{
+            {"Hello", false, "Hello"},
+            {"Hello", true, "\"Hello\""},
+            {"G'Day", false, "\"G'Day\""},
+            {"G'Day", true, "\"G'Day\""},
+            {"Bruce Wayne", false, "\"Bruce Wayne\""},
+            {"Bruce Wayne", true, "\"Bruce Wayne\""},
+            {"GoodDay$", false, "\"GoodDay$\""},
+            {"GoodDay$", true, "\"GoodDay$\""},};
+    }
+
+    /*
+     * DataProvider used to provide strings are invalid for enquoteIdentifier
+     * resulting in a SQLException being thrown
+     */
+    @DataProvider(name = "invalidIdentifierValues")
+    protected Object[][] invalidEnquotedIdentifierValues() {
+        int invalidLen = 129;
+        StringBuilder s = new StringBuilder(invalidLen);
+        for (int i = 0; i < invalidLen; i++) {
+            s.append('a');
+        }
+        return new Object[][]{
+            {"Hel\"lo", false},
+            {"\"Hel\"lo\"", true},
+            {"Hello" + '\0', false},
+            {"", false},
+            {s.toString(), false},};
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/sql/testng/util/StubCallableStatement.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,612 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package util;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.math.BigDecimal;
+import java.net.URL;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.Date;
+import java.sql.NClob;
+import java.sql.Ref;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Calendar;
+import java.util.Map;
+
+public class StubCallableStatement  extends StubPreparedStatement
+implements CallableStatement{
+
+    @Override
+    public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean wasNull() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getString(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean getBoolean(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public byte getByte(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public short getShort(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getInt(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public long getLong(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public float getFloat(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public double getDouble(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public byte[] getBytes(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Date getDate(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Time getTime(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Timestamp getTimestamp(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Object getObject(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public BigDecimal getBigDecimal(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Object getObject(int parameterIndex, Map<String, Class<?>> map) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Ref getRef(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Blob getBlob(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Clob getClob(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Array getArray(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Date getDate(int parameterIndex, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Time getTime(int parameterIndex, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void registerOutParameter(int parameterIndex, int sqlType, String typeName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void registerOutParameter(String parameterName, int sqlType) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public URL getURL(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setURL(String parameterName, URL val) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNull(String parameterName, int sqlType) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBoolean(String parameterName, boolean x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setByte(String parameterName, byte x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setShort(String parameterName, short x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setInt(String parameterName, int x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setLong(String parameterName, long x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setFloat(String parameterName, float x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setDouble(String parameterName, double x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setString(String parameterName, String x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBytes(String parameterName, byte[] x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setDate(String parameterName, Date x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setTime(String parameterName, Time x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setTimestamp(String parameterName, Timestamp x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setObject(String parameterName, Object x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setDate(String parameterName, Date x, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setTime(String parameterName, Time x, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNull(String parameterName, int sqlType, String typeName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getString(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean getBoolean(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public byte getByte(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public short getShort(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getInt(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public long getLong(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public float getFloat(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public double getDouble(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public byte[] getBytes(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Date getDate(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Time getTime(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Timestamp getTimestamp(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Object getObject(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public BigDecimal getBigDecimal(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Object getObject(String parameterName, Map<String, Class<?>> map) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Ref getRef(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Blob getBlob(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Clob getClob(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Array getArray(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Date getDate(String parameterName, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Time getTime(String parameterName, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public URL getURL(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public RowId getRowId(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public RowId getRowId(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setRowId(String parameterName, RowId x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNString(String parameterName, String value) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNClob(String parameterName, NClob value) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setClob(String parameterName, Reader reader, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNClob(String parameterName, Reader reader, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public NClob getNClob(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public NClob getNClob(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public SQLXML getSQLXML(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public SQLXML getSQLXML(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getNString(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getNString(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Reader getNCharacterStream(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Reader getNCharacterStream(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Reader getCharacterStream(int parameterIndex) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Reader getCharacterStream(String parameterName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBlob(String parameterName, Blob x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setClob(String parameterName, Clob x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setAsciiStream(String parameterName, InputStream x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBinaryStream(String parameterName, InputStream x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setCharacterStream(String parameterName, Reader reader) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNCharacterStream(String parameterName, Reader value) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setClob(String parameterName, Reader reader) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBlob(String parameterName, InputStream inputStream) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNClob(String parameterName, Reader reader) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public <T> T getObject(int parameterIndex, Class<T> type) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public <T> T getObject(String parameterName, Class<T> type) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/sql/testng/util/StubPreparedStatement.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,323 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package util;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.math.BigDecimal;
+import java.net.URL;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Date;
+import java.sql.NClob;
+import java.sql.ParameterMetaData;
+import java.sql.PreparedStatement;
+import java.sql.Ref;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Calendar;
+
+public class StubPreparedStatement extends StubStatement implements PreparedStatement{
+
+    @Override
+    public ResultSet executeQuery() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int executeUpdate() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNull(int parameterIndex, int sqlType) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBoolean(int parameterIndex, boolean x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setByte(int parameterIndex, byte x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setShort(int parameterIndex, short x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setInt(int parameterIndex, int x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setLong(int parameterIndex, long x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setFloat(int parameterIndex, float x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setDouble(int parameterIndex, double x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setString(int parameterIndex, String x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBytes(int parameterIndex, byte[] x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setDate(int parameterIndex, Date x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setTime(int parameterIndex, Time x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void clearParameters() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setObject(int parameterIndex, Object x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean execute() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void addBatch() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setRef(int parameterIndex, Ref x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBlob(int parameterIndex, Blob x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setClob(int parameterIndex, Clob x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setArray(int parameterIndex, Array x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ResultSetMetaData getMetaData() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setURL(int parameterIndex, URL x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ParameterMetaData getParameterMetaData() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setRowId(int parameterIndex, RowId x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNString(int parameterIndex, String value) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNClob(int parameterIndex, NClob value) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setClob(int parameterIndex, Reader reader, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setClob(int parameterIndex, Reader reader) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNClob(int parameterIndex, Reader reader) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/sql/testng/util/StubStatement.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,257 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package util;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.Statement;
+import java.util.regex.Pattern;
+import static java.util.stream.Collectors.joining;
+
+public class StubStatement implements Statement {
+
+    @Override
+    public ResultSet executeQuery(String sql) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int executeUpdate(String sql) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void close() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getMaxFieldSize() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setMaxFieldSize(int max) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getMaxRows() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setMaxRows(int max) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setEscapeProcessing(boolean enable) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getQueryTimeout() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setQueryTimeout(int seconds) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void cancel() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public SQLWarning getWarnings() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void clearWarnings() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setCursorName(String name) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean execute(String sql) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ResultSet getResultSet() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getUpdateCount() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean getMoreResults() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setFetchDirection(int direction) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getFetchDirection() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setFetchSize(int rows) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getFetchSize() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getResultSetConcurrency() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getResultSetType() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void addBatch(String sql) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void clearBatch() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int[] executeBatch() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Connection getConnection() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean getMoreResults(int current) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ResultSet getGeneratedKeys() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int executeUpdate(String sql, String[] columnNames) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean execute(String sql, int[] columnIndexes) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean execute(String sql, String[] columnNames) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getResultSetHoldability() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean isClosed() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setPoolable(boolean poolable) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean isPoolable() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void closeOnCompletion() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean isCloseOnCompletion() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public <T> T unwrap(Class<T> iface) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean isWrapperFor(Class<?> iface) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+
+
+}
--- a/jdk/test/java/time/tck/java/time/TCKInstant.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/time/tck/java/time/TCKInstant.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -638,6 +638,12 @@
                 {Instant.ofEpochSecond(86400 + 3600 + 60 + 1, 123_456_789), NINETY_MINS, Instant.ofEpochSecond(86400 + 0, 0)},
                 {Instant.ofEpochSecond(86400 + 7200 + 60 + 1, 123_456_789), NINETY_MINS, Instant.ofEpochSecond(86400 + 5400, 0)},
                 {Instant.ofEpochSecond(86400 + 10800 + 60 + 1, 123_456_789), NINETY_MINS, Instant.ofEpochSecond(86400 + 10800, 0)},
+
+                {Instant.ofEpochSecond(-86400 - 3600 - 60 - 1, 123_456_789), MINUTES, Instant.ofEpochSecond(-86400 - 3600 - 120, 0 )},
+                {Instant.ofEpochSecond(-86400 - 3600 - 60 - 1, 123_456_789), MICROS, Instant.ofEpochSecond(-86400 - 3600 - 60 - 1, 123_456_000)},
+
+                {Instant.ofEpochSecond(86400 + 3600 + 60 + 1, 0), SECONDS, Instant.ofEpochSecond(86400 + 3600 + 60 + 1, 0)},
+                {Instant.ofEpochSecond(-86400 - 3600 - 120, 0), MINUTES, Instant.ofEpochSecond(-86400 - 3600 - 120, 0)},
         };
     }
     @Test(dataProvider="truncatedToValid")
--- a/jdk/test/java/util/AbstractList/CheckForComodification.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/AbstractList/CheckForComodification.java	Tue Oct 27 01:45:03 2015 -0400
@@ -42,7 +42,7 @@
             for (int i : list)
                 if (i == LENGTH - 2)
                     list.remove(i);
-        } catch(ConcurrentModificationException e) {
+        } catch (ConcurrentModificationException e) {
             return;
         }
         throw new RuntimeException("No ConcurrentModificationException");
--- a/jdk/test/java/util/AbstractList/FailFastIterator.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/AbstractList/FailFastIterator.java	Tue Oct 27 01:45:03 2015 -0400
@@ -24,7 +24,7 @@
 /**
  * @test
  * @bug 4189896
- * @summary AbstractList iterators previously checked for co-modificatin
+ * @summary AbstractList iterators previously checked for co-modification
  *          *after* the set/add/remove operations were performed.
  */
 
@@ -44,7 +44,7 @@
             copy.add(new Integer(99));
             i.remove();
             throw new Exception("remove: iterator didn't fail fast");
-        } catch(ConcurrentModificationException e) {
+        } catch (ConcurrentModificationException e) {
         }
         if (!copy.equals(orig))
             throw new Exception("remove: iterator didn't fail fast enough");
@@ -56,7 +56,7 @@
             copy.add(new Integer(99));
             i.set(new Integer(666));
             throw new Exception("set: iterator didn't fail fast");
-        } catch(ConcurrentModificationException e) {
+        } catch (ConcurrentModificationException e) {
         }
         if (!copy.equals(orig))
             throw new Exception("set: iterator didn't fail fast enough");
@@ -67,7 +67,7 @@
             copy.add(new Integer(99));
             i.add(new Integer(666));
             throw new Exception("add: iterator didn't fail fast");
-        } catch(ConcurrentModificationException e) {
+        } catch (ConcurrentModificationException e) {
         }
         if (!copy.equals(orig))
             throw new Exception("add: iterator didn't fail fast enough");
--- a/jdk/test/java/util/Collection/BiggernYours.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collection/BiggernYours.java	Tue Oct 27 01:45:03 2015 -0400
@@ -41,16 +41,16 @@
         Object[] c2Array = c2.toArray();
 
         check(c1Array.length == c2Array.length);
-        for(Object aC1 : c1Array) {
+        for (Object aC1 : c1Array) {
             boolean found = false;
-            for(Object aC2 : c2Array) {
-                if(Objects.equals(aC1, aC2)) {
+            for (Object aC2 : c2Array) {
+                if (Objects.equals(aC1, aC2)) {
                     found = true;
                     break;
                 }
             }
 
-            if(!found)
+            if (!found)
                 fail(aC1 + " not found in " + Arrays.toString(c2Array));
         }
     }
--- a/jdk/test/java/util/Collection/MOAT.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collection/MOAT.java	Tue Oct 27 01:45:03 2015 -0400
@@ -101,7 +101,12 @@
 
         testMap(new HashMap<Integer,Integer>());
         testMap(new LinkedHashMap<Integer,Integer>());
-        testMap(new WeakHashMap<Integer,Integer>());
+
+        // TODO: Add reliable support for WeakHashMap.
+        // This test is subject to very rare failures because the GC
+        // may remove unreferenced-keys from the map at any time.
+        // testMap(new WeakHashMap<Integer,Integer>());
+
         testMap(new IdentityHashMap<Integer,Integer>());
         testMap(new TreeMap<Integer,Integer>());
         testMap(new Hashtable<Integer,Integer>());
@@ -343,6 +348,12 @@
         return true;
     }
 
+    // 6260652: (coll) Arrays.asList(x).toArray().getClass()
+    //          should be Object[].class
+    // Fixed in jdk9, but not jdk8 ...
+    static final boolean needToWorkAround6260652 =
+        Arrays.asList("").toArray().getClass() != Object[].class;
+
     private static void checkFunctionalInvariants(Collection<Integer> c) {
         try {
             checkContainsSelf(c);
@@ -356,7 +367,10 @@
             }
 
             check(c.toArray().length == c.size());
-            check(c.toArray().getClass() == Object[].class);
+            check(c.toArray().getClass() == Object[].class
+                  ||
+                  (needToWorkAround6260652 &&
+                   c.getClass().getName().equals("java.util.Arrays$ArrayList")));
             for (int size : new int[]{0,1,c.size(), c.size()+1}) {
                 Integer[] a = c.toArray(new Integer[size]);
                 check((size > c.size()) || a.length == c.size());
@@ -408,7 +422,6 @@
         catch (Throwable t) { unexpected(t); }
     }
 
-
     //----------------------------------------------------------------
     // If add("x") succeeds, contains("x") & remove("x") should succeed
     //----------------------------------------------------------------
@@ -1291,7 +1304,7 @@
 
         equalNext(descItr, expected[idx--]);
         descItr.remove();
-        while(idx >= 0 && descItr.hasNext()) {
+        while (idx >= 0 && descItr.hasNext()) {
             equalNext(descItr, expected[idx--]);
         }
         equal(descItr.hasNext(), false);
--- a/jdk/test/java/util/Collection/testlibrary/CollectionAsserts.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collection/testlibrary/CollectionAsserts.java	Tue Oct 27 01:45:03 2015 -0400
@@ -113,7 +113,7 @@
         }
 
         Set<T> uniq = new HashSet<>();
-        while(iter.hasNext()) {
+        while (iter.hasNext()) {
             T each = iter.next();
             assertTrue(!uniq.contains(each));
             uniq.add(each);
@@ -209,7 +209,7 @@
             assertTrue(!pI.hasNext());
         }
 
-        while(mI.hasNext()) {
+        while (mI.hasNext()) {
             pI = mI.next().iterator();
             assertTrue(!pI.hasNext());
         }
--- a/jdk/test/java/util/Collections/BigBinarySearch.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/BigBinarySearch.java	Tue Oct 27 01:45:03 2015 -0400
@@ -61,13 +61,13 @@
         }
     }
 
-    /** Check that binarySearch finds an element where we got it */
+    /** Checks that binarySearch finds an element where we got it. */
     private static void checkBinarySearch(List<Integer> l, int i) {
         try { equal(i, Collections.binarySearch(l, l.get(i))); }
         catch (Throwable t) { unexpected(t); }
     }
 
-    /** Check that binarySearch finds an element where we got it */
+    /** Checks that binarySearch finds an element where we got it. */
     private static void checkBinarySearch(List<Integer> l, int i,
                                           Comparator<Integer> comparator) {
         try { equal(i, Collections.binarySearch(l, l.get(i), comparator)); }
--- a/jdk/test/java/util/Collections/BinarySearchNullComparator.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/BinarySearchNullComparator.java	Tue Oct 27 01:45:03 2015 -0400
@@ -27,11 +27,10 @@
  * @summary Test Collections.binarySearch() with a null comparator
  */
 
-
 import java.util.*;
 
 public class BinarySearchNullComparator {
-    public static void main (String args[]) throws Exception {
+    public static void main(String args[]) throws Exception {
         List list = Arrays.asList(new String[] {"I", "Love", "You"});
 
         int result = Collections.binarySearch(list, "You", null);
--- a/jdk/test/java/util/Collections/CheckedListBash.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/CheckedListBash.java	Tue Oct 27 01:45:03 2015 -0400
@@ -109,19 +109,19 @@
 
         List even = clone(s);
         Iterator it = even.iterator();
-        while(it.hasNext())
-            if(((Integer)it.next()).intValue() % 2 == 1)
+        while (it.hasNext())
+            if (((Integer)it.next()).intValue() % 2 == 1)
                 it.remove();
         it = even.iterator();
-        while(it.hasNext())
-            if(((Integer)it.next()).intValue() % 2 == 1)
+        while (it.hasNext())
+            if (((Integer)it.next()).intValue() % 2 == 1)
                 fail("Failed to remove all odd nubmers.");
 
         List odd = clone(s);
         for (int i=0; i<(listSize/2); i++)
             odd.remove(i);
         for (int i=0; i<(listSize/2); i++)
-            if(((Integer)odd.get(i)).intValue() % 2 != 1)
+            if (((Integer)odd.get(i)).intValue() % 2 != 1)
                 fail("Failed to remove all even nubmers.");
 
         List all = clone(odd);
@@ -145,8 +145,8 @@
         }
         itAll = all.listIterator();
         it = s.iterator();
-        while(it.hasNext())
-            if(it.next()==itAll.next())
+        while (it.hasNext())
+            if (it.next()==itAll.next())
                 fail("Iterator.set failed to change value.");
         if (!all.equals(s))
             fail("Failed to reconstruct ints with ListIterator.");
@@ -215,10 +215,10 @@
 
             int preSize = s.size();
             if (!s.add(e))
-                fail ("Add failed.");
+                fail("Add failed.");
             int postSize = s.size();
             if (postSize-preSize != 1)
-                fail ("Add didn't increase size by 1.");
+                fail("Add didn't increase size by 1.");
         }
     }
 
--- a/jdk/test/java/util/Collections/CheckedMapBash.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/CheckedMapBash.java	Tue Oct 27 01:45:03 2015 -0400
@@ -134,7 +134,7 @@
             fail("clear failed.");
 
         Iterator i = m.entrySet().iterator();
-        while(i.hasNext()) {
+        while (i.hasNext()) {
             i.next();
             i.remove();
         }
@@ -142,12 +142,11 @@
             fail("Iterator.remove() failed");
     }
 
-
     @DataProvider(name = "Bash.Supplier<Map<Integer,Integer>>", parallel = true)
     public static Iterator<Object[]> bashNavigableMapProvider() {
         ArrayList<Object[]> iters = new ArrayList<>(makeCheckedMaps());
         iters.ensureCapacity(numItr * iters.size());
-        for(int each=1; each < numItr; each++) {
+        for (int each=1; each < numItr; each++) {
             iters.addAll( makeCheckedMaps());
         }
         return iters.iterator();
--- a/jdk/test/java/util/Collections/CheckedSetBash.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/CheckedSetBash.java	Tue Oct 27 01:45:03 2015 -0400
@@ -130,14 +130,14 @@
             boolean prePresent = s.contains(e);
             boolean added = s.add(e);
             if (!s.contains(e))
-                fail ("Element not present after addition.");
+                fail("Element not present after addition.");
             if (added == prePresent)
-                fail ("added == alreadyPresent");
+                fail("added == alreadyPresent");
             int postSize = s.size();
             if (added && preSize == postSize)
-                fail ("Add returned true, but size didn't change.");
+                fail("Add returned true, but size didn't change.");
             if (!added && preSize != postSize)
-                fail ("Add returned false, but size changed.");
+                fail("Add returned false, but size changed.");
         }
     }
 
@@ -145,7 +145,7 @@
     public static Iterator<Object[]> navigableSetsProvider() {
         ArrayList<Object[]> iters = new ArrayList<>(makeCheckedSets());
         iters.ensureCapacity(numItr * iters.size());
-        for(int each=1; each < numItr; each++) {
+        for (int each=1; each < numItr; each++) {
             iters.addAll( makeCheckedSets());
         }
         return iters.iterator();
--- a/jdk/test/java/util/Collections/EmptyCollectionSerialization.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/EmptyCollectionSerialization.java	Tue Oct 27 01:45:03 2015 -0400
@@ -62,7 +62,7 @@
                 copy.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(copy)) +
                 " is not the singleton " +
                 singleton.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(singleton)));
-        } catch(Exception all) {
+        } catch (Exception all) {
             fail(description + ": Unexpected Exception", all);
         }
     }
--- a/jdk/test/java/util/Collections/EmptyIterator.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/EmptyIterator.java	Tue Oct 27 01:45:03 2015 -0400
@@ -29,13 +29,14 @@
 
 import static java.util.Collections.*;
 import java.util.*;
+import java.util.concurrent.SynchronousQueue;
 
 public class EmptyIterator {
 
     void test(String[] args) throws Throwable {
         testEmptyCollection(emptyList());
         testEmptyCollection(emptySet());
-
+        testEmptyCollection(new SynchronousQueue<Object>());
         testEmptyMap(emptyMap());
 
         Hashtable<?,?> emptyTable = new Hashtable<>();
--- a/jdk/test/java/util/Collections/EmptyNavigableMap.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/EmptyNavigableMap.java	Tue Oct 27 01:45:03 2015 -0400
@@ -282,7 +282,7 @@
 
         // slightly smaller
         NavigableMap ns = subMap.subMap(first, false, last, false);
-        // slight exapansion
+        // slight expansion
         assertThrows(() -> {
             ns.subMap(first, true, last, true);
         },
@@ -303,7 +303,7 @@
         // slightly smaller
         NavigableMap ns = subMap.headMap(BigInteger.ONE, false);
 
-        // slight exapansion
+        // slight expansion
         assertThrows(() -> {
             ns.headMap(BigInteger.ONE, true);
         },
@@ -324,7 +324,7 @@
         // slightly smaller
         NavigableMap ns = subMap.tailMap(BigInteger.ONE, false);
 
-        // slight exapansion
+        // slight expansion
         assertThrows(() -> {
             ns.tailMap(BigInteger.ONE, true);
         },
--- a/jdk/test/java/util/Collections/EmptyNavigableSet.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/EmptyNavigableSet.java	Tue Oct 27 01:45:03 2015 -0400
@@ -301,7 +301,7 @@
 
         // slightly smaller
         NavigableSet ns = subSet.subSet(first, false, last, false);
-        // slight exapansion
+        // slight expansion
         assertThrows(() -> {
             ns.subSet(first, true, last, true);
         },
@@ -322,7 +322,7 @@
         // slightly smaller
         NavigableSet ns = subSet.headSet(BigInteger.ONE, false);
 
-        // slight exapansion
+        // slight expansion
         assertThrows(() -> {
             ns.headSet(BigInteger.ONE, true);
         },
@@ -343,7 +343,7 @@
         // slightly smaller
         NavigableSet ns = subSet.tailSet(BigInteger.ONE, false);
 
-        // slight exapansion
+        // slight expansion
         assertThrows(() -> {
             ns.tailSet(BigInteger.ONE, true);
         },
--- a/jdk/test/java/util/Collections/RacingCollections.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/RacingCollections.java	Tue Oct 27 01:45:03 2015 -0400
@@ -62,14 +62,16 @@
             this.start();
         }
 
-        @SuppressWarnings("unchecked") void clear(Object o) {
+        @SuppressWarnings("unchecked")
+        void clear(Object o) {
             if (o instanceof Collection)
                 ((Collection<?>)o).clear();
             else
                 ((Map<?,?>)o).clear();
         }
 
-        @SuppressWarnings("unchecked") void realRun() {
+        @SuppressWarnings("unchecked")
+        void realRun() {
             // Mutate elLoco wildly forever, checking occasionally for "done"
             clear(elLoco);
             if (elLoco instanceof List) {
@@ -156,7 +158,7 @@
             quittingTime = System.nanoTime() + workTimeMillis * 1024 * 1024;
         }
         boolean keepGoing() {
-            return (i++ % 128 != 0) || (System.nanoTime() < quittingTime);
+            return (i++ % 128 != 0) || (System.nanoTime() - quittingTime < 0);
         }
     }
 
@@ -233,6 +235,7 @@
     private static List<Queue<Integer>> newConcurrentQueues() {
         List<Queue<Integer>> list =
             new ArrayList<Queue<Integer>>(newConcurrentDeques());
+        list.add(new ArrayBlockingQueue<Integer>(10));
         list.add(new LinkedBlockingQueue<Integer>(10));
         list.add(new LinkedTransferQueue<Integer>());
         list.add(new ConcurrentLinkedQueue<Integer>());
--- a/jdk/test/java/util/Collections/ReverseOrder.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/ReverseOrder.java	Tue Oct 27 01:45:03 2015 -0400
@@ -25,7 +25,7 @@
  * @test
  * @bug 4593209 8001667
  * @summary Reverse comparator was subtly broken
- * @author Josh bloch
+ * @author Josh Bloch
  */
 
 import java.util.*;
--- a/jdk/test/java/util/Collections/RotateEmpty.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/RotateEmpty.java	Tue Oct 27 01:45:03 2015 -0400
@@ -33,6 +33,6 @@
 
     public static void main(String[] args) throws Exception {
             List l = new ArrayList();
-            Collections.rotate (l, 1);
+            Collections.rotate(l, 1);
     }
 }
--- a/jdk/test/java/util/Collections/T6433170.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/T6433170.java	Tue Oct 27 01:45:03 2015 -0400
@@ -58,7 +58,6 @@
         checkEmpty(checked);
     }
 
-
     //--------------------- Infrastructure ---------------------------
     volatile int passed = 0, failed = 0;
     void pass() {passed++;}
--- a/jdk/test/java/util/Collections/WrappedNull.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Collections/WrappedNull.java	Tue Oct 27 01:45:03 2015 -0400
@@ -33,133 +33,133 @@
 public class WrappedNull {
       public static void main(String argv[]) throws Exception {
           boolean testSucceeded = false;
-          try{
+          try {
               List l = Arrays.asList(null);
           }
           catch (NullPointerException e) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("Arrays.asList");
 
           testSucceeded = false;
-          try{
+          try {
               Collection c = Collections.unmodifiableCollection(null);
           }
           catch (NullPointerException e) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("unmodifiableCollection");
 
           testSucceeded = false;
-          try{
+          try {
               Set c = Collections.unmodifiableSet(null);
           }
           catch (NullPointerException e) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("unmodifiableSet");
 
           testSucceeded = false;
-          try{
+          try {
               List c = Collections.unmodifiableList(null);
           }
           catch (NullPointerException e) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("unmodifiableList");
 
           testSucceeded = false;
-          try{
+          try {
               Map c = Collections.unmodifiableMap(null);
           }
           catch (NullPointerException e) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("unmodifiableMap");
 
           testSucceeded = false;
-          try{
+          try {
               SortedSet c = Collections.unmodifiableSortedSet(null);
           }
           catch (NullPointerException e) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("unmodifiableSortedSet");
 
           testSucceeded = false;
-          try{
+          try {
               SortedMap c = Collections.unmodifiableSortedMap(null);
           }
           catch (NullPointerException e) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("unmodifiableSortedMap");
 
           testSucceeded = false;
-          try{
+          try {
               Collection c = Collections.synchronizedCollection(null);
           }
           catch (NullPointerException e) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("synchronizedCollection");
 
           testSucceeded = false;
-          try{
+          try {
               Set c = Collections.synchronizedSet(null);
           }
           catch (NullPointerException e) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("synchronizedSet");
 
           testSucceeded = false;
-          try{
+          try {
               List c = Collections.synchronizedList(null);
           }
           catch (NullPointerException e) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("synchronizedList");
 
           testSucceeded = false;
-          try{
+          try {
               Map c = Collections.synchronizedMap(null);
           }
           catch (NullPointerException e) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("synchronizedMap");
 
           testSucceeded = false;
-          try{
+          try {
               SortedSet c = Collections.synchronizedSortedSet(null);
           }
           catch (NullPointerException e) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("synchronizedSortedSet");
 
           testSucceeded = false;
-          try{
+          try {
               SortedMap c = Collections.synchronizedSortedMap(null);
           }
           catch (NullPointerException e) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("synchronizedSortedMap");
 
           // Make sure that non-null arguments don't throw exc.
--- a/jdk/test/java/util/Hashtable/IllegalLoadFactor.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Hashtable/IllegalLoadFactor.java	Tue Oct 27 01:45:03 2015 -0400
@@ -26,8 +26,6 @@
    @summary Test for an illegalargumentexception on loadFactor
 */
 
-
-
 import java.util.*;
 
 /**
@@ -38,92 +36,92 @@
 
       public static void main(String argv[]) throws Exception {
           boolean testSucceeded = false;
-          try{
+          try {
               // this should generate an IllegalArgumentException
               Hashtable bad1 = new Hashtable(100, -3);
           }
           catch (IllegalArgumentException e1) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("Hashtable, negative load factor");
 
           testSucceeded = false;
-          try{
+          try {
               // this should generate an IllegalArgumentException
               Hashtable bad1 = new Hashtable(100, Float.NaN);
           }
           catch (IllegalArgumentException e1) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("Hashtable, NaN load factor");
 
           testSucceeded = false;
-          try{
+          try {
               // this should generate an IllegalArgumentException
               HashMap bad1 = new HashMap(100, -3);
           }
           catch (IllegalArgumentException e1) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("HashMap, negative load factor");
 
           testSucceeded = false;
-          try{
+          try {
               // this should generate an IllegalArgumentException
               HashMap bad1 = new HashMap(100, Float.NaN);
           }
           catch (IllegalArgumentException e1) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("HashMap, NaN load factor");
 
 
           testSucceeded = false;
-          try{
+          try {
               // this should generate an IllegalArgumentException
               HashSet bad1 = new HashSet(100, -3);
           }
           catch (IllegalArgumentException e1) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("HashSet, negative load factor");
 
           testSucceeded = false;
-          try{
+          try {
               // this should generate an IllegalArgumentException
               HashSet bad1 = new HashSet(100, Float.NaN);
           }
           catch (IllegalArgumentException e1) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("HashSet, NaN load factor");
 
           testSucceeded = false;
-          try{
+          try {
               // this should generate an IllegalArgumentException
               WeakHashMap bad1 = new WeakHashMap(100, -3);
           }
           catch (IllegalArgumentException e1) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("WeakHashMap, negative load factor");
 
           testSucceeded = false;
-          try{
+          try {
               // this should generate an IllegalArgumentException
               WeakHashMap bad1 = new WeakHashMap(100, Float.NaN);
           }
           catch (IllegalArgumentException e1) {
               testSucceeded = true;
           }
-          if(!testSucceeded)
+          if (!testSucceeded)
               throw new Exception("WeakHashMap, NaN load factor");
 
           // Make sure that legal creates don't throw exceptions
--- a/jdk/test/java/util/Hashtable/ReadObject.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Hashtable/ReadObject.java	Tue Oct 27 01:45:03 2015 -0400
@@ -57,13 +57,13 @@
     public Object get(Object key) {
         ValueWrapper valueWrapper = (ValueWrapper)super.get(key);
         Object value = valueWrapper.getValue();
-        if(value instanceof ValueWrapper)
+        if (value instanceof ValueWrapper)
             throw new RuntimeException("Hashtable.get bug");
         return value;
     }
 
     public Object put(Object key, Object value) {
-        if(value instanceof ValueWrapper)
+        if (value instanceof ValueWrapper)
             throw new RuntimeException(
                 "Hashtable.put bug: value is already wrapped");
         ValueWrapper valueWrapper = new ValueWrapper(value);
@@ -98,4 +98,4 @@
         ReadObject myHashtableCopy = (ReadObject)copyObject(myHashtable);
         String value = (String)myHashtableCopy.get("key");
     }
-};
+}
--- a/jdk/test/java/util/IdentityHashMap/ToString.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/IdentityHashMap/ToString.java	Tue Oct 27 01:45:03 2015 -0400
@@ -28,7 +28,6 @@
  * @author  Josh Bloch
  */
 
-
 import java.util.*;
 
 public class ToString {
--- a/jdk/test/java/util/LinkedHashMap/Basic.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/LinkedHashMap/Basic.java	Tue Oct 27 01:45:03 2015 -0400
@@ -83,12 +83,12 @@
         Map<Integer,Integer> m = new LinkedHashMap();
         for (int i=0; i<mapSize; i++)
             if (m.put(new Integer(i), new Integer(2*i)) != null)
-                throw new Exception("put returns non-null value erroenously.");
+                throw new Exception("put returns non-null value erroneously.");
         for (int i=0; i<2*mapSize; i++)
             if (m.containsValue(new Integer(i)) != (i%2==0))
                 throw new Exception("contains value "+i);
         if (m.put(nil, nil) == null)
-            throw new Exception("put returns a null value erroenously.");
+            throw new Exception("put returns a null value erroneously.");
         Map<Integer,Integer> m2 = new LinkedHashMap(); m2.putAll(m);
         if (!m.equals(m2))
             throw new Exception("Clone not equal to original. (1)");
@@ -129,7 +129,7 @@
             throw new Exception("clear failed.");
 
         Iterator it = m.entrySet().iterator();
-        while(it.hasNext()) {
+        while (it.hasNext()) {
             it.next();
             it.remove();
         }
@@ -240,8 +240,8 @@
 
         for (int i=0; i<mapSize; i++) {
             Integer x = (Integer) l2.get(i);
-            if(!x.equals(m.remove(x)))
-              throw new Exception("Missing key: "+i+", "+x);
+            if (!x.equals(m.remove(x)))
+                throw new Exception("Missing key: "+i+", "+x);
             if (!x.equals(m.computeIfAbsent(x, Integer::valueOf)))
                 throw new Exception("Wrong value: "+i+", "+m.get(x)+", "+x);
         }
@@ -292,7 +292,7 @@
             ObjectInputStream in = new ObjectInputStream(bis);
             result = (Map)in.readObject();
             in.close();
-        } catch(Exception e) {
+        } catch (Exception e) {
             e.printStackTrace();
         }
         return result;
--- a/jdk/test/java/util/LinkedHashMap/Cache.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/LinkedHashMap/Cache.java	Tue Oct 27 01:45:03 2015 -0400
@@ -33,7 +33,7 @@
     private static final int MAP_SIZE = 10;
     private static final int NUM_KEYS = 100;
 
-    public static void main(String[] args)  throws Exception {
+    public static void main(String[] args) throws Exception {
         Map m = new LinkedHashMap() {
             protected boolean removeEldestEntry(Map.Entry eldest) {
                 return size() > MAP_SIZE;
--- a/jdk/test/java/util/LinkedHashSet/Basic.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/LinkedHashSet/Basic.java	Tue Oct 27 01:45:03 2015 -0400
@@ -99,7 +99,7 @@
     static Set clone(Set s) throws Exception {
         Set clone;
         int method = rnd.nextInt(3);
-        clone = (method==0 ?  (Set) ((LinkedHashSet)s).clone() :
+        clone = (method==0 ? (Set) ((LinkedHashSet)s).clone() :
                  (method==1 ? new LinkedHashSet(Arrays.asList(s.toArray())) :
                   serClone(s)));
         if (!s.equals(clone))
@@ -126,7 +126,7 @@
             ObjectInputStream in = new ObjectInputStream(bis);
             result = (Set)in.readObject();
             in.close();
-        } catch(Exception e) {
+        } catch (Exception e) {
             e.printStackTrace();
         }
         return result;
--- a/jdk/test/java/util/LinkedList/Clone.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/LinkedList/Clone.java	Tue Oct 27 01:45:03 2015 -0400
@@ -74,7 +74,7 @@
             throw new RuntimeException("TreeMap.clone() is broken.");
     }
 
-    private static class LinkedList2 extends LinkedList {};
-    private static class TreeSet2    extends TreeSet {};
-    private static class TreeMap2    extends TreeMap {};
+    private static class LinkedList2 extends LinkedList {}
+    private static class TreeSet2    extends TreeSet {}
+    private static class TreeMap2    extends TreeMap {}
 }
--- a/jdk/test/java/util/LinkedList/ComodifiedRemove.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/LinkedList/ComodifiedRemove.java	Tue Oct 27 01:45:03 2015 -0400
@@ -41,10 +41,10 @@
         list.add(o1);
         ListIterator e = list.listIterator();
         e.next();
-        Object o2 = new Integer (2);
+        Object o2 = new Integer(2);
         list.add(o2);
 
-        try{
+        try {
             e.remove();
         } catch (ConcurrentModificationException cme) {
             return;
--- a/jdk/test/java/util/List/ListDefaults.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/List/ListDefaults.java	Tue Oct 27 01:45:03 2015 -0400
@@ -381,7 +381,7 @@
                 minBitCount = bitCount;
             }
 
-            // Resuse the supplier to store AtomicInteger instead of Integer
+            // Reuse the supplier to store AtomicInteger instead of Integer
             // Hence the use of raw type and cast
             List<AtomicInteger> incomparablesData = new ArrayList<>();
             for (int i = 0; i < test.expected.size(); i++) {
--- a/jdk/test/java/util/Map/Defaults.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Map/Defaults.java	Tue Oct 27 01:45:03 2015 -0400
@@ -464,7 +464,7 @@
     @Test(dataProvider = "MergeCases")
     private void testMerge(String description, Map<IntegerEnum, String> map, Merging.Value oldValue, Merging.Value newValue, Merging.Merger merger, Merging.Value put, Merging.Value result) {
             // add and check initial conditions.
-            switch(oldValue) {
+            switch (oldValue) {
                 case ABSENT :
                     map.remove(EXTRA_KEY);
                     assertFalse(map.containsKey(EXTRA_KEY), "key not absent");
@@ -490,7 +490,7 @@
 
             // check result
 
-            switch(result) {
+            switch (result) {
                 case NULL :
                     assertNull(returned, "wrong value");
                     break;
@@ -505,7 +505,7 @@
             }
 
             // check map
-            switch(put) {
+            switch (put) {
                 case ABSENT :
                     assertFalse(map.containsKey(EXTRA_KEY), "key not absent");
                     break;
@@ -610,7 +610,6 @@
         return all;
     }
 
-
     private static Collection<Object[]> makeRWMapsNoNulls() {
         Collection<Object[]> all = new ArrayList<>();
 
@@ -656,8 +655,8 @@
 
         return all;
     }
+
     /**
-     *
      * @param nullKeys include null keys
      * @param nullValues include null values
      * @return
@@ -674,7 +673,6 @@
     }
 
     /**
-     *
      * @param nulls include null values
      * @return
      */
@@ -702,7 +700,6 @@
     }
 
     /**
-     *
      * @param nulls include nulls
      * @return
      */
@@ -712,8 +709,7 @@
         });
     }
 
-     /**
-     *
+    /**
      * @param supplier a supplier of mutable map instances.
      *
      * @param nullKeys   include null keys
@@ -774,15 +770,15 @@
     static Collection<Object[]> makeMergeTestCases() {
         Collection<Object[]> cases = new ArrayList<>();
 
-        for( Object[] mapParams : makeAllRWMaps() ) {
+        for (Object[] mapParams : makeAllRWMaps() ) {
             cases.add(new Object[] { mapParams[0], mapParams[1], Merging.Value.ABSENT, Merging.Value.NEWVALUE, Merging.Merger.UNUSED, Merging.Value.NEWVALUE, Merging.Value.NEWVALUE });
         }
 
-        for( Object[] mapParams : makeAllRWMaps() ) {
+        for (Object[] mapParams : makeAllRWMaps() ) {
             cases.add(new Object[] { mapParams[0], mapParams[1], Merging.Value.OLDVALUE, Merging.Value.NEWVALUE, Merging.Merger.NULL, Merging.Value.ABSENT, Merging.Value.NULL });
         }
 
-        for( Object[] mapParams : makeAllRWMaps() ) {
+        for (Object[] mapParams : makeAllRWMaps() ) {
             cases.add(new Object[] { mapParams[0], mapParams[1], Merging.Value.OLDVALUE, Merging.Value.NEWVALUE, Merging.Merger.RESULT, Merging.Value.RESULT, Merging.Value.RESULT });
         }
 
@@ -813,7 +809,7 @@
     }
 
     public static <T extends Throwable> void assertThrows(Class<T> throwable, String message, Thrower<T>... throwers) {
-        for(Thrower<T> thrower : throwers) {
+        for (Thrower<T> thrower : throwers) {
             assertThrows(thrower, throwable, message);
         }
     }
@@ -834,7 +830,7 @@
      * @param <K> Type of keys
      * @param <V> Type of values
      */
-    public static class ExtendsAbstractMap<M extends Map<K,V>, K, V> extends AbstractMap<K, V> {
+    public static class ExtendsAbstractMap<M extends Map<K,V>, K, V> extends AbstractMap<K,V> {
 
         protected final M map;
 
@@ -842,8 +838,8 @@
 
         protected ExtendsAbstractMap(M map) { this.map = map; }
 
-        public Set<Map.Entry<K, V>> entrySet() {
-            return new AbstractSet<Map.Entry<K, V>>() {
+        public Set<Map.Entry<K,V>> entrySet() {
+            return new AbstractSet<Map.Entry<K,V>>() {
                 public int size() {
                     return map.size();
                 }
@@ -876,7 +872,7 @@
      * @param <K> Type of keys
      * @param <V> Type of values
      */
-    public static class ImplementsConcurrentMap<K, V> extends ExtendsAbstractMap<ConcurrentMap<K,V>, K, V> implements ConcurrentMap<K,V> {
+    public static class ImplementsConcurrentMap<K,V> extends ExtendsAbstractMap<ConcurrentMap<K,V>, K, V> implements ConcurrentMap<K,V> {
         public ImplementsConcurrentMap() { super(new ConcurrentHashMap<K,V>()); }
 
         // ConcurrentMap reabstracts these methods
--- a/jdk/test/java/util/Map/Get.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Map/Get.java	Tue Oct 27 01:45:03 2015 -0400
@@ -119,7 +119,7 @@
     static void check(boolean cond) { if (cond) pass(); else fail(); }
     static void check(String desc, boolean cond) { if (cond) pass(); else fail(desc); }
     static void equal(Object x, Object y) {
-        if(Objects.equals(x,y)) pass(); else fail(x + " not equal to " + y);
+        if (Objects.equals(x,y)) pass(); else fail(x + " not equal to " + y);
     }
 
     public static void main(String[] args) throws Throwable {
--- a/jdk/test/java/util/NavigableMap/LockStep.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/NavigableMap/LockStep.java	Tue Oct 27 01:45:03 2015 -0400
@@ -228,8 +228,8 @@
         if (maybe(4) && s instanceof Serializable) {
             try {
                 equal2(s, serialClone(s));
-            } catch(RuntimeException uhoh) {
-                if(!(uhoh.getCause() instanceof NotSerializableException)) {
+            } catch (RuntimeException uhoh) {
+                if (!(uhoh.getCause() instanceof NotSerializableException)) {
                     throw uhoh;
                 }
             }
--- a/jdk/test/java/util/Objects/BasicObjectsTest.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Objects/BasicObjectsTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,6 +44,7 @@
         errors += testRequireNonNull();
         errors += testIsNull();
         errors += testNonNull();
+        errors += testNonNullOf();
         if (errors > 0 )
             throw new RuntimeException();
     }
@@ -232,4 +233,46 @@
 
         return errors;
     }
+
+    private static int testNonNullOf() {
+        int errors = 0;
+        String defString = new String("default");
+        String nullString = null;
+        String nonNullString = "non-null";
+
+        // Confirm the compile time return type matches
+        String result = Objects.nonNullElse(nullString, defString);
+        errors += (result == defString) ? 0 : 1;
+        errors += (Objects.nonNullElse(nonNullString, defString) == nonNullString) ? 0 : 1;
+        errors += (Objects.nonNullElse(nonNullString, null) == nonNullString) ? 0 : 1;
+        try {
+            Objects.nonNullElse(null, null);
+            errors += 1;
+        } catch (NullPointerException npe) {
+            // expected
+            errors += npe.getMessage().equals("defaultObj") ? 0 : 1;
+        }
+
+
+        // Test nonNullElseGet with a supplier
+        errors += (Objects.nonNullElseGet(nullString, () -> defString) == defString) ? 0 : 1;
+        errors += (Objects.nonNullElseGet(nonNullString, () -> defString) == nonNullString) ? 0 : 1;
+        errors += (Objects.nonNullElseGet(nonNullString, () -> null) == nonNullString) ? 0 : 1;
+
+        try {
+            Objects.nonNullElseGet(null, () -> null);
+            errors += 1;
+        } catch (NullPointerException npe) {
+            // expected
+            errors += npe.getMessage().equals("supplier.get()") ? 0 : 1;
+        }
+        try {       // supplier is null
+            Objects.nonNullElseGet(null, null);
+            errors += 1;
+        } catch (NullPointerException npe) {
+            // expected
+            errors += npe.getMessage().equals("supplier") ? 0 : 1;
+        }
+        return errors;
+    }
 }
--- a/jdk/test/java/util/Optional/Basic.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Optional/Basic.java	Tue Oct 27 01:45:03 2015 -0400
@@ -294,6 +294,46 @@
     }
 
     @Test(groups = "unit")
+    public void testOr() {
+        Optional<String> empty = Optional.empty();
+        Optional<String> duke = Optional.of("Duke");
+
+        // Null supplier
+        try {
+            Optional<String> b = empty.or(null);
+            fail("Should throw NPE on null supplier");
+        } catch (NullPointerException npe) {
+            // expected
+        }
+
+        // Supply null
+        try {
+            Optional<String> b = empty.or(() -> null);
+            fail("Should throw NPE when supplier returns null");
+        } catch (NullPointerException npe) {
+            // expected
+        }
+
+        // Non-empty won't invoke supplier
+        try {
+            Optional<String> b = duke.or(() -> null);
+            assertTrue(b.isPresent());
+        } catch (NullPointerException npe) {
+            fail("Supplier should not be invoked");
+        }
+
+        // Supply for empty
+        Optional<String> suppliedDuke = empty.or(() -> duke);
+        assertTrue(suppliedDuke.isPresent());
+        assertSame(suppliedDuke, duke);
+
+        // Supply for non-empty
+        Optional<String> actualDuke = duke.or(() -> Optional.of("Other Duke"));
+        assertTrue(actualDuke.isPresent());
+        assertSame(actualDuke, duke);
+    }
+
+    @Test(groups = "unit")
     public void testStream() {
         {
             Stream<String> s = Optional.<String>empty().stream();
--- a/jdk/test/java/util/Spliterator/SpliteratorCharacteristics.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Spliterator/SpliteratorCharacteristics.java	Tue Oct 27 01:45:03 2015 -0400
@@ -126,19 +126,19 @@
         }
 
         {
-            Spliterator<?> s = Spliterators.spliterator(l.iterator( ), 1, 0);
+            Spliterator<?> s = Spliterators.spliterator(l.iterator(), 1, 0);
             assertCharacteristics(s, Spliterator.SIZED | Spliterator.SUBSIZED);
             assertHasNotCharacteristics(s, Spliterator.CONCURRENT);
         }
 
         {
-            Spliterator<?> s = Spliterators.spliterator(l.iterator( ), 1, Spliterator.CONCURRENT);
+            Spliterator<?> s = Spliterators.spliterator(l.iterator(), 1, Spliterator.CONCURRENT);
             assertHasNotCharacteristics(s, Spliterator.SIZED | Spliterator.SUBSIZED);
             assertCharacteristics(s, Spliterator.CONCURRENT);
         }
 
         {
-            Spliterator<?> s = Spliterators.spliteratorUnknownSize(l.iterator( ), 0);
+            Spliterator<?> s = Spliterators.spliteratorUnknownSize(l.iterator(), 0);
             assertHasNotCharacteristics(s, Spliterator.SIZED | Spliterator.SUBSIZED);
         }
 
--- a/jdk/test/java/util/Spliterator/SpliteratorLateBindingFailFastTest.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Spliterator/SpliteratorLateBindingFailFastTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -214,7 +214,7 @@
 
         db.addMap(LinkedHashMap::new);
 
-        // This fails when run through jrteg but passes when run though
+        // This fails when run through jtreg but passes when run through
         // ant
 //        db.addMap(IdentityHashMap::new);
 
--- a/jdk/test/java/util/TimSort/Sorter.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/TimSort/Sorter.java	Tue Oct 27 01:45:03 2015 -0400
@@ -46,7 +46,7 @@
 
         for (int i=0; i < 10000; i++) {
             for (Sorter s : values()) {
-                Integer[] test= gold.clone();
+                Integer[] test = gold.clone();
                 s.sort(test);
             }
         }
--- a/jdk/test/java/util/TreeMap/ContainsValue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/TreeMap/ContainsValue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -30,7 +30,7 @@
 import java.util.*;
 
 public class ContainsValue {
-    public static void main (String[] args) {
+    public static void main(String[] args) {
         Map map = new TreeMap();
 
         if (map.containsValue ("gemutlichkeit"))
--- a/jdk/test/java/util/TreeMap/HeadTailTypeError.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/TreeMap/HeadTailTypeError.java	Tue Oct 27 01:45:03 2015 -0400
@@ -32,71 +32,70 @@
 
 public class HeadTailTypeError {
     public static void main(String argv[]) throws Exception {
-        try{
+        try {
             SortedMap m = new TreeMap();
             m.headMap(new Object());
             throw new Exception("headMap, natural ordering");
         } catch (ClassCastException e) {
         }
 
-        try{
+        try {
             SortedMap m = new TreeMap();
             m.tailMap(new Object());
             throw new Exception("tailMap, natural ordering");
         } catch (ClassCastException e) {
         }
 
-
-        try{
+        try {
             SortedMap m = new TreeMap(String.CASE_INSENSITIVE_ORDER);
             m.headMap(new Integer(0));
             throw new Exception("headMap, explicit comparator");
         } catch (ClassCastException e) {
         }
 
-        try{
+        try {
             SortedMap m = new TreeMap(String.CASE_INSENSITIVE_ORDER);
             m.tailMap(new Integer(0));
             throw new Exception("tailMap, explicit comparator");
         } catch (ClassCastException e) {
         }
 
-        try{
+        try {
             SortedSet m = new TreeSet();
             m.headSet(new Object());
             throw new Exception("headSet, natural ordering");
         } catch (ClassCastException e) {
         }
 
-        try{
+        try {
             SortedSet m = new TreeSet();
             m.tailSet(new Object());
             throw new Exception("tailSet, natural ordering");
         } catch (ClassCastException e) {
         }
 
-        try{
+        try {
             SortedSet m = new TreeSet(String.CASE_INSENSITIVE_ORDER);
             m.headSet(new Integer(0));
             throw new Exception("headSet, explicit comparator");
         } catch (ClassCastException e) {
         }
 
-        try{
+        try {
             SortedSet m = new TreeSet(String.CASE_INSENSITIVE_ORDER);
             m.tailSet(new Integer(0));
             throw new Exception("tailSet, explicit comparator");
         } catch (ClassCastException e) {
         }
 
-        try{
+        try {
             SortedMap m = new TreeMap();
             m.headMap(null);
             throw new Exception("(null endpoint)headMap, natural ordering");
         } catch (NullPointerException e) {
         }
 
-        try{
+        try {
             SortedMap m = new TreeMap();
             m.tailMap(null);
             throw new Exception("(null endpoint)tailMap, natural ordering");
@@ -104,42 +103,42 @@
         }
 
 
-        try{
+        try {
             SortedMap m = new TreeMap(String.CASE_INSENSITIVE_ORDER);
             m.headMap(null);
             throw new Exception("(null endpoint)headMap, explicit comparator");
         } catch (NullPointerException e) {
         }
 
-        try{
+        try {
             SortedMap m = new TreeMap(String.CASE_INSENSITIVE_ORDER);
             m.tailMap(null);
             throw new Exception("(null endpoint)tailMap, explicit comparator");
         } catch (NullPointerException e) {
         }
 
-        try{
+        try {
             SortedSet m = new TreeSet();
             m.headSet(null);
             throw new Exception("(null endpoint)headSet, natural ordering");
         } catch (NullPointerException e) {
         }
 
-        try{
+        try {
             SortedSet m = new TreeSet();
             m.tailSet(null);
             throw new Exception("(null endpoint)tailSet, natural ordering");
         } catch (NullPointerException e) {
         }
 
-        try{
+        try {
             SortedSet m = new TreeSet(String.CASE_INSENSITIVE_ORDER);
             m.headSet(null);
             throw new Exception("(null endpoint)headSet, explicit comparator");
         } catch (NullPointerException e) {
         }
 
-        try{
+        try {
             SortedSet m = new TreeSet(String.CASE_INSENSITIVE_ORDER);
             m.tailSet(null);
             throw new Exception("(null endpoint)tailSet, explicit comparator");
--- a/jdk/test/java/util/TreeMap/SubMap.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/TreeMap/SubMap.java	Tue Oct 27 01:45:03 2015 -0400
@@ -40,7 +40,7 @@
         boolean exc = false;
         try {
             m2.firstKey();
-        } catch(NoSuchElementException e) {
+        } catch (NoSuchElementException e) {
             exc = true;
         }
         if (!exc)
@@ -49,7 +49,7 @@
         exc = false;
         try {
             m2.lastKey();
-        } catch(NoSuchElementException e) {
+        } catch (NoSuchElementException e) {
             exc = true;
         }
         if (!exc)
@@ -70,7 +70,7 @@
         exc = false;
         try {
             s2.first();
-        } catch(NoSuchElementException e) {
+        } catch (NoSuchElementException e) {
             exc = true;
         }
         if (!exc)
@@ -79,7 +79,7 @@
         exc = false;
         try {
             s2.last();
-        } catch(NoSuchElementException e) {
+        } catch (NoSuchElementException e) {
             exc = true;
         }
         if (!exc)
--- a/jdk/test/java/util/Vector/ComodifiedRemoveAllElements.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Vector/ComodifiedRemoveAllElements.java	Tue Oct 27 01:45:03 2015 -0400
@@ -25,7 +25,7 @@
  * @test
  * @bug 4298133
  * @summary Due to a bug in Vector's removeAllElements(),
- *          the modification counter  would not get incremented.
+ *          the modification counter would not get incremented.
  * @author Konstantin Kladko
  */
 
@@ -37,7 +37,7 @@
         v.addElement(null);
         Iterator it = v.iterator();
         v.removeAllElements();
-        try{
+        try {
             it.next();
         } catch (ConcurrentModificationException cme) {
             return;
--- a/jdk/test/java/util/Vector/IllegalConstructorArgs.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Vector/IllegalConstructorArgs.java	Tue Oct 27 01:45:03 2015 -0400
@@ -39,7 +39,7 @@
       public static void main(String argv[]) {
           int testSucceeded=0;
 
-        try{
+        try {
            // this should generate an IllegalArgumentException
            Vector bad1 = new Vector(-100, 10);
         }
@@ -50,8 +50,8 @@
             testSucceeded =0;
         }
 
-        if(testSucceeded == 0)
-             throw new RuntimeException("Wrong exception thrown.");
+        if (testSucceeded == 0)
+            throw new RuntimeException("Wrong exception thrown.");
 
      }
 
--- a/jdk/test/java/util/Vector/LastIndexOf.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Vector/LastIndexOf.java	Tue Oct 27 01:45:03 2015 -0400
@@ -34,7 +34,7 @@
     public static void main(String argv[]) throws Exception {
         Vector v = new Vector(10);
 
-        try{
+        try {
             int i = v.lastIndexOf(null, 5);
             throw new Exception("lastIndexOf(5/10) " + i);
         } catch (IndexOutOfBoundsException e) {
--- a/jdk/test/java/util/Vector/SyncLastIndexOf.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/Vector/SyncLastIndexOf.java	Tue Oct 27 01:45:03 2015 -0400
@@ -36,7 +36,7 @@
     static class RemovingThread extends Thread {
 
         public void run() {
-           synchronized(v) {
+           synchronized (v) {
                 try {
                 sleep(200);
                 } catch (InterruptedException e) {
--- a/jdk/test/java/util/WeakHashMap/GCDuringIteration.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/WeakHashMap/GCDuringIteration.java	Tue Oct 27 01:45:03 2015 -0400
@@ -24,7 +24,6 @@
 /*
  * @test
  * @bug 6499848
- * @ignore until 6842353 is resolved
  * @summary Check that iterators work properly in the presence of
  *          concurrent finalization and removal of elements.
  * @key randomness
@@ -116,7 +115,7 @@
             it.next();          // protects first entry
             System.out.println(map.values());
             foos[first] = null;
-            tryWaitForFinalizersToRun()
+            tryWaitForFinalizersToRun();
             equal(map.size(), first+1);
             System.out.println(map.values());
             checkIterator(it, first-1);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/ArrayBlockingQueue/IteratorConsistency.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,755 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Martin Buchholz with assistance from members of JCP
+ * JSR-166 Expert Group and released to the public domain, as
+ * explained at http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+import java.lang.ref.WeakReference;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.ArrayDeque;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Queue;
+import java.util.Random;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.CountDownLatch;
+
+/*
+ * @test
+ * @bug 7014263
+ * @summary White box testing of ArrayBlockingQueue iterators.
+ */
+
+/**
+ * Highly coupled to the implementation of ArrayBlockingQueue.
+ * Uses reflection to inspect queue and iterator state.
+ */
+@SuppressWarnings({"unchecked", "rawtypes"})
+public class IteratorConsistency {
+    final Random rnd = new Random();
+    final int CAPACITY = 20;
+    Field itrsField;
+    Field itemsField;
+    Field takeIndexField;
+    Field headField;
+    Field nextField;
+    Field prevTakeIndexField;
+
+    void test(String[] args) throws Throwable {
+        itrsField = ArrayBlockingQueue.class.getDeclaredField("itrs");
+        itemsField = ArrayBlockingQueue.class.getDeclaredField("items");
+        takeIndexField = ArrayBlockingQueue.class.getDeclaredField("takeIndex");
+        headField = Class.forName("java.util.concurrent.ArrayBlockingQueue$Itrs").getDeclaredField("head");
+        nextField = Class.forName("java.util.concurrent.ArrayBlockingQueue$Itrs$Node").getDeclaredField("next");
+        prevTakeIndexField = Class.forName("java.util.concurrent.ArrayBlockingQueue$Itr").getDeclaredField("prevTakeIndex");
+        itrsField.setAccessible(true);
+        itemsField.setAccessible(true);
+        takeIndexField.setAccessible(true);
+        headField.setAccessible(true);
+        nextField.setAccessible(true);
+        prevTakeIndexField.setAccessible(true);
+        test(CAPACITY, true);
+        test(CAPACITY, false);
+    }
+
+    Object itrs(ArrayBlockingQueue q) {
+        try {
+            return itrsField.get(q);
+        } catch (Throwable t) { throw new Error(); }
+    }
+
+    int takeIndex(ArrayBlockingQueue q) {
+        try {
+            return takeIndexField.getInt(q);
+        } catch (Throwable t) { throw new Error(); }
+    }
+
+    List<Iterator> trackedIterators(Object itrs) {
+        try {
+            List<Iterator> its = new ArrayList<Iterator>();
+            if (itrs != null)
+                for (Object p = headField.get(itrs); p != null; p = nextField.get(p))
+                    its.add(((WeakReference<Iterator>)(p)).get());
+            Collections.reverse(its);
+            return its;
+        } catch (Throwable t) { throw new Error(); }
+    }
+
+    List<Iterator> trackedIterators(ArrayBlockingQueue q) {
+        return trackedIterators(itrs(q));
+    }
+
+    List<Iterator> attachedIterators(Object itrs) {
+        try {
+            List<Iterator> its = new ArrayList<Iterator>();
+            if (itrs != null)
+                for (Object p = headField.get(itrs); p != null; p = nextField.get(p)) {
+                    Iterator it = ((WeakReference<Iterator>)(p)).get();
+                    if (it != null && !isDetached(it))
+                        its.add(it);
+                }
+            Collections.reverse(its);
+            return its;
+        } catch (Throwable t) { unexpected(t); return null; }
+    }
+
+    List<Iterator> attachedIterators(ArrayBlockingQueue q) {
+        return attachedIterators(itrs(q));
+    }
+
+    Object[] internalArray(ArrayBlockingQueue q) {
+        try {
+            return (Object[]) itemsField.get(q);
+        } catch (Throwable t) { throw new Error(t); }
+    }
+
+    void printInternalArray(ArrayBlockingQueue q) {
+        System.err.println(Arrays.toString(internalArray(q)));
+    }
+
+    void checkExhausted(Iterator it) {
+        if (rnd.nextBoolean()) {
+            check(!it.hasNext());
+            check(isDetached(it));
+        }
+        if (rnd.nextBoolean())
+            try { it.next(); fail("should throw"); }
+            catch (NoSuchElementException success) {}
+    }
+
+    boolean isDetached(Iterator it) {
+        try {
+            return prevTakeIndexField.getInt(it) < 0;
+        } catch (IllegalAccessException t) { unexpected(t); return false; }
+    }
+
+    void checkDetached(Iterator it) {
+        check(isDetached(it));
+    }
+
+    void removeUsingIterator(ArrayBlockingQueue q, Object element) {
+        Iterator it = q.iterator();
+        while (it.hasNext()) {
+            Object x = it.next();
+            if (element.equals(x))
+                it.remove();
+            checkRemoveThrowsISE(it);
+        }
+    }
+
+    void checkRemoveThrowsISE(Iterator it) {
+        if (rnd.nextBoolean())
+            return;
+        try { it.remove(); fail("should throw"); }
+        catch (IllegalStateException success) {}
+    }
+
+    void checkRemoveHasNoEffect(Iterator it, Collection c) {
+        if (rnd.nextBoolean())
+            return;
+        int size = c.size();
+        it.remove(); // no effect
+        equal(c.size(), size);
+        checkRemoveThrowsISE(it);
+    }
+
+    void checkIterationSanity(Queue q) {
+        if (rnd.nextBoolean())
+            return;
+        int size = q.size();
+        Object[] a = q.toArray();
+        Object[] b = new Object[size+2];
+        Arrays.fill(b, Boolean.TRUE);
+        Object[] c = q.toArray(b);
+        equal(a.length, size);
+        check(b == c);
+        check(b[size] == null);
+        check(b[size+1] == Boolean.TRUE);
+        equal(q.toString(), Arrays.toString(a));
+        Integer[] xx = null, yy = null;
+        if (size > 0) {
+            xx = new Integer[size - 1];
+            Arrays.fill(xx, 42);
+            yy = ((Queue<Integer>)q).toArray(xx);
+            for (Integer zz : xx)
+                equal(42, zz);
+        }
+        Iterator it = q.iterator();
+        for (int i = 0; i < size; i++) {
+            check(it.hasNext());
+            Object x = it.next();
+            check(x == a[i]);
+            check(x == b[i]);
+            if (xx != null) check(x == yy[i]);
+        }
+        check(!it.hasNext());
+    }
+
+    private static void waitForFinalizersToRun() {
+        for (int i = 0; i < 2; i++)
+            tryWaitForFinalizersToRun();
+    }
+
+    private static void tryWaitForFinalizersToRun() {
+        System.gc();
+        final CountDownLatch fin = new CountDownLatch(1);
+        new Object() { protected void finalize() { fin.countDown(); }};
+        System.gc();
+        try { fin.await(); }
+        catch (InterruptedException ie) { throw new Error(ie); }
+    }
+
+    void test(int capacity, boolean fair) {
+        //----------------------------------------------------------------
+        // q.clear will clear out itrs.
+        //----------------------------------------------------------------
+        try {
+            ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair);
+            List<Iterator> its = new ArrayList<Iterator>();
+            for (int i = 0; i < capacity; i++)
+                check(q.add(i));
+            check(itrs(q) == null);
+            for (int i = 0; i < capacity; i++) {
+                its.add(q.iterator());
+                equal(trackedIterators(q), its);
+                q.poll();
+                q.add(capacity+i);
+            }
+            q.clear();
+            check(itrs(q) == null);
+            int j = 0;
+            for (Iterator it : its) {
+                if (rnd.nextBoolean())
+                    check(it.hasNext());
+                equal(it.next(), j++);
+                checkExhausted(it);
+            }
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // q emptying will clear out itrs.
+        //----------------------------------------------------------------
+        try {
+            ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair);
+            List<Iterator> its = new ArrayList<Iterator>();
+            for (int i = 0; i < capacity; i++)
+                q.add(i);
+            check(itrs(q) == null);
+            for (int i = 0; i < capacity; i++) {
+                its.add(q.iterator());
+                equal(trackedIterators(q), its);
+                q.poll();
+                q.add(capacity+i);
+            }
+            for (int i = 0; i < capacity; i++)
+                q.poll();
+            check(itrs(q) == null);
+            int j = 0;
+            for (Iterator it : its) {
+                if (rnd.nextBoolean())
+                    check(it.hasNext());
+                equal(it.next(), j++);
+                checkExhausted(it);
+            }
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Advancing 2 cycles will remove iterators.
+        //----------------------------------------------------------------
+        try {
+            ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair);
+            List<Iterator> its = new ArrayList<Iterator>();
+            for (int i = 0; i < capacity; i++)
+                q.add(i);
+            check(itrs(q) == null);
+            for (int i = capacity; i < 3 * capacity; i++) {
+                its.add(q.iterator());
+                equal(trackedIterators(q), its);
+                q.poll();
+                q.add(i);
+            }
+            for (int i = 3 * capacity; i < 4 * capacity; i++) {
+                equal(trackedIterators(q), its.subList(capacity,2*capacity));
+                q.poll();
+                q.add(i);
+            }
+            check(itrs(q) == null);
+            int j = 0;
+            for (Iterator it : its) {
+                if (rnd.nextBoolean())
+                    check(it.hasNext());
+                equal(it.next(), j++);
+                checkExhausted(it);
+            }
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Interior removal of elements used by an iterator will cause
+        // it to be untracked.
+        //----------------------------------------------------------------
+        try {
+            ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair);
+            q.add(0);
+            for (int i = 1; i < 2 * capacity; i++) {
+                q.add(i);
+                Integer[] elts = { -1, -2, -3 };
+                for (Integer elt : elts) q.add(elt);
+                equal(q.remove(), i - 1);
+                Iterator it = q.iterator();
+                equal(it.next(), i);
+                equal(it.next(), elts[0]);
+                Collections.shuffle(Arrays.asList(elts));
+                check(q.remove(elts[0]));
+                check(q.remove(elts[1]));
+                equal(trackedIterators(q), Collections.singletonList(it));
+                check(q.remove(elts[2]));
+                check(itrs(q) == null);
+                equal(it.next(), -2);
+                if (rnd.nextBoolean()) checkExhausted(it);
+                if (rnd.nextBoolean()) checkDetached(it);
+            }
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Check iterators on an empty q
+        //----------------------------------------------------------------
+        try {
+            ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair);
+            for (int i = 0; i < 4; i++) {
+                Iterator it = q.iterator();
+                check(itrs(q) == null);
+                if (rnd.nextBoolean()) checkExhausted(it);
+                if (rnd.nextBoolean()) checkDetached(it);
+                checkRemoveThrowsISE(it);
+            }
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Check "interior" removal of iterator's last element
+        //----------------------------------------------------------------
+        try {
+            ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair);
+            List<Iterator> its = new ArrayList<Iterator>();
+            for (int i = 0; i < capacity; i++)
+                q.add(i);
+            for (int i = 0; i < capacity; i++) {
+                Iterator it = q.iterator();
+                its.add(it);
+                for (int j = 0; j < i; j++)
+                    equal(j, it.next());
+                equal(attachedIterators(q), its);
+            }
+            q.remove(capacity - 1);
+            equal(attachedIterators(q), its);
+            for (int i = 1; i < capacity - 1; i++) {
+                q.remove(capacity - i - 1);
+                Iterator it = its.get(capacity - i);
+                checkDetached(it);
+                equal(attachedIterators(q), its.subList(0, capacity - i));
+                if (rnd.nextBoolean()) check(it.hasNext());
+                equal(it.next(), capacity - i);
+                checkExhausted(it);
+            }
+            equal(attachedIterators(q), its.subList(0, 2));
+            q.remove(0);
+            check(q.isEmpty());
+            check(itrs(q) == null);
+            Iterator it = its.get(0);
+            equal(it.next(), 0);
+            checkRemoveHasNoEffect(it, q);
+            checkExhausted(it);
+            checkDetached(it);
+            checkRemoveHasNoEffect(its.get(1), q);
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Check "interior" removal of alternating elements, straddling 2 cycles
+        //----------------------------------------------------------------
+        try {
+            ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair);
+            List<Iterator> its = new ArrayList<Iterator>();
+            // Move takeIndex to middle
+            for (int i = 0; i < capacity/2; i++) {
+                check(q.add(i));
+                equal(q.poll(), i);
+            }
+            check(takeIndex(q) == capacity/2);
+            for (int i = 0; i < capacity; i++)
+                q.add(i);
+            for (int i = 0; i < capacity; i++) {
+                Iterator it = q.iterator();
+                its.add(it);
+                for (int j = 0; j < i; j++)
+                    equal(j, it.next());
+                equal(attachedIterators(q), its);
+            }
+            // Remove all even elements, in either direction using
+            // q.remove(), or iterator.remove()
+            switch (rnd.nextInt(3)) {
+            case 0:
+                for (int i = 0; i < capacity; i+=2) {
+                    check(q.remove(i));
+                    equal(attachedIterators(q), its);
+                }
+                break;
+            case 1:
+                for (int i = capacity - 2; i >= 0; i-=2) {
+                    check(q.remove(i));
+                    equal(attachedIterators(q), its);
+                }
+                break;
+            case 2:
+                Iterator it = q.iterator();
+                while (it.hasNext()) {
+                    int i = (Integer) it.next();
+                    if ((i & 1) == 0)
+                        it.remove();
+                }
+                equal(attachedIterators(q), its);
+                break;
+            default: throw new Error();
+            }
+
+            for (int i = 0; i < capacity; i++) {
+                Iterator it = its.get(i);
+                boolean even = ((i & 1) == 0);
+                if (even) {
+                    if (rnd.nextBoolean()) check(it.hasNext());
+                    equal(i, it.next());
+                    for (int j = i+1; j < capacity; j += 2)
+                        equal(j, it.next());
+                    check(!isDetached(it));
+                    check(!it.hasNext());
+                    check(isDetached(it));
+                } else { /* odd */
+                    if (rnd.nextBoolean()) check(it.hasNext());
+                    checkRemoveHasNoEffect(it, q);
+                    equal(i, it.next());
+                    for (int j = i+2; j < capacity; j += 2)
+                        equal(j, it.next());
+                    check(!isDetached(it));
+                    check(!it.hasNext());
+                    check(isDetached(it));
+                }
+            }
+            equal(trackedIterators(q), Collections.emptyList());
+            check(itrs(q) == null);
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Check garbage collection of discarded iterators
+        //----------------------------------------------------------------
+        try {
+            ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair);
+            List<Iterator> its = new ArrayList<Iterator>();
+            for (int i = 0; i < capacity; i++)
+                q.add(i);
+            for (int i = 0; i < capacity; i++) {
+                its.add(q.iterator());
+                equal(attachedIterators(q), its);
+            }
+            its = null;
+            waitForFinalizersToRun();
+            List<Iterator> trackedIterators = trackedIterators(q);
+            equal(trackedIterators.size(), capacity);
+            for (Iterator x : trackedIterators)
+                check(x == null);
+            Iterator it = q.iterator();
+            equal(trackedIterators(q), Collections.singletonList(it));
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Check garbage collection of discarded iterators,
+        // with a randomly retained subset.
+        //----------------------------------------------------------------
+        try {
+            ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair);
+            List<Iterator> its = new ArrayList<Iterator>();
+            List<Iterator> retained = new ArrayList<Iterator>();
+            final int size = 1 + rnd.nextInt(capacity);
+            for (int i = 0; i < size; i++)
+                q.add(i);
+            for (int i = 0; i < size; i++) {
+                Iterator it = q.iterator();
+                its.add(it);
+                equal(attachedIterators(q), its);
+            }
+            // Leave sufficient gaps in retained
+            for (int i = 0; i < size; i+= 2+rnd.nextInt(3))
+                retained.add(its.get(i));
+            its = null;
+            waitForFinalizersToRun();
+            List<Iterator> trackedIterators = trackedIterators(q);
+            equal(trackedIterators.size(), size);
+            for (Iterator it : trackedIterators)
+                check((it == null) ^ retained.contains(it));
+            Iterator it = q.iterator(); // trigger another sweep
+            retained.add(it);
+            equal(trackedIterators(q), retained);
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Check incremental sweeping of discarded iterators.
+        // Excessively white box?!
+        //----------------------------------------------------------------
+        try {
+            final int SHORT_SWEEP_PROBES = 4;
+            final int LONG_SWEEP_PROBES = 16;
+            final int PROBE_HOP = LONG_SWEEP_PROBES + 6 * SHORT_SWEEP_PROBES;
+            final int PROBE_HOP_COUNT = 10;
+            // Expect around 8 sweeps per PROBE_HOP
+            final int SWEEPS_PER_PROBE_HOP = 8;
+            ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair);
+            List<Iterator> its = new ArrayList<Iterator>();
+            for (int i = 0; i < capacity; i++)
+                q.add(i);
+            for (int i = 0; i < PROBE_HOP_COUNT * PROBE_HOP; i++) {
+                its.add(q.iterator());
+                equal(attachedIterators(q), its);
+            }
+            // make some garbage, separated by PROBE_HOP
+            for (int i = 0; i < its.size(); i += PROBE_HOP)
+                its.set(i, null);
+            waitForFinalizersToRun();
+            int retries;
+            for (retries = 0;
+                 trackedIterators(q).contains(null) && retries < 1000;
+                 retries++)
+                // one round of sweeping
+                its.add(q.iterator());
+            check(retries >= PROBE_HOP_COUNT * (SWEEPS_PER_PROBE_HOP - 2));
+            check(retries <= PROBE_HOP_COUNT * (SWEEPS_PER_PROBE_HOP + 2));
+            Iterator itsit = its.iterator();
+            while (itsit.hasNext())
+                if (itsit.next() == null)
+                    itsit.remove();
+            equal(trackedIterators(q), its);
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Check safety of iterator.remove while in detached mode.
+        //----------------------------------------------------------------
+        try {
+            ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair);
+            List<Iterator> its = new ArrayList<Iterator>();
+            for (int i = 0; i < capacity/2; i++) {
+                q.add(i);
+                q.remove();
+            }
+            check(takeIndex(q) == capacity/2);
+            for (int i = 0; i < capacity; i++)
+                q.add(i);
+            for (int i = 0; i < capacity; i++) {
+                Iterator it = q.iterator();
+                its.add(it);
+                for (int j = 0; j < i; j++)
+                    equal(j, it.next());
+                equal(attachedIterators(q), its);
+            }
+            for (int i = capacity - 1; i >= 0; i--) {
+                Iterator it = its.get(i);
+                equal(i, it.next()); // last element
+                check(!isDetached(it));
+                check(!it.hasNext()); // first hasNext failure
+                check(isDetached(it));
+                int size = q.size();
+                check(q.contains(i));
+                switch (rnd.nextInt(3)) {
+                case 0:
+                    it.remove();
+                    check(!q.contains(i));
+                    equal(q.size(), size - 1);
+                    break;
+                case 1:
+                    // replace i with impostor
+                    if (q.remainingCapacity() == 0) {
+                        check(q.remove(i));
+                        check(q.add(-1));
+                    } else {
+                        check(q.add(-1));
+                        check(q.remove(i));
+                    }
+                    it.remove(); // should have no effect
+                    equal(size, q.size());
+                    check(q.contains(-1));
+                    check(q.remove(-1));
+                    break;
+                case 2:
+                    // replace i with true impostor
+                    if (i != 0) {
+                        check(q.remove(i));
+                        check(q.add(i));
+                    }
+                    it.remove();
+                    check(!q.contains(i));
+                    equal(q.size(), size - 1);
+                    break;
+                default: throw new Error();
+                }
+                checkRemoveThrowsISE(it);
+                check(isDetached(it));
+                check(!trackedIterators(q).contains(it));
+            }
+            check(q.isEmpty());
+            check(itrs(q) == null);
+            for (Iterator it : its)
+                checkExhausted(it);
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Check dequeues bypassing iterators' current positions.
+        //----------------------------------------------------------------
+        try {
+            ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair);
+            Queue<Iterator> its0
+                = new ArrayDeque<Iterator>();
+            Queue<Iterator> itsMid
+                = new ArrayDeque<Iterator>();
+            List<Iterator> its = new ArrayList<Iterator>();
+            for (int i = 0; i < capacity; i++)
+                q.add(i);
+            for (int i = 0; i < 2 * capacity + 1; i++) {
+                Iterator it = q.iterator();
+                its.add(it);
+                its0.add(it);
+            }
+            for (int i = 0; i < 2 * capacity + 1; i++) {
+                Iterator it = q.iterator();
+                for (int j = 0; j < capacity/2; j++)
+                    equal(j, it.next());
+                its.add(it);
+                itsMid.add(it);
+            }
+            for (int i = capacity; i < 3 * capacity; i++) {
+                Iterator it;
+
+                it = its0.remove();
+                checkRemoveThrowsISE(it);
+                if (rnd.nextBoolean()) check(it.hasNext());
+                equal(0, it.next());
+                int victim = i - capacity;
+                for (int j = victim + (victim == 0 ? 1 : 0); j < i; j++) {
+                    if (rnd.nextBoolean()) check(it.hasNext());
+                    equal(j, it.next());
+                }
+                checkExhausted(it);
+
+                it = itsMid.remove();
+                if (victim >= capacity/2)
+                    checkRemoveHasNoEffect(it, q);
+                equal(capacity/2, it.next());
+                if (victim > capacity/2)
+                    checkRemoveHasNoEffect(it, q);
+                for (int j = Math.max(victim, capacity/2 + 1); j < i; j++) {
+                    if (rnd.nextBoolean()) check(it.hasNext());
+                    equal(j, it.next());
+                }
+                checkExhausted(it);
+
+                if (rnd.nextBoolean()) {
+                    equal(victim, q.remove());
+                } else {
+                    ArrayList list = new ArrayList(1);
+                    q.drainTo(list, 1);
+                    equal(list.size(), 1);
+                    equal(victim, list.get(0));
+                }
+                check(q.add(i));
+            }
+            // takeIndex has wrapped twice.
+            Iterator it0 = its0.remove();
+            Iterator itMid = itsMid.remove();
+            check(isDetached(it0));
+            check(isDetached(itMid));
+            if (rnd.nextBoolean()) check(it0.hasNext());
+            if (rnd.nextBoolean()) check(itMid.hasNext());
+            checkRemoveThrowsISE(it0);
+            checkRemoveHasNoEffect(itMid, q);
+            if (rnd.nextBoolean()) equal(0, it0.next());
+            if (rnd.nextBoolean()) equal(capacity/2, itMid.next());
+            check(isDetached(it0));
+            check(isDetached(itMid));
+            equal(capacity, q.size());
+            equal(0, q.remainingCapacity());
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Check collective sanity of iteration, toArray() and toString()
+        //----------------------------------------------------------------
+        try {
+            ArrayBlockingQueue q = new ArrayBlockingQueue(capacity, fair);
+            for (int i = 0; i < capacity; i++) {
+                checkIterationSanity(q);
+                equal(capacity, q.size() + q.remainingCapacity());
+                q.add(i);
+            }
+            for (int i = 0; i < (capacity + (capacity >> 1)); i++) {
+                checkIterationSanity(q);
+                equal(capacity, q.size() + q.remainingCapacity());
+                equal(i, q.peek());
+                equal(i, q.poll());
+                checkIterationSanity(q);
+                equal(capacity, q.size() + q.remainingCapacity());
+                q.add(capacity + i);
+            }
+            for (int i = 0; i < capacity; i++) {
+                checkIterationSanity(q);
+                equal(capacity, q.size() + q.remainingCapacity());
+                int expected = i + capacity + (capacity >> 1);
+                equal(expected, q.peek());
+                equal(expected, q.poll());
+            }
+            checkIterationSanity(q);
+        } catch (Throwable t) { unexpected(t); }
+
+    }
+
+    //--------------------- Infrastructure ---------------------------
+    volatile int passed = 0, failed = 0;
+    void pass() {passed++;}
+    void fail() {failed++; Thread.dumpStack();}
+    void fail(String msg) {System.err.println(msg); fail();}
+    void unexpected(Throwable t) {failed++; t.printStackTrace();}
+    void check(boolean cond) {if (cond) pass(); else fail();}
+    void equal(Object x, Object y) {
+        if (x == null ? y == null : x.equals(y)) pass();
+        else fail(x + " not equal to " + y);}
+    public static void main(String[] args) throws Throwable {
+        new IteratorConsistency().instanceMain(args);}
+    public void instanceMain(String[] args) throws Throwable {
+        try {test(args);} catch (Throwable t) {unexpected(t);}
+        System.err.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+        if (failed > 0) throw new AssertionError("Some tests failed");}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/BlockingQueue/DrainToFails.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,207 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Doug Lea and Martin Buchholz with assistance from
+ * members of JCP JSR-166 Expert Group and released to the public
+ * domain, as explained at
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+/*
+ * @test
+ * @summary Test drainTo failing due to c.add throwing
+ */
+
+import java.util.*;
+import java.util.concurrent.*;
+
+@SuppressWarnings({"unchecked", "rawtypes"})
+public class DrainToFails {
+    final int CAPACITY = 10;
+    final int SMALL = 2;
+
+    void test(String[] args) throws Throwable {
+        testDelayQueue(new DelayQueue());
+        testDelayQueue(new ScheduledThreadPoolExecutor(1).getQueue());
+
+        testUnbounded(new LinkedBlockingQueue());
+        testUnbounded(new LinkedBlockingDeque());
+        testUnbounded(new PriorityBlockingQueue());
+
+        testBounded(new LinkedBlockingQueue(CAPACITY));
+        testBounded(new LinkedBlockingDeque(CAPACITY));
+        testBounded(new ArrayBlockingQueue(CAPACITY));
+    }
+
+    static class PDelay
+        extends FutureTask<Void>
+        implements Delayed, RunnableScheduledFuture<Void> {
+        int pseudodelay;
+        PDelay(int i) {
+            super(new Runnable() { public void run() {}}, null);
+            pseudodelay = i;
+        }
+        public int compareTo(PDelay other) {
+            int a = this.pseudodelay;
+            int b = other.pseudodelay;
+            return (a < b) ? -1 : (a > b) ? 1 : 0;
+        }
+        public int compareTo(Delayed y) {
+            return compareTo((PDelay)y);
+        }
+        public boolean equals(Object other) {
+            return (other instanceof PDelay) &&
+                this.pseudodelay == ((PDelay)other).pseudodelay;
+        }
+        public long getDelay(TimeUnit ignore) {
+            return Integer.MIN_VALUE + pseudodelay;
+        }
+        public String toString() {
+            return String.valueOf(pseudodelay);
+        }
+        public boolean isPeriodic() { return false; }
+    }
+
+    void testDelayQueue(final BlockingQueue q) throws Throwable {
+        System.err.println(q.getClass().getSimpleName());
+        for (int i = 0; i < CAPACITY; i++)
+            q.add(new PDelay(i));
+        ArrayBlockingQueue q2 = new ArrayBlockingQueue(SMALL);
+        try {
+            q.drainTo(q2, SMALL + 3);
+            fail("should throw");
+        } catch (IllegalStateException success) {
+            equal(SMALL, q2.size());
+            equal(new PDelay(0), q2.poll());
+            equal(new PDelay(1), q2.poll());
+            check(q2.isEmpty());
+            for (int i = SMALL; i < CAPACITY; i++)
+                equal(new PDelay(i), q.poll());
+            equal(0, q.size());
+        }
+    }
+
+    void testUnbounded(final BlockingQueue q) throws Throwable {
+        System.err.println(q.getClass().getSimpleName());
+        for (int i = 0; i < CAPACITY; i++)
+            q.add(i);
+        ArrayBlockingQueue q2 = new ArrayBlockingQueue(SMALL);
+        try {
+            q.drainTo(q2, 7);
+            fail("should throw");
+        } catch (IllegalStateException success) {
+            assertContentsInOrder(q2, 0, 1);
+            q2.clear();
+            equal(q.size(), CAPACITY - SMALL);
+            equal(SMALL, q.peek());
+        }
+
+        try {
+            q.drainTo(q2);
+            fail("should throw");
+        } catch (IllegalStateException success) {
+            assertContentsInOrder(q2, 2, 3);
+            equal(q.size(), CAPACITY - 2 * SMALL);
+            for (int i = 2 * SMALL; i < CAPACITY; i++)
+                equal(i, q.poll());
+            equal(0, q.size());
+        }
+    }
+
+    void testBounded(final BlockingQueue q) throws Throwable {
+        System.err.println(q.getClass().getSimpleName());
+        for (int i = 0; i < CAPACITY; i++)
+            q.add(i);
+        List<Thread> putters = new ArrayList<Thread>();
+        for (int i = 0; i < 4; i++) {
+            Thread putter = new Thread(putter(q, 42 + i));
+            putters.add(putter);
+            putter.setDaemon(true);
+            putter.start();
+        }
+        ArrayBlockingQueue q2 = new ArrayBlockingQueue(SMALL);
+        try {
+            q.drainTo(q2, 7);
+            fail("should throw");
+        } catch (IllegalStateException success) {
+            while (q.size() < CAPACITY)
+                Thread.yield();
+            assertContentsInOrder(q2, 0, 1);
+            q2.clear();
+        }
+
+        try {
+            q.drainTo(q2);
+            fail("should throw");
+        } catch (IllegalStateException success) {
+            for (Thread putter : putters) {
+                putter.join(2000L);
+                check(! putter.isAlive());
+            }
+            assertContentsInOrder(q2, 2, 3);
+            for (int i = 2 * SMALL; i < CAPACITY; i++)
+                equal(i, q.poll());
+            equal(4, q.size());
+            check(q.contains(42));
+            check(q.contains(43));
+            check(q.contains(44));
+            check(q.contains(45));
+        }
+    }
+
+    Runnable putter(final BlockingQueue q, final int elt) {
+        return new Runnable() {
+            public void run() {
+                try { q.put(elt); }
+                catch (Throwable t) { unexpected(t); }}};
+    }
+
+    void assertContentsInOrder(Iterable it, Object... contents) {
+        int i = 0;
+        for (Object e : it)
+            equal(contents[i++], e);
+        equal(contents.length, i);
+    }
+
+    //--------------------- Infrastructure ---------------------------
+    volatile int passed = 0, failed = 0;
+    void pass() {passed++;}
+    void fail() {failed++; Thread.dumpStack();}
+    void fail(String msg) {System.err.println(msg); fail();}
+    void unexpected(Throwable t) {failed++; t.printStackTrace();}
+    void check(boolean cond) {if (cond) pass(); else fail();}
+    void equal(Object x, Object y) {
+        if (x == null ? y == null : x.equals(y)) pass();
+        else fail(x + " not equal to " + y);}
+    public static void main(String[] args) throws Throwable {
+        new DrainToFails().instanceMain(args);}
+    public void instanceMain(String[] args) throws Throwable {
+        try {test(args);} catch (Throwable t) {unexpected(t);}
+        System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+        if (failed > 0) throw new AssertionError("Some tests failed");}
+}
--- a/jdk/test/java/util/concurrent/BlockingQueue/Interrupt.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/BlockingQueue/Interrupt.java	Tue Oct 27 01:45:03 2015 -0400
@@ -48,7 +48,8 @@
         }
     }
 
-    static void checkInterrupted(Iterable<Fun> fs) {
+    static void checkInterrupted(Iterable<Fun> fs)
+            throws InterruptedException {
         final Executor immediateExecutor = new Executor() {
                 public void execute(Runnable r) {
                     r.run(); }};
@@ -60,6 +61,7 @@
         checkInterrupted0(fs, immediateExecutor);
         checkInterrupted0(fs, delayedExecutor);
         stpe.shutdown();
+        check(stpe.awaitTermination(10, SECONDS));
     }
 
     static void testQueue(final BlockingQueue<Object> q) {
@@ -96,8 +98,10 @@
             }
             checkInterrupted(fs);
         } catch (Throwable t) {
-          System.out.printf("Failed: %s%n", q.getClass().getSimpleName());
-          unexpected(t);
+            System.out.printf("Failed: %s%n", q.getClass().getSimpleName());
+            unexpected(t);
+        } finally {
+            Thread.interrupted();       // clear interrupts, just in case
         }
     }
 
--- a/jdk/test/java/util/concurrent/CompletableFuture/Basic.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/CompletableFuture/Basic.java	Tue Oct 27 01:45:03 2015 -0400
@@ -53,7 +53,6 @@
 import static java.util.concurrent.ForkJoinPool.*;
 import java.util.concurrent.atomic.AtomicInteger;
 
-
 public class Basic {
 
     static void checkCompletedNormally(CompletableFuture<?> cf, Object value) {
@@ -66,6 +65,7 @@
         try { equalAnyOf(cf.get(), values); } catch (Throwable x) { unexpected(x); }
         try { equalAnyOf(cf.get(0L, SECONDS), values); } catch (Throwable x) { unexpected(x); }
         check(cf.isDone(), "Expected isDone to be true, got:" + cf);
+        check(!cf.isCompletedExceptionally(), "Expected isCompletedExceptionally to return false");
         check(!cf.isCancelled(), "Expected isCancelled to be false");
         check(!cf.cancel(true), "Expected cancel to return false");
         check(cf.toString().contains("[Completed normally]"));
@@ -97,6 +97,7 @@
         catch (CancellationException x) { if (cancelled) pass(); else fail(); }
         catch (ExecutionException x) { if (cancelled) check(x.getCause() instanceof CancellationException); else pass(); }
         check(cf.isDone(), "Expected isDone to be true, got:" + cf);
+        check(cf.isCompletedExceptionally(), "Expected isCompletedExceptionally");
         check(cf.isCancelled() == cancelled, "Expected isCancelled: " + cancelled + ", got:"  + cf.isCancelled());
         check(cf.cancel(true) == cancelled, "Expected cancel: " + cancelled + ", got:"  + cf.cancel(true));
         check(cf.toString().contains("[Completed exceptionally]"));  // ## TODO: 'E'xceptionally
@@ -805,6 +806,49 @@
             cf2 = cf1.handle((x,t) -> { check(t.getCause() == ex); return 2;});
             checkCompletedExceptionally(cf1);
             checkCompletedNormally(cf2, 2);
+
+            cf1 = supplyAsync(() -> 1);
+            cf2 = cf1.handleAsync((x,t) -> x+1);
+            checkCompletedNormally(cf1, 1);
+            checkCompletedNormally(cf2, 2);
+
+            cf1 = supplyAsync(() -> { throw ex; });
+            cf2 = cf1.handleAsync((x,t) -> { check(t.getCause() == ex); return 2;});
+            checkCompletedExceptionally(cf1);
+            checkCompletedNormally(cf2, 2);
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // whenComplete tests
+        //----------------------------------------------------------------
+        try {
+            AtomicInteger count = new AtomicInteger();
+            CompletableFuture<Integer> cf2;
+            CompletableFuture<Integer> cf1 = supplyAsync(() -> 1);
+            cf2 = cf1.whenComplete((x,t) -> count.getAndIncrement());
+            checkCompletedNormally(cf1, 1);
+            checkCompletedNormally(cf2, 1);
+            check(count.get() == 1, "action count should be incremented");
+
+            final RuntimeException ex = new RuntimeException();
+            cf1 = supplyAsync(() -> { throw ex; });
+            cf2 = cf1.whenComplete((x,t) -> count.getAndIncrement());
+            checkCompletedExceptionally(cf1);
+            checkCompletedExceptionally(cf2);
+            check(count.get() == 2, "action count should be incremented");
+
+            cf1 = supplyAsync(() -> 1);
+            cf2 = cf1.whenCompleteAsync((x,t) -> count.getAndIncrement());
+            checkCompletedNormally(cf1, 1);
+            checkCompletedNormally(cf2, 1);
+            check(count.get() == 3, "action count should be incremented");
+
+            cf1 = supplyAsync(() -> { throw ex; });
+            cf2 = cf1.whenCompleteAsync((x,t) -> count.getAndIncrement());
+            checkCompletedExceptionally(cf1);
+            checkCompletedExceptionally(cf2);
+            check(count.get() == 4, "action count should be incremented");
+
         } catch (Throwable t) { unexpected(t); }
 
     }
--- a/jdk/test/java/util/concurrent/CompletableFuture/ThenComposeAsyncTest.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/CompletableFuture/ThenComposeAsyncTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -27,7 +27,6 @@
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.CountDownLatch;
 
-
 /**
  * @test
  * @bug 8029164
--- a/jdk/test/java/util/concurrent/CompletableFuture/ThenComposeExceptionTest.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/CompletableFuture/ThenComposeExceptionTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -33,7 +33,6 @@
 import java.util.function.BiFunction;
 import java.util.function.Consumer;
 
-
 /**
  * @test
  * @bug 8068432 8072030
--- a/jdk/test/java/util/concurrent/ConcurrentHashMap/ConcurrentAssociateTest.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/ConcurrentHashMap/ConcurrentAssociateTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -23,14 +23,18 @@
 
 import org.testng.annotations.Test;
 
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.lang.management.ThreadMXBean;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.CompletionException;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 import java.util.function.BiConsumer;
 import java.util.function.Supplier;
 import java.util.stream.IntStream;
@@ -39,48 +43,52 @@
 /**
  * @test
  * @bug 8028564
- * @run testng ConcurrentAssociateTest
+ * @run testng/timeout=1200 ConcurrentAssociateTest
  * @summary Test that association operations, such as put and compute,
  * place entries in the map
  */
 @Test
 public class ConcurrentAssociateTest {
 
-    // The number of entries for each thread to place in a map
+    /** Maximum time (in seconds) to wait for a test method to complete. */
+    private static final int TIMEOUT = Integer.getInteger("timeout", 200);
+
+    /** The number of entries for each thread to place in a map. */
     private static final int N = Integer.getInteger("n", 128);
-    // The number of iterations of the test
-    private static final int I = Integer.getInteger("i", 256);
 
-    // Object to be placed in the concurrent map
+    /** The number of iterations of the test. */
+    private static final int I = Integer.getInteger("i", 64);
+
+    /** Objects to be placed in the concurrent map. */
     static class X {
         // Limit the hash code to trigger collisions
-        int hc = ThreadLocalRandom.current().nextInt(1, 9);
+        final int hc = ThreadLocalRandom.current().nextInt(1, 9);
 
         public int hashCode() { return hc; }
     }
 
     @Test
-    public void testPut() {
+    public void testPut() throws Throwable {
         test("CHM.put", (m, o) -> m.put(o, o));
     }
 
     @Test
-    public void testCompute() {
+    public void testCompute() throws Throwable {
         test("CHM.compute", (m, o) -> m.compute(o, (k, v) -> o));
     }
 
     @Test
-    public void testComputeIfAbsent() {
+    public void testComputeIfAbsent() throws Throwable {
         test("CHM.computeIfAbsent", (m, o) -> m.computeIfAbsent(o, (k) -> o));
     }
 
     @Test
-    public void testMerge() {
+    public void testMerge() throws Throwable {
         test("CHM.merge", (m, o) -> m.merge(o, o, (v1, v2) -> v1));
     }
 
     @Test
-    public void testPutAll() {
+    public void testPutAll() throws Throwable {
         test("CHM.putAll", (m, o) -> {
             Map<Object, Object> hm = new HashMap<>();
             hm.put(o, o);
@@ -88,7 +96,7 @@
         });
     }
 
-    private static void test(String desc, BiConsumer<ConcurrentMap<Object, Object>, Object> associator) {
+    private static void test(String desc, BiConsumer<ConcurrentMap<Object, Object>, Object> associator) throws Throwable {
         for (int i = 0; i < I; i++) {
             testOnce(desc, associator);
         }
@@ -100,13 +108,16 @@
         }
     }
 
-    private static void testOnce(String desc, BiConsumer<ConcurrentMap<Object, Object>, Object> associator) {
+    private static void testOnce(String desc, BiConsumer<ConcurrentMap<Object, Object>, Object> associator) throws Throwable {
         ConcurrentHashMap<Object, Object> m = new ConcurrentHashMap<>();
         CountDownLatch s = new CountDownLatch(1);
 
         Supplier<Runnable> sr = () -> () -> {
             try {
-                s.await();
+                if (!s.await(TIMEOUT, TimeUnit.SECONDS)) {
+                    dumpTestThreads();
+                    throw new AssertionError("timed out");
+                }
             }
             catch (InterruptedException e) {
             }
@@ -121,7 +132,7 @@
         };
 
         // Bound concurrency to avoid degenerate performance
-        int ps = Math.min(Runtime.getRuntime().availableProcessors(), 32);
+        int ps = Math.min(Runtime.getRuntime().availableProcessors(), 8);
         Stream<CompletableFuture> runners = IntStream.range(0, ps)
                 .mapToObj(i -> sr.get())
                 .map(CompletableFuture::runAsync);
@@ -131,16 +142,41 @@
 
         // Trigger the runners to start associating
         s.countDown();
+
         try {
-            all.join();
-        } catch (CompletionException e) {
-            Throwable t = e.getCause();
-            if (t instanceof AssociationFailure) {
-                throw (AssociationFailure) t;
+            all.get(TIMEOUT, TimeUnit.SECONDS);
+        } catch (TimeoutException e) {
+            dumpTestThreads();
+            throw e;
+        } catch (Throwable e) {
+            dumpTestThreads();
+            Throwable cause = e.getCause();
+            if (cause instanceof AssociationFailure) {
+                throw cause;
             }
-            else {
-                throw e;
-            }
+            throw e;
         }
     }
+
+    /**
+     * A debugging tool to print stack traces of most threads, as jstack does.
+     * Uninteresting threads are filtered out.
+     */
+    static void dumpTestThreads() {
+        ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
+        System.err.println("------ stacktrace dump start ------");
+        for (ThreadInfo info : threadMXBean.dumpAllThreads(true, true)) {
+            String name = info.getThreadName();
+            if ("Signal Dispatcher".equals(name))
+                continue;
+            if ("Reference Handler".equals(name)
+                && info.getLockName().startsWith("java.lang.ref.Reference$Lock"))
+                continue;
+            if ("Finalizer".equals(name)
+                && info.getLockName().startsWith("java.lang.ref.ReferenceQueue$Lock"))
+                continue;
+            System.err.print(info);
+        }
+        System.err.println("------ stacktrace dump end ------");
+    }
 }
--- a/jdk/test/java/util/concurrent/ConcurrentHashMap/ConcurrentContainsKeyTest.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/ConcurrentHashMap/ConcurrentContainsKeyTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -80,7 +80,6 @@
         test(content, m);
     }
 
-
     private static void test(X[] content, ConcurrentHashMap<Object, Object> m) {
         for (int i = 0; i < I; i++) {
             testOnce(content, m);
--- a/jdk/test/java/util/concurrent/ConcurrentHashMap/MapCheck.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/ConcurrentHashMap/MapCheck.java	Tue Oct 27 01:45:03 2015 -0400
@@ -68,7 +68,6 @@
             }
         }
 
-
         if (args.length > 1)
             numTests = Integer.parseInt(args[1]);
 
@@ -92,7 +91,6 @@
 
         TestTimer.printStats();
 
-
         if (doSerializeTest)
             stest(newMap(mapClass), size);
     }
--- a/jdk/test/java/util/concurrent/ConcurrentHashMap/MapLoops.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/ConcurrentHashMap/MapLoops.java	Tue Oct 27 01:45:03 2015 -0400
@@ -175,7 +175,7 @@
         int position;
         int total;
 
-        Runner(Map<Integer,Integer> map, Integer[] key,  CyclicBarrier barrier) {
+        Runner(Map<Integer,Integer> map, Integer[] key, CyclicBarrier barrier) {
             this.map = map;
             this.key = key;
             this.barrier = barrier;
@@ -183,7 +183,7 @@
         }
 
         int step() {
-            // random-walk around key positions,  bunching accesses
+            // random-walk around key positions, bunching accesses
             int r = rng.next();
             position += (r & 7) - 3;
             while (position >= key.length) position -= key.length;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/ConcurrentLinkedQueue/RemoveLeak.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,60 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Martin Buchholz with assistance from members of JCP
+ * JSR-166 Expert Group and released to the public domain, as
+ * explained at http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+/*
+ * @test
+ * @bug 8054446 8137184 8137185
+ * @summary Regression test for memory leak in remove(Object)
+ * @run main/othervm -Xmx2200k RemoveLeak
+ */
+
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+public class RemoveLeak {
+    public static void main(String[] args) {
+        int i = 0;
+        // Without bug fix, OutOfMemoryError was observed at iteration 65120
+        int iterations = 10 * 65120;
+        try {
+            ConcurrentLinkedQueue<Long> queue = new ConcurrentLinkedQueue<>();
+            queue.add(0L);
+            while (i++ < iterations) {
+                queue.add(1L);
+                queue.remove(1L);
+            }
+        } catch (Error t) {
+            System.err.printf("failed at iteration %d/%d%n", i, iterations);
+            throw t;
+        }
+    }
+}
--- a/jdk/test/java/util/concurrent/ConcurrentQueues/ConcurrentQueueLoops.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/ConcurrentQueues/ConcurrentQueueLoops.java	Tue Oct 27 01:45:03 2015 -0400
@@ -47,10 +47,10 @@
     AtomicInteger totalItems;
     boolean print;
 
-    // Suitable for benchmarking.  Overriden by args[0] for testing.
+    // Suitable for benchmarking.  Overridden by args[0] for testing.
     int maxStages = 20;
 
-    // Suitable for benchmarking.  Overriden by args[1] for testing.
+    // Suitable for benchmarking.  Overridden by args[1] for testing.
     int items = 1024 * 1024;
 
     Collection<Queue<Integer>> concurrentQueues() {
--- a/jdk/test/java/util/concurrent/ConcurrentQueues/GCRetention.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/ConcurrentQueues/GCRetention.java	Tue Oct 27 01:45:03 2015 -0400
@@ -56,7 +56,7 @@
 import java.util.Map;
 
 public class GCRetention {
-    // Suitable for benchmarking.  Overriden by args[0] for testing.
+    // Suitable for benchmarking.  Overridden by args[0] for testing.
     int count = 1024 * 1024;
 
     final Map<String,String> results = new ConcurrentHashMap<String,String>();
--- a/jdk/test/java/util/concurrent/ConcurrentQueues/IteratorWeakConsistency.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/ConcurrentQueues/IteratorWeakConsistency.java	Tue Oct 27 01:45:03 2015 -0400
@@ -42,6 +42,7 @@
 
 @SuppressWarnings({"unchecked", "rawtypes"})
 public class IteratorWeakConsistency {
+    final Random rnd = new Random();
 
     void test(String[] args) throws Throwable {
         test(new LinkedBlockingQueue());
@@ -51,14 +52,46 @@
         test(new ConcurrentLinkedDeque());
         test(new ConcurrentLinkedQueue());
         test(new LinkedTransferQueue());
-        // Other concurrent queues (e.g. ArrayBlockingQueue) do not
-        // currently have weakly consistent iterators.
-        // As of 2010-09, ArrayBlockingQueue passes this test, but
-        // does not fully implement weak consistency.
         test(new ArrayBlockingQueue(20));
     }
 
+    void checkExhausted(Iterator it) {
+        if (rnd.nextBoolean()) {
+            check(!it.hasNext());
+        }
+        if (rnd.nextBoolean())
+            try { it.next(); fail("should throw"); }
+            catch (NoSuchElementException success) {}
+    }
+
+    void checkRemoveThrowsISE(Iterator it) {
+        if (rnd.nextBoolean()) {
+            try { it.remove(); fail("should throw"); }
+            catch (IllegalStateException success) {}
+        }
+    }
+
+    void checkRemoveHasNoEffect(Iterator it, Collection c) {
+        if (rnd.nextBoolean()) {
+            int size = c.size();
+            it.remove(); // no effect
+            equal(c.size(), size);
+            checkRemoveThrowsISE(it);
+        }
+    }
+
     void test(Queue q) {
+        //----------------------------------------------------------------
+        // Check iterators on an empty q
+        //----------------------------------------------------------------
+        try {
+            for (int i = 0; i < 4; i++) {
+                Iterator it = q.iterator();
+                if (rnd.nextBoolean()) checkExhausted(it);
+                checkRemoveThrowsISE(it);
+            }
+        } catch (Throwable t) { unexpected(t); }
+
         // TODO: make this more general
         try {
             for (int i = 0; i < 10; i++)
@@ -73,7 +106,7 @@
                 list.add(it.next());
             equal(list, Arrays.asList(0, 3, 4, 5, 6, 8, 9));
             check(! list.contains(null));
-            System.out.printf("%s: %s%n",
+            System.err.printf("%s: %s%n",
                               q.getClass().getSimpleName(),
                               list);
         } catch (Throwable t) { unexpected(t); }
@@ -96,6 +129,118 @@
             check(found4);
         } catch (Throwable t) { unexpected(t); }
 
+        try {
+            q.clear();
+            Object x = new Object();
+            for (int i = 0; i < 20; i++)
+                q.add(x);
+            equal(20, q.size());
+            Iterator it1 = q.iterator();
+            Iterator it2 = q.iterator();
+            try { it1.remove(); fail(); }
+            catch (IllegalStateException success) {}
+            try { it2.remove(); fail(); }
+            catch (IllegalStateException success) {}
+
+            check(it1.next() == x);
+            check(it2.hasNext());
+            check(it2.next() == x);
+            it1.remove();
+            it2.remove();
+            equal(19, q.size());
+            try { it1.remove(); fail(); }
+            catch (IllegalStateException success) {}
+            try { it2.remove(); fail(); }
+            catch (IllegalStateException success) {}
+            equal(19, q.size());
+
+            it1.next();
+            check(it2.hasNext());
+            it2.next();
+            it2.remove();
+            it1.remove();
+            equal(18, q.size());
+
+            it1.next();
+            it2.next();
+            check(q.remove() == x);
+            equal(17, q.size());
+            it1.remove();
+            it2.remove();
+            equal(17, q.size());
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Check "interior" removal of alternating elements
+        //----------------------------------------------------------------
+        try {
+            q.clear();
+            final int remainingCapacity = (q instanceof BlockingQueue) ?
+                ((BlockingQueue)q).remainingCapacity() :
+                Integer.MAX_VALUE;
+            final int capacity = Math.min(20, remainingCapacity);
+            List<Iterator> its = new ArrayList<Iterator>();
+            // Move to "middle"
+            for (int i = 0; i < capacity/2; i++) {
+                check(q.add(i));
+                equal(q.poll(), i);
+            }
+            for (int i = 0; i < capacity; i++)
+                check(q.add(i));
+            for (int i = 0; i < capacity; i++) {
+                Iterator it = q.iterator();
+                its.add(it);
+                for (int j = 0; j < i; j++)
+                    equal(j, it.next());
+            }
+
+            // Remove all even elements, in either direction using
+            // q.remove(), or iterator.remove()
+            switch (rnd.nextInt(3)) {
+            case 0:
+                for (int i = 0; i < capacity; i+=2)
+                    check(q.remove(i));
+                break;
+            case 1:
+                for (int i = capacity - 2; i >= 0; i-=2)
+                    check(q.remove(i));
+                break;
+            case 2:
+                Iterator it = q.iterator();
+                while (it.hasNext()) {
+                    int i = (Integer) it.next();
+                    if ((i & 1) == 0)
+                        it.remove();
+                }
+                break;
+            default: throw new Error();
+            }
+
+            for (int i = 0; i < capacity; i++) {
+                Iterator it = its.get(i);
+                boolean even = ((i & 1) == 0);
+                if (even) {
+                    if (rnd.nextBoolean()) check(it.hasNext());
+                    equal(i, it.next());
+                    for (int j = i+1; j < capacity; j += 2)
+                        equal(j, it.next());
+                    check(!it.hasNext());
+                } else { /* odd */
+                    if (rnd.nextBoolean()) check(it.hasNext());
+                    checkRemoveHasNoEffect(it, q);
+                    equal(i, it.next());
+                    for (int j = i+2; j < capacity; j += 2)
+                        equal(j, it.next());
+                    check(!it.hasNext());
+                }
+            }
+
+            // q only contains odd elements
+            for (int i = 0; i < capacity; i++)
+                check(q.contains(i) ^ ((i & 1) == 0));
+
+        } catch (Throwable t) { unexpected(t); }
+
     }
 
     //--------------------- Infrastructure ---------------------------
@@ -112,6 +257,6 @@
         new IteratorWeakConsistency().instanceMain(args);}
     public void instanceMain(String[] args) throws Throwable {
         try {test(args);} catch (Throwable t) {unexpected(t);}
-        System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+        System.err.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
         if (failed > 0) throw new AssertionError("Some tests failed");}
 }
--- a/jdk/test/java/util/concurrent/ConcurrentQueues/OfferRemoveLoops.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/ConcurrentQueues/OfferRemoveLoops.java	Tue Oct 27 01:45:03 2015 -0400
@@ -32,6 +32,7 @@
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
+import static java.util.concurrent.TimeUnit.*;
 
 @SuppressWarnings({"unchecked", "rawtypes", "deprecation"})
 public class OfferRemoveLoops {
@@ -65,15 +66,16 @@
     }
 
     void testQueue(final Queue q) throws Throwable {
-        System.out.println(q.getClass().getSimpleName());
+        System.err.println(q.getClass().getSimpleName());
         final long testDurationNanos = testDurationMillis * 1000L * 1000L;
         final long quittingTimeNanos = System.nanoTime() + testDurationNanos;
         final long timeoutMillis = 10L * 1000L;
         final int maxChunkSize = 1042;
         final int maxQueueSize = 10 * maxChunkSize;
+        final CountDownLatch done = new CountDownLatch(3);
 
-        /** Poor man's bounded buffer. */
-        final AtomicLong approximateCount = new AtomicLong(0L);
+        /** Poor man's bounded buffer; prevents unbounded queue expansion. */
+        final Semaphore offers = new Semaphore(maxQueueSize);
 
         abstract class CheckedThread extends Thread {
             CheckedThread(String name) {
@@ -89,42 +91,44 @@
             protected boolean quittingTime(long i) {
                 return (i % 1024) == 0 && quittingTime();
             }
-            protected abstract void realRun();
+            protected abstract void realRun() throws Exception;
             public void run() {
                 try { realRun(); } catch (Throwable t) { unexpected(t); }
             }
         }
 
         Thread offerer = new CheckedThread("offerer") {
-            protected void realRun() {
-                final long chunkSize = getRandom().nextInt(maxChunkSize) + 2;
+            protected void realRun() throws InterruptedException {
+                final int chunkSize = getRandom().nextInt(maxChunkSize) + 20;
                 long c = 0;
-                for (long i = 0; ! quittingTime(i); i++) {
+                while (! quittingTime()) {
                     if (q.offer(Long.valueOf(c))) {
                         if ((++c % chunkSize) == 0) {
-                            approximateCount.getAndAdd(chunkSize);
-                            while (approximateCount.get() > maxQueueSize)
-                                Thread.yield();
+                            offers.acquire(chunkSize);
                         }
                     } else {
                         Thread.yield();
-                    }}}};
+                    }
+                }
+                done.countDown();
+            }};
 
         Thread remover = new CheckedThread("remover") {
             protected void realRun() {
-                final long chunkSize = getRandom().nextInt(maxChunkSize) + 2;
+                final int chunkSize = getRandom().nextInt(maxChunkSize) + 20;
                 long c = 0;
-                for (long i = 0; ! quittingTime(i); i++) {
+                while (! quittingTime()) {
                     if (q.remove(Long.valueOf(c))) {
                         if ((++c % chunkSize) == 0) {
-                            approximateCount.getAndAdd(-chunkSize);
+                            offers.release(chunkSize);
                         }
                     } else {
                         Thread.yield();
                     }
                 }
                 q.clear();
-                approximateCount.set(0); // Releases waiting offerer thread
+                offers.release(1<<30);  // Releases waiting offerer thread
+                done.countDown();
             }};
 
         Thread scanner = new CheckedThread("scanner") {
@@ -139,18 +143,19 @@
                         break;
                     }
                     Thread.yield();
-                }}};
+                }
+                done.countDown();
+            }};
 
-        for (Thread thread : new Thread[] { offerer, remover, scanner }) {
-            thread.join(timeoutMillis + testDurationMillis);
-            if (thread.isAlive()) {
-                System.err.printf("Hung thread: %s%n", thread.getName());
-                failed++;
-                for (StackTraceElement e : thread.getStackTrace())
-                    System.err.println(e);
-                // Kludge alert
-                thread.stop();
-                thread.join(timeoutMillis);
+        if (! done.await(timeoutMillis + testDurationMillis, MILLISECONDS)) {
+            for (Thread thread : new Thread[] { offerer, remover, scanner }) {
+                if (thread.isAlive()) {
+                    System.err.printf("Hung thread: %s%n", thread.getName());
+                    failed++;
+                    for (StackTraceElement e : thread.getStackTrace())
+                        System.err.println(e);
+                    thread.interrupt();
+                }
             }
         }
     }
--- a/jdk/test/java/util/concurrent/ConcurrentQueues/RemovePollRace.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/ConcurrentQueues/RemovePollRace.java	Tue Oct 27 01:45:03 2015 -0400
@@ -36,7 +36,7 @@
  * @bug 6785442
  * @summary Checks race between poll and remove(Object), while
  * occasionally moonlighting as a microbenchmark.
- * @run main RemovePollRace 12345
+ * @run main RemovePollRace 1234
  */
 
 import java.util.concurrent.ArrayBlockingQueue;
@@ -56,7 +56,7 @@
 import java.util.Map;
 
 public class RemovePollRace {
-    // Suitable for benchmarking.  Overriden by args[0] for testing.
+    // Suitable for benchmarking.  Overridden by args[0] for testing.
     int count = 1024 * 1024;
 
     final Map<String,String> results = new ConcurrentHashMap<String,String>();
@@ -100,6 +100,7 @@
     void test(String[] args) throws Throwable {
         if (args.length > 0)
             count = Integer.valueOf(args[0]);
+
         // Warmup
         for (Queue<Boolean> queue : concurrentQueues())
             test(queue);
--- a/jdk/test/java/util/concurrent/CopyOnWriteArrayList/COWSubList.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/CopyOnWriteArrayList/COWSubList.java	Tue Oct 27 01:45:03 2015 -0400
@@ -51,8 +51,7 @@
             r.run();
             throw new RuntimeException("Failed: expected IOOBE to be thrown");
         } catch (IndexOutOfBoundsException x) {
-            // ok, excpeted
+            // ok, expected
         }
     }
 }
-
--- a/jdk/test/java/util/concurrent/CountDownLatch/Basic.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/CountDownLatch/Basic.java	Tue Oct 27 01:45:03 2015 -0400
@@ -120,7 +120,7 @@
     //----------------------------------------------------------------
     // One thread interrupted
     //----------------------------------------------------------------
-    public static void threadInterrupted() throws Throwable{
+    public static void threadInterrupted() throws Throwable {
         int count = 0;
         Basic test = new Basic();
         CountDownLatch latch = new CountDownLatch(3);
--- a/jdk/test/java/util/concurrent/Exchanger/ExchangeLoops.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/Exchanger/ExchangeLoops.java	Tue Oct 27 01:45:03 2015 -0400
@@ -49,7 +49,6 @@
         Int(int i) { value = i; }
     }
 
-
     public static void main(String[] args) throws Exception {
         int maxStages = 5;
         int iters = 10000;
--- a/jdk/test/java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java	Tue Oct 27 01:45:03 2015 -0400
@@ -111,8 +111,6 @@
 
         if (r == 0) // avoid overoptimization
             System.out.println("useless result: " + r);
-
-
     }
 
 }
--- a/jdk/test/java/util/concurrent/Executors/AutoShutdown.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/Executors/AutoShutdown.java	Tue Oct 27 01:45:03 2015 -0400
@@ -24,55 +24,71 @@
 /*
  * @test
  * @bug 6399443
- * @run main/othervm AutoShutdown
+ * @run main/othervm/timeout=1000 AutoShutdown
  * @summary Check for auto-shutdown and gc of singleThreadExecutors
  * @author Martin Buchholz
  */
 
-import java.io.*;
-import java.util.*;
-import java.util.concurrent.*;
-import static java.util.concurrent.Executors.*;
-import java.util.concurrent.Phaser;
+import java.lang.ref.WeakReference;
+import java.util.Arrays;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executor;
+import java.util.concurrent.TimeUnit;
+import static java.util.concurrent.Executors.defaultThreadFactory;
+import static java.util.concurrent.Executors.newFixedThreadPool;
+import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor;
+import static java.util.concurrent.Executors.newSingleThreadExecutor;
 
 public class AutoShutdown {
-    private static void waitForFinalizersToRun() {
-        for (int i = 0; i < 2; i++)
-            tryWaitForFinalizersToRun();
-    }
 
-    private static void tryWaitForFinalizersToRun() {
-        System.gc();
-        final CountDownLatch fin = new CountDownLatch(1);
-        new Object() { protected void finalize() { fin.countDown(); }};
-        System.gc();
-        try { fin.await(); }
-        catch (InterruptedException ie) { throw new Error(ie); }
+    static void await(CountDownLatch latch) throws InterruptedException {
+        if (!latch.await(100L, TimeUnit.SECONDS))
+            throw new AssertionError("timed out waiting for latch");
     }
 
     private static void realMain(String[] args) throws Throwable {
-        final Phaser phaser = new Phaser(3);
-        Runnable trivialRunnable = new Runnable() {
-            public void run() {
-                phaser.arriveAndAwaitAdvance();
-            }
+        final Executor[] executors = {
+            newSingleThreadExecutor(),
+            newSingleThreadExecutor(defaultThreadFactory()),
+            // TODO: should these executors also auto-shutdown?
+            //newFixedThreadPool(1),
+            //newSingleThreadScheduledExecutor(),
+            //newSingleThreadScheduledExecutor(defaultThreadFactory()),
         };
-        int count0 = Thread.activeCount();
-        Executor e1 = newSingleThreadExecutor();
-        Executor e2 = newSingleThreadExecutor(defaultThreadFactory());
-        e1.execute(trivialRunnable);
-        e2.execute(trivialRunnable);
-        phaser.arriveAndAwaitAdvance();
-        equal(Thread.activeCount(), count0 + 2);
-        e1 = e2 = null;
-        for (int i = 0; i < 10 && Thread.activeCount() > count0; i++)
-            tryWaitForFinalizersToRun();
-        for (int i = 0; i < 10; ++i) { // give JVM a chance to settle.
-            if (Thread.activeCount() == count0)
-                return;
-            Thread.sleep(1000);
+        final ConcurrentLinkedQueue<WeakReference<Thread>> poolThreads
+            = new ConcurrentLinkedQueue<>();
+        final CountDownLatch threadStarted
+            = new CountDownLatch(executors.length);
+        final CountDownLatch pleaseProceed
+            = new CountDownLatch(1);
+        Runnable task = new Runnable() { public void run() {
+            try {
+                poolThreads.add(new WeakReference<>(Thread.currentThread()));
+                threadStarted.countDown();
+                await(pleaseProceed);
+            } catch (Throwable t) { unexpected(t); }
+        }};
+        for (Executor executor : executors)
+            executor.execute(task);
+        await(threadStarted);
+        pleaseProceed.countDown();
+        Arrays.fill(executors, null);   // make executors unreachable
+        boolean done = false;
+        for (long timeout = 1L; !done && timeout <= 128L; timeout *= 2) {
+            System.gc();
+            done = true;
+            for (WeakReference<Thread> ref : poolThreads) {
+                Thread thread = ref.get();
+                if (thread != null) {
+                    TimeUnit.SECONDS.timedJoin(thread, timeout);
+                    if (thread.isAlive())
+                        done = false;
+                }
+            }
         }
-        equal(Thread.activeCount(), count0);
+        if (!done)
+            throw new AssertionError("pool threads did not terminate");
     }
 
     //--------------------- Infrastructure ---------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/FutureTask/DoneMeansDone.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,100 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Martin Buchholz with assistance from members of JCP
+ * JSR-166 Expert Group and released to the public domain, as
+ * explained at http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+/*
+ * @test
+ * @bug 8073704
+ * @summary Checks that once isDone() returns true,
+ * get() never throws InterruptedException or TimeoutException
+ */
+
+import java.util.ArrayList;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+
+public class DoneMeansDone {
+    public static void main(String[] args) throws Throwable {
+        final int iters = 1000;
+        final int nThreads = 2;
+        final AtomicBoolean done = new AtomicBoolean(false);
+        final AtomicReference<FutureTask<Boolean>> a = new AtomicReference<>();
+        final CountDownLatch threadsStarted = new CountDownLatch(nThreads);
+        final Callable<Boolean> alwaysTrue = new Callable<Boolean>() {
+            public Boolean call() {
+                return true;
+            }};
+
+        final Runnable observer = new Runnable() { public void run() {
+            threadsStarted.countDown();
+            final ThreadLocalRandom rnd = ThreadLocalRandom.current();
+            try {
+                for (FutureTask<Boolean> f; !done.get();) {
+                    f = a.get();
+                    if (f != null) {
+                        do {} while (!f.isDone());
+                        Thread.currentThread().interrupt();
+                        if (!(rnd.nextBoolean()
+                              ? f.get()
+                              : f.get(-1L, TimeUnit.DAYS)))
+                            throw new AssertionError();
+                    }
+                }
+            } catch (Exception t) { throw new AssertionError(t); }
+        }};
+
+        final ArrayList<Future<?>> futures = new ArrayList<>(nThreads);
+        final ExecutorService pool = Executors.newCachedThreadPool();
+        for (int i = 0; i < nThreads; i++)
+            futures.add(pool.submit(observer));
+        threadsStarted.await();
+        for (int i = 0; i < iters; i++) {
+            FutureTask<Boolean> f = new FutureTask<>(alwaysTrue);
+            a.set(f);
+            f.run();
+        }
+        done.set(true);
+        pool.shutdown();
+        if (!pool.awaitTermination(10L, TimeUnit.SECONDS))
+            throw new AssertionError();
+        for (Future<?> future : futures)
+            future.get();
+    }
+}
--- a/jdk/test/java/util/concurrent/FutureTask/DoneTimedGetLoops.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/FutureTask/DoneTimedGetLoops.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,4 @@
 /*
- * Copyright (c) 2012, 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,6 +21,11 @@
  */
 
 /*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
  * Written by Martin Buchholz with assistance from members of JCP JSR-166
  * Expert Group and released to the public domain, as explained at
  * http://creativecommons.org/publicdomain/zero/1.0/
--- a/jdk/test/java/util/concurrent/FutureTask/ExplicitSet.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/FutureTask/ExplicitSet.java	Tue Oct 27 01:45:03 2015 -0400
@@ -58,7 +58,7 @@
         SettableTask() {
             super(new Callable<Boolean>() {
                     public Boolean call() {
-                        fail ("The task should never be run!");
+                        fail("The task should never be run!");
                         return null;
                     };
                 });
--- a/jdk/test/java/util/concurrent/FutureTask/NegativeTimeout.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/FutureTask/NegativeTimeout.java	Tue Oct 27 01:45:03 2015 -0400
@@ -44,4 +44,3 @@
         } catch (TimeoutException success) {}
     }
 }
-
--- a/jdk/test/java/util/concurrent/Phaser/Basic.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/Phaser/Basic.java	Tue Oct 27 01:45:03 2015 -0400
@@ -97,7 +97,8 @@
             equal(phase, atTheStartingGate.arrive());
             int awaitPhase = atTheStartingGate.awaitAdvanceInterruptibly
                 (phase, 30, SECONDS);
-            if (expectNextPhase) check(awaitPhase == (phase + 1));
+            if (expectNextPhase) check(awaitPhase == phase + 1);
+            else check(awaitPhase == phase || awaitPhase == phase + 1);
 
             pass();
         } catch (Throwable t) {
@@ -249,13 +250,11 @@
             Phaser phaser = new Phaser(3);
             Iterator<Arriver> arrivers = arriverIterator(phaser);
             int phase = phaser.getPhase();
-            for (int i = 0; i < 4; i++) {
+            for (int i = 0; i < 10; i++) {
                 check(phaser.getPhase() == phase);
                 Awaiter a1 = awaiter(phaser, 30, SECONDS); a1.start();
                 Arriver a2 = arrivers.next(); a2.start();
                 toTheStartingGate();
-                // allow a1 to block in awaitAdvanceInterruptibly
-                Thread.sleep(2000);
                 a1.interrupt();
                 a1.join();
                 phaser.arriveAndAwaitAdvance();
@@ -273,7 +272,7 @@
         // Phaser is terminated while threads are waiting
         //----------------------------------------------------------------
         try {
-            for (int i = 0; i < 4; i++) {
+            for (int i = 0; i < 10; i++) {
                 Phaser phaser = new Phaser(3);
                 Iterator<Awaiter> awaiters = awaiterIterator(phaser);
                 Arriver a1 = awaiters.next(); a1.start();
--- a/jdk/test/java/util/concurrent/ScheduledThreadPoolExecutor/DelayOverflow.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/ScheduledThreadPoolExecutor/DelayOverflow.java	Tue Oct 27 01:45:03 2015 -0400
@@ -88,7 +88,7 @@
     /**
      * Attempts to test exhaustively and deterministically, all 20
      * possible ways that one task can be scheduled in the maximal
-     * distant future, while at the same time an existing tasks's time
+     * distant future, while at the same time an existing task's time
      * has already expired.
      */
     void test(String[] args) throws Throwable {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/ScheduledThreadPoolExecutor/GCRetention.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,136 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Doug Lea and Martin Buchholz with assistance from members of
+ * JCP JSR-166 Expert Group and released to the public domain, as explained
+ * at http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+/*
+ * @test
+ * @summary Ensure that waiting pool threads don't retain refs to tasks.
+ */
+
+import java.lang.ref.*;
+import java.util.concurrent.*;
+
+public class GCRetention {
+    /**
+     * A custom thread pool with a custom RunnableScheduledFuture, for the
+     * sole purpose of ensuring that the task retains a strong reference to
+     * the Runnable even after cancellation.
+     */
+    static class CustomPool extends ScheduledThreadPoolExecutor {
+        CustomPool(int n) { super(n); }
+        protected <V> RunnableScheduledFuture<V> decorateTask(
+            final Runnable r,
+            final RunnableScheduledFuture<V> task) {
+            return new RunnableScheduledFuture<V>() {
+                public void run() { System.err.println(r); task.run(); }
+                public boolean isPeriodic() { return task.isPeriodic(); }
+                public V get()
+                    throws InterruptedException,ExecutionException
+                    { return task.get(); }
+                public V get(long x, TimeUnit y)
+                    throws InterruptedException,ExecutionException,TimeoutException
+                    { return task.get(x, y); }
+                public boolean isDone() { return task.isDone(); }
+                public boolean isCancelled() { return task.isCancelled(); }
+                public boolean cancel(boolean x) { return task.cancel(x); }
+                public long getDelay(TimeUnit x) { return task.getDelay(x); }
+                public int compareTo(Delayed x) { return task.compareTo(x); }
+            };
+        }
+    }
+
+    int countRefsCleared(WeakReference<?>[] refs) {
+        int count = 0;
+        for (WeakReference<?> ref : refs)
+            if (ref.get() == null)
+                count++;
+        return count;
+    }
+
+    void test(String[] args) throws Throwable {
+        CustomPool pool = new CustomPool(10);
+        final int size = 100;
+        WeakReference<?>[] refs = new WeakReference<?>[size];
+        Future<?>[] futures = new Future<?>[size];
+        for (int i = 0; i < size; i++) {
+            final Object x = new Object();
+            refs[i] = new WeakReference<Object>(x);
+            // Create a Runnable with a strong ref to x.
+            Runnable r = new Runnable() {
+                    public void run() { System.out.println(x); }
+                };
+            // Schedule a custom task with a strong reference to r.
+            // Later tasks have earlier expiration, to ensure multiple
+            // residents of queue head.
+            futures[i] = pool.schedule(r, size*2-i, TimeUnit.MINUTES);
+        }
+        Thread.sleep(10);
+        for (int i = 0; i < size; i++) {
+            if (futures[i] != null) {
+                futures[i].cancel(false);
+                futures[i] = null;
+            }
+        }
+        pool.purge();
+        int cleared = 0;
+        for (int i = 0;
+             i < 10 && (cleared = countRefsCleared(refs)) < size;
+             i++) {
+            System.gc();
+            System.runFinalization();
+            Thread.sleep(10);
+        }
+        pool.shutdown();
+        pool.awaitTermination(10, TimeUnit.SECONDS);
+        if (cleared < size)
+            throw new Error(String.format
+                            ("references to %d/%d tasks retained (\"leaked\")",
+                             size - cleared, size));
+    }
+
+    //--------------------- Infrastructure ---------------------------
+    volatile int passed = 0, failed = 0;
+    void pass() {passed++;}
+    void fail() {failed++; Thread.dumpStack();}
+    void fail(String msg) {System.err.println(msg); fail();}
+    void unexpected(Throwable t) {failed++; t.printStackTrace();}
+    void check(boolean cond) {if (cond) pass(); else fail();}
+    void equal(Object x, Object y) {
+        if (x == null ? y == null : x.equals(y)) pass();
+        else fail(x + " not equal to " + y);}
+    public static void main(String[] args) throws Throwable {
+        new GCRetention().instanceMain(args);}
+    void instanceMain(String[] args) throws Throwable {
+        try {test(args);} catch (Throwable t) {unexpected(t);}
+        System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+        if (failed > 0) throw new AssertionError("Some tests failed");}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/ScheduledThreadPoolExecutor/ZeroCoreThreads.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,117 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Martin Buchholz with assistance from members of JCP
+ * JSR-166 Expert Group and released to the public domain, as
+ * explained at http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+/*
+ * @test
+ * @bug 8022642 8065320 8129861
+ * @summary Ensure relative sanity when zero core threads
+ */
+
+import java.util.concurrent.*;
+import static java.util.concurrent.TimeUnit.*;
+import java.util.concurrent.locks.*;
+import java.lang.reflect.*;
+
+public class ZeroCoreThreads {
+    static boolean hasWaiters(ReentrantLock lock, Condition condition) {
+        lock.lock();
+        try {
+            return lock.hasWaiters(condition);
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    static <T> T getField(Object x, String fieldName) {
+        try {
+            Field field = x.getClass().getDeclaredField(fieldName);
+            field.setAccessible(true);
+            return (T) field.get(x);
+        } catch (ReflectiveOperationException ex) {
+            throw new AssertionError(ex);
+        }
+    }
+
+    void test(String[] args) throws Throwable {
+        ScheduledThreadPoolExecutor p = new ScheduledThreadPoolExecutor(0);
+        try {
+            test(p);
+        } finally {
+            p.shutdownNow();
+            check(p.awaitTermination(10L, SECONDS));
+        }
+    }
+
+    void test(ScheduledThreadPoolExecutor p) throws Throwable {
+        Runnable dummy = new Runnable() { public void run() {
+            throw new AssertionError("shouldn't get here"); }};
+        BlockingQueue q = p.getQueue();
+        ReentrantLock lock = getField(q, "lock");
+        Condition available = getField(q, "available");
+
+        equal(0, p.getPoolSize());
+        equal(0, p.getLargestPoolSize());
+        equal(0L, p.getTaskCount());
+        equal(0L, p.getCompletedTaskCount());
+        p.schedule(dummy, 1L, HOURS);
+        // Ensure one pool thread actually waits in timed queue poll
+        long t0 = System.nanoTime();
+        while (!hasWaiters(lock, available)) {
+            if (System.nanoTime() - t0 > SECONDS.toNanos(10L))
+                throw new AssertionError
+                    ("timed out waiting for a waiter to show up");
+            Thread.yield();
+        }
+        equal(1, p.getPoolSize());
+        equal(1, p.getLargestPoolSize());
+        equal(1L, p.getTaskCount());
+        equal(0L, p.getCompletedTaskCount());
+    }
+
+    //--------------------- Infrastructure ---------------------------
+    volatile int passed = 0, failed = 0;
+    void pass() {passed++;}
+    void fail() {failed++; Thread.dumpStack();}
+    void fail(String msg) {System.err.println(msg); fail();}
+    void unexpected(Throwable t) {failed++; t.printStackTrace();}
+    void check(boolean cond) {if (cond) pass(); else fail();}
+    void equal(Object x, Object y) {
+        if (x == null ? y == null : x.equals(y)) pass();
+        else fail(x + " not equal to " + y);}
+    public static void main(String[] args) throws Throwable {
+        new ZeroCoreThreads().instanceMain(args);}
+    void instanceMain(String[] args) throws Throwable {
+        try {test(args);} catch (Throwable t) {unexpected(t);}
+        System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+        if (failed > 0) throw new AssertionError("Some tests failed");}
+}
--- a/jdk/test/java/util/concurrent/ThreadPoolExecutor/CoreThreadTimeOut.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/ThreadPoolExecutor/CoreThreadTimeOut.java	Tue Oct 27 01:45:03 2015 -0400
@@ -55,7 +55,7 @@
         return count;
     }
 
-    long millisElapsedSince(long t0) {
+    static long millisElapsedSince(long t0) {
         return (System.nanoTime() - t0) / (1000L * 1000L);
     }
 
--- a/jdk/test/java/util/concurrent/ThreadPoolExecutor/Custom.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/ThreadPoolExecutor/Custom.java	Tue Oct 27 01:45:03 2015 -0400
@@ -41,7 +41,6 @@
         if (x == null ? y == null : x.equals(y)) pass();
         else {System.out.println(x + " not equal to " + y); fail(); }}
 
-
     private static class CustomTask<V> extends FutureTask<V> {
         public static final AtomicInteger births = new AtomicInteger(0);
         CustomTask(Callable<V> c) { super(c); births.getAndIncrement(); }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/ThreadPoolExecutor/FlakyThreadFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,108 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Martin Buchholz and Doug Lea with assistance from
+ * members of JCP JSR-166 Expert Group and released to the public
+ * domain, as explained at
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+/*
+ * @test
+ * @summary Should be able to shutdown a pool when worker creation failed.
+ */
+
+import java.util.concurrent.*;
+
+public class FlakyThreadFactory {
+    void test(String[] args) throws Throwable {
+        test(NullPointerException.class,
+             new ThreadFactory() {
+                public Thread newThread(Runnable r) {
+                    throw new NullPointerException();
+                }});
+        test(OutOfMemoryError.class,
+             new ThreadFactory() {
+                public Thread newThread(Runnable r) {
+                    new Thread(null, r, "a natural OOME", 1L << 60);
+                    // """On some platforms, the value of the stackSize
+                    // parameter may have no effect whatsoever."""
+                    throw new OutOfMemoryError("artificial OOME");
+                }});
+        test(null,
+             new ThreadFactory() {
+                public Thread newThread(Runnable r) {
+                    return null;
+                }});
+    }
+
+    void test(final Class<?> exceptionClass,
+              final ThreadFactory failingThreadFactory)
+            throws Throwable {
+        ThreadFactory flakyThreadFactory = new ThreadFactory() {
+            int seq = 0;
+            public Thread newThread(Runnable r) {
+                if (seq++ < 4)
+                    return new Thread(r);
+                else
+                    return failingThreadFactory.newThread(r);
+            }};
+        ThreadPoolExecutor pool =
+            new ThreadPoolExecutor(10, 10,
+                                   0L, TimeUnit.SECONDS,
+                                   new LinkedBlockingQueue(),
+                                   flakyThreadFactory);
+        try {
+            for (int i = 0; i < 8; i++)
+                pool.submit(new Runnable() { public void run() {} });
+            check(exceptionClass == null);
+        } catch (Throwable t) {
+            /* t.printStackTrace(); */
+            check(exceptionClass.isInstance(t));
+        }
+        pool.shutdown();
+        check(pool.awaitTermination(10L, TimeUnit.SECONDS));
+    }
+
+    //--------------------- Infrastructure ---------------------------
+    volatile int passed = 0, failed = 0;
+    void pass() {passed++;}
+    void fail() {failed++; Thread.dumpStack();}
+    void fail(String msg) {System.err.println(msg); fail();}
+    void unexpected(Throwable t) {failed++; t.printStackTrace();}
+    void check(boolean cond) {if (cond) pass(); else fail();}
+    void equal(Object x, Object y) {
+        if (x == null ? y == null : x.equals(y)) pass();
+        else fail(x + " not equal to " + y);}
+    public static void main(String[] args) throws Throwable {
+        new FlakyThreadFactory().instanceMain(args);}
+    public void instanceMain(String[] args) throws Throwable {
+        try {test(args);} catch (Throwable t) {unexpected(t);}
+        System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+        if (failed > 0) throw new AssertionError("Some tests failed");}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/ThreadPoolExecutor/ThreadRestarts.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,80 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Martin Buchholz and Jason Mehrens with assistance from
+ * members of JCP JSR-166 Expert Group and released to the public
+ * domain, as explained at
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+/*
+ * @test
+ * @summary Only one thread should be created when a thread needs to
+ * be kept alive to service a delayed task waiting in the queue.
+ */
+
+import java.util.concurrent.*;
+import static java.util.concurrent.TimeUnit.*;
+import java.util.concurrent.atomic.*;
+
+public class ThreadRestarts {
+    public static void main(String[] args) throws Exception {
+        test(false);
+        test(true);
+    }
+
+    private static void test(boolean allowTimeout) throws Exception {
+        CountingThreadFactory ctf = new CountingThreadFactory();
+        ScheduledThreadPoolExecutor stpe
+            = new ScheduledThreadPoolExecutor(10, ctf);
+        try {
+            Runnable nop = new Runnable() { public void run() {}};
+            stpe.schedule(nop, 10*1000L, MILLISECONDS);
+            stpe.setKeepAliveTime(1L, MILLISECONDS);
+            stpe.allowCoreThreadTimeOut(allowTimeout);
+            MILLISECONDS.sleep(100L);
+        } finally {
+            stpe.shutdownNow();
+            stpe.awaitTermination(Long.MAX_VALUE, MILLISECONDS);
+        }
+        if (ctf.count.get() > 1)
+            throw new AssertionError(
+                String.format("%d threads created, 1 expected",
+                              ctf.count.get()));
+    }
+
+    static class CountingThreadFactory implements ThreadFactory {
+        final AtomicLong count = new AtomicLong(0L);
+
+        public Thread newThread(Runnable r) {
+            Thread t = new Thread(r);
+            count.getAndIncrement();
+            return t;
+        }
+    }
+}
--- a/jdk/test/java/util/concurrent/forkjoin/FJExceptionTableLeak.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/forkjoin/FJExceptionTableLeak.java	Tue Oct 27 01:45:03 2015 -0400
@@ -36,11 +36,12 @@
  * @author Doug Lea
  * @bug 8004138
  * @summary Check if ForkJoinPool table leaks thrown exceptions.
- * @run main/othervm -Xmx32m FJExceptionTableLeak
+ * @run main/othervm/timeout=1200 -Xmx32m FJExceptionTableLeak
  */
 import java.util.concurrent.*;
 
 public class FJExceptionTableLeak {
+    // TODO: make this test use less time!
 
     // Run with TASKS_PER_STEP * 40 < Xmx < STEPS * TASKS_PER_STEP * 40
     // These work for Xmx32m:
--- a/jdk/test/java/util/concurrent/forkjoin/Integrate.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/forkjoin/Integrate.java	Tue Oct 27 01:45:03 2015 -0400
@@ -59,14 +59,15 @@
     static final int DYNAMIC = 0;
     static final int FORK = 1;
 
-    // the function to integrate
-    static double computeFunction(double x)  {
+    /** the function to integrate */
+    static double computeFunction(double x) {
         return (x * x + 1.0) * x;
     }
 
     static final double start = 0.0;
     static final double end = 1536.0;
-    /*
+
+    /**
      * The number of recursive calls for
      * integrate from start to end.
      * (Empirically determined)
@@ -127,7 +128,6 @@
         g.shutdown();
     }
 
-
     // Sequential version
     static final class SQuad extends RecursiveAction {
         static double computeArea(ForkJoinPool pool, double l, double r) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/locks/Lock/CheckedLockLoops.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,412 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Doug Lea with assistance from members of JCP JSR-166
+ * Expert Group and released to the public domain, as explained at
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+/*
+ * @test
+ * @bug 4486658
+ * @run main/timeout=7200 CheckedLockLoops
+ * @summary basic safety and liveness of ReentrantLocks, and other locks based on them
+ */
+
+import java.util.concurrent.*;
+import java.util.concurrent.locks.*;
+import java.util.*;
+
+public final class CheckedLockLoops {
+    static final ExecutorService pool = Executors.newCachedThreadPool();
+    static final LoopHelpers.SimpleRandom rng = new LoopHelpers.SimpleRandom();
+    static boolean print = false;
+    static boolean doBuiltin = false;
+
+    public static void main(String[] args) throws Exception {
+        int maxThreads = 5;
+        int iters = 100000;
+
+        if (args.length > 0)
+            maxThreads = Integer.parseInt(args[0]);
+
+        rng.setSeed(3122688L);
+
+        print = false;
+        System.out.println("Warmup...");
+        oneTest(3, 10000);
+        Thread.sleep(1000);
+        oneTest(2, 10000);
+        Thread.sleep(100);
+        oneTest(1, 100000);
+        Thread.sleep(100);
+        oneTest(1, 100000);
+        Thread.sleep(1000);
+        print = true;
+
+        for (int i = 1; i <= maxThreads; i += (i+1) >>> 1) {
+            System.out.println("Threads:" + i);
+            oneTest(i, iters / i);
+            Thread.sleep(100);
+        }
+        pool.shutdown();
+        if (! pool.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS))
+            throw new Error();
+    }
+
+    static void oneTest(int nthreads, int iters) throws Exception {
+        int v = rng.next();
+        if (doBuiltin) {
+            if (print)
+                System.out.print("builtin lock          ");
+            new BuiltinLockLoop().test(v, nthreads, iters);
+            Thread.sleep(10);
+        }
+
+        if (print)
+            System.out.print("ReentrantLock         ");
+        new ReentrantLockLoop().test(v, nthreads, iters);
+        Thread.sleep(10);
+
+        if (print)
+            System.out.print("Mutex                 ");
+        new MutexLoop().test(v, nthreads, iters);
+        Thread.sleep(10);
+
+        if (print)
+            System.out.print("ReentrantWriteLock    ");
+        new ReentrantWriteLockLoop().test(v, nthreads, iters);
+        Thread.sleep(10);
+
+        if (print)
+            System.out.print("ReentrantReadWriteLock");
+        new ReentrantReadWriteLockLoop().test(v, nthreads, iters);
+        Thread.sleep(10);
+
+        if (print)
+            System.out.print("Semaphore             ");
+        new SemaphoreLoop().test(v, nthreads, iters);
+        Thread.sleep(10);
+
+        if (print)
+            System.out.print("fair Semaphore        ");
+        new FairSemaphoreLoop().test(v, nthreads, iters);
+        Thread.sleep(10);
+
+        if (print)
+            System.out.print("FairReentrantLock     ");
+        new FairReentrantLockLoop().test(v, nthreads, iters);
+        Thread.sleep(10);
+
+        if (print)
+            System.out.print("FairRWriteLock         ");
+        new FairReentrantWriteLockLoop().test(v, nthreads, iters);
+        Thread.sleep(10);
+
+        if (print)
+            System.out.print("FairRReadWriteLock     ");
+        new FairReentrantReadWriteLockLoop().test(v, nthreads, iters);
+        Thread.sleep(10);
+    }
+
+    abstract static class LockLoop implements Runnable {
+        int value;
+        int checkValue;
+        int iters;
+        volatile int result;
+        final LoopHelpers.BarrierTimer timer = new LoopHelpers.BarrierTimer();
+        CyclicBarrier barrier;
+
+        final int setValue(int v) {
+            checkValue = v ^ 0x55555555;
+            value = v;
+            return v;
+        }
+
+        final int getValue() {
+            int v = value;
+            if (checkValue != ~(v ^ 0xAAAAAAAA))
+                throw new Error("lock protection failure");
+            return v;
+        }
+
+        final void test(int initialValue, int nthreads, int iters) throws Exception {
+            setValue(initialValue);
+            this.iters = iters;
+            barrier = new CyclicBarrier(nthreads+1, timer);
+            for (int i = 0; i < nthreads; ++i)
+                pool.execute(this);
+            barrier.await();
+            barrier.await();
+            long time = timer.getTime();
+            if (print) {
+                long tpi = time / (iters * nthreads);
+                System.out.print("\t" + LoopHelpers.rightJustify(tpi) + " ns per update");
+                //                double secs = (double)(time) / 1000000000.0;
+                //                System.out.print("\t " + secs + "s run time");
+                System.out.println();
+            }
+
+            if (result == 0) // avoid overoptimization
+                System.out.println("useless result: " + result);
+        }
+        abstract int loop(int n);
+        public final void run() {
+            try {
+                barrier.await();
+                result += loop(iters);
+                barrier.await();
+            }
+            catch (Exception ie) {
+                return;
+            }
+        }
+
+    }
+
+    private static class BuiltinLockLoop extends LockLoop {
+        final int loop(int n) {
+            int sum = 0;
+            int x = 0;
+            while (n-- > 0) {
+                synchronized (this) {
+                    x = setValue(LoopHelpers.compute1(getValue()));
+                }
+                sum += LoopHelpers.compute2(x);
+            }
+            return sum;
+        }
+    }
+
+    private static class ReentrantLockLoop extends LockLoop {
+        private final ReentrantLock lock = new ReentrantLock();
+        final int loop(int n) {
+            final ReentrantLock lock = this.lock;
+            int sum = 0;
+            int x = 0;
+            while (n-- > 0) {
+                lock.lock();
+                try {
+                    x = setValue(LoopHelpers.compute1(getValue()));
+                }
+                finally {
+                    lock.unlock();
+                }
+                sum += LoopHelpers.compute2(x);
+            }
+            return sum;
+        }
+    }
+
+    private static class MutexLoop extends LockLoop {
+        private final Mutex lock = new Mutex();
+        final int loop(int n) {
+            final Mutex lock = this.lock;
+            int sum = 0;
+            int x = 0;
+            while (n-- > 0) {
+                lock.lock();
+                try {
+                    x = setValue(LoopHelpers.compute1(getValue()));
+                }
+                finally {
+                    lock.unlock();
+                }
+                sum += LoopHelpers.compute2(x);
+            }
+            return sum;
+        }
+    }
+
+    private static class FairReentrantLockLoop extends LockLoop {
+        private final ReentrantLock lock = new ReentrantLock(true);
+        final int loop(int n) {
+            final ReentrantLock lock = this.lock;
+            int sum = 0;
+            int x = 0;
+            while (n-- > 0) {
+                lock.lock();
+                try {
+                    x = setValue(LoopHelpers.compute1(getValue()));
+                }
+                finally {
+                    lock.unlock();
+                }
+                sum += LoopHelpers.compute2(x);
+            }
+            return sum;
+        }
+    }
+
+    private static class ReentrantWriteLockLoop extends LockLoop {
+        private final Lock lock = new ReentrantReadWriteLock().writeLock();
+        final int loop(int n) {
+            final Lock lock = this.lock;
+            int sum = 0;
+            int x = 0;
+            while (n-- > 0) {
+                lock.lock();
+                try {
+                    x = setValue(LoopHelpers.compute1(getValue()));
+                }
+                finally {
+                    lock.unlock();
+                }
+                sum += LoopHelpers.compute2(x);
+            }
+            return sum;
+        }
+    }
+
+    private static class FairReentrantWriteLockLoop extends LockLoop {
+        final Lock lock = new ReentrantReadWriteLock(true).writeLock();
+        final int loop(int n) {
+            final Lock lock = this.lock;
+            int sum = 0;
+            int x = 0;
+            while (n-- > 0) {
+                lock.lock();
+                try {
+                    x = setValue(LoopHelpers.compute1(getValue()));
+                }
+                finally {
+                    lock.unlock();
+                }
+                sum += LoopHelpers.compute2(x);
+            }
+            return sum;
+        }
+    }
+
+    private static class SemaphoreLoop extends LockLoop {
+        private final Semaphore sem = new Semaphore(1, false);
+        final int loop(int n) {
+            final Semaphore sem = this.sem;
+            int sum = 0;
+            int x = 0;
+            while (n-- > 0) {
+                sem.acquireUninterruptibly();
+                try {
+                    x = setValue(LoopHelpers.compute1(getValue()));
+                }
+                finally {
+                    sem.release();
+                }
+                sum += LoopHelpers.compute2(x);
+            }
+            return sum;
+        }
+    }
+    private static class FairSemaphoreLoop extends LockLoop {
+        private final Semaphore sem = new Semaphore(1, true);
+        final int loop(int n) {
+            final Semaphore sem = this.sem;
+            int sum = 0;
+            int x = 0;
+            while (n-- > 0) {
+                sem.acquireUninterruptibly();
+                try {
+                    x = setValue(LoopHelpers.compute1(getValue()));
+                }
+                finally {
+                    sem.release();
+                }
+                sum += LoopHelpers.compute2(x);
+            }
+            return sum;
+        }
+    }
+
+    private static class ReentrantReadWriteLockLoop extends LockLoop {
+        private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
+        final int loop(int n) {
+            final Lock rlock = lock.readLock();
+            final Lock wlock = lock.writeLock();
+            int sum = 0;
+            int x = 0;
+            while (n-- > 0) {
+                if ((n & 16) != 0) {
+                    rlock.lock();
+                    try {
+                        x = LoopHelpers.compute1(getValue());
+                        x = LoopHelpers.compute2(x);
+                    }
+                    finally {
+                        rlock.unlock();
+                    }
+                }
+                else {
+                    wlock.lock();
+                    try {
+                        setValue(x);
+                    }
+                    finally {
+                        wlock.unlock();
+                    }
+                    sum += LoopHelpers.compute2(x);
+                }
+            }
+            return sum;
+        }
+
+    }
+
+    private static class FairReentrantReadWriteLockLoop extends LockLoop {
+        private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
+        final int loop(int n) {
+            final Lock rlock = lock.readLock();
+            final Lock wlock = lock.writeLock();
+            int sum = 0;
+            int x = 0;
+            while (n-- > 0) {
+                if ((n & 16) != 0) {
+                    rlock.lock();
+                    try {
+                        x = LoopHelpers.compute1(getValue());
+                        x = LoopHelpers.compute2(x);
+                    }
+                    finally {
+                        rlock.unlock();
+                    }
+                }
+                else {
+                    wlock.lock();
+                    try {
+                        setValue(x);
+                    }
+                    finally {
+                        wlock.unlock();
+                    }
+                    sum += LoopHelpers.compute2(x);
+                }
+            }
+            return sum;
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/locks/Lock/LoopHelpers.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,129 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Doug Lea with assistance from members of JCP JSR-166
+ * Expert Group and released to the public domain, as explained at
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+/**
+ * Misc utilities in JSR166 performance tests
+ */
+
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.*;
+
+class LoopHelpers {
+
+    // Some mindless computation to do between synchronizations...
+
+    /**
+     * generates 32 bit pseudo-random numbers.
+     * Adapted from http://www.snippets.org
+     */
+    public static int compute1(int x) {
+        int lo = 16807 * (x & 0xFFFF);
+        int hi = 16807 * (x >>> 16);
+        lo += (hi & 0x7FFF) << 16;
+        if ((lo & 0x80000000) != 0) {
+            lo &= 0x7fffffff;
+            ++lo;
+        }
+        lo += hi >>> 15;
+        if (lo == 0 || (lo & 0x80000000) != 0) {
+            lo &= 0x7fffffff;
+            ++lo;
+        }
+        return lo;
+    }
+
+    /**
+     *  Computes a linear congruential random number a random number
+     *  of times.
+     */
+    public static int compute2(int x) {
+        int loops = (x >>> 4) & 7;
+        while (loops-- > 0) {
+            x = (x * 2147483647) % 16807;
+        }
+        return x;
+    }
+
+    /**
+     * An actually useful random number generator, but unsynchronized.
+     * Basically same as java.util.Random.
+     */
+    public static class SimpleRandom {
+        private static final long multiplier = 0x5DEECE66DL;
+        private static final long addend = 0xBL;
+        private static final long mask = (1L << 48) - 1;
+        static final AtomicLong seq = new AtomicLong(1);
+        private long seed = System.nanoTime() + seq.getAndIncrement();
+
+        public void setSeed(long s) {
+            seed = s;
+        }
+
+        public int next() {
+            long nextseed = (seed * multiplier + addend) & mask;
+            seed = nextseed;
+            return ((int)(nextseed >>> 17)) & 0x7FFFFFFF;
+        }
+    }
+
+    public static class BarrierTimer implements Runnable {
+        public volatile long startTime;
+        public volatile long endTime;
+        public void run() {
+            long t = System.nanoTime();
+            if (startTime == 0)
+                startTime = t;
+            else
+                endTime = t;
+        }
+        public void clear() {
+            startTime = 0;
+            endTime = 0;
+        }
+        public long getTime() {
+            return endTime - startTime;
+        }
+    }
+
+    public static String rightJustify(long n) {
+        // There's probably a better way to do this...
+        String field = "         ";
+        String num = Long.toString(n);
+        if (num.length() >= field.length())
+            return num;
+        StringBuffer b = new StringBuffer(field);
+        b.replace(b.length()-num.length(), b.length(), num);
+        return b.toString();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/locks/Lock/Mutex.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,82 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Doug Lea with assistance from members of JCP JSR-166
+ * Expert Group and released to the public domain, as explained at
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.locks.*;
+import java.util.concurrent.atomic.*;
+import java.io.*;
+
+/**
+ * A sample user extension of AbstractQueuedSynchronizer.
+ */
+public class Mutex implements Lock, java.io.Serializable {
+    private static class Sync extends AbstractQueuedSynchronizer {
+        public boolean isHeldExclusively() { return getState() == 1; }
+
+        public boolean tryAcquire(int acquires) {
+            assert acquires == 1; // Does not use multiple acquires
+            return compareAndSetState(0, 1);
+        }
+
+        public boolean tryRelease(int releases) {
+            setState(0);
+            return true;
+        }
+
+        Condition newCondition() { return new ConditionObject(); }
+
+        private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
+            s.defaultReadObject();
+            setState(0); // reset to unlocked state
+        }
+    }
+
+    private final Sync sync = new Sync();
+    public void lock() {
+        sync.acquire(1);
+    }
+    public boolean tryLock() {
+        return sync.tryAcquire(1);
+    }
+    public void lockInterruptibly() throws InterruptedException {
+        sync.acquireInterruptibly(1);
+    }
+    public boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException {
+        return sync.tryAcquireNanos(1, unit.toNanos(timeout));
+    }
+    public void unlock() { sync.release(1); }
+    public Condition newCondition() { return sync.newCondition(); }
+    public boolean isLocked() { return sync.isHeldExclusively(); }
+    public boolean hasQueuedThreads() { return sync.hasQueuedThreads(); }
+}
--- a/jdk/test/java/util/concurrent/locks/Lock/TimedAcquireLeak.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/locks/Lock/TimedAcquireLeak.java	Tue Oct 27 01:45:03 2015 -0400
@@ -28,14 +28,32 @@
  * @author Martin Buchholz
  */
 
-// Note: this file is now out of sync with the jsr166 CVS repository due to the fix for 7092140
+import static java.util.concurrent.TimeUnit.NANOSECONDS;
+import static java.util.concurrent.TimeUnit.SECONDS;
 
-import java.util.*;
-import java.util.regex.*;
-import java.util.concurrent.*;
-import java.util.concurrent.locks.*;
-import static java.util.concurrent.TimeUnit.*;
-import java.io.*;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.io.Reader;
+import java.lang.ref.WeakReference;
+import java.util.Random;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.locks.ReentrantLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 public class TimedAcquireLeak {
     static String javahome() {
@@ -96,18 +114,34 @@
                                   Callable<T> callable) throws Throwable {
         p.getInputStream().read();
         T result = callable.call();
-        OutputStream os = p.getOutputStream();
-        os.write((byte)'\n'); os.flush();
+        sendByte(p.getOutputStream());
         return result;
     }
 
+    /** No guarantees, but effective in practice. */
+    private static void forceFullGc() {
+        CountDownLatch finalizeDone = new CountDownLatch(1);
+        WeakReference<?> ref = new WeakReference<Object>(new Object() {
+            protected void finalize() { finalizeDone.countDown(); }});
+        try {
+            for (int i = 0; i < 10; i++) {
+                System.gc();
+                if (finalizeDone.await(1L, SECONDS) && ref.get() == null) {
+                    System.runFinalization(); // try to pick up stragglers
+                    return;
+                }
+            }
+        } catch (InterruptedException unexpected) {
+            throw new AssertionError("unexpected InterruptedException");
+        }
+        throw new AssertionError("failed to do a \"full\" gc");
+    }
+
     // To be called exactly twice by the child process
     public static void rendezvousChild() {
         try {
-            for (int i = 0; i < 100; i++) {
-                System.gc(); System.runFinalization(); Thread.sleep(50);
-            }
-            System.out.write((byte)'\n'); System.out.flush();
+            forceFullGc();
+            sendByte(System.out);
             System.in.read();
         } catch (Throwable t) { throw new Error(t); }
     }
@@ -118,6 +152,12 @@
         return matcher.group(group);
     }
 
+    /** It's all about sending a message! */
+    static void sendByte(OutputStream s) throws IOException {
+        s.write('!');
+        s.flush();
+    }
+
     static int objectsInUse(final Process child,
                             final String childPid,
                             final String className) {
@@ -155,6 +195,9 @@
             childClassName, uniqueID
         };
         final Process p = new ProcessBuilder(jobCmd).start();
+        // Ensure subprocess jvm has started, so that jps can find it
+        p.getInputStream().read();
+        sendByte(p.getOutputStream());
 
         final String childPid =
             match(commandOutputOf(jps, "-m"),
@@ -167,10 +210,19 @@
         failed += p.exitValue();
 
         // Check that no objects were leaked.
+        //
+        // TODO: This test is very brittle, depending on current JDK
+        // implementation, and needing occasional adjustment.
         System.out.printf("%d -> %d%n", n0, n1);
-        check(Math.abs(n1 - n0) < 2); // Almost always n0 == n1
-        check(n1 < 20);
+        // Almost always n0 == n1
+        // Maximum jitter observed in practice is 10 -> 17
+        check(Math.abs(n1 - n0) < 10);
+        check(n1 < 25);
         drainers.shutdown();
+        if (!drainers.awaitTermination(10L, SECONDS)) {
+            drainers.shutdownNow(); // last resort
+            throw new AssertionError("thread pool did not terminate");
+        }
     }
 
     //----------------------------------------------------------------
@@ -187,6 +239,10 @@
         }
 
         public static void main(String[] args) throws Throwable {
+            // Synchronize with parent process, so that jps can find us
+            sendByte(System.out);
+            System.in.read();
+
             final ReentrantLock lock = new ReentrantLock();
             lock.lock();
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/concurrent/locks/LockSupport/ParkLoops.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,163 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Martin Buchholz with assistance from members of JCP
+ * JSR-166 Expert Group and released to the public domain, as
+ * explained at http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+/*
+ * @test
+ * @bug 8074773
+ * @summary Stress test looks for lost unparks
+ * @run main/timeout=1200 ParkLoops
+ */
+
+import static java.util.concurrent.TimeUnit.SECONDS;
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReferenceArray;
+import java.util.concurrent.locks.LockSupport;
+
+public final class ParkLoops {
+    static final int THREADS = 4; // must be power of two
+    // static final int ITERS = 2_000_000;
+    // static final int TIMEOUT = 3500;  // in seconds
+    static final int ITERS = 100_000;
+    static final int TIMEOUT = 1000;  // in seconds
+
+    static class Parker implements Runnable {
+        static {
+            // Reduce the risk of rare disastrous classloading in first call to
+            // LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
+            Class<?> ensureLoaded = LockSupport.class;
+        }
+
+        private final AtomicReferenceArray<Thread> threads;
+        private final CountDownLatch done;
+
+        Parker(AtomicReferenceArray<Thread> threads, CountDownLatch done) {
+            this.threads = threads;
+            this.done = done;
+        }
+
+        public void run() {
+            final SimpleRandom rng = new SimpleRandom();
+            final Thread current = Thread.currentThread();
+            for (int k = ITERS, j; k > 0; k--) {
+                do {
+                    j = rng.next() & (THREADS - 1);
+                } while (!threads.compareAndSet(j, null, current));
+                do {                    // handle spurious wakeups
+                    LockSupport.park();
+                } while (threads.get(j) == current);
+            }
+            done.countDown();
+        }
+    }
+
+    static class Unparker implements Runnable {
+        static {
+            // Reduce the risk of rare disastrous classloading in first call to
+            // LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
+            Class<?> ensureLoaded = LockSupport.class;
+        }
+
+        private final AtomicReferenceArray<Thread> threads;
+        private final CountDownLatch done;
+
+        Unparker(AtomicReferenceArray<Thread> threads, CountDownLatch done) {
+            this.threads = threads;
+            this.done = done;
+        }
+
+        public void run() {
+            final SimpleRandom rng = new SimpleRandom();
+            for (int n = 0; (n++ & 0xff) != 0 || done.getCount() > 0;) {
+                int j = rng.next() & (THREADS - 1);
+                Thread parker = threads.get(j);
+                if (parker != null &&
+                    threads.compareAndSet(j, parker, null)) {
+                    LockSupport.unpark(parker);
+                }
+            }
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        final ExecutorService pool = Executors.newCachedThreadPool();
+        final AtomicReferenceArray<Thread> threads
+            = new AtomicReferenceArray<>(THREADS);
+        final CountDownLatch done = new CountDownLatch(THREADS);
+        final Runnable parker = new Parker(threads, done);
+        final Runnable unparker = new Unparker(threads, done);
+        for (int i = 0; i < THREADS; i++) {
+            pool.submit(parker);
+            pool.submit(unparker);
+        }
+        try {
+          if (!done.await(TIMEOUT, SECONDS)) {
+            dumpAllStacks();
+            throw new AssertionError("lost unpark");
+          }
+        } finally {
+          pool.shutdown();
+          pool.awaitTermination(10L, SECONDS);
+        }
+    }
+
+    static void dumpAllStacks() {
+        ThreadInfo[] threadInfos =
+            ManagementFactory.getThreadMXBean().dumpAllThreads(true, true);
+        for (ThreadInfo threadInfo : threadInfos) {
+            System.err.print(threadInfo);
+        }
+    }
+
+    /**
+     * An actually useful random number generator, but unsynchronized.
+     * Basically same as java.util.Random.
+     */
+    public static class SimpleRandom {
+        private static final long multiplier = 0x5DEECE66DL;
+        private static final long addend = 0xBL;
+        private static final long mask = (1L << 48) - 1;
+        static final AtomicLong seq = new AtomicLong(1);
+        private long seed = System.nanoTime() + seq.getAndIncrement();
+
+        public int next() {
+            long nextseed = (seed * multiplier + addend) & mask;
+            seed = nextseed;
+            return ((int)(nextseed >>> 17)) & 0x7FFFFFFF;
+        }
+    }
+}
--- a/jdk/test/java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java	Tue Oct 27 01:45:03 2015 -0400
@@ -35,10 +35,10 @@
  * @test
  * @bug 4486658
  * @run main/timeout=2800 CancelledLockLoops
- * @summary tests lockInterruptibly.
- * Checks for responsiveness of locks to interrupts. Runs under that
- * assumption that ITERS_VALUE computations require more than TIMEOUT
- * msecs to complete.
+ * @summary tests ReentrantLock.lockInterruptibly.
+ * Checks for responsiveness of locks to interrupts.  Runs under the
+ * assumption that ITERS computations require more than TIMEOUT msecs
+ * to complete.
  */
 
 import java.util.concurrent.*;
@@ -48,11 +48,12 @@
 public final class CancelledLockLoops {
     static final Random rng = new Random();
     static boolean print = false;
-    static final int ITERS = 5000000;
+    static final int ITERS = 1000000;
     static final long TIMEOUT = 100;
 
     public static void main(String[] args) throws Exception {
         int maxThreads = (args.length > 0) ? Integer.parseInt(args[0]) : 5;
+
         print = true;
 
         for (int i = 2; i <= maxThreads; i += (i+1) >>> 1) {
@@ -112,7 +113,7 @@
                 lock.unlock();
             }
             if (c != 2)
-                throw new Error("Completed != 2");
+                throw new Error("Completed == " + c + "; expected 2");
             int r = result;
             if (r == 0) // avoid overoptimization
                 System.out.println("useless result: " + r);
--- a/jdk/test/java/util/concurrent/locks/ReentrantLock/TimeoutLockLoops.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/locks/ReentrantLock/TimeoutLockLoops.java	Tue Oct 27 01:45:03 2015 -0400
@@ -57,7 +57,6 @@
         if (args.length > 0)
             maxThreads = Integer.parseInt(args[0]);
 
-
         print = true;
 
         for (int i = 1; i <= maxThreads; i += (i+1) >>> 1) {
@@ -140,6 +139,4 @@
             }
         }
     }
-
-
 }
--- a/jdk/test/java/util/concurrent/locks/ReentrantReadWriteLock/MapLoops.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/locks/ReentrantReadWriteLock/MapLoops.java	Tue Oct 27 01:45:03 2015 -0400
@@ -134,7 +134,7 @@
         int position;
         int total;
 
-        Runner(Map<Integer,Integer> map, Integer[] key,  CyclicBarrier barrier) {
+        Runner(Map<Integer,Integer> map, Integer[] key, CyclicBarrier barrier) {
             this.map = map;
             this.key = key;
             this.barrier = barrier;
@@ -142,7 +142,7 @@
         }
 
         int step() {
-            // random-walk around key positions,  bunching accesses
+            // random-walk around key positions, bunching accesses
             int r = rng.next();
             position += (r & 7) - 3;
             while (position >= key.length) position -= key.length;
@@ -156,7 +156,7 @@
                     throw new Error("bad mapping: " + x + " to " + k);
 
                 if (r < removesPerMaxRandom) {
-                    // get awy from this position
+                    // get away from this position
                     position = r % key.length;
                     map.remove(k);
                     return 2;
--- a/jdk/test/java/util/concurrent/locks/ReentrantReadWriteLock/RWMap.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/locks/ReentrantReadWriteLock/RWMap.java	Tue Oct 27 01:45:03 2015 -0400
@@ -35,13 +35,11 @@
 import java.util.concurrent.*;
 import java.util.concurrent.locks.*;
 
-
 /**
  * This is an incomplete implementation of a wrapper class
  * that places read-write locks around unsynchronized Maps.
  * Exists as a sample input for MapLoops test.
  */
-
 public class RWMap implements Map {
     private final Map m;
     private final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock();
@@ -86,7 +84,6 @@
         finally { rwl.readLock().unlock(); }
     }
 
-
     public Set keySet() { // Not implemented
         return null;
     }
--- a/jdk/test/java/util/concurrent/locks/StampedLock/Basic.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/java/util/concurrent/locks/StampedLock/Basic.java	Tue Oct 27 01:45:03 2015 -0400
@@ -78,7 +78,7 @@
     abstract static class Locker extends Thread {
         static AtomicInteger count = new AtomicInteger(1);
         private volatile Throwable thrown;
-        private volatile long stamp;;
+        private volatile long stamp;
         protected void thrown(Throwable thrown) { this.thrown = thrown; }
         public Throwable thrown() { return thrown; }
         protected void stamp(long stamp) { this.stamp = stamp; }
@@ -371,7 +371,7 @@
                 check(!sl.tryUnlockRead());
                 check(!sl.tryUnlockWrite());
                 check(sl.tryOptimisticRead() != 0L);
-                Locker[] wThreads = new Locker[100];;
+                Locker[] wThreads = new Locker[100];
                 for (int j=0; j<100; j++)
                     wThreads[j] = writers.next();
                 for (int j=0; j<100; j++)
@@ -401,7 +401,7 @@
                 check(!sl.tryUnlockRead());
                 check(!sl.tryUnlockWrite());
                 check(sl.tryOptimisticRead() != 0L);
-                Locker[] rThreads = new Locker[100];;
+                Locker[] rThreads = new Locker[100];
                 for (int j=0; j<100; j++)
                     rThreads[j] = readers.next();
                 for (int j=0; j<100; j++)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexResetUpdate.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,548 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FilePermission;
+import java.io.IOException;
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+import java.util.UUID;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.logging.FileHandler;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+import java.util.logging.LoggingPermission;
+
+/**
+ * @test
+ * @bug 8033661
+ * @summary tests that FileHandlers configured on abstract nodes in logging.properties
+ *          will be closed on reset and reopened on updateConfiguration().
+ *          Test a complex reconfiguration where a logger with handlers
+ *          suddenly appears in the hierarchy between a child logger and the
+ *          root logger.
+ * @run main/othervm HandlersOnComplexResetUpdate UNSECURE
+ * @run main/othervm HandlersOnComplexResetUpdate SECURE
+ * @author danielfuchs
+ */
+public class HandlersOnComplexResetUpdate {
+
+    /**
+     * We will test the handling of abstract logger nodes with file handlers in
+     * two configurations:
+     * UNSECURE: No security manager.
+     * SECURE: With the security manager present - and the required
+     *         permissions granted.
+     */
+    public static enum TestCase {
+        UNSECURE, SECURE;
+        public void run(List<Properties> properties) throws Exception {
+            System.out.println("Running test case: " + name());
+            Configure.setUp(this, properties.get(0));
+            test(this.name(), properties);
+        }
+    }
+
+
+    private static final String PREFIX =
+            "FileHandler-" + UUID.randomUUID() + ".log";
+    private static final String userDir = System.getProperty("user.dir", ".");
+    private static final boolean userDirWritable = Files.isWritable(Paths.get(userDir));
+
+    private static final List<Properties> properties;
+    static {
+        // The test will call reset() and updateConfiguration() with each of these
+        // properties in sequence. The child logger is not released between each
+        // configuration. What is interesting here is mostly what happens between
+        // props4 and props5:
+        //
+        // In step 4 (props4) the configuration defines a handler for the
+        // logger com.foo (the direct parent of com.foo.child - which is the
+        // logger we hold on to).
+        //
+        // In step 5 (props5) the configuration has nothing concerning
+        // 'com.foo', but the handler has been migrated to 'com'.
+        // Since there doesn't exist any logger for 'com' (the previous
+        // configuration didn't have any configuration for 'com'), then
+        // 'com' will not be found when we process the existing loggers named
+        // in the configuration.
+        //
+        // So if we didn't also process the existing loggers not named in the
+        // configuration (such as com.foo.child) then no logger for 'com'
+        // would be created, which means that com.foo.child would not be
+        // able to inherit its configuration for 'com' until someone explicitely
+        // creates a logger for 'com'.
+        //
+        // This test check that a logger for 'com' will be created because
+        // 'com.foo.child' still exists when updateConfiguration() is called.
+
+        Properties props1 = new Properties();
+        props1.setProperty("test.name", "parent logger with handler");
+        props1.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props1.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props1.setProperty(FileHandler.class.getName() + ".level", "ALL");
+        props1.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+        props1.setProperty("com.foo.handlers", FileHandler.class.getName());
+        props1.setProperty("test.checkHandlersOnParent", "true");
+        props1.setProperty("test.checkHandlersOn", "com.foo");
+        props1.setProperty("com.bar.level", "FINEST");
+
+        Properties props2 = new Properties();
+        props2.setProperty("java.util.logging.LogManager.reconfigureHandlers", "true");
+        props2.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props2.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props2.setProperty(FileHandler.class.getName() + ".level", "ALL");
+        props2.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+        props2.setProperty("com.foo.handlers", FileHandler.class.getName());
+        props2.setProperty("test.checkHandlersOnParent", "true");
+        props2.setProperty("test.checkHandlersOn", "com.foo");
+        props2.setProperty("com.bar.level", "FINEST");
+
+        Properties props3 = new Properties();
+        props3.setProperty("test.name", "parent logger with handler");
+        props3.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props3.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props3.setProperty(FileHandler.class.getName() + ".level", "ALL");
+        props3.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+        props3.setProperty("com.foo.handlers", FileHandler.class.getName());
+        props3.setProperty("test.checkHandlersOnParent", "true");
+        props3.setProperty("test.checkHandlersOn", "com.foo");
+        props3.setProperty("com.bar.level", "FINEST");
+
+        Properties props4 = new Properties();
+        props4.setProperty("java.util.logging.LogManager.reconfigureHandlers", "true");
+        props4.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props4.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props4.setProperty(FileHandler.class.getName() + ".level", "ALL");
+        props4.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+        props4.setProperty("test.checkHandlersOnParent", "true");
+        props4.setProperty("test.checkHandlersOn", "com.foo");
+        props4.setProperty("com.foo.handlers", FileHandler.class.getName());
+
+        Properties props5 = new Properties();
+        props5.setProperty("test.name", "parent logger with handler");
+        props5.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props5.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props5.setProperty(FileHandler.class.getName() + ".level", "ALL");
+        props5.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+        props5.setProperty("test.checkHandlersOnParent", "false");
+        props5.setProperty("test.checkHandlersOn", "com");
+        props5.setProperty("com.handlers", FileHandler.class.getName());
+
+        properties = Collections.unmodifiableList(Arrays.asList(
+                    props1, props2, props3, props4, props5));
+    }
+
+    /**
+     * This is the main test method. The rest is infrastructure.
+     * Creates a child of the 'com.foo' logger (com.foo.child) and holds on to
+     * it.
+     * <p>
+     * Then applies all given configurations in sequence and verifies assumptions
+     * about the handlers that com.foo should have, or not have.
+     * In the last configuration (props5) it also verifies that the
+     * logger 'com' has been created and has now the expected handler.
+     * <p>
+     * Finally releases the child logger after all configurations have been
+     * applied.
+     *
+     * @param name
+     * @param properties
+     * @throws Exception
+     */
+    static void test(String name, List<Properties> properties)
+            throws Exception {
+
+        System.out.println("\nTesting: " + name);
+        if (!userDirWritable) {
+            throw new RuntimeException("Not writable: "+userDir);
+        }
+
+        // Then create a child of the com.foo logger.
+        Logger fooChild = Logger.getLogger("com.foo.child");
+        fooChild.info("hello world");
+        Logger barChild = Logger.getLogger("com.bar.child");
+        barChild.info("hello world");
+
+        ReferenceQueue<Logger> queue = new ReferenceQueue();
+        WeakReference<Logger> fooRef = new WeakReference<>(Logger.getLogger("com.foo"), queue);
+        if (fooRef.get() != fooChild.getParent()) {
+            throw new RuntimeException("Unexpected parent logger: "
+                    + fooChild.getParent() +"\n\texpected: " + fooRef.get());
+        }
+        WeakReference<Logger> barRef = new WeakReference<>(Logger.getLogger("com.bar"), queue);
+        if (barRef.get() != barChild.getParent()) {
+            throw new RuntimeException("Unexpected parent logger: "
+                    + barChild.getParent() +"\n\texpected: " + barRef.get());
+        }
+        Reference<? extends Logger> ref2;
+        int max = 3;
+        barChild = null;
+        while ((ref2 = queue.poll()) == null) {
+            System.gc();
+            Thread.sleep(100);
+            if (--max == 0) break;
+        }
+
+        Throwable failed = null;
+        try {
+            if (ref2 != null) {
+                String refName = ref2 == fooRef ? "fooRef" : ref2 == barRef ? "barRef" : "unknown";
+                if (ref2 != barRef) {
+                    throw new RuntimeException("Unexpected logger reference cleared: " + refName);
+                } else {
+                    System.out.println("Reference " + refName + " cleared as expected");
+                }
+            } else if (ref2 == null) {
+                throw new RuntimeException("Expected 'barRef' to be cleared");
+            }
+            // Now lets try to reset, check that ref2 has no handlers, and
+            // attempt to configure again.
+            Properties previousProps  = properties.get(0);
+            int expectedHandlersCount = 1;
+            boolean checkHandlersOnParent = Boolean.parseBoolean(
+                    previousProps.getProperty("test.checkHandlersOnParent", "true"));
+            String checkHandlersOn = previousProps.getProperty("test.checkHandlersOn", null);
+            for (int i=1; i<properties.size(); i++) {
+                System.out.println("\n*** Reconfiguration with properties["+i+"]\n");
+                Properties nextProps = properties.get(i);
+                boolean reconfigureHandlers = true;
+
+                if (checkHandlersOnParent) {
+                    assertEquals(expectedHandlersCount,
+                            fooChild.getParent().getHandlers().length,
+                            "fooChild.getParent().getHandlers().length");
+                }
+                if (checkHandlersOn != null) {
+                    Logger loggerWithHandlers = LogManager.getLogManager().getLogger(checkHandlersOn);
+                    if (loggerWithHandlers == null) {
+                        throw new RuntimeException("Logger with handlers not found: " + checkHandlersOn);
+                    }
+                    assertEquals(expectedHandlersCount,
+                            loggerWithHandlers.getHandlers().length,
+                            checkHandlersOn + ".getHandlers().length");
+                }
+
+                // Reset
+                Configure.doPrivileged(() -> LogManager.getLogManager().reset());
+                assertEquals(0, fooChild.getParent().getHandlers().length, "fooChild.getParent().getHandlers().length");
+                if (checkHandlersOn != null) {
+                    Logger loggerWithHandlers = LogManager.getLogManager().getLogger(checkHandlersOn);
+                    if (loggerWithHandlers == null) {
+                        throw new RuntimeException("Logger with handlers not found: " + checkHandlersOn);
+                    }
+                    assertEquals(0, loggerWithHandlers.getHandlers().length,
+                            checkHandlersOn + ".getHandlers().length");
+                }
+
+                if (i == 4) {
+                    System.out.println("Last configuration...");
+                }
+                // Read configuration
+                Configure.doPrivileged(() -> Configure.updateConfigurationWith(nextProps, false));
+
+                expectedHandlersCount = reconfigureHandlers ? 1 : 0;
+                checkHandlersOnParent = Boolean.parseBoolean(
+                    nextProps.getProperty("test.checkHandlersOnParent", "true"));
+                checkHandlersOn = nextProps.getProperty("test.checkHandlersOn", null);
+
+                if (checkHandlersOnParent) {
+                    assertEquals(expectedHandlersCount,
+                        fooChild.getParent().getHandlers().length,
+                        "fooChild.getParent().getHandlers().length");
+                } else {
+                    assertEquals(0,
+                        fooChild.getParent().getHandlers().length,
+                        "fooChild.getParent().getHandlers().length");
+                }
+                if (checkHandlersOn != null) {
+                    Logger loggerWithHandlers = LogManager.getLogManager().getLogger(checkHandlersOn);
+                    if (loggerWithHandlers == null) {
+                        throw new RuntimeException("Logger with handlers not found: " + checkHandlersOn);
+                    }
+                    assertEquals(expectedHandlersCount,
+                            loggerWithHandlers.getHandlers().length,
+                            checkHandlersOn + ".getHandlers().length");
+                }
+            }
+        } catch (Throwable t) {
+            failed = t;
+        } finally {
+            final Throwable suppressed = failed;
+            Configure.doPrivileged(() -> LogManager.getLogManager().reset());
+            Configure.doPrivileged(() -> {
+                try {
+                    StringBuilder builder = new StringBuilder();
+                    Files.list(Paths.get(userDir))
+                        .filter((f) -> f.toString().contains(PREFIX))
+                        .filter((f) -> f.toString().endsWith(".lck"))
+                        .forEach((f) -> {
+                                builder.append(f.toString()).append('\n');
+                        });
+                    if (!builder.toString().isEmpty()) {
+                        throw new RuntimeException("Lock files not cleaned:\n"
+                                + builder.toString());
+                    }
+                } catch(RuntimeException | Error x) {
+                    if (suppressed != null) x.addSuppressed(suppressed);
+                    throw x;
+                } catch(Exception x) {
+                    if (suppressed != null) x.addSuppressed(suppressed);
+                    throw new RuntimeException(x);
+                }
+            });
+            fooChild = null;
+            System.out.println("Setting fooChild to: " + fooChild);
+            while ((ref2 = queue.poll()) == null) {
+                System.gc();
+                Thread.sleep(1000);
+            }
+            if (ref2 != fooRef) {
+                throw new RuntimeException("Unexpected reference: "
+                        + ref2 +"\n\texpected: " + fooRef);
+            }
+            if (ref2.get() != null) {
+                throw new RuntimeException("Referent not cleared: " + ref2.get());
+            }
+            System.out.println("Got fooRef after reset(), fooChild is " + fooChild);
+
+        }
+        if (failed != null) {
+            // should rarely happen...
+            throw new RuntimeException(failed);
+        }
+
+    }
+
+    public static void main(String... args) throws Exception {
+
+
+        if (args == null || args.length == 0) {
+            args = new String[] {
+                TestCase.UNSECURE.name(),
+                TestCase.SECURE.name(),
+            };
+        }
+
+        try {
+            for (String testName : args) {
+                TestCase test = TestCase.valueOf(testName);
+                test.run(properties);
+            }
+        } finally {
+            if (userDirWritable) {
+                Configure.doPrivileged(() -> {
+                    // cleanup - delete files that have been created
+                    try {
+                        Files.list(Paths.get(userDir))
+                            .filter((f) -> f.toString().contains(PREFIX))
+                            .forEach((f) -> {
+                                try {
+                                    System.out.println("deleting " + f);
+                                    Files.delete(f);
+                                } catch(Throwable t) {
+                                    System.err.println("Failed to delete " + f + ": " + t);
+                                }
+                            });
+                    } catch(Throwable t) {
+                        System.err.println("Cleanup failed to list files: " + t);
+                        t.printStackTrace();
+                    }
+                });
+            }
+        }
+    }
+
+    static class Configure {
+        static Policy policy = null;
+        static final ThreadLocal<AtomicBoolean> allowAll = new ThreadLocal<AtomicBoolean>() {
+            @Override
+            protected AtomicBoolean initialValue() {
+                return  new AtomicBoolean(false);
+            }
+        };
+        static void setUp(TestCase test, Properties propertyFile) {
+            switch (test) {
+                case SECURE:
+                    if (policy == null && System.getSecurityManager() != null) {
+                        throw new IllegalStateException("SecurityManager already set");
+                    } else if (policy == null) {
+                        policy = new SimplePolicy(TestCase.SECURE, allowAll);
+                        Policy.setPolicy(policy);
+                        System.setSecurityManager(new SecurityManager());
+                    }
+                    if (System.getSecurityManager() == null) {
+                        throw new IllegalStateException("No SecurityManager.");
+                    }
+                    if (policy == null) {
+                        throw new IllegalStateException("policy not configured");
+                    }
+                    break;
+                case UNSECURE:
+                    if (System.getSecurityManager() != null) {
+                        throw new IllegalStateException("SecurityManager already set");
+                    }
+                    break;
+                default:
+                    new InternalError("No such testcase: " + test);
+            }
+            doPrivileged(() -> {
+                updateConfigurationWith(propertyFile, false);
+            });
+        }
+
+        static void updateConfigurationWith(Properties propertyFile, boolean append) {
+            try {
+                ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+                propertyFile.store(bytes, propertyFile.getProperty("test.name"));
+                ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray());
+                Function<String, BiFunction<String,String,String>> remapper =
+                        append ? (x) -> ((o, n) -> n == null ? o : n)
+                               : (x) -> ((o, n) -> n);
+                LogManager.getLogManager().updateConfiguration(bais, remapper);
+            } catch (IOException ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+
+        static void doPrivileged(Runnable run) {
+            final boolean old = allowAll.get().getAndSet(true);
+            try {
+                run.run();
+            } finally {
+                allowAll.get().set(old);
+            }
+        }
+        static <T> T callPrivileged(Callable<T> call) throws Exception {
+            final boolean old = allowAll.get().getAndSet(true);
+            try {
+                return call.call();
+            } finally {
+                allowAll.get().set(old);
+            }
+        }
+    }
+
+    @FunctionalInterface
+    public static interface FileHandlerSupplier {
+        public FileHandler test() throws Exception;
+    }
+
+    static final class TestAssertException extends RuntimeException {
+        TestAssertException(String msg) {
+            super(msg);
+        }
+    }
+
+    private static void assertEquals(long expected, long received, String msg) {
+        if (expected != received) {
+            throw new TestAssertException("Unexpected result for " + msg
+                    + ".\n\texpected: " + expected
+                    +  "\n\tactual:   " + received);
+        } else {
+            System.out.println("Got expected " + msg + ": " + received);
+        }
+    }
+
+    final static class PermissionsBuilder {
+        final Permissions perms;
+        public PermissionsBuilder() {
+            this(new Permissions());
+        }
+        public PermissionsBuilder(Permissions perms) {
+            this.perms = perms;
+        }
+        public PermissionsBuilder add(Permission p) {
+            perms.add(p);
+            return this;
+        }
+        public PermissionsBuilder addAll(PermissionCollection col) {
+            if (col != null) {
+                for (Enumeration<Permission> e = col.elements(); e.hasMoreElements(); ) {
+                    perms.add(e.nextElement());
+                }
+            }
+            return this;
+        }
+        public Permissions toPermissions() {
+            final PermissionsBuilder builder = new PermissionsBuilder();
+            builder.addAll(perms);
+            return builder.perms;
+        }
+    }
+
+    public static class SimplePolicy extends Policy {
+
+        final Permissions permissions;
+        final Permissions allPermissions;
+        final ThreadLocal<AtomicBoolean> allowAll; // actually: this should be in a thread locale
+        public SimplePolicy(TestCase test, ThreadLocal<AtomicBoolean> allowAll) {
+            this.allowAll = allowAll;
+            permissions = new Permissions();
+            permissions.add(new LoggingPermission("control", null));
+            permissions.add(new FilePermission(PREFIX+".lck", "read,write,delete"));
+            permissions.add(new FilePermission(PREFIX, "read,write"));
+
+            // these are used for configuring the test itself...
+            allPermissions = new Permissions();
+            allPermissions.add(new java.security.AllPermission());
+
+        }
+
+        @Override
+        public boolean implies(ProtectionDomain domain, Permission permission) {
+            if (allowAll.get().get()) return allPermissions.implies(permission);
+            return permissions.implies(permission);
+        }
+
+        @Override
+        public PermissionCollection getPermissions(CodeSource codesource) {
+            return new PermissionsBuilder().addAll(allowAll.get().get()
+                    ? allPermissions : permissions).toPermissions();
+        }
+
+        @Override
+        public PermissionCollection getPermissions(ProtectionDomain domain) {
+            return new PermissionsBuilder().addAll(allowAll.get().get()
+                    ? allPermissions : permissions).toPermissions();
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexUpdate.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,547 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FilePermission;
+import java.io.IOException;
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+import java.util.UUID;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.logging.FileHandler;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+import java.util.logging.LoggingPermission;
+
+/**
+ * @test
+ * @bug 8033661
+ * @summary tests that FileHandlers configured on abstract nodes in logging.properties
+ *          will be properly closed and reopened on updateConfiguration().
+ *          Test a complex reconfiguration where a logger with handlers
+ *          suddenly appears in the hierarchy between a child logger and the
+ *          root logger.
+ * @run main/othervm HandlersOnComplexUpdate UNSECURE
+ * @run main/othervm HandlersOnComplexUpdate SECURE
+ * @author danielfuchs
+ */
+public class HandlersOnComplexUpdate {
+
+    /**
+     * We will test the handling of abstract logger nodes with file handlers in
+     * two configurations:
+     * UNSECURE: No security manager.
+     * SECURE: With the security manager present - and the required
+     *         permissions granted.
+     */
+    public static enum TestCase {
+        UNSECURE, SECURE;
+        public void run(List<Properties> properties) throws Exception {
+            System.out.println("Running test case: " + name());
+            Configure.setUp(this, properties.get(0));
+            test(this.name(), properties);
+        }
+    }
+
+
+    private static final String PREFIX =
+            "FileHandler-" + UUID.randomUUID() + ".log";
+    private static final String userDir = System.getProperty("user.dir", ".");
+    private static final boolean userDirWritable = Files.isWritable(Paths.get(userDir));
+
+    private static final List<Properties> properties;
+    static {
+        // The test will call updateConfiguration() with each of these
+        // properties in sequence. The child logger is not released between each
+        // configuration. What is interesting here is mostly what happens between
+        // props4 and props5:
+        //
+        // In step 4 (props4) the configuration defines a handler for the
+        // logger com.foo (the direct parent of com.foo.child - which is the
+        // logger we hold on to).
+        //
+        // In step 5 (props5) the configuration has nothing concerning
+        // 'com.foo', but the handler has been migrated to 'com'.
+        // Since there doesn't exist any logger for 'com' (the previous
+        // configuration didn't have any configuration for 'com'), then
+        // 'com' will not be found when we process the existing loggers named
+        // in the configuration.
+        //
+        // So if we didn't also process the existing loggers not named in the
+        // configuration (such as com.foo.child) then no logger for 'com'
+        // would be created, which means that com.foo.child would not be
+        // able to inherit its configuration for 'com' until someone explicitely
+        // creates a logger for 'com'.
+        //
+        // This test check that a logger for 'com' will be created because
+        // 'com.foo.child' still exists when updateConfiguration() is called.
+
+        Properties props1 = new Properties();
+        props1.setProperty("test.name", "parent logger with handler");
+        props1.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props1.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props1.setProperty(FileHandler.class.getName() + ".level", "ALL");
+        props1.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+        props1.setProperty("com.foo.handlers", FileHandler.class.getName());
+        props1.setProperty("test.checkHandlersOnParent", "true");
+        props1.setProperty("test.checkHandlersOn", "com.foo");
+        props1.setProperty("com.bar.level", "FINEST");
+
+        Properties props2 = new Properties();
+        props2.setProperty("test.name", "parent logger with handler");
+        props2.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props2.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props2.setProperty(FileHandler.class.getName() + ".level", "ALL");
+        props2.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+        props2.setProperty("com.foo.handlers", FileHandler.class.getName());
+        props2.setProperty("test.checkHandlersOnParent", "true");
+        props2.setProperty("test.checkHandlersOn", "com.foo");
+        props2.setProperty("com.bar.level", "FINEST");
+
+        Properties props3 = new Properties();
+        props3.setProperty("test.name", "parent logger with handler");
+        props3.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props3.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props3.setProperty(FileHandler.class.getName() + ".level", "ALL");
+        props3.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+        props3.setProperty("com.foo.handlers", FileHandler.class.getName());
+        props3.setProperty("test.checkHandlersOnParent", "true");
+        props3.setProperty("test.checkHandlersOn", "com.foo");
+        props3.setProperty("com.bar.level", "FINEST");
+
+        Properties props4 = new Properties();
+        props4.setProperty("test.name", "parent logger with handler");
+        props4.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props4.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props4.setProperty(FileHandler.class.getName() + ".level", "ALL");
+        props4.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+        props4.setProperty("test.checkHandlersOnParent", "true");
+        props4.setProperty("test.checkHandlersOn", "com.foo");
+        props4.setProperty("com.foo.handlers", FileHandler.class.getName());
+
+        Properties props5 = new Properties();
+        props5.setProperty("test.name", "parent logger with handler");
+        props5.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props5.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props5.setProperty(FileHandler.class.getName() + ".level", "ALL");
+        props5.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+        props5.setProperty("test.checkHandlersOnParent", "false");
+        props5.setProperty("test.checkHandlersOn", "com");
+        props5.setProperty("com.handlers", FileHandler.class.getName());
+
+        properties = Collections.unmodifiableList(Arrays.asList(
+                    props1, props2, props3, props4, props5));
+    }
+
+    /**
+     * This is the main test method. The rest is infrastructure.
+     * Creates a child of the 'com.foo' logger (com.foo.child) and holds on to
+     * it.
+     * <p>
+     * Then applies all given configurations in sequence and verifies assumptions
+     * about the handlers that com.foo should have, or not have.
+     * In the last configuration (props5) it also verifies that the
+     * logger 'com' has been created and has now the expected handler.
+     * <p>
+     * Finally releases the child logger after all configurations have been
+     * applied.
+     *
+     * @param name
+     * @param properties
+     * @throws Exception
+     */
+    static void test(String name, List<Properties> properties)
+            throws Exception {
+
+        System.out.println("\nTesting: " + name);
+        if (!userDirWritable) {
+            throw new RuntimeException("Not writable: "+userDir);
+        }
+
+        // Then create a child of the com.foo logger.
+        Logger fooChild = Logger.getLogger("com.foo.child");
+        fooChild.info("hello world");
+        Logger barChild = Logger.getLogger("com.bar.child");
+        barChild.info("hello world");
+
+        ReferenceQueue<Logger> queue = new ReferenceQueue();
+        WeakReference<Logger> fooRef = new WeakReference<>(Logger.getLogger("com.foo"), queue);
+        if (fooRef.get() != fooChild.getParent()) {
+            throw new RuntimeException("Unexpected parent logger: "
+                    + fooChild.getParent() +"\n\texpected: " + fooRef.get());
+        }
+        WeakReference<Logger> barRef = new WeakReference<>(Logger.getLogger("com.bar"), queue);
+        if (barRef.get() != barChild.getParent()) {
+            throw new RuntimeException("Unexpected parent logger: "
+                    + barChild.getParent() +"\n\texpected: " + barRef.get());
+        }
+        Reference<? extends Logger> ref2;
+        int max = 3;
+        barChild = null;
+        while ((ref2 = queue.poll()) == null) {
+            System.gc();
+            Thread.sleep(100);
+            if (--max == 0) break;
+        }
+
+        Throwable failed = null;
+        try {
+            if (ref2 != null) {
+                String refName = ref2 == fooRef ? "fooRef" : ref2 == barRef ? "barRef" : "unknown";
+                if (ref2 != barRef) {
+                    throw new RuntimeException("Unexpected logger reference cleared: " + refName);
+                } else {
+                    System.out.println("Reference " + refName + " cleared as expected");
+                }
+            } else if (ref2 == null) {
+                throw new RuntimeException("Expected 'barRef' to be cleared");
+            }
+            // Now lets try to check handlers, and
+            // attempt to update the configuration again.
+            Properties previousProps  = properties.get(0);
+            int expectedHandlersCount = 1;
+            boolean checkHandlersOnParent = Boolean.parseBoolean(
+                    previousProps.getProperty("test.checkHandlersOnParent", "true"));
+            String checkHandlersOn = previousProps.getProperty("test.checkHandlersOn", null);
+            for (int i=1; i<properties.size(); i++) {
+                System.out.println("\n*** Reconfiguration with properties["+i+"]\n");
+                Properties nextProps = properties.get(i);
+                boolean reconfigureHandlers = true;
+
+                if (checkHandlersOnParent) {
+                    assertEquals(expectedHandlersCount,
+                            fooChild.getParent().getHandlers().length,
+                            "fooChild.getParent().getHandlers().length");
+                }
+                if (checkHandlersOn != null) {
+                    Logger loggerWithHandlers = LogManager.getLogManager().getLogger(checkHandlersOn);
+                    if (loggerWithHandlers == null) {
+                        throw new RuntimeException("Logger with handlers not found: " + checkHandlersOn);
+                    }
+                    assertEquals(expectedHandlersCount,
+                            loggerWithHandlers.getHandlers().length,
+                            checkHandlersOn + ".getHandlers().length");
+                }
+
+                if (i == 4) {
+                    System.out.println("Last configuration...");
+                }
+                // Read configuration
+                Configure.doPrivileged(() -> Configure.updateConfigurationWith(nextProps, false));
+
+                expectedHandlersCount = reconfigureHandlers ? 1 : 0;
+                checkHandlersOnParent = Boolean.parseBoolean(
+                    nextProps.getProperty("test.checkHandlersOnParent", "true"));
+                checkHandlersOn = nextProps.getProperty("test.checkHandlersOn", null);
+
+                if (checkHandlersOnParent) {
+                    assertEquals(expectedHandlersCount,
+                        fooChild.getParent().getHandlers().length,
+                        "fooChild.getParent().getHandlers().length");
+                } else {
+                    assertEquals(0,
+                        fooChild.getParent().getHandlers().length,
+                        "fooChild.getParent().getHandlers().length");
+                }
+                if (checkHandlersOn != null) {
+                    Logger loggerWithHandlers = LogManager.getLogManager().getLogger(checkHandlersOn);
+                    if (loggerWithHandlers == null) {
+                        throw new RuntimeException("Logger with handlers not found: " + checkHandlersOn);
+                    }
+                    assertEquals(expectedHandlersCount,
+                            loggerWithHandlers.getHandlers().length,
+                            checkHandlersOn + ".getHandlers().length");
+                }
+            }
+        } catch (Throwable t) {
+            failed = t;
+        } finally {
+            final Throwable suppressed = failed;
+            Configure.doPrivileged(() -> LogManager.getLogManager().reset());
+            Configure.doPrivileged(() -> {
+                try {
+                    StringBuilder builder = new StringBuilder();
+                    Files.list(Paths.get(userDir))
+                        .filter((f) -> f.toString().contains(PREFIX))
+                        .filter((f) -> f.toString().endsWith(".lck"))
+                        .forEach((f) -> {
+                                builder.append(f.toString()).append('\n');
+                        });
+                    if (!builder.toString().isEmpty()) {
+                        throw new RuntimeException("Lock files not cleaned:\n"
+                                + builder.toString());
+                    }
+                } catch(RuntimeException | Error x) {
+                    if (suppressed != null) x.addSuppressed(suppressed);
+                    throw x;
+                } catch(Exception x) {
+                    if (suppressed != null) x.addSuppressed(suppressed);
+                    throw new RuntimeException(x);
+                }
+            });
+            fooChild = null;
+            System.out.println("Setting fooChild to: " + fooChild);
+            while ((ref2 = queue.poll()) == null) {
+                System.gc();
+                Thread.sleep(1000);
+            }
+            if (ref2 != fooRef) {
+                throw new RuntimeException("Unexpected reference: "
+                        + ref2 +"\n\texpected: " + fooRef);
+            }
+            if (ref2.get() != null) {
+                throw new RuntimeException("Referent not cleared: " + ref2.get());
+            }
+            System.out.println("Got fooRef after reset(), fooChild is " + fooChild);
+
+        }
+        if (failed != null) {
+            // should rarely happen...
+            throw new RuntimeException(failed);
+        }
+
+    }
+
+    public static void main(String... args) throws Exception {
+
+
+        if (args == null || args.length == 0) {
+            args = new String[] {
+                TestCase.UNSECURE.name(),
+                TestCase.SECURE.name(),
+            };
+        }
+
+        try {
+            for (String testName : args) {
+                TestCase test = TestCase.valueOf(testName);
+                test.run(properties);
+            }
+        } finally {
+            if (userDirWritable) {
+                Configure.doPrivileged(() -> {
+                    // cleanup - delete files that have been created
+                    try {
+                        Files.list(Paths.get(userDir))
+                            .filter((f) -> f.toString().contains(PREFIX))
+                            .forEach((f) -> {
+                                try {
+                                    System.out.println("deleting " + f);
+                                    Files.delete(f);
+                                } catch(Throwable t) {
+                                    System.err.println("Failed to delete " + f + ": " + t);
+                                }
+                            });
+                    } catch(Throwable t) {
+                        System.err.println("Cleanup failed to list files: " + t);
+                        t.printStackTrace();
+                    }
+                });
+            }
+        }
+    }
+
+    static class Configure {
+        static Policy policy = null;
+        static final ThreadLocal<AtomicBoolean> allowAll = new ThreadLocal<AtomicBoolean>() {
+            @Override
+            protected AtomicBoolean initialValue() {
+                return  new AtomicBoolean(false);
+            }
+        };
+        static void setUp(TestCase test, Properties propertyFile) {
+            switch (test) {
+                case SECURE:
+                    if (policy == null && System.getSecurityManager() != null) {
+                        throw new IllegalStateException("SecurityManager already set");
+                    } else if (policy == null) {
+                        policy = new SimplePolicy(TestCase.SECURE, allowAll);
+                        Policy.setPolicy(policy);
+                        System.setSecurityManager(new SecurityManager());
+                    }
+                    if (System.getSecurityManager() == null) {
+                        throw new IllegalStateException("No SecurityManager.");
+                    }
+                    if (policy == null) {
+                        throw new IllegalStateException("policy not configured");
+                    }
+                    break;
+                case UNSECURE:
+                    if (System.getSecurityManager() != null) {
+                        throw new IllegalStateException("SecurityManager already set");
+                    }
+                    break;
+                default:
+                    new InternalError("No such testcase: " + test);
+            }
+            doPrivileged(() -> {
+                configureWith(propertyFile);
+            });
+        }
+
+        static void configureWith(Properties propertyFile) {
+            try {
+                ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+                propertyFile.store(bytes, propertyFile.getProperty("test.name"));
+                ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray());
+                LogManager.getLogManager().readConfiguration(bais);
+            } catch (IOException ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+
+        static void updateConfigurationWith(Properties propertyFile, boolean append) {
+            try {
+                ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+                propertyFile.store(bytes, propertyFile.getProperty("test.name"));
+                ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray());
+                Function<String, BiFunction<String,String,String>> remapper =
+                        append ? (x) -> ((o, n) -> n == null ? o : n)
+                               : (x) -> ((o, n) -> n);
+                LogManager.getLogManager().updateConfiguration(bais, remapper);
+            } catch (IOException ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+
+        static void doPrivileged(Runnable run) {
+            final boolean old = allowAll.get().getAndSet(true);
+            try {
+                run.run();
+            } finally {
+                allowAll.get().set(old);
+            }
+        }
+        static <T> T callPrivileged(Callable<T> call) throws Exception {
+            final boolean old = allowAll.get().getAndSet(true);
+            try {
+                return call.call();
+            } finally {
+                allowAll.get().set(old);
+            }
+        }
+    }
+
+    @FunctionalInterface
+    public static interface FileHandlerSupplier {
+        public FileHandler test() throws Exception;
+    }
+
+    static final class TestAssertException extends RuntimeException {
+        TestAssertException(String msg) {
+            super(msg);
+        }
+    }
+
+    private static void assertEquals(long expected, long received, String msg) {
+        if (expected != received) {
+            throw new TestAssertException("Unexpected result for " + msg
+                    + ".\n\texpected: " + expected
+                    +  "\n\tactual:   " + received);
+        } else {
+            System.out.println("Got expected " + msg + ": " + received);
+        }
+    }
+
+    final static class PermissionsBuilder {
+        final Permissions perms;
+        public PermissionsBuilder() {
+            this(new Permissions());
+        }
+        public PermissionsBuilder(Permissions perms) {
+            this.perms = perms;
+        }
+        public PermissionsBuilder add(Permission p) {
+            perms.add(p);
+            return this;
+        }
+        public PermissionsBuilder addAll(PermissionCollection col) {
+            if (col != null) {
+                for (Enumeration<Permission> e = col.elements(); e.hasMoreElements(); ) {
+                    perms.add(e.nextElement());
+                }
+            }
+            return this;
+        }
+        public Permissions toPermissions() {
+            final PermissionsBuilder builder = new PermissionsBuilder();
+            builder.addAll(perms);
+            return builder.perms;
+        }
+    }
+
+    public static class SimplePolicy extends Policy {
+
+        final Permissions permissions;
+        final Permissions allPermissions;
+        final ThreadLocal<AtomicBoolean> allowAll; // actually: this should be in a thread locale
+        public SimplePolicy(TestCase test, ThreadLocal<AtomicBoolean> allowAll) {
+            this.allowAll = allowAll;
+            permissions = new Permissions();
+            permissions.add(new LoggingPermission("control", null));
+            permissions.add(new FilePermission(PREFIX+".lck", "read,write,delete"));
+            permissions.add(new FilePermission(PREFIX, "read,write"));
+
+            // these are used for configuring the test itself...
+            allPermissions = new Permissions();
+            allPermissions.add(new java.security.AllPermission());
+
+        }
+
+        @Override
+        public boolean implies(ProtectionDomain domain, Permission permission) {
+            if (allowAll.get().get()) return allPermissions.implies(permission);
+            return permissions.implies(permission);
+        }
+
+        @Override
+        public PermissionCollection getPermissions(CodeSource codesource) {
+            return new PermissionsBuilder().addAll(allowAll.get().get()
+                    ? allPermissions : permissions).toPermissions();
+        }
+
+        @Override
+        public PermissionCollection getPermissions(ProtectionDomain domain) {
+            return new PermissionsBuilder().addAll(allowAll.get().get()
+                    ? allPermissions : permissions).toPermissions();
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/LogManager/Configuration/updateConfiguration/SimpleUpdateConfigWithInputStreamTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,685 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
+import java.util.logging.LoggingPermission;
+
+/**
+ * @test
+ * @bug 8033661
+ * @summary tests LogManager.updateConfiguration(InputStream, Function) method
+ * @run main/othervm SimpleUpdateConfigWithInputStreamTest UNSECURE
+ * @run main/othervm SimpleUpdateConfigWithInputStreamTest SECURE
+ * @author danielfuchs
+ */
+public class SimpleUpdateConfigWithInputStreamTest {
+
+    /**
+     * We will test updateConfiguration in
+     * two configurations:
+     * UNSECURE: No security manager.
+     * SECURE: With the security manager present - and the required
+     *         permissions granted.
+     */
+    public static enum TestCase {
+        UNSECURE, SECURE;
+        public void execute(Runnable run) {
+            System.out.println("Running test case: " + name());
+            try {
+               Configure.setUp(this);
+               Configure.doPrivileged(run, SimplePolicy.allowControl);
+            } finally {
+               Configure.doPrivileged(() -> {
+                   try {
+                       setSystemProperty("java.util.logging.config.file", null);
+                       LogManager.getLogManager().readConfiguration();
+                       System.gc();
+                   } catch (Exception x) {
+                       throw new RuntimeException(x);
+                   }
+               }, SimplePolicy.allowAll);
+            }
+        }
+    }
+
+    public static class MyHandler extends Handler {
+        static final AtomicLong seq = new AtomicLong();
+        long count = seq.incrementAndGet();
+
+        @Override
+        public void publish(LogRecord record) {
+        }
+
+        @Override
+        public void flush() {
+        }
+
+        @Override
+        public void close() throws SecurityException {
+        }
+
+        @Override
+        public String toString() {
+            return super.toString() + "("+count+")";
+        }
+
+    }
+
+    static String storePropertyToFile(String name, Properties props)
+        throws Exception {
+        return Configure.callPrivileged(() -> {
+            String scratch = System.getProperty("user.dir", ".");
+            Path p = Paths.get(scratch, name);
+            try (FileOutputStream fos = new FileOutputStream(p.toFile())) {
+                props.store(fos, name);
+            }
+            return p.toString();
+        }, SimplePolicy.allowAll);
+    }
+
+    static void setSystemProperty(String name, String value)
+        throws Exception {
+        Configure.doPrivileged(() -> {
+            if (value == null)
+                System.clearProperty(name);
+            else
+                System.setProperty(name, value);
+        }, SimplePolicy.allowAll);
+    }
+
+    static String trim(String value) {
+        return value == null ? null : value.trim();
+    }
+
+
+    /**
+     * Tests one of the configuration defined above.
+     * <p>
+     * This is the main test method (the rest is infrastructure).
+     */
+    static void testUpdateConfiguration() {
+        try {
+            // manager initialized with default configuration.
+            LogManager manager = LogManager.getLogManager();
+
+            // Test default configuration. It should not have
+            // any value for "com.foo.level" and "com.foo.handlers"
+            assertEquals(null, manager.getProperty("com.foo.level"),
+                "com.foo.level in default configuration");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in default configuration");
+
+            // Create a logging configuration file that contains
+            // com.foo.level=FINEST
+            // and set "java.util.logging.config.file" to this file.
+            Properties props = new Properties();
+            props.setProperty("com.foo.level", "FINEST");
+
+            // Update configuration with props
+            // then test that the new configuration has
+            // com.foo.level=FINEST
+            // and nothing for com.foo.handlers
+            Configure.updateConfigurationWith(props, null);
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level in " + props);
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in " + props);
+
+            // call updateConfiguration with an empty stream.
+            // check that the new configuration no longer has
+            // any value for com.foo.level, and still no value
+            // for com.foo.handlers
+            Configure.updateConfigurationWith(new Properties(), null);
+            assertEquals(null, manager.getProperty("com.foo.level"),
+                    "com.foo.level in default configuration");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in default configuration");
+
+            // creates the com.foo logger, check it has
+            // the default config: no level, and no handlers
+            final Logger logger = Logger.getLogger("com.foo");
+            assertEquals(null, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertDeepEquals(new Handler[0], logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+
+            // call updateConfiguration with 'props'
+            // check that the configuration has
+            // com.foo.level=FINEST
+            // and nothing for com.foo.handlers
+            // check that the logger has now a FINEST level and still
+            // no handlers
+            Configure.updateConfigurationWith(props, null);
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level in " + props);
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertDeepEquals(new Handler[0], logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in " + props);
+
+            // Calls updateConfiguration with a lambda whose effect should
+            // be to set the FINER level on the "com.foo" logger.
+            // Check that the new configuration has
+            // com.foo.level=FINER
+            // and nothing for com.foo.handlers
+            // check that the logger has now a FINER level and still
+            // no handlers
+            Configure.updateConfigurationWith(props,
+                    (k) -> ("com.foo.level".equals(k) ? (o, n) -> "FINER" : (o, n) -> n));
+            assertEquals("FINER", manager.getProperty("com.foo.level"),
+                "com.foo.level set to FINER by updateConfiguration");
+            assertEquals(Level.FINER, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertDeepEquals(new Handler[0], logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in " + props);
+
+            // Calls updateConfiguration with a lambda whose effect is a noop.
+            // This should not change the configuration, so
+            // check that the new configuration still has
+            // com.foo.level=FINER
+            // and nothing for com.foo.handlers
+            // check that the logger still has FINER level and still
+            // no handlers
+            Configure.updateConfigurationWith(props,
+                    (k) -> ((o, n) -> o));
+            assertEquals("FINER", manager.getProperty("com.foo.level"),
+                "com.foo.level preserved by updateConfiguration");
+            assertEquals(Level.FINER, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertDeepEquals(new Handler[0], logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in " + props);
+
+            // Calls updateConfiguration with a lambda whose effect is to
+            // take all values from the new configuration.
+            // This should update the configuration to what is in props, so
+            // check that the new configuration has
+            // com.foo.level=FINEST
+            // and nothing for com.foo.handlers
+            // check that the logger now has FINEST level and still
+            // no handlers
+            Configure.updateConfigurationWith(props,
+                    (k) -> ((o, n) -> n));
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertDeepEquals(new Handler[0], logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in " + props);
+
+            // now set a handler on the com.foo logger.
+            MyHandler h = new MyHandler();
+            logger.addHandler(h);
+            assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+
+            // Calls updateConfiguration with a lambda whose effect should
+            // be to set the FINER level on the "com.foo" logger, and
+            // take the value from props for everything else.
+            // Check that the new configuration has
+            // com.foo.level=FINER
+            // and nothing for com.foo.handlers
+            // check that the logger has now a FINER level, but that its
+            // handlers are still present and have not been reset
+            // since neither the old nor new configuration defined them.
+            Configure.updateConfigurationWith(props,
+                    (k) -> ("com.foo.level".equals(k) ? (o, n) -> "FINER" : (o, n) -> n));
+            assertEquals("FINER", manager.getProperty("com.foo.level"),
+                "com.foo.level set to FINER by updateConfiguration");
+            assertEquals(Level.FINER, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in " + props);
+
+            // now add some configuration for com.foo.handlers
+            props.setProperty("com.foo.handlers", MyHandler.class.getName());
+
+            // we didn't call updateConfiguration, so just changing the
+            // content of props should have had no effect.
+            assertEquals("FINER", manager.getProperty("com.foo.level"),
+                "com.foo.level set to FINER by updateConfiguration");
+            assertEquals(Level.FINER, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(null,
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+            assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+
+            // Calls updateConfiguration with a lambda whose effect is a noop.
+            // This should not change the current configuration, so
+            // check that the new configuration still has
+            // com.foo.level=FINER
+            // and nothing for com.foo.handlers
+            // check that the logger still has FINER level and still
+            // has its handlers and that they haven't been reset.
+            Configure.updateConfigurationWith(props, (k) -> ((o, n) -> o));
+            assertEquals("FINER", manager.getProperty("com.foo.level"),
+                "com.foo.level set to FINER by updateConfiguration");
+            assertEquals(Level.FINER, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(null,
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+            assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+
+            // Calls updateConfiguration with a lambda whose effect is to
+            // take all values from the new configuration.
+            // This should update the configuration to what is in props, so
+            // check that the new configuration has
+            // com.foo.level=FINEST
+            // com.foo.handlers=SimpleUpdateConfigWithInputStreamTest$MyHandler
+            // check that the logger now has FINEST level
+            // and a new handler instance, since the old config
+            // had no handlers for com.foo and the new config has one.
+            Configure.updateConfigurationWith(props, (k) -> ((o, n) -> n));
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(MyHandler.class.getName(),
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+            Handler[] loggerHandlers = logger.getHandlers().clone();
+            assertEquals(1, loggerHandlers.length,
+                    "Logger.getLogger(\"com.foo\").getHandlers().length");
+            assertEquals(MyHandler.class, loggerHandlers[0].getClass(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()[0].getClass()");
+            assertEquals(h.count + 1, ((MyHandler)logger.getHandlers()[0]).count,
+                    "Logger.getLogger(\"com.foo\").getHandlers()[0].count");
+
+            // Calls updateConfiguration with a lambda whose effect is a noop.
+            // This should not change the current configuration, so
+            // check that the new configuration still has
+            // com.foo.level=FINEST
+            // com.foo.handlers=SimpleUpdateConfigWithInputStreamTest$MyHandler
+            // check that the logger still has FINEST level and still
+            // has its handlers and that they haven't been reset.
+            Configure.updateConfigurationWith(props, (k) -> ((o, n) -> o));
+            assertDeepEquals(loggerHandlers, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(MyHandler.class.getName(),
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+
+            // Calls updateConfiguration with a lambda whose effect is to
+            // take all values from the new configuration.
+            // Because the content of the props hasn't changed, then
+            // it should also be a noop.
+            // check that the new configuration still has
+            // com.foo.level=FINEST
+            // com.foo.handlers=SimpleUpdateConfigWithInputStreamTest$MyHandler
+            // check that the logger still has FINEST level and still
+            // has its handlers and that they haven't been reset.
+            Configure.updateConfigurationWith(props, (k) -> ((o, n) -> n));
+            assertDeepEquals(loggerHandlers, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(MyHandler.class.getName(),
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+
+            // Calls updateConfiguration with a null lambda, whose effect is to
+            // take all values from the new configuration.
+            // Because the content of the props hasn't changed, then
+            // it should also be a noop.
+            // check that the new configuration still has
+            // com.foo.level=FINEST
+            // com.foo.handlers=SimpleUpdateConfigWithInputStreamTest$MyHandler
+            // check that the logger still has FINEST level and still
+            // has its handlers and that they haven't been reset.
+            Configure.updateConfigurationWith(props, (k) -> ((o, n) -> n));
+            assertDeepEquals(loggerHandlers, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(MyHandler.class.getName(),
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+
+            // now remove com.foo.handlers=SimpleUpdateConfigWithInputStreamTest$MyHandler
+            // from the configuration file.
+            props.remove("com.foo.handlers");
+
+            // Calls updateConfiguration with a lambda whose effect is a noop.
+            // This should not change the current configuration, so
+            // check that the new configuration still has
+            // com.foo.level=FINEST
+            // com.foo.handlers=SimpleUpdateConfigWithInputStreamTest$MyHandler
+            // check that the logger still has FINEST level and still
+            // has its handlers and that they haven't been reset.
+            Configure.updateConfigurationWith(props, (k) -> ((o, n) -> o));
+            assertDeepEquals(loggerHandlers, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(MyHandler.class.getName(),
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+
+            // Calls updateConfiguration with a lambda whose effect is to
+            // take all values from the new configuration.
+            // This should update the configuration to what is in props, so
+            // check that the new configuration has
+            // com.foo.level=FINEST
+            // and nothing for com.foo.handlers
+            // check that the logger still has FINEST level
+            // and no handlers, since the old config
+            // had an handler for com.foo and the new config doesn't.
+            Configure.updateConfigurationWith(props, (k) -> ((o, n) -> n));
+            assertDeepEquals(new Handler[0], logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(null,
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+
+
+        } catch (RuntimeException | Error r) {
+            throw r;
+        } catch (Exception x) {
+            throw new RuntimeException(x);
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        if (args == null || args.length == 0) {
+            args = new String[] { "UNSECURE", "SECURE" };
+        }
+        for (String test : args) {
+            TestCase.valueOf(test).execute(SimpleUpdateConfigWithInputStreamTest::testUpdateConfiguration);
+        }
+    }
+
+    static class Configure {
+        static Policy policy = null;
+        static void setUp(TestCase test) {
+            switch (test) {
+                case SECURE:
+                    if (policy == null && System.getSecurityManager() != null) {
+                        throw new IllegalStateException("SecurityManager already set");
+                    } else if (policy == null) {
+                        policy = new SimplePolicy(TestCase.SECURE);
+                        Policy.setPolicy(policy);
+                        System.setSecurityManager(new SecurityManager());
+                    }
+                    if (System.getSecurityManager() == null) {
+                        throw new IllegalStateException("No SecurityManager.");
+                    }
+                    if (policy == null) {
+                        throw new IllegalStateException("policy not configured");
+                    }
+                    break;
+                case UNSECURE:
+                    if (System.getSecurityManager() != null) {
+                        throw new IllegalStateException("SecurityManager already set");
+                    }
+                    break;
+                default:
+                    throw new InternalError("No such testcase: " + test);
+            }
+        }
+
+        static void updateConfigurationWith(Properties propertyFile,
+                Function<String,BiFunction<String,String,String>> remapper) {
+            try {
+                ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+                propertyFile.store(bytes, propertyFile.getProperty("test.name"));
+                ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray());
+                LogManager.getLogManager().updateConfiguration(bais, remapper);
+            } catch (IOException ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+
+        static void doPrivileged(Runnable run, ThreadLocal<AtomicBoolean> granter) {
+            final boolean old = granter.get().getAndSet(true);
+            try {
+                run.run();
+            } finally {
+                granter.get().set(old);
+            }
+        }
+        static <T> T callPrivileged(Callable<T> call,
+                ThreadLocal<AtomicBoolean> granter) throws Exception {
+            final boolean old = granter.get().getAndSet(true);
+            try {
+                return call.call();
+            } finally {
+                granter.get().set(old);
+            }
+        }
+    }
+
+    static final class TestAssertException extends RuntimeException {
+        TestAssertException(String msg) {
+            super(msg);
+        }
+    }
+
+    private static void assertEquals(long expected, long received, String msg) {
+        if (expected != received) {
+            throw new TestAssertException("Unexpected result for " + msg
+                    + ".\n\texpected: " + expected
+                    +  "\n\tactual:   " + received);
+        } else {
+            System.out.println("Got expected " + msg + ": " + received);
+        }
+    }
+
+    private static void assertEquals(String expected, String received, String msg) {
+        if (!Objects.equals(expected, received)) {
+            throw new TestAssertException("Unexpected result for " + msg
+                    + ".\n\texpected: " + expected
+                    +  "\n\tactual:   " + received);
+        } else {
+            System.out.println("Got expected " + msg + ": " + received);
+        }
+    }
+
+    private static void assertEquals(Object expected, Object received, String msg) {
+        if (!Objects.equals(expected, received)) {
+            throw new TestAssertException("Unexpected result for " + msg
+                    + ".\n\texpected: " + expected
+                    +  "\n\tactual:   " + received);
+        } else {
+            System.out.println("Got expected " + msg + ": " + received);
+        }
+    }
+
+    public static String deepToString(Object o) {
+        if (o == null) {
+            return "null";
+        } else if (o.getClass().isArray()) {
+            String s;
+            if (o instanceof Object[])
+                s = Arrays.deepToString((Object[]) o);
+            else if (o instanceof byte[])
+                s = Arrays.toString((byte[]) o);
+            else if (o instanceof short[])
+                s = Arrays.toString((short[]) o);
+            else if (o instanceof int[])
+                s = Arrays.toString((int[]) o);
+            else if (o instanceof long[])
+                s = Arrays.toString((long[]) o);
+            else if (o instanceof char[])
+                s = Arrays.toString((char[]) o);
+            else if (o instanceof float[])
+                s = Arrays.toString((float[]) o);
+            else if (o instanceof double[])
+                s = Arrays.toString((double[]) o);
+            else if (o instanceof boolean[])
+                s = Arrays.toString((boolean[]) o);
+            else
+                s = o.toString();
+            return s;
+        } else {
+            return o.toString();
+        }
+    }
+
+    private static void assertDeepEquals(Object expected, Object received, String msg) {
+        if (!Objects.deepEquals(expected, received)) {
+            throw new TestAssertException("Unexpected result for " + msg
+                    + ".\n\texpected: " + deepToString(expected)
+                    +  "\n\tactual:   " + deepToString(received));
+        } else {
+            System.out.println("Got expected " + msg + ": " + deepToString(received));
+        }
+    }
+
+    final static class PermissionsBuilder {
+        final Permissions perms;
+        public PermissionsBuilder() {
+            this(new Permissions());
+        }
+        public PermissionsBuilder(Permissions perms) {
+            this.perms = perms;
+        }
+        public PermissionsBuilder add(Permission p) {
+            perms.add(p);
+            return this;
+        }
+        public PermissionsBuilder addAll(PermissionCollection col) {
+            if (col != null) {
+                for (Enumeration<Permission> e = col.elements(); e.hasMoreElements(); ) {
+                    perms.add(e.nextElement());
+                }
+            }
+            return this;
+        }
+        public Permissions toPermissions() {
+            final PermissionsBuilder builder = new PermissionsBuilder();
+            builder.addAll(perms);
+            return builder.perms;
+        }
+    }
+
+    public static class SimplePolicy extends Policy {
+
+        final Permissions basic;
+        final Permissions control;
+        final Permissions all;
+        public final static ThreadLocal<AtomicBoolean> allowAll =
+                new ThreadLocal<AtomicBoolean>() {
+            @Override
+            protected AtomicBoolean initialValue() {
+                return new AtomicBoolean();
+            }
+        };
+        public final static ThreadLocal<AtomicBoolean> allowControl =
+                new ThreadLocal<AtomicBoolean>() {
+            @Override
+            protected AtomicBoolean initialValue() {
+                return new AtomicBoolean();
+            }
+        };
+        public SimplePolicy(TestCase test) {
+            basic = new Permissions();
+            control = new Permissions();
+            control.add(new LoggingPermission("control", null));
+
+            // these are used for configuring the test itself...
+            all = new Permissions();
+            all.add(new java.security.AllPermission());
+
+        }
+
+        @Override
+        public boolean implies(ProtectionDomain domain, Permission permission) {
+            return getPermissions(domain).implies(permission);
+        }
+
+        public PermissionCollection permissions() {
+            PermissionsBuilder builder = new PermissionsBuilder();
+            if (allowAll.get().get()) {
+                builder.addAll(all);
+            } else {
+                builder.addAll(basic);
+                if (allowControl.get().get()) {
+                    builder.addAll(control);
+                }
+            }
+            return builder.toPermissions();
+        }
+
+        @Override
+        public PermissionCollection getPermissions(CodeSource codesource) {
+            return permissions();
+        }
+
+        @Override
+        public PermissionCollection getPermissions(ProtectionDomain domain) {
+            return permissions();
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/LogManager/Configuration/updateConfiguration/SimpleUpdateConfigurationTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,720 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileOutputStream;
+import java.io.FilePermission;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.PropertyPermission;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
+import java.util.logging.LoggingPermission;
+
+/**
+ * @test
+ * @bug 8033661
+ * @summary tests LogManager.updateConfiguration(Function) method
+ * @run main/othervm SimpleUpdateConfigurationTest UNSECURE
+ * @run main/othervm SimpleUpdateConfigurationTest SECURE
+ * @author danielfuchs
+ */
+public class SimpleUpdateConfigurationTest {
+
+    /**
+     * We will test updateConfiguration in
+     * two configurations:
+     * UNSECURE: No security manager.
+     * SECURE: With the security manager present - and the required
+     *         permissions granted.
+     */
+    public static enum TestCase {
+        UNSECURE, SECURE;
+        public void execute(Runnable run) {
+            System.out.println("Running test case: " + name());
+            try {
+               Configure.setUp(this);
+               Configure.doPrivileged(run, SimplePolicy.allowControl);
+            } finally {
+               Configure.doPrivileged(() -> {
+                   try {
+                       setSystemProperty("java.util.logging.config.file", null);
+                       LogManager.getLogManager().readConfiguration();
+                       System.gc();
+                   } catch (Exception x) {
+                       throw new RuntimeException(x);
+                   }
+               }, SimplePolicy.allowAll);
+            }
+        }
+    }
+
+    public static class MyHandler extends Handler {
+        static final AtomicLong seq = new AtomicLong();
+        long count = seq.incrementAndGet();
+
+        @Override
+        public void publish(LogRecord record) {
+        }
+
+        @Override
+        public void flush() {
+        }
+
+        @Override
+        public void close() throws SecurityException {
+        }
+
+        @Override
+        public String toString() {
+            return super.toString() + "("+count+")";
+        }
+
+    }
+
+    static String storePropertyToFile(String name, Properties props)
+        throws Exception {
+        return Configure.callPrivileged(() -> {
+            String scratch = System.getProperty("user.dir", ".");
+            Path p = Paths.get(scratch, name);
+            try (FileOutputStream fos = new FileOutputStream(p.toFile())) {
+                props.store(fos, name);
+            }
+            return p.toString();
+        }, SimplePolicy.allowAll);
+    }
+
+    static void setSystemProperty(String name, String value)
+        throws Exception {
+        Configure.doPrivileged(() -> {
+            if (value == null)
+                System.clearProperty(name);
+            else
+                System.setProperty(name, value);
+        }, SimplePolicy.allowAll);
+    }
+
+    static String trim(String value) {
+        return value == null ? null : value.trim();
+    }
+
+
+    /**
+     * Tests one of the configuration defined above.
+     * <p>
+     * This is the main test method (the rest is infrastructure).
+     */
+    static void testUpdateConfiguration() {
+        String configFile = null;
+        try {
+            // manager initialized with default configuration.
+            LogManager manager = LogManager.getLogManager();
+
+            // Test default configuration. It should not have
+            // any value for "com.foo.level" and "com.foo.handlers"
+            assertEquals(null, manager.getProperty("com.foo.level"),
+                "com.foo.level in default configuration");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in default configuration");
+
+            // Create a logging configuration file that contains
+            // com.foo.level=FINEST
+            // and set "java.util.logging.config.file" to this file.
+            Properties props = new Properties();
+            props.setProperty("com.foo.level", "FINEST");
+            configFile = storePropertyToFile("config1", props);
+            setSystemProperty("java.util.logging.config.file", configFile);
+
+            // Update configuration with configFile
+            // then test that the new configuration has
+            // com.foo.level=FINEST
+            // and nothing for com.foo.handlers
+            manager.updateConfiguration(null);
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level in " + configFile);
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in " + configFile);
+
+            // clear ("java.util.logging.config.file" system property,
+            // and call updateConfiguration again.
+            // check that the new configuration no longer has
+            // any value for com.foo.level, and still no value
+            // for com.foo.handlers
+            setSystemProperty("java.util.logging.config.file", null);
+            manager.updateConfiguration(null);
+            assertEquals(null, manager.getProperty("com.foo.level"),
+                    "com.foo.level in default configuration");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in default configuration");
+
+            // creates the com.foo logger, check it has
+            // the default config: no level, and no handlers
+            final Logger logger = Logger.getLogger("com.foo");
+            assertEquals(null, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertDeepEquals(new Handler[0], logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+
+            // set "java.util.logging.config.file" to configFile and
+            // call updateConfiguration.
+            // check that the configuration has
+            // com.foo.level=FINEST
+            // and nothing for com.foo.handlers
+            // check that the logger has now a FINEST level and still
+            // no handlers
+            setSystemProperty("java.util.logging.config.file", configFile);
+            manager.updateConfiguration(null);
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level in " + configFile);
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertDeepEquals(new Handler[0], logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in " + configFile);
+
+            // Calls updateConfiguration with a lambda whose effect should
+            // be to set the FINER level on the "com.foo" logger.
+            // Check that the new configuration has
+            // com.foo.level=FINER
+            // and nothing for com.foo.handlers
+            // check that the logger has now a FINER level and still
+            // no handlers
+            manager.updateConfiguration(
+                    (k) -> ("com.foo.level".equals(k) ? (o, n) -> "FINER" : (o, n) -> n));
+            assertEquals("FINER", manager.getProperty("com.foo.level"),
+                "com.foo.level set to FINER by updateConfiguration");
+            assertEquals(Level.FINER, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertDeepEquals(new Handler[0], logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in " + configFile);
+
+            // Calls updateConfiguration with a lambda whose effect is a noop.
+            // This should not change the configuration, so
+            // check that the new configuration still has
+            // com.foo.level=FINER
+            // and nothing for com.foo.handlers
+            // check that the logger still has FINER level and still
+            // no handlers
+            manager.updateConfiguration(
+                    (k) -> ((o, n) -> o));
+            assertEquals("FINER", manager.getProperty("com.foo.level"),
+                "com.foo.level preserved by updateConfiguration");
+            assertEquals(Level.FINER, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertDeepEquals(new Handler[0], logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in " + configFile);
+
+            // Calls updateConfiguration with a lambda whose effect is to
+            // take all values from the new configuration.
+            // This should update the configuration to what is in configFile, so
+            // check that the new configuration has
+            // com.foo.level=FINEST
+            // and nothing for com.foo.handlers
+            // check that the logger now has FINEST level and still
+            // no handlers
+            manager.updateConfiguration(
+                    (k) -> ((o, n) -> n));
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertDeepEquals(new Handler[0], logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in " + configFile);
+
+            // now set a handler on the com.foo logger.
+            MyHandler h = new MyHandler();
+            logger.addHandler(h);
+            assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+
+            // Calls updateConfiguration with a lambda whose effect should
+            // be to set the FINER level on the "com.foo" logger, and
+            // take the value from configFile for everything else.
+            // Check that the new configuration has
+            // com.foo.level=FINER
+            // and nothing for com.foo.handlers
+            // check that the logger has now a FINER level, but that its
+            // handlers are still present and have not been reset
+            // since neither the old nor new configuration defined them.
+            manager.updateConfiguration(
+                    (k) -> ("com.foo.level".equals(k) ? (o, n) -> "FINER" : (o, n) -> n));
+            assertEquals("FINER", manager.getProperty("com.foo.level"),
+                "com.foo.level set to FINER by updateConfiguration");
+            assertEquals(Level.FINER, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals(null, manager.getProperty("com.foo.handlers"),
+                "com.foo.handlers in " + configFile);
+
+            // now add some configuration for com.foo.handlers in the
+            // configuration file.
+            props.setProperty("com.foo.handlers", MyHandler.class.getName());
+            storePropertyToFile("config1", props);
+
+            // we didn't call updateConfiguration, so just changing the
+            // content of the file should have had no no effect yet.
+            assertEquals("FINER", manager.getProperty("com.foo.level"),
+                "com.foo.level set to FINER by updateConfiguration");
+            assertEquals(Level.FINER, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(null,
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+            assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+
+            // Calls updateConfiguration with a lambda whose effect is a noop.
+            // This should not change the current configuration, so
+            // check that the new configuration still has
+            // com.foo.level=FINER
+            // and nothing for com.foo.handlers
+            // check that the logger still has FINER level and still
+            // has its handlers and that they haven't been reset.
+            manager.updateConfiguration((k) -> ((o, n) -> o));
+            assertEquals("FINER", manager.getProperty("com.foo.level"),
+                "com.foo.level set to FINER by updateConfiguration");
+            assertEquals(Level.FINER, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(null,
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+            assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+
+            // Calls updateConfiguration with a lambda whose effect is to
+            // take all values from the new configuration.
+            // This should update the configuration to what is in configFile, so
+            // check that the new configuration has
+            // com.foo.level=FINEST
+            // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler
+            // check that the logger now has FINEST level
+            // and a new handler instance, since the old config
+            // had no handlers for com.foo and the new config has one.
+            manager.updateConfiguration((k) -> ((o, n) -> n));
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(MyHandler.class.getName(),
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+            Handler[] loggerHandlers = logger.getHandlers().clone();
+            assertEquals(1, loggerHandlers.length,
+                    "Logger.getLogger(\"com.foo\").getHandlers().length");
+            assertEquals(MyHandler.class, loggerHandlers[0].getClass(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()[0].getClass()");
+            assertEquals(h.count + 1, ((MyHandler)logger.getHandlers()[0]).count,
+                    "Logger.getLogger(\"com.foo\").getHandlers()[0].count");
+
+            // Calls updateConfiguration with a lambda whose effect is a noop.
+            // This should not change the current configuration, so
+            // check that the new configuration still has
+            // com.foo.level=FINEST
+            // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler
+            // check that the logger still has FINEST level and still
+            // has its handlers and that they haven't been reset.
+            manager.updateConfiguration((k) -> ((o, n) -> o));
+            assertDeepEquals(loggerHandlers, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(MyHandler.class.getName(),
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+
+            // Calls updateConfiguration with a lambda whose effect is to
+            // take all values from the new configuration.
+            // Because the content of the configFile hasn't changed, then
+            // it should also be a noop.
+            // check that the new configuration still has
+            // com.foo.level=FINEST
+            // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler
+            // check that the logger still has FINEST level and still
+            // has its handlers and that they haven't been reset.
+            manager.updateConfiguration((k) -> ((o, n) -> n));
+            assertDeepEquals(loggerHandlers, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(MyHandler.class.getName(),
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+
+            // Calls updateConfiguration with a null lambda, whose effect is to
+            // take all values from the new configuration.
+            // Because the content of the configFile hasn't changed, then
+            // it should also be a noop.
+            // check that the new configuration still has
+            // com.foo.level=FINEST
+            // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler
+            // check that the logger still has FINEST level and still
+            // has its handlers and that they haven't been reset.
+            manager.updateConfiguration((k) -> ((o, n) -> n));
+            assertDeepEquals(loggerHandlers, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(MyHandler.class.getName(),
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+
+            // no remove com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler
+            // from the configuration file.
+            props.remove("com.foo.handlers");
+            storePropertyToFile("config1", props);
+
+            // Calls updateConfiguration with a lambda whose effect is a noop.
+            // This should not change the current configuration, so
+            // check that the new configuration still has
+            // com.foo.level=FINEST
+            // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler
+            // check that the logger still has FINEST level and still
+            // has its handlers and that they haven't been reset.
+            manager.updateConfiguration((k) -> ((o, n) -> o));
+            assertDeepEquals(loggerHandlers, logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(MyHandler.class.getName(),
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+
+            // Calls updateConfiguration with a lambda whose effect is to
+            // take all values from the new configuration.
+            // This should update the configuration to what is in configFile, so
+            // check that the new configuration has
+            // com.foo.level=FINEST
+            // and nothing for com.foo.handlers
+            // check that the logger still has FINEST level
+            // and no handlers, since the old config
+            // had an handler for com.foo and the new config doesn't.
+            manager.updateConfiguration((k) -> ((o, n) -> n));
+            assertDeepEquals(new Handler[0], logger.getHandlers(),
+                    "Logger.getLogger(\"com.foo\").getHandlers()");
+            assertEquals("FINEST", manager.getProperty("com.foo.level"),
+                "com.foo.level updated by updateConfiguration");
+            assertEquals(Level.FINEST, logger.getLevel(),
+                "Logger.getLogger(\"com.foo\").getLevel()");
+            assertEquals(null,
+                    manager.getProperty("com.foo.handlers"),
+                    "manager.getProperty(\"com.foo.handlers\")");
+
+
+        } catch (RuntimeException | Error r) {
+            throw r;
+        } catch (Exception x) {
+            throw new RuntimeException(x);
+        } finally {
+            if (configFile != null) {
+                // cleanup
+                final String file = configFile;
+                Configure.doPrivileged(() -> {
+                    try {
+                        Files.delete(Paths.get(file));
+                    } catch (RuntimeException | Error r) {
+                        throw r;
+                    } catch (Exception x) {
+                        throw new RuntimeException(x);
+                    }
+                }, SimplePolicy.allowAll);
+            }
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        if (args == null || args.length == 0) {
+            args = new String[] { "UNSECURE", "SECURE" };
+        }
+        for (String test : args) {
+            TestCase.valueOf(test).execute(SimpleUpdateConfigurationTest::testUpdateConfiguration);
+        }
+    }
+
+    static class Configure {
+        static Policy policy = null;
+        static void setUp(TestCase test) {
+            switch (test) {
+                case SECURE:
+                    if (policy == null && System.getSecurityManager() != null) {
+                        throw new IllegalStateException("SecurityManager already set");
+                    } else if (policy == null) {
+                        policy = new SimplePolicy(TestCase.SECURE);
+                        Policy.setPolicy(policy);
+                        System.setSecurityManager(new SecurityManager());
+                    }
+                    if (System.getSecurityManager() == null) {
+                        throw new IllegalStateException("No SecurityManager.");
+                    }
+                    if (policy == null) {
+                        throw new IllegalStateException("policy not configured");
+                    }
+                    break;
+                case UNSECURE:
+                    if (System.getSecurityManager() != null) {
+                        throw new IllegalStateException("SecurityManager already set");
+                    }
+                    break;
+                default:
+                    throw new InternalError("No such testcase: " + test);
+            }
+        }
+
+        static void updateConfigurationWith(Properties propertyFile,
+                Function<String,BiFunction<String,String,String>> remapper) {
+            try {
+                ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+                propertyFile.store(bytes, propertyFile.getProperty("test.name"));
+                ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray());
+                LogManager.getLogManager().updateConfiguration(bais, remapper);
+            } catch (IOException ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+
+        static void doPrivileged(Runnable run, ThreadLocal<AtomicBoolean> granter) {
+            final boolean old = granter.get().getAndSet(true);
+            try {
+                run.run();
+            } finally {
+                granter.get().set(old);
+            }
+        }
+        static <T> T callPrivileged(Callable<T> call,
+                ThreadLocal<AtomicBoolean> granter) throws Exception {
+            final boolean old = granter.get().getAndSet(true);
+            try {
+                return call.call();
+            } finally {
+                granter.get().set(old);
+            }
+        }
+    }
+
+    static final class TestAssertException extends RuntimeException {
+        TestAssertException(String msg) {
+            super(msg);
+        }
+    }
+
+    private static void assertEquals(long expected, long received, String msg) {
+        if (expected != received) {
+            throw new TestAssertException("Unexpected result for " + msg
+                    + ".\n\texpected: " + expected
+                    +  "\n\tactual:   " + received);
+        } else {
+            System.out.println("Got expected " + msg + ": " + received);
+        }
+    }
+
+    private static void assertEquals(String expected, String received, String msg) {
+        if (!Objects.equals(expected, received)) {
+            throw new TestAssertException("Unexpected result for " + msg
+                    + ".\n\texpected: " + expected
+                    +  "\n\tactual:   " + received);
+        } else {
+            System.out.println("Got expected " + msg + ": " + received);
+        }
+    }
+
+    private static void assertEquals(Object expected, Object received, String msg) {
+        if (!Objects.equals(expected, received)) {
+            throw new TestAssertException("Unexpected result for " + msg
+                    + ".\n\texpected: " + expected
+                    +  "\n\tactual:   " + received);
+        } else {
+            System.out.println("Got expected " + msg + ": " + received);
+        }
+    }
+
+    public static String deepToString(Object o) {
+        if (o == null) {
+            return "null";
+        } else if (o.getClass().isArray()) {
+            String s;
+            if (o instanceof Object[])
+                s = Arrays.deepToString((Object[]) o);
+            else if (o instanceof byte[])
+                s = Arrays.toString((byte[]) o);
+            else if (o instanceof short[])
+                s = Arrays.toString((short[]) o);
+            else if (o instanceof int[])
+                s = Arrays.toString((int[]) o);
+            else if (o instanceof long[])
+                s = Arrays.toString((long[]) o);
+            else if (o instanceof char[])
+                s = Arrays.toString((char[]) o);
+            else if (o instanceof float[])
+                s = Arrays.toString((float[]) o);
+            else if (o instanceof double[])
+                s = Arrays.toString((double[]) o);
+            else if (o instanceof boolean[])
+                s = Arrays.toString((boolean[]) o);
+            else
+                s = o.toString();
+            return s;
+        } else {
+            return o.toString();
+        }
+    }
+
+    private static void assertDeepEquals(Object expected, Object received, String msg) {
+        if (!Objects.deepEquals(expected, received)) {
+            throw new TestAssertException("Unexpected result for " + msg
+                    + ".\n\texpected: " + deepToString(expected)
+                    +  "\n\tactual:   " + deepToString(received));
+        } else {
+            System.out.println("Got expected " + msg + ": " + deepToString(received));
+        }
+    }
+
+    final static class PermissionsBuilder {
+        final Permissions perms;
+        public PermissionsBuilder() {
+            this(new Permissions());
+        }
+        public PermissionsBuilder(Permissions perms) {
+            this.perms = perms;
+        }
+        public PermissionsBuilder add(Permission p) {
+            perms.add(p);
+            return this;
+        }
+        public PermissionsBuilder addAll(PermissionCollection col) {
+            if (col != null) {
+                for (Enumeration<Permission> e = col.elements(); e.hasMoreElements(); ) {
+                    perms.add(e.nextElement());
+                }
+            }
+            return this;
+        }
+        public Permissions toPermissions() {
+            final PermissionsBuilder builder = new PermissionsBuilder();
+            builder.addAll(perms);
+            return builder.perms;
+        }
+    }
+
+    public static class SimplePolicy extends Policy {
+
+        final Permissions basic;
+        final Permissions control;
+        final Permissions all;
+        public final static ThreadLocal<AtomicBoolean> allowAll =
+                new ThreadLocal<AtomicBoolean>() {
+            @Override
+            protected AtomicBoolean initialValue() {
+                return new AtomicBoolean();
+            }
+        };
+        public final static ThreadLocal<AtomicBoolean> allowControl =
+                new ThreadLocal<AtomicBoolean>() {
+            @Override
+            protected AtomicBoolean initialValue() {
+                return new AtomicBoolean();
+            }
+        };
+        public SimplePolicy(TestCase test) {
+            basic = new Permissions();
+            control = new Permissions();
+            control.add(new LoggingPermission("control", null));
+
+            // These permissions are required to call updateConfiguration(Function)
+            control.add(new PropertyPermission("java.util.logging.config.file", "read"));
+            control.add(new PropertyPermission("java.home", "read"));
+            control.add(new FilePermission(
+                    Paths.get(System.getProperty("user.dir", "."),"-").toString(), "read"));
+            control.add(new FilePermission(
+                    Paths.get(System.getProperty("java.home"),"conf","-").toString(), "read"));
+
+            // these are used for configuring the test itself...
+            all = new Permissions();
+            all.add(new java.security.AllPermission());
+
+        }
+
+        @Override
+        public boolean implies(ProtectionDomain domain, Permission permission) {
+            return getPermissions(domain).implies(permission);
+        }
+
+        public PermissionCollection permissions() {
+            PermissionsBuilder builder = new PermissionsBuilder();
+            if (allowAll.get().get()) {
+                builder.addAll(all);
+            } else {
+                builder.addAll(basic);
+                if (allowControl.get().get()) {
+                    builder.addAll(control);
+                }
+            }
+            return builder.toPermissions();
+        }
+
+        @Override
+        public PermissionCollection getPermissions(CodeSource codesource) {
+            return permissions();
+        }
+
+        @Override
+        public PermissionCollection getPermissions(ProtectionDomain domain) {
+            return permissions();
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/LogManager/Configuration/updateConfiguration/UpdateConfigurationTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,608 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FilePermission;
+import java.io.IOException;
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.lang.reflect.Field;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.UUID;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.logging.FileHandler;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+import java.util.logging.LoggingPermission;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @test
+ * @bug 8033661
+ * @summary tests LogManager.updateConfiguration(bin)
+ * @run main/othervm UpdateConfigurationTest UNSECURE
+ * @run main/othervm UpdateConfigurationTest SECURE
+ * @author danielfuchs
+ */
+public class UpdateConfigurationTest {
+
+    /**
+     * We will test the handling of abstract logger nodes with file handlers in
+     * two configurations:
+     * UNSECURE: No security manager.
+     * SECURE: With the security manager present - and the required
+     *         permissions granted.
+     */
+    public static enum TestCase {
+        UNSECURE, SECURE;
+        public void run(Properties propertyFile, boolean last) throws Exception {
+            System.out.println("Running test case: " + name());
+            Configure.setUp(this);
+            test(this.name() + " " + propertyFile.getProperty("test.name"),
+                    propertyFile, last);
+        }
+    }
+
+
+    private static final String PREFIX =
+            "FileHandler-" + UUID.randomUUID() + ".log";
+    private static final String userDir = System.getProperty("user.dir", ".");
+    private static final boolean userDirWritable = Files.isWritable(Paths.get(userDir));
+
+    static enum ConfigMode { APPEND, REPLACE, DEFAULT;
+        boolean append() { return this == APPEND; }
+        Function<String, BiFunction<String,String,String>> remapper() {
+            switch(this) {
+                case APPEND:
+                    return (k) -> ((o,n) -> (n == null ? o : n));
+                case REPLACE:
+                    return (k) -> ((o,n) -> n);
+            }
+            return null;
+        }
+    }
+
+    private static final List<Properties> properties;
+    static {
+        // The test will be run with each of the configurations below.
+        // The 'child' logger is forgotten after each test
+
+        Properties props1 = new Properties();
+        props1.setProperty("test.name", "props1");
+        props1.setProperty("test.config.mode", ConfigMode.REPLACE.name());
+        props1.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props1.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props1.setProperty(FileHandler.class.getName() + ".level", "ALL");
+        props1.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+        props1.setProperty("com.foo.handlers", FileHandler.class.getName());
+        props1.setProperty("com.bar.level", "FINEST");
+
+        Properties props2 = new Properties();
+        props2.setProperty("test.name", "props2");
+        props2.setProperty("test.config.mode", ConfigMode.DEFAULT.name());
+        props2.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props2.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props2.setProperty(FileHandler.class.getName() + ".level", "ALL");
+        props2.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+        props2.setProperty("com.foo.handlers", FileHandler.class.getName());
+        props2.setProperty("com.foo.handlers.ensureCloseOnReset", "true");
+        props2.setProperty("com.level", "FINE");
+
+        Properties props3 = new Properties();
+        props3.setProperty("test.name", "props3");
+        props3.setProperty("test.config.mode", ConfigMode.APPEND.name());
+        props3.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+        props3.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+        props3.setProperty(FileHandler.class.getName() + ".level", "ALL");
+        props3.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+        props3.setProperty("com.foo.handlers", ""); // specify "" to override the value in the previous conf
+        props3.setProperty("com.foo.handlers.ensureCloseOnReset", "false");
+        props3.setProperty("com.bar.level", "FINER");
+
+
+        properties = Collections.unmodifiableList(Arrays.asList(
+                    props1, props2, props3, props1));
+    }
+
+    static Properties previous;
+    static Properties current;
+    static final Field propsField;
+    static {
+        LogManager manager = LogManager.getLogManager();
+        try {
+            propsField = LogManager.class.getDeclaredField("props");
+            propsField.setAccessible(true);
+            previous = current = (Properties) propsField.get(manager);
+        } catch (NoSuchFieldException | IllegalAccessException ex) {
+            throw new ExceptionInInitializerError(ex);
+        }
+    }
+
+    static Properties getProperties() {
+        try {
+            return (Properties) propsField.get(LogManager.getLogManager());
+        } catch (IllegalAccessException x) {
+            throw new RuntimeException(x);
+        }
+    }
+
+    static String trim(String value) {
+        return value == null ? null : value.trim();
+    }
+
+
+    /**
+     * Tests one of the configuration defined above.
+     * <p>
+     * This is the main test method (the rest is infrastructure).
+     * <p>
+     * Creates a child of the com.foo logger (com.foo.child), resets
+     * the configuration, and verifies that com.foo has no handler.
+     * Then reapplies the configuration and verifies that the handler
+     * for com.foo has been reestablished, depending on whether
+     * java.util.logging.LogManager.reconfigureHandlers is present and
+     * true.
+     * <p>
+     * Finally releases the logger com.foo.child, so that com.foo can
+     * be garbage collected, and the next configuration can be
+     * tested.
+     */
+    static void test(ConfigMode mode, String name, Properties props, boolean last)
+            throws Exception {
+
+        // Then create a child of the com.foo logger.
+        Logger fooChild = Logger.getLogger("com.foo.child");
+        fooChild.info("hello world");
+        Logger barChild = Logger.getLogger("com.bar.child");
+        barChild.info("hello world");
+
+        ReferenceQueue<Logger> queue = new ReferenceQueue();
+        WeakReference<Logger> fooRef = new WeakReference<>(Logger.getLogger("com.foo"), queue);
+        if (fooRef.get() != fooChild.getParent()) {
+            throw new RuntimeException("Unexpected parent logger: "
+                    + fooChild.getParent() +"\n\texpected: " + fooRef.get());
+        }
+        WeakReference<Logger> barRef = new WeakReference<>(Logger.getLogger("com.bar"), queue);
+        if (barRef.get() != barChild.getParent()) {
+            throw new RuntimeException("Unexpected parent logger: "
+                    + barChild.getParent() +"\n\texpected: " + barRef.get());
+        }
+        Reference<? extends Logger> ref2;
+        int max = 3;
+        barChild = null;
+        while ((ref2 = queue.poll()) == null) {
+            System.gc();
+            Thread.sleep(100);
+            if (--max == 0) break;
+        }
+
+        Throwable failed = null;
+        try {
+            if (ref2 != null) {
+                String refName = ref2 == fooRef ? "fooRef" : ref2 == barRef ? "barRef" : "unknown";
+                if (ref2 != barRef) {
+                    throw new RuntimeException("Unexpected logger reference cleared: " + refName);
+                } else {
+                    System.out.println("Reference " + refName + " cleared as expected");
+                }
+            } else if (ref2 == null) {
+                throw new RuntimeException("Expected 'barRef' to be cleared");
+            }
+            // Now lets try to  check that ref2 has expected handlers, and
+            // attempt to configure again.
+            String p = current.getProperty("com.foo.handlers", "").trim();
+            assertEquals(p.isEmpty() ? 0 : 1, fooChild.getParent().getHandlers().length,
+                    "["+name+"] fooChild.getParent().getHandlers().length");
+            Configure.doPrivileged(() -> Configure.updateConfigurationWith(props, mode.remapper()));
+            String p2 = previous.getProperty("com.foo.handlers", "").trim();
+            assertEquals(p, p2, "["+name+"] com.foo.handlers");
+            String n = trim(props.getProperty("com.foo.handlers", null));
+            boolean hasHandlers = mode.append()
+                    ? (n == null ? !p.isEmpty() : !n.isEmpty())
+                    : n != null && !n.isEmpty();
+            assertEquals( hasHandlers ? 1 : 0,
+                    fooChild.getParent().getHandlers().length,
+                    "["+name+"] fooChild.getParent().getHandlers().length"
+                    + "[p=\""+p+"\", n=" + (n==null?null:"\""+n+"\"") + "]");
+
+            checkProperties(mode, previous, current, props);
+
+        } catch (Throwable t) {
+            failed = t;
+        } finally {
+            if (last || failed != null) {
+                final Throwable suppressed = failed;
+                Configure.doPrivileged(LogManager.getLogManager()::reset);
+                Configure.doPrivileged(() -> {
+                    try {
+                        StringBuilder builder = new StringBuilder();
+                        Files.list(Paths.get(userDir))
+                            .filter((f) -> f.toString().contains(PREFIX))
+                            .filter((f) -> f.toString().endsWith(".lck"))
+                            .forEach((f) -> {
+                                    builder.append(f.toString()).append('\n');
+                            });
+                        if (!builder.toString().isEmpty()) {
+                            throw new RuntimeException("Lock files not cleaned:\n"
+                                    + builder.toString());
+                        }
+                    } catch(RuntimeException | Error x) {
+                        if (suppressed != null) x.addSuppressed(suppressed);
+                        throw x;
+                    } catch(Exception x) {
+                        if (suppressed != null) x.addSuppressed(suppressed);
+                        throw new RuntimeException(x);
+                    }
+                });
+
+                // Now we need to forget the child, so that loggers are released,
+                // and so that we can run the test with the next configuration...
+
+                fooChild = null;
+                System.out.println("Setting fooChild to: " + fooChild);
+                while ((ref2 = queue.poll()) == null) {
+                    System.gc();
+                    Thread.sleep(1000);
+                }
+                if (ref2 != fooRef) {
+                    throw new RuntimeException("Unexpected reference: "
+                            + ref2 +"\n\texpected: " + fooRef);
+                }
+                if (ref2.get() != null) {
+                    throw new RuntimeException("Referent not cleared: " + ref2.get());
+                }
+                System.out.println("Got fooRef after reset(), fooChild is " + fooChild);
+
+            }
+        }
+        if (failed != null) {
+            // should rarely happen...
+            throw new RuntimeException(failed);
+        }
+
+    }
+
+    private static void checkProperties(ConfigMode mode,
+            Properties previous, Properties current, Properties props) {
+        Set<String> set = new HashSet<>();
+
+        // Check that all property names from 'props' are in current.
+        set.addAll(props.stringPropertyNames());
+        set.removeAll(current.keySet());
+        if (!set.isEmpty()) {
+            throw new RuntimeException("Missing properties in current: " + set);
+        }
+        set.clear();
+        set.addAll(current.stringPropertyNames());
+        set.removeAll(previous.keySet());
+        set.removeAll(props.keySet());
+        if (!set.isEmpty()) {
+            throw new RuntimeException("Superfluous properties in current: " + set);
+        }
+        set.clear();
+        Stream<String> allnames =
+                Stream.concat(
+                    Stream.concat(previous.stringPropertyNames().stream(),
+                                  props.stringPropertyNames().stream()),
+                    current.stringPropertyNames().stream())
+                        .collect(Collectors.toCollection(TreeSet::new))
+                        .stream();
+        if (mode.append()) {
+            // Check that all previous property names are in current.
+            set.addAll(previous.stringPropertyNames());
+            set.removeAll(current.keySet());
+            if (!set.isEmpty()) {
+                throw new RuntimeException("Missing properties in current: " + set
+                    + "\n\tprevious: " + previous
+                    + "\n\tcurrent:  " + current
+                    + "\n\tprops:    " + props);
+
+            }
+            allnames.forEach((k) -> {
+                    String p = previous.getProperty(k, "").trim();
+                    String n = current.getProperty(k, "").trim();
+                    if (props.containsKey(k)) {
+                        assertEquals(props.getProperty(k), n, k);
+                    } else {
+                        assertEquals(p, n, k);
+                    }
+                });
+        } else {
+            // Check that only properties from 'props' are in current.
+            set.addAll(current.stringPropertyNames());
+            set.removeAll(props.keySet());
+            if (!set.isEmpty()) {
+                throw new RuntimeException("Superfluous properties in current: " + set);
+            }
+            allnames.forEach((k) -> {
+                    String p = previous.getProperty(k, "");
+                    String n = current.getProperty(k, "");
+                    if (props.containsKey(k)) {
+                        assertEquals(props.getProperty(k), n, k);
+                    } else {
+                        assertEquals("", n, k);
+                    }
+                });
+        }
+
+    }
+
+    public static void main(String... args) throws Exception {
+
+
+        if (args == null || args.length == 0) {
+            args = new String[] {
+                TestCase.UNSECURE.name(),
+                TestCase.SECURE.name(),
+            };
+        }
+
+        try {
+            for (String testName : args) {
+                TestCase test = TestCase.valueOf(testName);
+                for (int i=0; i<properties.size();i++) {
+                    Properties propertyFile = properties.get(i);
+                    test.run(propertyFile, i == properties.size() - 1);
+                }
+            }
+        } finally {
+            if (userDirWritable) {
+                Configure.doPrivileged(() -> {
+                    // cleanup - delete files that have been created
+                    try {
+                        Files.list(Paths.get(userDir))
+                            .filter((f) -> f.toString().contains(PREFIX))
+                            .forEach((f) -> {
+                                try {
+                                    System.out.println("deleting " + f);
+                                    Files.delete(f);
+                                } catch(Throwable t) {
+                                    System.err.println("Failed to delete " + f + ": " + t);
+                                }
+                            });
+                    } catch(Throwable t) {
+                        System.err.println("Cleanup failed to list files: " + t);
+                        t.printStackTrace();
+                    }
+                });
+            }
+        }
+    }
+
+    static class Configure {
+        static Policy policy = null;
+        static final ThreadLocal<AtomicBoolean> allowAll = new ThreadLocal<AtomicBoolean>() {
+            @Override
+            protected AtomicBoolean initialValue() {
+                return  new AtomicBoolean(false);
+            }
+        };
+        static void setUp(TestCase test) {
+            switch (test) {
+                case SECURE:
+                    if (policy == null && System.getSecurityManager() != null) {
+                        throw new IllegalStateException("SecurityManager already set");
+                    } else if (policy == null) {
+                        policy = new SimplePolicy(TestCase.SECURE, allowAll);
+                        Policy.setPolicy(policy);
+                        System.setSecurityManager(new SecurityManager());
+                    }
+                    if (System.getSecurityManager() == null) {
+                        throw new IllegalStateException("No SecurityManager.");
+                    }
+                    if (policy == null) {
+                        throw new IllegalStateException("policy not configured");
+                    }
+                    break;
+                case UNSECURE:
+                    if (System.getSecurityManager() != null) {
+                        throw new IllegalStateException("SecurityManager already set");
+                    }
+                    break;
+                default:
+                    new InternalError("No such testcase: " + test);
+            }
+        }
+
+        static void updateConfigurationWith(Properties propertyFile,
+                Function<String,BiFunction<String,String,String>> remapper) {
+            try {
+                ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+                propertyFile.store(bytes, propertyFile.getProperty("test.name"));
+                ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray());
+                LogManager.getLogManager().updateConfiguration(bais, remapper);
+            } catch (IOException ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+
+        static void doPrivileged(Runnable run) {
+            final boolean old = allowAll.get().getAndSet(true);
+            try {
+                Properties before = getProperties();
+                try {
+                    run.run();
+                } finally {
+                    Properties after = getProperties();
+                    if (before != after) {
+                        previous = before;
+                        current = after;
+                    }
+                }
+            } finally {
+                allowAll.get().set(old);
+            }
+        }
+        static <T> T callPrivileged(Callable<T> call) throws Exception {
+            final boolean old = allowAll.get().getAndSet(true);
+            try {
+                Properties before = getProperties();
+                try {
+                    return call.call();
+                } finally {
+                    Properties after = getProperties();
+                    if (before != after) {
+                        previous = before;
+                        current = after;
+                    }
+                }
+            } finally {
+                allowAll.get().set(old);
+            }
+        }
+    }
+
+    @FunctionalInterface
+    public static interface FileHandlerSupplier {
+        public FileHandler test() throws Exception;
+    }
+
+    static final class TestAssertException extends RuntimeException {
+        TestAssertException(String msg) {
+            super(msg);
+        }
+    }
+
+    private static void assertEquals(long expected, long received, String msg) {
+        if (expected != received) {
+            throw new TestAssertException("Unexpected result for " + msg
+                    + ".\n\texpected: " + expected
+                    +  "\n\tactual:   " + received);
+        } else {
+            System.out.println("Got expected " + msg + ": " + received);
+        }
+    }
+
+    private static void assertEquals(String expected, String received, String msg) {
+        if (!Objects.equals(expected, received)) {
+            throw new TestAssertException("Unexpected result for " + msg
+                    + ".\n\texpected: " + expected
+                    +  "\n\tactual:   " + received);
+        } else {
+            System.out.println("Got expected " + msg + ": " + received);
+        }
+    }
+
+
+    public static void test(String name, Properties props, boolean last) throws Exception {
+        ConfigMode configMode = ConfigMode.valueOf(props.getProperty("test.config.mode"));
+        System.out.println("\nTesting: " + name + " mode=" + configMode);
+        if (!userDirWritable) {
+            throw new RuntimeException("Not writable: "+userDir);
+        }
+        switch(configMode) {
+            case REPLACE:
+            case APPEND:
+            case DEFAULT:
+                test(configMode, name, props, last); break;
+            default:
+                throw new RuntimeException("Unknwown mode: " + configMode);
+        }
+    }
+
+    final static class PermissionsBuilder {
+        final Permissions perms;
+        public PermissionsBuilder() {
+            this(new Permissions());
+        }
+        public PermissionsBuilder(Permissions perms) {
+            this.perms = perms;
+        }
+        public PermissionsBuilder add(Permission p) {
+            perms.add(p);
+            return this;
+        }
+        public PermissionsBuilder addAll(PermissionCollection col) {
+            if (col != null) {
+                for (Enumeration<Permission> e = col.elements(); e.hasMoreElements(); ) {
+                    perms.add(e.nextElement());
+                }
+            }
+            return this;
+        }
+        public Permissions toPermissions() {
+            final PermissionsBuilder builder = new PermissionsBuilder();
+            builder.addAll(perms);
+            return builder.perms;
+        }
+    }
+
+    public static class SimplePolicy extends Policy {
+
+        final Permissions permissions;
+        final Permissions allPermissions;
+        final ThreadLocal<AtomicBoolean> allowAll; // actually: this should be in a thread locale
+        public SimplePolicy(TestCase test, ThreadLocal<AtomicBoolean> allowAll) {
+            this.allowAll = allowAll;
+            permissions = new Permissions();
+            permissions.add(new LoggingPermission("control", null));
+            permissions.add(new FilePermission(PREFIX+".lck", "read,write,delete"));
+            permissions.add(new FilePermission(PREFIX, "read,write"));
+
+            // these are used for configuring the test itself...
+            allPermissions = new Permissions();
+            allPermissions.add(new java.security.AllPermission());
+
+        }
+
+        @Override
+        public boolean implies(ProtectionDomain domain, Permission permission) {
+            if (allowAll.get().get()) return allPermissions.implies(permission);
+            return permissions.implies(permission);
+        }
+
+        @Override
+        public PermissionCollection getPermissions(CodeSource codesource) {
+            return new PermissionsBuilder().addAll(allowAll.get().get()
+                    ? allPermissions : permissions).toPermissions();
+        }
+
+        @Override
+        public PermissionCollection getPermissions(ProtectionDomain domain) {
+            return new PermissionsBuilder().addAll(allowAll.get().get()
+                    ? allPermissions : permissions).toPermissions();
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/zip/ZipFile/ZipEntryFreeTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 6907252
+ * @summary ZipFileInputStream Not Thread-Safe
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
+ * @run main ZipEntryFreeTest
+ */
+
+import java.io.*;
+import java.nio.file.Paths;
+import java.util.Random;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.zip.*;
+import jdk.testlibrary.FileUtils;
+
+public class ZipEntryFreeTest extends Thread {
+
+    private static final int NUM_THREADS = 5;
+    private static final int TEST_ITERATIONS = 5;
+    private static final String ZIPFILE_NAME = "large.zip";
+    private static final String ZIPENTRY_NAME = "random.txt";
+    private static InputStream is = null;
+    final Timer timer = new Timer();
+
+    public static void main(String args[]) throws Exception {
+        createZipFile();
+        try {
+            for (int i = 0; i < TEST_ITERATIONS; i++) {
+               runTest();
+            }
+        } finally {
+            FileUtils.deleteFileIfExistsWithRetry(Paths.get(ZIPFILE_NAME));
+        }
+    }
+
+    private static void runTest() throws Exception {
+        try (ZipFile zf = new ZipFile(new File(ZIPFILE_NAME))) {
+            is = zf.getInputStream(zf.getEntry(ZIPENTRY_NAME + "_0"));
+            Thread[] threadArray = new Thread[NUM_THREADS];
+            for (int i = 0; i < threadArray.length; i++) {
+                threadArray[i] = new ZipEntryFreeTest();
+            }
+            for (int i = 0; i < threadArray.length; i++) {
+                threadArray[i].start();
+            }
+            for (int i = 0; i < threadArray.length; i++) {
+                threadArray[i].join();
+            }
+        }
+    }
+
+    private static void createZipFile() throws Exception {
+        Random rnd = new Random(1000L);
+        byte[] contents = new byte[2_000_000];
+        ZipEntry ze = null;
+
+        try (ZipOutputStream zos =
+            new ZipOutputStream(new FileOutputStream(ZIPFILE_NAME))) {
+            // uncompressed mode seemed to tickle the crash
+            zos.setMethod(ZipOutputStream.STORED);
+            for (int ze_count = 0; ze_count < 10; ze_count++) {
+                rnd.nextBytes(contents);
+                ze = createZipEntry(contents, ze_count);
+                zos.putNextEntry(ze);
+                zos.write(contents, 0, contents.length);
+            }
+            zos.flush();
+        }
+    }
+
+    private static ZipEntry createZipEntry(byte[] b, int i) {
+        ZipEntry ze = new ZipEntry(ZIPENTRY_NAME + "_" + i);
+        ze.setCompressedSize(b.length);
+        ze.setSize(b.length);
+        CRC32 crc = new CRC32();
+        crc.update(b);
+        ze.setCrc(crc.getValue());
+        return ze;
+    }
+
+    @Override
+    public void run() {
+        try {
+            int iteration = 0;
+            TimerTask tt = (new TimerTask() {
+                @Override
+                public void run() {
+                    try {
+                        is.close();
+                    } catch (Exception ex) {
+                         ex.printStackTrace(System.out);
+                    }
+                }
+            });
+            timer.schedule(tt, 50);
+            while (is.read() != -1 && iteration++ < 1_000) { }
+        } catch (ZipException ze) {
+            // ZipException now expected instead of ZIP_Read crash
+            System.out.println(ze);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        } finally {
+            timer.cancel();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/Bug8066904.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug     8066904
+ * @summary Test verifies whether Bits per Pixel in BMP
+ *          Header is corrupted or not
+ * @run     main Bug8066904
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import javax.imageio.ImageIO;
+
+public class Bug8066904 {
+
+    public static void main(String[] args) throws IOException {
+        // corrupted byte array with improper Bits per pixel in header
+        byte[] corruptedBmp = { (byte) 0x42, (byte) 0x4d, (byte) 0x7e,
+                (byte) 0x06, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
+                (byte) 0x00, (byte) 0x00, (byte) 0x3e, (byte) 0x00, (byte) 0x00,
+                (byte) 0x00, (byte) 0x28, (byte) 0x00, (byte) 0x00, (byte) 0x00,
+                (byte) 0x64, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x64,
+                (byte) 0x00, (byte) 0x40, (byte) 0x06, (byte) 0x00, (byte) 0x00,
+                (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
+                (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
+                (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
+                (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
+                (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x00, (byte) 0xff,
+                (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
+                (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
+                (byte) 0xff };
+
+        /** if IOException is caught then test will
+         * pass otherwise throws a different exception.
+         */
+        try {
+            ImageIO.read(new ByteArrayInputStream(corruptedBmp));
+        } catch(Exception ex) {
+            if (!(ex instanceof IOException))
+                throw ex;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JMenu/8067346/bug8067346.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ @bug 8067346
+ @summary Submenu has a changed offset on Windows7 with Windows look and feel
+ @requires (os.family == "windows")
+ @run main bug8067346
+ */
+import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
+import java.awt.Insets;
+import javax.swing.JFrame;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+
+
+public class bug8067346 {
+
+    private JMenuBar menuBar;
+    private JFrame frame;
+    private String[] menuClasses = {"MenuItem", "Menu",
+        "CheckBoxMenuItem", "RadioButtonMenuItem"};
+    private String MARGIN = ".margin";
+    private String CHECKICONOFFSET = ".checkIconOffset";
+    private static boolean runTest = true;
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+
+            @Override
+            public void run() {
+                bug8067346 test = new bug8067346();
+                try {
+                    // set windows look and feel
+                    UIManager.setLookAndFeel(new WindowsLookAndFeel());
+                } catch (UnsupportedLookAndFeelException e) {
+                    runTest = false;
+                }
+                if(runTest) {
+                    test.createUI();
+                    test.performTest();
+                    test.dispose();
+                }
+            }
+        });
+    }
+
+    public void createUI() {
+
+        frame = new JFrame();
+        menuBar = new JMenuBar();
+        frame.setJMenuBar(menuBar);
+        JMenu menu, submenu;
+        JMenuItem menuItem;
+
+        menu = new JMenu("A Menu");
+        menuBar.add(menu);
+        menu.addSeparator();
+
+        submenu = new JMenu("A submenu");
+
+        menuItem = new JMenuItem("An item in the submenu");
+        submenu.add(menuItem);
+        menu.add(submenu);
+    }
+
+    public void performTest() {
+        try {
+            String errorMessage = "Incorrect value for ";
+            StringBuilder errorMessageBuilder = new StringBuilder(errorMessage);
+            boolean error = false;
+            int retVal = testMargin();
+            if (retVal != 0) {
+                errorMessageBuilder.append(menuClasses[retVal])
+                        .append(MARGIN).append("\n");
+                error = true;
+            }
+            retVal = testCheckIconOffset();
+            if (retVal != 0) {
+                errorMessageBuilder.append(errorMessage)
+                        .append(menuClasses[retVal]).append(CHECKICONOFFSET);
+            }
+            if (error || retVal != 0) {
+                throw new RuntimeException(errorMessageBuilder.toString());
+            }
+        } finally {
+            dispose();
+        }
+    }
+
+    private int testMargin() {
+
+        for (int inx = 0; inx < menuClasses.length; inx++) {
+            Insets margin = (Insets) UIManager.get(menuClasses[inx] + MARGIN);
+            if (margin != null && margin.bottom == 0 && margin.left == 0
+                    && margin.right == 0 && margin.top == 0) {
+                return inx + 1;
+            }
+        }
+        return 0;
+    }
+
+    private int testCheckIconOffset() {
+
+        for (int inx = 0; inx < menuClasses.length; inx++) {
+            Object checkIconOffset = UIManager.get(menuClasses[inx]
+                    + CHECKICONOFFSET);
+            if (checkIconOffset != null && ((Integer) checkIconOffset) == 0) {
+                return inx + 1;
+            }
+        }
+        return 0;
+    }
+
+    public void dispose() {
+        frame.dispose();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/bind/jxc/8073519/InputWithError.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType
+public class InputWithError {
+     public int a;
+     int compile-error;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/bind/jxc/8073519/SchemagenErrorReporting.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8073519
+ * @summary test that schemagen tool reports errors during
+ * xsd generation process
+ * @library /lib/testlibrary
+ * @run testng/othervm SchemagenErrorReporting
+ */
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.Arrays;
+import java.util.stream.Collectors;
+import jdk.testlibrary.JDKToolLauncher;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class SchemagenErrorReporting {
+
+    @Test
+    public void schemagenErrorReporting() throws Exception {
+        //schemagen tool output file name
+        final String SCHEMA_FILE = "schema1.xsd";
+        //Schemagen input java file with not compilable source
+        final String CLASS_FILE = "InputWithError.java";
+        //Test working, src directories and test output file
+        Path testWorkDir, testSrcDir, testOutput;
+
+        //Prepare test environment
+        //Create test directory inside scratch
+        testWorkDir = Paths.get(System.getProperty("user.dir", "."))
+                .resolve("SchemagenErrorReporting");
+        //Get test source directory
+        testSrcDir = Paths.get(System.getProperty("test.src", "."));
+        //Set test output file path
+        testOutput = testWorkDir.resolve("stdErrContent");
+        //Create test directory inside scratch directory
+        Files.createDirectory(testWorkDir);
+        //Copy java source from test.src to the test directory
+        Files.copy(testSrcDir.resolve(CLASS_FILE), testWorkDir.resolve(CLASS_FILE),
+                StandardCopyOption.REPLACE_EXISTING);
+
+        //Prepare process builder to run schemagen tool and save its output
+        JDKToolLauncher sgl = JDKToolLauncher.createUsingTestJDK("schemagen");
+        sgl.addToolArg(CLASS_FILE);
+        System.out.println("Executing: " + Arrays.asList(sgl.getCommand()));
+        ProcessBuilder pb = new ProcessBuilder(sgl.getCommand());
+        //Set schemagen work directory with the input java file
+        pb.directory(testWorkDir.toFile());
+        //Redirect schemagen output to file
+        pb.redirectError(testOutput.toFile());
+        Process p = pb.start();
+        int result = p.waitFor();
+        p.destroy();
+
+        //Read schemagen output from the file
+        String stdErrContent = Files.lines(testOutput)
+                .collect(Collectors.joining(System.lineSeparator(), System.lineSeparator(), ""));
+        System.out.println("Schemagen return value:" + result);
+        System.out.println("Error output:" + stdErrContent);
+        //Check test results:
+        //Schemagen finished with non-0 return value
+        Assert.assertNotEquals(result, 0);
+        //Schemagen output contains compile error message
+        Assert.assertTrue(stdErrContent.contains("InputWithError.java:28: error"));
+    }
+}
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java	Tue Oct 27 01:45:03 2015 -0400
@@ -66,7 +66,7 @@
     public static final double TIMEOUT_FACTOR;
     static {
         String toFactor = System.getProperty("test.timeout.factor", "1.0");
-       TIMEOUT_FACTOR = Double.parseDouble(toFactor);
+        TIMEOUT_FACTOR = Double.parseDouble(toFactor);
     }
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/java2d/loops/CopyAreaSpeed.html	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<!--
+  Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+  This code is free software; you can redistribute it and/or modify it
+  under the terms of the GNU General Public License version 2 only, as
+  published by the Free Software Foundation.
+
+  This code is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+  version 2 for more details (a copy is included in the LICENSE file that
+  accompanied this code).
+
+  You should have received a copy of the GNU General Public License version
+  2 along with this work; if not, write to the Free Software Foundation,
+  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+  Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+  or visit www.oracle.com if you need additional information or have any
+  questions.
+-->
+<html>
+  <head>
+    <title>CopyAreaSpeed</title>
+  </head>
+
+  <body>
+      <h1>CopyAreaSpeed</h1>
+      <hr>
+      <address><a href="mailto:thanh@eng.sun.com">Thanh Nguyen</a></address>
+<!-- Created: Mon Jan 11 16:13:29 PST 1999 -->
+<!-- hhmts start -->
+Last modified: Tue Jan 19 16:18:37 PST 1999
+<!-- hhmts end -->
+      <APPLET CODE="CopyAreaSpeed.class" WIDTH=200 HEIGHT=300></APPLET>
+  </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/java2d/loops/CopyAreaSpeed.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,268 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/*
+ * @test
+ * @bug 4189070
+ * @summary This test prints out the time it takes for a certain amount of
+ * copyArea calls to be completed. Because the performance measurement is
+ * relative, this code only provides a benchmark to run with different releases
+ * to compare the outcomes.
+ * @run applet/manual=done CopyAreaSpeed.html
+ */
+
+import java.applet.Applet;
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+
+public class CopyAreaSpeed extends Applet implements Runnable {
+    int top = 0;
+
+    public void init() {
+    }
+
+    public CopyAreaSpeed()
+    {
+        super();
+        String[] instructions =
+        {
+            "This test prints out the time it takes for a certain amount ",
+            "of copyArea calls to be completed. Because the performance ",
+            "measurement is relative, this code only provides a benchmark ",
+            "to run with different releases to compare the outcomes."
+        };
+        Sysout.createDialogWithInstructions( instructions );
+        (new Thread(this)).start();
+        Button bt = new Button("Hello");
+        bt.setBounds(50, 10, 50, 22);
+        bt.setVisible(false);
+        add(bt);
+    }
+
+    public void update(Graphics g)
+    {
+        paint(g);
+    }
+
+    public void paint(Graphics g)
+    {
+        synchronized(this) {
+            Rectangle rct = g.getClipBounds();
+            g.setColor(Color.white);
+            g.fillRect(rct.x, rct.y, rct.width, rct.height);
+            g.setFont(getFont());
+            g.setColor(Color.black);
+
+            Dimension dm = getSize();
+            for (int y = 0; y <= (dm.height + 10); y += 20) {
+                if (y > rct.y) {
+                    int z = y / 20 + top;
+                    g.drawString("" + z, 10, y);
+                }               /* endif */
+            }                   // endfor
+        }
+    }
+
+    static long millsec(Date s, Date e) {
+        long ts = s.getTime();
+        long te = e.getTime();
+        return te-ts;
+    }
+
+    public void run()
+    {
+        int count = 1000;
+        int loops = count;
+        Date start;
+        Date end;
+
+        start = new Date();
+        while (count-- > 0) {
+            Dimension dm = getSize();
+            if (dm != null && dm.width != 0 && dm.height != 0) {
+                synchronized(this) {
+                    top++;
+                    Graphics g = getGraphics();
+                    g.copyArea(0, 20, dm.width, dm.height - 20, 0, -20);
+                    g.setClip(0, dm.height - 20, dm.width, 20);
+                    paint(g);
+                    g.dispose();
+                }
+            }
+            try {
+                Thread.sleep(1);
+            } catch(Exception ex) {
+                ex.printStackTrace();
+            }
+        }
+        end = new Date();
+        Sysout.println("copyArea X "+loops+" = "+ millsec(start, end) + " msec");
+    }
+
+    public static void main(String args[]) {
+        Frame frm = new Frame("CopyAreaSpeed");
+        frm.add(new CopyAreaSpeed());
+        frm.addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent ev) {
+                System.exit(0);
+            }
+        });
+        frm.setSize(500, 500);
+        frm.show();
+    }
+}
+/****************************************************
+ Standard Test Machinery
+ DO NOT modify anything below -- it's a standard
+  chunk of code whose purpose is to make user
+  interaction uniform, and thereby make it simpler
+  to read and understand someone else's test.
+ ****************************************************/
+
+/**
+ This is part of the standard test machinery.
+ It creates a dialog (with the instructions), and is the interface
+  for sending text messages to the user.
+ To print the instructions, send an array of strings to Sysout.createDialog
+  WithInstructions method.  Put one line of instructions per array entry.
+ To display a message for the tester to see, simply call Sysout.println
+  with the string to be displayed.
+ This mimics System.out.println but works within the test harness as well
+  as standalone.
+ */
+class Sysout
+{
+    private static TestDialog dialog;
+
+    public static void createDialogWithInstructions( String[] instructions )
+    {
+        dialog = new TestDialog( new Frame(), "Instructions" );
+        dialog.printInstructions( instructions );
+        dialog.show();
+        println( "Any messages for the tester will display here." );
+    }
+
+    public static void createDialog( )
+    {
+        dialog = new TestDialog( new Frame(), "Instructions" );
+        String[] defInstr = { "Instructions will appear here. ", "" } ;
+        dialog.printInstructions( defInstr );
+        dialog.show();
+        println( "Any messages for the tester will display here." );
+    }
+
+
+    public static void printInstructions( String[] instructions )
+    {
+        dialog.printInstructions( instructions );
+    }
+
+
+    public static void println( String messageIn )
+    {
+        dialog.displayMessage( messageIn );
+    }
+
+}// Sysout  class
+
+/**
+  This is part of the standard test machinery.  It provides a place for the
+   test instructions to be displayed, and a place for interactive messages
+   to the user to be displayed.
+  To have the test instructions displayed, see Sysout.
+  To have a message to the user be displayed, see Sysout.
+  Do not call anything in this dialog directly.
+  */
+class TestDialog extends Dialog
+{
+
+    TextArea instructionsText;
+    TextArea messageText;
+    int maxStringLength = 80;
+
+    //DO NOT call this directly, go through Sysout
+    public TestDialog( Frame frame, String name )
+    {
+        super( frame, name );
+        int scrollBoth = TextArea.SCROLLBARS_BOTH;
+        instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth );
+        add( "North", instructionsText );
+
+        messageText = new TextArea( "", 5, maxStringLength, scrollBoth );
+        add("South", messageText);
+
+        pack();
+
+        show();
+    }// TestDialog()
+
+    //DO NOT call this directly, go through Sysout
+    public void printInstructions( String[] instructions )
+    {
+        //Clear out any current instructions
+        instructionsText.setText( "" );
+
+        //Go down array of instruction strings
+
+        String printStr, remainingStr;
+        for( int i=0; i < instructions.length; i++ )
+        {
+            //chop up each into pieces maxSringLength long
+            remainingStr = instructions[ i ];
+            while( remainingStr.length() > 0 )
+            {
+                //if longer than max then chop off first max chars to print
+                if( remainingStr.length() >= maxStringLength )
+                {
+                    //Try to chop on a word boundary
+                   int posOfSpace = remainingStr.
+                   lastIndexOf( ' ', maxStringLength - 1 );
+
+                   if( posOfSpace <= 0 ) {
+                       posOfSpace = maxStringLength - 1;
+                   }
+
+                   printStr = remainingStr.substring( 0, posOfSpace + 1 );
+                   remainingStr = remainingStr.substring( posOfSpace + 1 );
+                }
+                else //else just print
+                {
+                    printStr = remainingStr;
+                    remainingStr = "";
+                }
+
+                instructionsText.append( printStr + "\n" );
+
+            }// while
+
+        }// for
+
+    }//printInstructions()
+
+    //DO NOT call this directly, go through Sysout
+    public void displayMessage( String messageIn )
+    {
+        messageText.append( messageIn + "\n" );
+    }
+
+}// TestDialog  class
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/management/LazyCompositeDataTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.management.openmbean.ArrayType;
+import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.CompositeDataSupport;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.OpenDataException;
+import javax.management.openmbean.OpenType;
+import javax.management.openmbean.SimpleType;
+import sun.management.LazyCompositeData;
+
+/**
+ * @test
+ * @bug 8139870
+ * @summary sun.management.LazyCompositeData.isTypeMatched() fails for composite types with items of ArrayType
+ * @modules java.management/sun.management
+ * @author Jaroslav Bachorik
+ */
+
+public class LazyCompositeDataTest {
+    private final static CompositeData dataV1, dataV2;
+
+    static {
+        try {
+            // ***
+            // prepare the composite types
+
+            // composite type stored in an array; V1
+            CompositeType subtypeV1 = new CompositeType(
+                    "Subtype1",
+                    "Version 1",
+                    new String[]{"item1"},
+                    new String[]{"Item 1"},
+                    new OpenType<?>[]{
+                        SimpleType.STRING
+                    }
+            );
+
+            // composite type stored in an array; V2
+            CompositeType subtypeV2 = new CompositeType(
+                    "Subtype2",
+                    "Version 2",
+                    new String[]{"item1", "item2"},
+                    new String[]{"Item 1", "Item 2"},
+                    new OpenType<?>[]{
+                        SimpleType.STRING,
+                        SimpleType.INTEGER
+                    }
+            );
+
+
+            // main composite type; V1
+            // one of the items is array of 'subtypeV1' instances
+            CompositeType typeV1 = new CompositeType(
+                    "MyDataV1",
+                    "Version 1",
+                    new String[]{"item1", "item2"},
+                    new String[]{"Item 1", "Item 2"},
+                    new OpenType<?>[]{
+                        SimpleType.STRING,
+                        ArrayType.getArrayType(subtypeV1)
+                    }
+            );
+
+            // main composite type; V2
+            // one of the items is array of 'subtypeV2' instances
+            CompositeType typeV2 = new CompositeType(
+                    "MyDataV2",
+                    "Version 2",
+                    new String[]{"item1", "item2"},
+                    new String[]{"Item 1", "Item 2"},
+                    new OpenType<?>[]{
+                        SimpleType.STRING,
+                        ArrayType.getArrayType(subtypeV2)
+                    }
+            );
+            // ***
+
+            // ***
+            // construct the data
+            Map<String, Object> subitemsV1 = new HashMap<>();
+            Map<String, Object> subitemsV2 = new HashMap<>();
+
+            Map<String, Object> itemsV1 = new HashMap<>();
+            Map<String, Object> itemsV2 = new HashMap<>();
+
+            subitemsV1.put("item1", "item1");
+            subitemsV2.put("item1", "item1");
+            subitemsV2.put("item2", 42);
+
+            itemsV1.put("item1", "item1");
+            itemsV1.put("item2", new CompositeData[]{new CompositeDataSupport(subtypeV1, subitemsV1)});
+
+            itemsV2.put("item1", "item1");
+            itemsV2.put("item2", new CompositeData[]{new CompositeDataSupport(subtypeV2, subitemsV2)});
+
+            dataV1 = new CompositeDataSupport(typeV1, itemsV1);
+            dataV2 = new CompositeDataSupport(typeV2, itemsV2);
+            // ***
+        } catch (OpenDataException e) {
+            throw new Error(e);
+        }
+    }
+
+    private static class MyDataV1 extends LazyCompositeData {
+        @Override
+        protected CompositeData getCompositeData() {
+            return dataV1;
+        }
+
+        public boolean isTypeMached(CompositeType type) {
+            return isTypeMatched(this.getCompositeType(), type);
+        }
+    }
+
+    private static class MyDataV2 extends LazyCompositeData {
+        @Override
+        protected CompositeData getCompositeData() {
+            return dataV2;
+        }
+
+    }
+
+    public static void main(String[] args) throws Exception {
+        System.out.println("Checking LazyCompositeData.isTypeMatched()");
+        MyDataV1 v1 = new MyDataV1();
+        MyDataV2 v2 = new MyDataV2();
+
+        if (!v1.isTypeMached(v2.getCompositeType())) {
+            System.err.println("=== FAILED");
+            System.err.println("V1 should be matched by V2");
+            System.err.println("\n=== V1");
+            System.err.println(v1.getCompositeType());
+            System.err.println("\n=== V2");
+            System.err.println(v2.getCompositeType());
+            throw new Error();
+        }
+        System.out.println("=== PASSED");
+    }
+}
\ No newline at end of file
--- a/jdk/test/sun/security/krb5/auto/KDC.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/sun/security/krb5/auto/KDC.java	Tue Oct 27 01:45:03 2015 -0400
@@ -889,8 +889,9 @@
 
         PrincipalName service = asReq.reqBody.sname;
         if (options.containsKey(KDC.Option.RESP_NT)) {
-            service = new PrincipalName(service.getNameStrings(),
-                    (int)options.get(KDC.Option.RESP_NT));
+            service = new PrincipalName((int)options.get(KDC.Option.RESP_NT),
+                    service.getNameStrings(),
+                    Realm.getDefault());
         }
         try {
             System.out.println(realm + "> " + asReq.reqBody.cname +
--- a/jdk/test/sun/security/krb5/auto/SSL.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/sun/security/krb5/auto/SSL.java	Tue Oct 27 01:45:03 2015 -0400
@@ -76,7 +76,10 @@
             return;
         }
         ServicePermission p = (ServicePermission)perm;
-        permChecks = permChecks + p.getActions().toUpperCase().charAt(0);
+        // ServicePermissions required to create GSSName are ignored
+        if (!p.getActions().isEmpty()) {
+            permChecks = permChecks + p.getActions().toUpperCase().charAt(0);
+        }
     }
 
     public static void main(String[] args) throws Exception {
--- a/jdk/test/sun/security/krb5/name/Constructors.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/sun/security/krb5/name/Constructors.java	Tue Oct 27 01:45:03 2015 -0400
@@ -41,22 +41,22 @@
 
         // Good ones
         type = PrincipalName.KRB_NT_UNKNOWN;
-        checkName("a", type, "R", "R", "a");
-        checkName("a@R2", type, "R", "R", "a");
-        checkName("a/b", type, "R", "R", "a", "b");
-        checkName("a/b@R2", type, "R", "R", "a", "b");
-        checkName("a/b/c", type, "R", "R", "a", "b", "c");
-        checkName("a/b/c@R2", type, "R", "R", "a", "b", "c");
+        checkName("a", type, "R", "R", false, "a");
+        checkName("a@R2", type, "R", "R", false, "a");
+        checkName("a/b", type, "R", "R", false, "a", "b");
+        checkName("a/b@R2", type, "R", "R", false, "a", "b");
+        checkName("a/b/c", type, "R", "R", false, "a", "b", "c");
+        checkName("a/b/c@R2", type, "R", "R", false, "a", "b", "c");
         // Weird ones
-        checkName("a\\/b", type, "R", "R", "a/b");
-        checkName("a\\/b\\/c", type, "R", "R", "a/b/c");
-        checkName("a\\/b\\@R2", type, "R", "R", "a/b@R2");
+        checkName("a\\/b", type, "R", "R", false, "a/b");
+        checkName("a\\/b\\/c", type, "R", "R", false, "a/b/c");
+        checkName("a\\/b\\@R2", type, "R", "R", false, "a/b@R2");
         // Bad ones
-        checkName("a", type, "", null);
-        checkName("a/", type, "R", null);
-        checkName("/a", type, "R", null);
-        checkName("a//b", type, "R", null);
-        checkName("a@", type, null, null);
+        checkName("a", type, "", null, false);
+        checkName("a/", type, "R", null, false);
+        checkName("/a", type, "R", null, false);
+        checkName("a//b", type, "R", null, false);
+        checkName("a@", type, null, null, false);
         type = PrincipalName.KRB_NT_SRV_HST;
 
         // Part 2: on realm choices
@@ -78,17 +78,17 @@
 
         if (testNoDefaultDomain) {
             type = PrincipalName.KRB_NT_UNKNOWN;
-            checkName("a", type, "R1", "R1", "a");      // arg
-            checkName("a@R1", type, null, "R1", "a");   // or r in name
-            checkName("a@R2", type, "R1", "R1", "a");   // arg over r
-            checkName("a", type, null, null);      // fail if none
-            checkName("a/b@R1", type, null, "R1", "a", "b");
+            checkName("a", type, "R1", "R1", false, "a");      // arg
+            checkName("a@R1", type, null, "R1", false, "a");   // or r in name
+            checkName("a@R2", type, "R1", "R1", false, "a");   // arg over r
+            checkName("a", type, null, null, false);      // fail if none
+            checkName("a/b@R1", type, null, "R1", false, "a", "b");
             type = PrincipalName.KRB_NT_SRV_HST;
             // Let's pray "b.h" won't be canonicalized
-            checkName("a/b.h", type, "R1", "R1", "a", "b.h");    // arg
-            checkName("a/b.h@R1", type, null, "R1", "a", "b.h"); // or r in name
-            checkName("a/b.h@R1", type, "R2", "R2", "a", "b.h"); // arg over r
-            checkName("a/b.h", type, null, null);    // fail if none
+            checkName("a/b.h", type, "R1", "R1", false, "a", "b.h");    // arg
+            checkName("a/b.h@R1", type, null, "R1", false, "a", "b.h"); // or r in name
+            checkName("a/b.h@R1", type, "R2", "R2", false, "a", "b.h"); // arg over r
+            checkName("a/b.h", type, null, null, false);    // fail if none
         }
 
         // When there is default realm
@@ -97,25 +97,25 @@
         Config.refresh();
 
         type = PrincipalName.KRB_NT_UNKNOWN;
-        checkName("a", type, "R1", "R1", "a");      // arg
-        checkName("a@R1", type, null, "R1", "a");   // or r in name
-        checkName("a@R2", type, "R1", "R1", "a");   // arg over r
-        checkName("a", type, null, "R", "a");       // default
-        checkName("a/b", type, null, "R", "a", "b");
+        checkName("a", type, "R1", "R1", false, "a");      // arg
+        checkName("a@R1", type, null, "R1", false, "a");   // or r in name
+        checkName("a@R2", type, "R1", "R1", false, "a");   // arg over r
+        checkName("a", type, null, "R", true, "a");       // default
+        checkName("a/b", type, null, "R", true, "a", "b");
         type = PrincipalName.KRB_NT_SRV_HST;
-        checkName("a/b.h3", type, "R1", "R1", "a", "b.h3");     // arg
-        checkName("a/b.h@R1", type, null, "R1", "a", "b.h");    // or r in name
-        checkName("a/b.h3@R2", type, "R1", "R1", "a", "b.h3");  // arg over r
-        checkName("a/b.h2", type, "R1", "R1", "a", "b.h2");     // arg over map
-        checkName("a/b.h2@R1", type, null, "R1", "a", "b.h2");  // r over map
-        checkName("a/b.h2", type, null, "R2", "a", "b.h2");     // map
-        checkName("a/b.h", type, null, "R", "a", "b.h");        // default
+        checkName("a/b.h3", type, "R1", "R1", false, "a", "b.h3");     // arg
+        checkName("a/b.h@R1", type, null, "R1", false, "a", "b.h");    // or r in name
+        checkName("a/b.h3@R2", type, "R1", "R1", false, "a", "b.h3");  // arg over r
+        checkName("a/b.h2", type, "R1", "R1", false, "a", "b.h2");     // arg over map
+        checkName("a/b.h2@R1", type, null, "R1", false, "a", "b.h2");  // r over map
+        checkName("a/b.h2", type, null, "R2", true, "a", "b.h2");     // map
+        checkName("a/b.h", type, null, "R", true, "a", "b.h");        // default
     }
 
     // Check if the creation matches the expected output.
     // Note: realm == null means creation failure
     static void checkName(String n, int t, String s,
-            String realm, String... parts)
+            String realm, boolean deduced, String... parts)
             throws Exception {
         PrincipalName pn = null;
         try {
@@ -132,5 +132,8 @@
             throw new Exception(pn.toString() + " vs "
                     + Arrays.toString(parts) + "@" + realm);
         }
+        if (deduced != pn.isRealmDeduced()) {
+            throw new Exception("pn.realmDeduced is " + pn.isRealmDeduced());
+        }
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/pkcs11/Provider/LoginISE.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+import java.util.*;
+import java.security.*;
+import javax.security.auth.callback.*;
+
+/**
+ * @test
+ * @bug 8130648
+ * @summary make sure IllegalStateException is thrown for uninitialized
+ * SunPKCS11 provider instance
+ */
+public class LoginISE {
+
+    public static void main(String[] args) throws Exception {
+
+        Provider p = Security.getProvider("SunPKCS11");
+        if (p == null) {
+            System.out.println("No un-initialized PKCS11 provider available; skip");
+            return;
+        }
+        if (!(p instanceof AuthProvider)) {
+            throw new RuntimeException("Error: expect AuthProvider!");
+        }
+        AuthProvider ap = (AuthProvider) p;
+        if (ap.isConfigured()) {
+            throw new RuntimeException("Fail: isConfigured() should return false");
+        }
+        try {
+            ap.login(null, null);
+            throw new RuntimeException("Fail: expected ISE not thrown!");
+        } catch (IllegalStateException ise) {
+            System.out.println("Expected ISE thrown for login call");
+        }
+        try {
+            ap.logout();
+            throw new RuntimeException("Fail: expected ISE not thrown!");
+        } catch (IllegalStateException ise) {
+            System.out.println("Expected ISE thrown for logout call");
+        }
+        try {
+            ap.setCallbackHandler(new PasswordCallbackHandler());
+            throw new RuntimeException("Fail: expected ISE not thrown!");
+        } catch (IllegalStateException ise) {
+            System.out.println("Expected ISE thrown for logout call");
+        }
+
+        System.out.println("Test Passed");
+    }
+
+    public static class PasswordCallbackHandler implements CallbackHandler {
+        public void handle(Callback[] callbacks)
+                throws IOException, UnsupportedCallbackException {
+        }
+    }
+}
--- a/jdk/test/sun/security/provider/PolicyFile/CombinedPerms.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/sun/security/provider/PolicyFile/CombinedPerms.java	Tue Oct 27 01:45:03 2015 -0400
@@ -39,7 +39,7 @@
 
         String host = "localhost";
 
-        URL u = new URL("file:/home/duke");
+        URL u = new URL("file:/tmp/duke");
         CodeSource cs =
             new CodeSource(u, (java.security.cert.Certificate[]) null);
         Permissions p = new Permissions();
--- a/jdk/test/sun/security/provider/PolicyFile/CombinedPerms.policy	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/sun/security/provider/PolicyFile/CombinedPerms.policy	Tue Oct 27 01:45:03 2015 -0400
@@ -1,3 +1,3 @@
-grant codebase "file:/home/duke" {
+grant codebase "file:/tmp/duke" {
     permission java.net.SocketPermission "localhost", "accept";
 };
--- a/jdk/test/sun/security/ssl/DHKeyExchange/DHEKeySizing.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/sun/security/ssl/DHKeyExchange/DHEKeySizing.java	Tue Oct 27 01:45:03 2015 -0400
@@ -31,34 +31,34 @@
  * @bug 6956398
  * @summary make ephemeral DH key match the length of the certificate key
  * @run main/othervm
- *      DHEKeySizing SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA true 1318 75
+ *      DHEKeySizing SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA true 1255 75
  * @run main/othervm -Djdk.tls.ephemeralDHKeySize=matched
- *      DHEKeySizing SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA true 1318 75
+ *      DHEKeySizing SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA true 1255 75
  * @run main/othervm -Djdk.tls.ephemeralDHKeySize=legacy
- *      DHEKeySizing SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA true 1318 75
+ *      DHEKeySizing SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA true 1255 75
  * @run main/othervm -Djdk.tls.ephemeralDHKeySize=1024
- *      DHEKeySizing SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA true 1318 75
+ *      DHEKeySizing SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA true 1255 75
  *
  * @run main/othervm
- *      DHEKeySizing SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA true 292 75
+ *      DHEKeySizing SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA true 229 75
  *
  * @run main/othervm
- *      DHEKeySizing TLS_DHE_RSA_WITH_AES_128_CBC_SHA  false 1510 139
+ *      DHEKeySizing TLS_DHE_RSA_WITH_AES_128_CBC_SHA  false 1383 139
  * @run main/othervm -Djdk.tls.ephemeralDHKeySize=legacy
- *      DHEKeySizing TLS_DHE_RSA_WITH_AES_128_CBC_SHA  false 1414 107
+ *      DHEKeySizing TLS_DHE_RSA_WITH_AES_128_CBC_SHA  false 1319 107
  * @run main/othervm -Djdk.tls.ephemeralDHKeySize=matched
- *      DHEKeySizing TLS_DHE_RSA_WITH_AES_128_CBC_SHA  false 1894 267
+ *      DHEKeySizing TLS_DHE_RSA_WITH_AES_128_CBC_SHA  false 1639 267
  * @run main/othervm -Djdk.tls.ephemeralDHKeySize=1024
- *      DHEKeySizing TLS_DHE_RSA_WITH_AES_128_CBC_SHA  false 1510 139
+ *      DHEKeySizing TLS_DHE_RSA_WITH_AES_128_CBC_SHA  false 1383 139
  *
  * @run main/othervm
- *      DHEKeySizing SSL_DH_anon_WITH_RC4_128_MD5  false 484 139
+ *      DHEKeySizing SSL_DH_anon_WITH_RC4_128_MD5  false 357 139
  * @run main/othervm -Djdk.tls.ephemeralDHKeySize=legacy
- *      DHEKeySizing SSL_DH_anon_WITH_RC4_128_MD5  false 388 107
+ *      DHEKeySizing SSL_DH_anon_WITH_RC4_128_MD5  false 293 107
  * @run main/othervm -Djdk.tls.ephemeralDHKeySize=matched
- *      DHEKeySizing SSL_DH_anon_WITH_RC4_128_MD5  false 484 139
+ *      DHEKeySizing SSL_DH_anon_WITH_RC4_128_MD5  false 357 139
  * @run main/othervm -Djdk.tls.ephemeralDHKeySize=1024
- *      DHEKeySizing SSL_DH_anon_WITH_RC4_128_MD5  false 484 139
+ *      DHEKeySizing SSL_DH_anon_WITH_RC4_128_MD5  false 357 139
  */
 
 /*
@@ -90,10 +90,10 @@
  * Here is a summary of the record length in the test case.
  *
  *            |  ServerHello Series  |  ClientKeyExchange | ServerHello Anon
- *   512-bit  |          1318 bytes  |           75 bytes |        292 bytes
- *   768-bit  |          1414 bytes  |          107 bytes |        388 bytes
- *  1024-bit  |          1510 bytes  |          139 bytes |        484 bytes
- *  2048-bit  |          1894 bytes  |          267 bytes |        484 bytes
+ *   512-bit  |          1255 bytes  |           75 bytes |        229 bytes
+ *   768-bit  |          1319 bytes  |          107 bytes |        293 bytes
+ *  1024-bit  |          1383 bytes  |          139 bytes |        357 bytes
+ *  2048-bit  |          1639 bytes  |          267 bytes |        357 bytes
  */
 
 import javax.net.ssl.*;
--- a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java	Tue Oct 27 01:45:03 2015 -0400
@@ -40,7 +40,6 @@
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 
-import sun.misc.IOUtils;
 import sun.security.pkcs.ContentInfo;
 import sun.security.pkcs.PKCS7;
 import sun.security.pkcs.PKCS9Attribute;
@@ -343,7 +342,7 @@
         try (JarFile jf = new JarFile(file)) {
             JarEntry je = jf.getJarEntry("META-INF/OLD.RSA");
             try (InputStream is = jf.getInputStream(je)) {
-                byte[] content = IOUtils.readFully(is, -1, true);
+                byte[] content = is.readAllBytes();
                 PKCS7 p7 = new PKCS7(content);
                 SignerInfo[] si = p7.getSignerInfos();
                 if (si == null || si.length == 0) {
--- a/jdk/test/sun/security/util/DerValue/BadValue.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/jdk/test/sun/security/util/DerValue/BadValue.java	Tue Oct 27 01:45:03 2015 -0400
@@ -25,13 +25,11 @@
  * @test
  * @bug 6864911
  * @summary ASN.1/DER input stream parser needs more work
- * @modules java.base/sun.misc
- *          java.base/sun.security.util
+ * @modules java.base/sun.security.util
  */
 
 import java.io.*;
 import sun.security.util.*;
-import sun.misc.IOUtils;
 
 public class BadValue {
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/util/resources/TimeZone/Bug8139107.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8139107
+ * @summary Test that date parsing with DateTimeFormatter pattern
+ *   that contains timezone field doesn't trigger NPE. All supported
+ *   locales are tested.
+ * @run testng/othervm -Djava.locale.providers=JRE,SPI Bug8139107
+ */
+import java.time.format.DateTimeFormatter;
+import java.util.Locale;
+import org.testng.annotations.Test;
+
+public class Bug8139107 {
+
+    @Test
+    public void testSupportedLocales() {
+        for (Locale loc:Locale.getAvailableLocales()) {
+            testLocale(loc);
+        }
+    }
+
+    //Test one locale
+    void testLocale(Locale tl) {
+        System.out.println("Locale:" + tl);
+        DateTimeFormatter inputDateTimeFormat = DateTimeFormatter
+                .ofPattern(pattern)
+                .withLocale(tl);
+        System.out.println("Parse result: " + inputDateTimeFormat.parse(inputDate));
+    }
+
+    // Input date time string with short time zone name
+    static final String inputDate = "06-10-2015 18:58:04 MSK";
+    // Pattern with time zone field
+    static final String pattern = "dd-MM-yyyy HH:mm:ss z";
+}
+
--- a/langtools/.hgtags	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/.hgtags	Tue Oct 27 01:45:03 2015 -0400
@@ -327,3 +327,6 @@
 d68904d5a00e7e6c714e11f7ec9d0689af959d79 jdk9-b82
 6b3b94a2ebca4a99b2effefb2a1556cee954fd2f jdk9-b83
 e3445ccab58f741801021dec9aa46e7f2c09efd9 jdk9-b84
+7ef2c66892a3af15540c2800104c660c4f7f45e9 jdk9-b85
+130a7c2a85900dde04e119bc36853b73146e3414 jdk9-b86
+45f796d8cdcd8dbde5d4d660c3e749a14c923e6d jdk9-b87
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java	Tue Oct 27 01:45:03 2015 -0400
@@ -142,6 +142,10 @@
         return false;
     }
 
+    public boolean isIntegral() {
+        return false;
+    }
+
     public boolean isPrimitive() {
         return false;
     }
@@ -697,6 +701,20 @@
         }
 
         @Override
+        public boolean isIntegral() {
+            switch (tag) {
+                case CHAR:
+                case BYTE:
+                case SHORT:
+                case INT:
+                case LONG:
+                    return true;
+                default:
+                    return false;
+            }
+        }
+
+        @Override
         public boolean isPrimitive() {
             return true;
         }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Tue Oct 27 01:45:03 2015 -0400
@@ -3733,17 +3733,17 @@
                                          " in tree " + tree);
             }
 
-            // Test (1): emit a `deprecation' warning if symbol is deprecated.
-            // (for constructors, the error was given when the constructor was
-            // resolved)
-
-            if (sym.name != names.init) {
+            // Emit a `deprecation' warning if symbol is deprecated.
+            // (for constructors (but not for constructor references), the error
+            // was given when the constructor was resolved)
+
+            if (sym.name != names.init || tree.hasTag(REFERENCE)) {
                 chk.checkDeprecated(tree.pos(), env.info.scope.owner, sym);
                 chk.checkSunAPI(tree.pos(), sym);
                 chk.checkProfile(tree.pos(), sym);
             }
 
-            // Test (3): if symbol is a variable, check that its type and
+            // If symbol is a variable, check that its type and
             // kind are compatible with the prototype and protokind.
             return check(tree, owntype, sym.kind.toSelector(), resultInfo);
         }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Tue Oct 27 01:45:03 2015 -0400
@@ -409,6 +409,9 @@
  * Class name generation
  **************************************************************************/
 
+
+    private Map<Pair<Name, Name>, Integer> localClassNameIndexes = new HashMap<>();
+
     /** Return name of local class.
      *  This is of the form   {@code <enclClass> $ n <classname> }
      *  where
@@ -416,17 +419,28 @@
      *    classname is the simple name of the local class
      */
     Name localClassName(ClassSymbol c) {
-        for (int i=1; ; i++) {
-            Name flatname = names.
-                fromString("" + c.owner.enclClass().flatname +
-                           syntheticNameChar + i +
-                           c.name);
-            if (compiled.get(flatname) == null) return flatname;
+        Name enclFlatname = c.owner.enclClass().flatname;
+        String enclFlatnameStr = enclFlatname.toString();
+        Pair<Name, Name> key = new Pair<>(enclFlatname, c.name);
+        Integer index = localClassNameIndexes.get(key);
+        for (int i = (index == null) ? 1 : index; ; i++) {
+            Name flatname = names.fromString(enclFlatnameStr
+                    + syntheticNameChar + i + c.name);
+            if (compiled.get(flatname) == null) {
+                localClassNameIndexes.put(key, i + 1);
+                return flatname;
+            }
         }
     }
 
+    void clearLocalClassNameIndexes(ClassSymbol c) {
+        localClassNameIndexes.remove(new Pair<>(
+                c.owner.enclClass().flatname, c.name));
+    }
+
     public void newRound() {
         compiled.clear();
+        localClassNameIndexes.clear();
     }
 
 /* *************************************************************************
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java	Tue Oct 27 01:45:03 2015 -0400
@@ -472,6 +472,7 @@
                 if (csym == null) return;
                 typeEnvs.remove(csym);
                 chk.compiled.remove(csym.flatname);
+                chk.clearLocalClassNameIndexes(csym);
                 syms.classes.remove(csym.flatname);
                 super.visitClassDef(tree);
             }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java	Tue Oct 27 01:45:03 2015 -0400
@@ -404,13 +404,20 @@
      */
     class UnaryNumericOperator extends UnaryOperatorHelper {
 
+        Predicate<Type> numericTest;
+
         UnaryNumericOperator(Tag tag) {
+            this(tag, Type::isNumeric);
+        }
+
+        UnaryNumericOperator(Tag tag, Predicate<Type> numericTest) {
             super(tag);
+            this.numericTest = numericTest;
         }
 
         @Override
         public boolean test(Type type) {
-            return unaryPromotion(type).isNumeric();
+            return numericTest.test(unaryPromotion(type));
         }
 
         @Override
@@ -462,8 +469,15 @@
      */
     class BinaryNumericOperator extends BinaryOperatorHelper {
 
+        Predicate<Type> numericTest;
+
         BinaryNumericOperator(Tag tag) {
+            this(tag, Type::isNumeric);
+        }
+
+        BinaryNumericOperator(Tag tag, Predicate<Type> numericTest) {
             super(tag);
+            this.numericTest = numericTest;
         }
 
         @Override
@@ -474,7 +488,8 @@
 
         @Override
         public boolean test(Type arg1, Type arg2) {
-            return unaryPromotion(arg1).isNumeric() && unaryPromotion(arg2).isNumeric();
+            return numericTest.test(unaryPromotion(arg1)) &&
+                    numericTest.test(unaryPromotion(arg2));
         }
     }
 
@@ -518,20 +533,22 @@
 
         @Override
         public boolean test(Type arg1, Type arg2) {
-            return types.isSameType(arg1, syms.stringType) ||
+            boolean hasStringOp = types.isSameType(arg1, syms.stringType) ||
                     types.isSameType(arg2, syms.stringType);
+            boolean hasVoidOp = arg1.hasTag(TypeTag.VOID) || arg2.hasTag(TypeTag.VOID);
+            return hasStringOp && !hasVoidOp;
         }
 
         /**
          * This routine applies following mappings:
          * - if input type is primitive, apply numeric promotion
-         * - if input type is either 'null' or 'String' leave it untouched
+         * - if input type is either 'void', 'null' or 'String' leave it untouched
          * - otherwise return 'Object'
          */
         private Type stringPromotion(Type t) {
             if (t.isPrimitive()) {
                 return unaryPromotion(t);
-            } else if (t.hasTag(TypeTag.BOT) ||
+            } else if (t.hasTag(TypeTag.VOID) || t.hasTag(TypeTag.BOT) ||
                     types.isSameType(t, syms.stringType)) {
                 return t;
             } else if (t.hasTag(TypeTag.TYPEVAR)) {
@@ -640,7 +657,7 @@
                         .addUnaryOperator(FLOAT, FLOAT, fneg)
                         .addUnaryOperator(LONG, LONG, lneg)
                         .addUnaryOperator(INT, INT, ineg),
-                new UnaryNumericOperator(Tag.COMPL)
+                new UnaryNumericOperator(Tag.COMPL, Type::isIntegral)
                         .addUnaryOperator(LONG, LONG, lxor)
                         .addUnaryOperator(INT, INT, ixor),
                 new UnaryPrefixPostfixOperator(Tag.POSTINC)
@@ -713,17 +730,17 @@
                     .addBinaryOperator(INT, INT, INT, imod),
             new BinaryBooleanOperator(Tag.BITAND)
                     .addBinaryOperator(BOOLEAN, BOOLEAN, BOOLEAN, iand),
-            new BinaryNumericOperator(Tag.BITAND)
+            new BinaryNumericOperator(Tag.BITAND, Type::isIntegral)
                     .addBinaryOperator(LONG, LONG, LONG, land)
                     .addBinaryOperator(INT, INT, INT, iand),
             new BinaryBooleanOperator(Tag.BITOR)
                     .addBinaryOperator(BOOLEAN, BOOLEAN, BOOLEAN, ior),
-            new BinaryNumericOperator(Tag.BITOR)
+            new BinaryNumericOperator(Tag.BITOR, Type::isIntegral)
                     .addBinaryOperator(LONG, LONG, LONG, lor)
                     .addBinaryOperator(INT, INT, INT, ior),
             new BinaryBooleanOperator(Tag.BITXOR)
                     .addBinaryOperator(BOOLEAN, BOOLEAN, BOOLEAN, ixor),
-            new BinaryNumericOperator(Tag.BITXOR)
+            new BinaryNumericOperator(Tag.BITXOR, Type::isIntegral)
                     .addBinaryOperator(LONG, LONG, LONG, lxor)
                     .addBinaryOperator(INT, INT, INT, ixor),
             new BinaryShiftOperator(Tag.SL)
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Tue Oct 27 01:45:03 2015 -0400
@@ -290,6 +290,13 @@
     }
 
     public boolean isAccessible(Env<AttrContext> env, TypeSymbol c, boolean checkInner) {
+
+        /* 15.9.5.1: Note that it is possible for the signature of the anonymous constructor
+           to refer to an inaccessible type
+        */
+        if (env.enclMethod != null && (env.enclMethod.mods.flags & ANONCONSTR) != 0)
+            return true;
+
         boolean isAccessible = false;
         switch ((short)(c.flags() & AccessFlags)) {
             case PRIVATE:
@@ -301,13 +308,7 @@
                 isAccessible =
                     env.toplevel.packge == c.owner // fast special case
                     ||
-                    env.toplevel.packge == c.packge()
-                    ||
-                    // Hack: this case is added since synthesized default constructors
-                    // of anonymous classes should be allowed to access
-                    // classes which would be inaccessible otherwise.
-                    env.enclMethod != null &&
-                    (env.enclMethod.mods.flags & ANONCONSTR) != 0;
+                    env.toplevel.packge == c.packge();
                 break;
             default: // error recovery
             case PUBLIC:
@@ -361,6 +362,13 @@
     }
     public boolean isAccessible(Env<AttrContext> env, Type site, Symbol sym, boolean checkInner) {
         if (sym.name == names.init && sym.owner != site.tsym) return false;
+
+        /* 15.9.5.1: Note that it is possible for the signature of the anonymous constructor
+           to refer to an inaccessible type
+        */
+        if (env.enclMethod != null && (env.enclMethod.mods.flags & ANONCONSTR) != 0)
+            return true;
+
         switch ((short)(sym.flags() & AccessFlags)) {
         case PRIVATE:
             return
@@ -2426,7 +2434,9 @@
                 return spMethod;
             }
         };
-        polymorphicSignatureScope.enter(msym);
+        if (!mtype.isErroneous()) { // Cache only if kosher.
+            polymorphicSignatureScope.enter(msym);
+        }
         return msym;
     }
 
@@ -3205,8 +3215,7 @@
                 findDiamond(env, site, argtypes, typeargtypes, phase.isBoxingRequired(), phase.isVarargsRequired()) :
                 findMethod(env, site, name, argtypes, typeargtypes,
                         phase.isBoxingRequired(), phase.isVarargsRequired());
-            return site.getEnclosingType().hasTag(CLASS) && !hasEnclosingInstance(env, site) ?
-                        new BadConstructorReferenceError(sym) : sym;
+            return enclosingInstanceMissing(env, site) ? new BadConstructorReferenceError(sym) : sym;
         }
 
         @Override
@@ -3339,9 +3348,12 @@
         }
     }
 
-    boolean hasEnclosingInstance(Env<AttrContext> env, Type type) {
-        Symbol encl = resolveSelfContainingInternal(env, type.tsym, false);
-        return encl != null && !encl.kind.isResolutionError();
+    boolean enclosingInstanceMissing(Env<AttrContext> env, Type type) {
+        if (type.hasTag(CLASS) && type.getEnclosingType().hasTag(CLASS)) {
+            Symbol encl = resolveSelfContainingInternal(env, type.tsym, false);
+            return encl == null || encl.kind.isResolutionError();
+        }
+        return false;
     }
 
     private Symbol resolveSelfContainingInternal(Env<AttrContext> env,
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/8138840/T8138840.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,12 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8138840 8139243 8139249
+ * @summary Compiler crashes when compiling bitwise operations with illegal operand types
+ * @compile/fail/ref=T8138840.out -XDrawDiagnostics T8138840.java
+ */
+
+class T8138840 {
+    void test(int x, double d) {
+        Object o = x & d;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/8138840/T8138840.out	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,2 @@
+T8138840.java:10:22: compiler.err.operator.cant.be.applied.1: &, int, double
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/8138840/T8139243.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,16 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8138840 8139243 8139249
+ * @summary Compiler crashes when compiling bitwise operations with illegal operand types
+ *          'void' is erroneously accepted as a possible operand for string concatenation
+ * @compile/fail/ref=T8139243.out -XDrawDiagnostics T8139243.java
+ */
+
+class T8139243 {
+
+    void test(String s) {
+        s += m(); // compile time error
+    }
+
+    void m() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/8138840/T8139243.out	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,2 @@
+T8139243.java:12:11: compiler.err.operator.cant.be.applied.1: +, java.lang.String, void
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/8138840/T8139249.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,13 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8138840 8139243 8139249
+ * @summary Compiler crashes when compiling bitwise operations with illegal operand types
+*           Unary operator erroneously applied to non-integral type operand
+ * @compile/fail/ref=T8139249.out -XDrawDiagnostics T8139249.java
+ */
+
+class T8139249 {
+    void test(float f2) {
+        float f1 = ~f2;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/8138840/T8139249.out	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,2 @@
+T8139249.java:11:20: compiler.err.operator.cant.be.applied: ~, float
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/AnonymousClass/CtorAccessBypassTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8075799
+ *
+ * @summary Extraneous access checks implemented by javac
+ * @compile CtorAccessBypassTest.java
+ * @run main CtorAccessBypassTest
+ *
+ */
+
+public class CtorAccessBypassTest {
+    public static void main(String[] args) {
+        new CtorAccessBypassTest_01<Object>(null) {};
+        new CtorAccessBypassTest_01<>(null) {};
+    }
+}
+
+class CtorAccessBypassTest_01<T> {
+    private class Private {}
+      CtorAccessBypassTest_01(Private p) {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8000316/T8000316.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8000316
+ * @summary Huge performance bottleneck in com.sun.tools.javac.comp.Check.localClassName
+ * @modules jdk.compiler
+ * @run main T8000316
+ */
+
+import com.sun.source.util.JavacTask;
+import java.net.URI;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Locale;
+import javax.tools.Diagnostic;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+public class T8000316 {
+
+    final static int N_METHODS = 1024;
+    final static int N_CLASSES = 8;
+
+    static class TestClass extends SimpleJavaFileObject {
+
+        String methTemplate = "    public static Runnable get#N() {\n" +
+                              "        return new Runnable() {\n" +
+                              "            @Override\n" +
+                              "            public void run() {\n" +
+                              "                return;\n" +
+                              "            }\n" +
+                              "        };\n" +
+                              "    }\n";
+
+        String classTemplate = "\n\nclass Chain#N {\n\n#M }";
+
+        String source;
+
+        public TestClass() {
+            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
+            StringBuilder buf = new StringBuilder();
+            StringBuilder fileBuf = new StringBuilder();
+
+            for (int i = 0 ; i < N_CLASSES ; i++) {
+                for (int j = 0; j < N_METHODS; j++) {
+                    buf.append(methTemplate.replace("#N", String.valueOf(j)));
+                    buf.append("\n");
+                }
+                fileBuf.append(classTemplate.replace("#M", buf.toString()).replace("#N", String.valueOf(i)));
+                buf = new StringBuilder();
+                source = fileBuf.toString();
+            }
+        }
+
+        @Override
+        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+            return source;
+        }
+    }
+
+    public static void main(String... args) throws Exception {
+        ArrayList<JavaFileObject> sources = new ArrayList<>();
+        sources.add(new TestClass());
+        new T8000316().run(sources);
+    }
+
+    void run(List<JavaFileObject> sources) throws Exception {
+        javax.tools.DiagnosticListener<JavaFileObject> dc = (diagnostic) -> {
+            if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
+                throw new AssertionError("unexpected diagnostic: " + diagnostic.getMessage(Locale.getDefault()));
+            }
+        };
+        JavaCompiler comp = ToolProvider.getSystemJavaCompiler();
+        try (StandardJavaFileManager fm = comp.getStandardFileManager(null, null, null)) {
+            JavacTask ct = (JavacTask)comp.getTask(null, fm, dc,
+                    null, null, sources);
+            ct.analyze();
+        }
+    }
+}
--- a/langtools/test/tools/javac/generics/diamond/neg/Neg18.out	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg18.out	Tue Oct 27 01:45:03 2015 -0400
@@ -1,3 +1,3 @@
 Neg18.java:14:21: compiler.err.prob.found.req: (compiler.misc.cant.apply.diamond.1: (compiler.misc.diamond: pkg.Neg18_01), (compiler.misc.inaccessible.varargs.type: pkg.Neg18_01.PkgPrivate, kindname.class, Neg18))
-Neg18.java:14:26: compiler.err.not.def.public.cant.access: pkg.Neg18_01.PkgPrivate, pkg.Neg18_01
+Neg18.java:14:9: compiler.err.cant.apply.symbol: kindname.constructor, , pkg.Neg18_01.PkgPrivate[], compiler.misc.no.args, kindname.class, compiler.misc.anonymous.class: <any>, (compiler.misc.inaccessible.varargs.type: pkg.Neg18_01.PkgPrivate, kindname.class, Neg18)
 2 errors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/MethodHandleInvokeTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8130506
+ * @summary javac AssertionError when invoking MethodHandle.invoke with lambda paramterer
+ * @run main MethodHandleInvokeTest
+ */
+
+import java.lang.invoke.MethodHandle;
+
+public class MethodHandleInvokeTest {
+
+    private static interface Obj2Obj {
+        Object run(Object obj) throws Throwable;
+    }
+
+    private static void m(Obj2Obj param) {
+    }
+
+    public static void main(String[] args) {
+        m((obj) -> {
+            MethodHandle mhandle = null;
+            mhandle.invoke(obj);
+            return null;
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/methodReference/MethodRefIntColonColonNewTest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,20 @@
+/**
+ * @test    /nodynamiccopyright/
+ * @bug     8139245
+ * @summary compiler crashes with exception on int:new method reference and generic method inference
+ * @compile/fail/ref=MethodRefIntColonColonNewTest.out -XDrawDiagnostics MethodRefIntColonColonNewTest.java
+ */
+
+public class MethodRefIntColonColonNewTest {
+
+    interface SAM<T> {
+        T m(T s);
+    }
+
+    static <T> SAM<T> infmethod(SAM<T> t) { return t; }
+
+    public static void main(String argv[]) {
+        SAM<Object> s = infmethod(int::new);
+        s.m();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/methodReference/MethodRefIntColonColonNewTest.out	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,3 @@
+MethodRefIntColonColonNewTest.java:17:35: compiler.err.type.found.req: int, (compiler.misc.type.req.class.array)
+MethodRefIntColonColonNewTest.java:18:10: compiler.err.cant.apply.symbol: kindname.method, m, java.lang.Object, compiler.misc.no.args, kindname.interface, MethodRefIntColonColonNewTest.SAM<T>, (compiler.misc.arg.length.mismatch)
+2 errors
--- a/langtools/test/tools/javac/proprietary/WarnClass.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/test/tools/javac/proprietary/WarnClass.java	Tue Oct 27 01:45:03 2015 -0400
@@ -3,11 +3,11 @@
  * @bug     6380059
  * @summary Emit warnings for proprietary packages in the boot class path
  * @author  Peter von der Ah\u00e9
- * @modules java.base/sun.misc
+ * @modules java.base/sun.security.x509
  * @compile WarnClass.java
  * @compile/fail/ref=WarnClass.out -XDrawDiagnostics  -Werror WarnClass.java
  * @compile/fail/ref=WarnClass.out -XDrawDiagnostics  -Werror -nowarn WarnClass.java
  * @compile/fail/ref=WarnClass.out -XDrawDiagnostics  -Werror -Xlint:none WarnClass.java
  */
 
-public class WarnClass extends sun.misc.Lock {}
+public class WarnClass extends sun.security.x509.X509CertInfo {}
--- a/langtools/test/tools/javac/proprietary/WarnClass.out	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/test/tools/javac/proprietary/WarnClass.out	Tue Oct 27 01:45:03 2015 -0400
@@ -1,4 +1,4 @@
-WarnClass.java:13:40: compiler.warn.sun.proprietary: sun.misc.Lock
+WarnClass.java:13:49: compiler.warn.sun.proprietary: sun.security.x509.X509CertInfo
 - compiler.err.warnings.and.werror
 1 error
 1 warning
--- a/langtools/test/tools/javac/warnings/6594914/T6594914b.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/test/tools/javac/warnings/6594914/T6594914b.java	Tue Oct 27 01:45:03 2015 -0400
@@ -2,29 +2,31 @@
  * @test /nodynamiccopyright/
  * @bug 6594914
  * @summary \\@SuppressWarnings("deprecation") does not not work for the type of a variable
- * @modules java.base/sun.misc
+ * @modules java.base/sun.security.x509
  * @compile/ref=T6594914b.out -XDenableSunApiLintControl -XDrawDiagnostics -Xlint:sunapi T6594914b.java
  */
 
 
 class T6747671b {
 
-    sun.misc.Lock a1; //warn
+    sun.security.x509.X509CertInfo a1; //warn
 
     @SuppressWarnings("sunapi")
-    sun.misc.Lock a2;
+    sun.security.x509.X509CertInfo a2;
 
-    <X extends sun.misc.Lock> sun.misc.Lock m1(sun.misc.Lock a)
-            throws sun.misc.CEFormatException { return null; } //warn
+    <X extends sun.security.x509.X509CertInfo>
+    sun.security.x509.X509CertInfo m1(sun.security.x509.X509CertInfo a)
+            throws sun.security.x509.CertException { return null; } //warn
 
     @SuppressWarnings("sunapi")
-    <X extends sun.misc.Lock> sun.misc.Lock m2(sun.misc.Lock a)
-            throws sun.misc.CEFormatException { return null; }
+    <X extends sun.security.x509.X509CertInfo>
+    sun.security.x509.X509CertInfo m2(sun.security.x509.X509CertInfo a)
+            throws sun.security.x509.CertException { return null; }
 
     void test() {
-        sun.misc.Lock a1; //warn
+        sun.security.x509.X509CertInfo a1; //warn
 
         @SuppressWarnings("sunapi")
-        sun.misc.Lock a2;
+        sun.security.x509.X509CertInfo a2;
     }
 }
--- a/langtools/test/tools/javac/warnings/6594914/T6594914b.out	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/test/tools/javac/warnings/6594914/T6594914b.out	Tue Oct 27 01:45:03 2015 -0400
@@ -1,7 +1,9 @@
-T6594914b.java:12:13: compiler.warn.sun.proprietary: sun.misc.Lock
-T6594914b.java:17:24: compiler.warn.sun.proprietary: sun.misc.Lock
-T6594914b.java:17:39: compiler.warn.sun.proprietary: sun.misc.Lock
-T6594914b.java:18:28: compiler.warn.sun.proprietary: sun.misc.CEFormatException
-T6594914b.java:17:56: compiler.warn.sun.proprietary: sun.misc.Lock
-T6594914b.java:25:17: compiler.warn.sun.proprietary: sun.misc.Lock
+T6594914b.java:12:22: compiler.warn.sun.proprietary: sun.security.x509.X509CertInfo
+T6594914b.java:17:33: compiler.warn.sun.proprietary: sun.security.x509.X509CertInfo
+T6594914b.java:18:22: compiler.warn.sun.proprietary: sun.security.x509.X509CertInfo
+T6594914b.java:19:37: compiler.warn.sun.proprietary: sun.security.x509.CertException
+T6594914b.java:18:56: compiler.warn.sun.proprietary: sun.security.x509.X509CertInfo
+T6594914b.java:27:26: compiler.warn.sun.proprietary: sun.security.x509.X509CertInfo
+- compiler.note.deprecated.filename: T6594914b.java
+- compiler.note.deprecated.recompile
 6 warnings
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/warnings/DeprecationSE8Test.java	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,47 @@
+/**
+ * @test  /nodynamiccopyright/
+ * @bug 8065219
+ * @summary Deprecated warning in method reference are missing in some cases.
+ * @compile/ref=DeprecationSE8Test.noLint.out -XDrawDiagnostics DeprecationSE8Test.java
+ * @compile/ref=DeprecationSE8Test.out -Xlint:deprecation,-options -source 8 -XDrawDiagnostics DeprecationSE8Test.java
+ */
+
+
+class DeprecationSE8Test {
+    @FunctionalInterface
+    interface I {
+        DeprecationSE8Test meth();
+    }
+
+    @FunctionalInterface
+    interface J {
+        int meth();
+    }
+
+    @Deprecated
+    public DeprecationSE8Test() {
+    }
+
+    @Deprecated
+    public static int foo() {
+        return 1;
+    }
+
+    // Using deprecated entities from within one's own top level class does not merit warning.
+    void notBadUsages() {
+        I i = DeprecationSE8Test::new;
+        new DeprecationSE8Test();
+        J j = DeprecationSE8Test::foo;
+        foo();
+    }
+}
+
+class DeprecationSE8_01 {
+    // Using deprecated entities from outside one's own top level class deserves warning.
+    void badUsages() {
+        DeprecationSE8Test.I i = DeprecationSE8Test::new;
+        new DeprecationSE8Test();
+        DeprecationSE8Test.foo();
+        DeprecationSE8Test.J j = DeprecationSE8Test::foo;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/warnings/DeprecationSE8Test.noLint.out	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,2 @@
+- compiler.note.deprecated.filename: DeprecationSE8Test.java
+- compiler.note.deprecated.recompile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/warnings/DeprecationSE8Test.out	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,5 @@
+DeprecationSE8Test.java:42:34: compiler.warn.has.been.deprecated: DeprecationSE8Test(), DeprecationSE8Test
+DeprecationSE8Test.java:43:9: compiler.warn.has.been.deprecated: DeprecationSE8Test(), DeprecationSE8Test
+DeprecationSE8Test.java:44:27: compiler.warn.has.been.deprecated: foo(), DeprecationSE8Test
+DeprecationSE8Test.java:45:34: compiler.warn.has.been.deprecated: foo(), DeprecationSE8Test
+4 warnings
--- a/langtools/test/tools/jdeps/APIDeps.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/test/tools/jdeps/APIDeps.java	Tue Oct 27 01:45:03 2015 -0400
@@ -25,7 +25,7 @@
  * @test
  * @bug 8015912 8029216 8048063 8050804
  * @summary Test -apionly and -jdkinternals options
- * @modules java.base/sun.misc
+ * @modules java.base/sun.security.x509
  *          java.management
  *          jdk.jdeps/com.sun.tools.classfile
  *          jdk.jdeps/com.sun.tools.jdeps
@@ -72,20 +72,20 @@
              new String[] {testDirBasename},
              new String[] {"-classpath", testDir.getPath(), "-verbose:class", "-filter:none", "-P"});
         test(new File(mDir, "Gee.class"),
-             new String[] {"g.G", "sun.misc.Lock", "com.sun.tools.classfile.ClassFile",
+             new String[] {"g.G", "sun.security.x509.X509CertInfo", "com.sun.tools.classfile.ClassFile",
                            "com.sun.management.ThreadMXBean", "com.sun.source.tree.BinaryTree"},
              new String[] {testDirBasename, "JDK internal API", "compact3", ""},
              new String[] {"-classpath", testDir.getPath(), "-verbose", "-P"});
 
         // -jdkinternals
         test(new File(mDir, "Gee.class"),
-             new String[] {"sun.misc.Lock", "com.sun.tools.classfile.ClassFile"},
+             new String[] {"sun.security.x509.X509CertInfo", "com.sun.tools.classfile.ClassFile"},
              new String[] {"JDK internal API"},
              new String[] {"-jdkinternals"});
         // -jdkinternals parses all classes on -classpath and the input arguments
         test(new File(mDir, "Gee.class"),
              new String[] {"com.sun.tools.jdeps.Main", "com.sun.tools.classfile.ClassFile",
-                           "sun.misc.Lock", "sun.misc.Unsafe"},
+                           "sun.security.x509.X509CertInfo", "sun.misc.Unsafe"},
              new String[] {"JDK internal API"},
              new String[] {"-classpath", testDir.getPath(), "-jdkinternals"});
 
--- a/langtools/test/tools/jdeps/m/Gee.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/langtools/test/tools/jdeps/m/Gee.java	Tue Oct 27 01:45:03 2015 -0400
@@ -25,7 +25,7 @@
 
 
 class Gee extends g.G {
-    public sun.misc.Lock lock;
+    public sun.security.x509.X509CertInfo cert;
     public com.sun.tools.classfile.ClassFile cf;     // @jdk.Exported(false)
     public com.sun.source.tree.BinaryTree tree;      // @jdk.Exported
     public com.sun.management.ThreadMXBean mxbean;   // @jdk.Exported on package-info
--- a/make/Init.gmk	Mon Oct 19 17:52:39 2015 +0300
+++ b/make/Init.gmk	Tue Oct 27 01:45:03 2015 -0400
@@ -287,7 +287,7 @@
 	    $(call StartGlobalTimer)
 	    $(call PrepareSmartJavac)
 	    ( cd $(TOPDIR) && \
-	        $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
+	        $(BUILD_LOG_WRAPPER) $(NICE) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
 	            -j $(JOBS) -f make/Main.gmk $(USER_MAKE_VARS) \
 	            $(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE) || \
 	        ( exitcode=$$? && $(BUILD_LOG_WRAPPER) \
--- a/nashorn/.hgtags	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/.hgtags	Tue Oct 27 01:45:03 2015 -0400
@@ -318,3 +318,6 @@
 8bab0a9d8a638affdd680c5ec783373f71c19267 jdk9-b82
 21b86b980a5f0d27f1f758a3e4818d3331387172 jdk9-b83
 214b97ba911f4d768c0214098739e32ab54c8503 jdk9-b84
+285628dac94332d95979de365630c93ab8fa9962 jdk9-b85
+e4283eeb182cbdf5004740728a404aac6afa1104 jdk9-b86
+0bf2fe0c7b3277cd247ed4f6faaf2b56d83139cf jdk9-b87
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/jsadapter-fallthrough.js	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Demonstrate how to provide a default fall-through solution for adapted Java
+// objects, forwarding all calls that are not adapted.
+
+var Date = Java.type('java.time.LocalDate')
+
+function wrapDate(d) {
+    return new JSAdapter() {
+        __call__: function() {
+            // adapted (extra) methods
+            if (arguments[0] === 'yesterday') {
+                return d.minusDays(1)
+            }
+            // fall-through: forward all other, non-adapted method calls
+            var args = [d].concat(Array.prototype.slice.call(arguments, 1)) 
+            return Function.call.apply(d[arguments[0]], args)
+        }
+    }
+}
+
+var now = wrapDate(Date.now())
+
+print(now)
+print(now.yesterday()) // adapted
+print(now.lengthOfMonth()) // fall through to original method
+print(now.atTime(23, 42)) // arguments are passed through
+
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/CallSiteDescriptor.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/CallSiteDescriptor.java	Tue Oct 27 01:45:03 2015 -0400
@@ -96,8 +96,6 @@
  * guarding linkers so they aren't tempted to directly manipulate the call sites. The constructors of built-in
  * {@link RelinkableCallSite} implementations all need a call site descriptor. Even if you create your own call site
  * descriptors consider using {@link CallSiteDescriptorFactory#tokenizeName(String)} in your implementation.
- *
- * @author Attila Szegedi
  */
 public interface CallSiteDescriptor {
     /**
@@ -157,7 +155,9 @@
     public MethodType getMethodType();
 
     /**
-     * Returns the lookup passed to the bootstrap method.
+     * Returns the lookup passed to the bootstrap method. If the lookup isn't the public lookup, the
+     * implementation must check the {@code RuntimePermission("dynalink.getLookup")} permission if a security
+     * manager is present.
      * @return the lookup passed to the bootstrap method.
      */
     public Lookup getLookup();
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/ChainedCallSite.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/ChainedCallSite.java	Tue Oct 27 01:45:03 2015 -0400
@@ -85,9 +85,9 @@
 
 import java.lang.invoke.MethodHandle;
 import java.lang.invoke.MethodHandles;
+import java.util.Arrays;
 import java.util.Iterator;
 import java.util.LinkedList;
-import java.util.concurrent.atomic.AtomicReference;
 import jdk.internal.dynalink.linker.GuardedInvocation;
 import jdk.internal.dynalink.support.AbstractRelinkableCallSite;
 import jdk.internal.dynalink.support.Lookup;
@@ -103,29 +103,23 @@
  * handle is always at the start of the chain.
  */
 public class ChainedCallSite extends AbstractRelinkableCallSite {
-    private static final MethodHandle PRUNE_CATCHES =
-            MethodHandles.insertArguments(
-                    Lookup.findOwnSpecial(
-                            MethodHandles.lookup(),
-                            "prune",
-                            MethodHandle.class,
-                            MethodHandle.class,
-                            boolean.class),
-                    2,
-                    true);
+    private static final MethodHandle PRUNE_CATCHES;
+    private static final MethodHandle PRUNE_SWITCHPOINTS;
+    static {
+        final MethodHandle PRUNE = Lookup.findOwnSpecial(MethodHandles.lookup(), "prune", MethodHandle.class,
+                MethodHandle.class, boolean.class);
+        PRUNE_CATCHES      = MethodHandles.insertArguments(PRUNE, 2, true);
+        PRUNE_SWITCHPOINTS = MethodHandles.insertArguments(PRUNE, 2, false);
+    }
 
-    private static final MethodHandle PRUNE_SWITCHPOINTS =
-            MethodHandles.insertArguments(
-                    Lookup.findOwnSpecial(
-                            MethodHandles.lookup(),
-                            "prune",
-                            MethodHandle.class,
-                            MethodHandle.class,
-                            boolean.class),
-                    2,
-                    false);
-
-    private final AtomicReference<LinkedList<GuardedInvocation>> invocations = new AtomicReference<>();
+    /**
+     * Contains the invocations currently linked into this call site's target. They are used when we are
+     * relinking to rebuild the guardWithTest chain. Valid values for this field are: {@code null} if there's
+     * no linked invocations, or an instance of {@link GuardedInvocation} if there is exactly one previous
+     * invocation, or an instance of {@code GuardedInvocation[]} if there is more than one previous
+     * invocation.
+     */
+    private Object invocations;
 
     /**
      * Creates a new chained call site.
@@ -155,10 +149,18 @@
     }
 
     private MethodHandle relinkInternal(final GuardedInvocation invocation, final MethodHandle relink, final boolean reset, final boolean removeCatches) {
-        final LinkedList<GuardedInvocation> currentInvocations = invocations.get();
-        @SuppressWarnings({ "unchecked", "rawtypes" })
-        final LinkedList<GuardedInvocation> newInvocations =
-            currentInvocations == null || reset ? new LinkedList<>() : (LinkedList)currentInvocations.clone();
+        final Object currentInvocations = invocations;
+        final LinkedList<GuardedInvocation> newInvocations;
+        if (currentInvocations == null || reset) {
+            newInvocations = new LinkedList<>();
+        } else if (currentInvocations instanceof GuardedInvocation) {
+            newInvocations = new LinkedList<>();
+            newInvocations.add((GuardedInvocation)currentInvocations);
+        } else if (currentInvocations instanceof GuardedInvocation[]) {
+            newInvocations = new LinkedList<>(Arrays.asList(((GuardedInvocation[])currentInvocations)));
+        } else {
+            throw new AssertionError();
+        }
 
         // First, prune the chain of invalidated switchpoints, we always do this
         // We also remove any catches if the remove catches flag is set
@@ -181,8 +183,8 @@
 
         // prune-and-invoke is used as the fallback for invalidated switchpoints. If a switchpoint gets invalidated, we
         // rebuild the chain and get rid of all invalidated switchpoints instead of letting them linger.
-        final MethodHandle pruneAndInvokeSwitchPoints = makePruneAndInvokeMethod(relink, getPruneSwitchpoints());
-        final MethodHandle pruneAndInvokeCatches      = makePruneAndInvokeMethod(relink, getPruneCatches());
+        final MethodHandle pruneAndInvokeSwitchPoints = makePruneAndInvokeMethod(relink, PRUNE_SWITCHPOINTS);
+        final MethodHandle pruneAndInvokeCatches      = makePruneAndInvokeMethod(relink, PRUNE_CATCHES);
 
         // Fold the new chain
         MethodHandle target = relink;
@@ -190,32 +192,21 @@
             target = inv.compose(target, pruneAndInvokeSwitchPoints, pruneAndInvokeCatches);
         }
 
-        // If nobody else updated the call site while we were rebuilding the chain, set the target to our chain. In case
-        // we lost the race for multithreaded update, just do nothing. Either the other thread installed the same thing
-        // we wanted to install, or otherwise, we'll be asked to relink again.
-        if(invocations.compareAndSet(currentInvocations, newInvocations)) {
-            setTarget(target);
+        switch (newInvocations.size()) {
+            case 0:
+                invocations = null;
+                break;
+            case 1:
+                invocations = newInvocations.getFirst();
+                break;
+            default:
+                invocations = newInvocations.toArray(new GuardedInvocation[newInvocations.size()]);
         }
+        setTarget(target);
         return target;
     }
 
     /**
-     * Get the switchpoint pruning function for a chained call site
-     * @return function that removes invalidated switchpoints tied to callsite guard chain and relinks
-     */
-    protected MethodHandle getPruneSwitchpoints() {
-        return PRUNE_SWITCHPOINTS;
-    }
-
-    /**
-     * Get the catch pruning function for a chained call site
-     * @return function that removes all catches tied to callsite guard chain and relinks
-     */
-    protected MethodHandle getPruneCatches() {
-        return PRUNE_CATCHES;
-    }
-
-    /**
      * Creates a method that rebuilds our call chain, pruning it of any invalidated switchpoints, and then invokes that
      * chain.
      * @param relink the ultimate fallback for the chain (the {@code DynamicLinker}'s relink).
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/DefaultBootstrapper.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/DefaultBootstrapper.java	Tue Oct 27 01:45:03 2015 -0400
@@ -97,8 +97,6 @@
  * and one that just uses the passed caller as the lookup scope. Using the public lookup one is advised if your language
  * runtime has no concept of interacting with Java visibility scopes, as it results in a more lightweight runtime
  * information.
- *
- * @author Attila Szegedi
  */
 public class DefaultBootstrapper {
     private static final DynamicLinker dynamicLinker = new DynamicLinkerFactory().createLinker();
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/DynamicLinker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/DynamicLinker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -147,15 +147,14 @@
  * additional parameters to the bootstrap method) to them.</li>
  *
  * </ul>
- *
- * @author Attila Szegedi
  */
-public class DynamicLinker {
+public final class DynamicLinker {
     private static final String CLASS_NAME = DynamicLinker.class.getName();
     private static final String RELINK_METHOD_NAME = "relink";
 
     private static final String INITIAL_LINK_CLASS_NAME = "java.lang.invoke.MethodHandleNatives";
     private static final String INITIAL_LINK_METHOD_NAME = "linkCallSite";
+    private static final String INVOKE_PACKAGE_PREFIX = "java.lang.invoke.";
 
     private final LinkerServices linkerServices;
     private final GuardedInvocationFilter prelinkFilter;
@@ -305,26 +304,21 @@
         final StackTraceElement[] trace = new Throwable().getStackTrace();
         for(int i = 0; i < trace.length - 1; ++i) {
             final StackTraceElement frame = trace[i];
+            // If we found any of our linking entry points on the stack...
             if(isRelinkFrame(frame) || isInitialLinkFrame(frame)) {
-                return trace[i + 1];
+                // ... then look for the first thing calling it that isn't j.l.invoke
+                for (int j = i + 1; j < trace.length; ++j) {
+                    final StackTraceElement frame2 = trace[j];
+                    if (!frame2.getClassName().startsWith(INVOKE_PACKAGE_PREFIX)) {
+                        return frame2;
+                    }
+                }
             }
         }
         return null;
     }
 
     /**
-     * Deprecated because of imprecise name.
-     *
-     * @deprecated Use {@link #getLinkedCallSiteLocation()} instead.
-     *
-     * @return see non-deprecated method
-     */
-    @Deprecated
-    public static StackTraceElement getRelinkedCallSiteLocation() {
-        return getLinkedCallSiteLocation();
-    }
-
-    /**
      * Returns {@code true} if the frame represents {@code MethodHandleNatives.linkCallSite()},
      * the frame immediately on top of the call site frame when the call site is
      * being linked for the first time.
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/DynamicLinkerFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/DynamicLinkerFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -111,14 +111,13 @@
 import jdk.internal.dynalink.support.TypeUtilities;
 
 /**
- * A factory class for creating {@link DynamicLinker}s. The most usual dynamic linker is a linker that is a composition
- * of all {@link GuardingDynamicLinker}s known and pre-created by the caller as well as any
- * {@link AutoDiscovery automatically discovered} guarding linkers and the standard fallback {@link BeansLinker} and a
- * {@link DefaultPrelinkFilter}. See {@link DynamicLinker} documentation for tips on how to use this class.
- *
- * @author Attila Szegedi
+ * A factory class for creating {@link DynamicLinker}s. The usual dynamic linker is a linker composed of all
+ * {@link GuardingDynamicLinker}s known and pre-created by the caller as well as any
+ * {@link AutoDiscovery automatically discovered} guarding linkers and the standard fallback
+ * {@link BeansLinker} and a {@link DefaultPrelinkFilter}. See {@link DynamicLinker} documentation for tips on
+ * how to use this class.
  */
-public class DynamicLinkerFactory {
+public final class DynamicLinkerFactory {
     /**
      * Default value for {@link #setUnstableRelinkThreshold(int) unstable relink threshold}.
      */
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/MonomorphicCallSite.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/MonomorphicCallSite.java	Tue Oct 27 01:45:03 2015 -0400
@@ -91,8 +91,6 @@
  * A relinkable call site that implements monomorphic inline caching strategy. After it linked a method, it will keep it
  * until either its guard evaluates to false, or its switchpoint is invalidated, at which time it will throw away the
  * previous linkage, and trigger relinking with its associated {@link DynamicLinker}.
- *
- * @author Attila Szegedi
  */
 public class MonomorphicCallSite extends AbstractRelinkableCallSite {
     /**
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/NoSuchDynamicMethodException.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/NoSuchDynamicMethodException.java	Tue Oct 27 01:45:03 2015 -0400
@@ -87,8 +87,6 @@
 
 /**
  * Thrown at the invocation if the call site can not be linked by any available {@link GuardingDynamicLinker}.
- *
- * @author Attila Szegedi
  */
 public class NoSuchDynamicMethodException extends RuntimeException {
     private static final long serialVersionUID = 1L;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/RelinkableCallSite.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/RelinkableCallSite.java	Tue Oct 27 01:45:03 2015 -0400
@@ -96,13 +96,11 @@
  * {@link ChainedCallSite} that retains a chain of already linked method handles. The reason this is defined as an
  * interface instead of a concrete, albeit abstract class is that it allows independent implementations to choose
  * between {@link MutableCallSite} and {@link VolatileCallSite} as they see fit.
- *
- * @author Attila Szegedi
  */
 public interface RelinkableCallSite {
     /**
-     * Initializes the relinkable call site by setting a relink-and-invoke method handle. The call site implementation
-     * is supposed to set this method handle as its target.
+     * Initializes the relinkable call site by setting a relink-and-invoke method handle. The call site
+     * implementation is supposed to set this method handle as its target.
      * @param relinkAndInvoke a relink-and-invoke method handle supplied by the {@link DynamicLinker}.
      */
     public void initialize(MethodHandle relinkAndInvoke);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/AbstractJavaLinker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/AbstractJavaLinker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -111,8 +111,6 @@
 /**
  * A base class for both {@link StaticClassLinker} and {@link BeanLinker}. Deals with common aspects of property
  * exposure and method calls for both static and instance facets of a class.
- *
- * @author Attila Szegedi
  */
 abstract class AbstractJavaLinker implements GuardingDynamicLinker {
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/AccessibleMembersLookup.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/AccessibleMembersLookup.java	Tue Oct 27 01:45:03 2015 -0400
@@ -98,8 +98,6 @@
  * public, or belongs to a restricted-access package. In that case, it is required to lookup a member in a publicly
  * accessible superclass or implemented interface of the class, and use it instead of the member discovered on the
  * class.
- *
- * @author Attila Szegedi
  */
 class AccessibleMembersLookup {
     private final Map<MethodSignature, Method> methods;
@@ -140,8 +138,6 @@
 
     /**
      * A helper class that represents a method signature - name and argument types.
-     *
-     * @author Attila Szegedi
      */
     static final class MethodSignature {
         private final String name;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/ApplicableOverloadedMethods.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/ApplicableOverloadedMethods.java	Tue Oct 27 01:45:03 2015 -0400
@@ -90,8 +90,6 @@
 
 /**
  * Represents overloaded methods applicable to a specific call site signature.
- *
- * @author Attila Szegedi
  */
 class ApplicableOverloadedMethods {
     private final List<SingleDynamicMethod> methods;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/BeanLinker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/BeanLinker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -102,8 +102,6 @@
 /**
  * A class that provides linking capabilities for a single POJO class. Normally not used directly, but managed by
  * {@link BeansLinker}.
- *
- * @author Attila Szegedi
  */
 class BeanLinker extends AbstractJavaLinker implements TypeBasedGuardingDynamicLinker {
     BeanLinker(final Class<?> clazz) {
@@ -316,8 +314,6 @@
     /**
      * Contains methods to adapt an item getter/setter method handle to the requested type, optionally binding it to a
      * fixed key first.
-     * @author Attila Szegedi
-     * @version $Id: $
      */
     private static class Binder {
         private final LinkerServices linkerServices;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/BeansLinker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/BeansLinker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -125,8 +125,6 @@
  * <p><strong>Variable argument invocation</strong> is handled for both methods and constructors.</p>
  * <p>Currently, only public fields and methods are supported. Any Lookup objects passed in the
  * {@link LinkRequest}s are ignored and {@link MethodHandles#publicLookup()} is used instead.</p>
- *
- * @author Attila Szegedi
  */
 public class BeansLinker implements GuardingDynamicLinker {
     private static final ClassValue<TypeBasedGuardingDynamicLinker> linkers = new ClassValue<TypeBasedGuardingDynamicLinker>() {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/CallerSensitiveDynamicMethod.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/CallerSensitiveDynamicMethod.java	Tue Oct 27 01:45:03 2015 -0400
@@ -98,8 +98,6 @@
  * caller sensitive, it doesn't cache a method handle but rather uses the passed lookup object in
  * {@link #getTarget(java.lang.invoke.MethodHandles.Lookup)} to unreflect a method handle from the reflective member on
  * every request.
- *
- * @author Attila Szegedi
  */
 class CallerSensitiveDynamicMethod extends SingleDynamicMethod {
     // Typed as "AccessibleObject" as it can be either a method or a constructor.
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/ClassLinker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/ClassLinker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -93,7 +93,6 @@
  * A linker for java.lang.Class objects. Provides a synthetic property "static" that allows access to static fields and
  * methods on the class (respecting property getter/setter conventions). Note that Class objects are not recognized by
  * the Dynalink as constructors for the instances of the class, {@link StaticClass} is used for this purpose.
- * @author Attila Szegedi
  */
 class ClassLinker extends BeanLinker {
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/ClassString.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/ClassString.java	Tue Oct 27 01:45:03 2015 -0400
@@ -92,8 +92,9 @@
 import jdk.internal.dynalink.support.TypeUtilities;
 
 /**
- *
- * @author Attila Szegedi
+ * Represents a sequence of {@link Class} objects, useful for representing method signatures. Provides value
+ * semantics for using them as map keys, as well as specificity calculations and applicability checks as per
+ * JLS.
  */
 final class ClassString {
     /**
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/DynamicMethod.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/DynamicMethod.java	Tue Oct 27 01:45:03 2015 -0400
@@ -93,8 +93,6 @@
  * overloaded methods will perform overload resolution (actually, it will perform partial overloaded resolution at link
  * time, but if that fails to identify exactly one target method, it will generate a method handle that will perform the
  * rest of the overload resolution at invocation time for actual argument types).
- *
- * @author Attila Szegedi
  */
 abstract class DynamicMethod {
     private final String name;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/FacetIntrospector.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/FacetIntrospector.java	Tue Oct 27 01:45:03 2015 -0400
@@ -97,7 +97,6 @@
 /**
  * Base for classes that expose class field and method information to an {@link AbstractJavaLinker}. There are
  * subclasses for instance (bean) and static facet of a class.
- * @author Attila Szegedi
  */
 abstract class FacetIntrospector {
     private final Class<?> clazz;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/GuardedInvocationComponent.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/GuardedInvocationComponent.java	Tue Oct 27 01:45:03 2015 -0400
@@ -91,8 +91,6 @@
  * {@link AbstractJavaLinker}. In addition to holding a guarded invocation, it holds semantic information about its
  * guard. All guards produced in the AbstractJavaLinker are either "Class.isInstance()" or "getClass() == clazz"
  * expressions. This allows choosing the most restrictive guard as the guard for the composition of two components.
- * @author Attila Szegedi
- * @version $Id: $
  */
 class GuardedInvocationComponent {
     enum ValidationType {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/MaximallySpecific.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/MaximallySpecific.java	Tue Oct 27 01:45:03 2015 -0400
@@ -94,8 +94,6 @@
 
 /**
  * Utility class that encapsulates the algorithm for choosing the maximally specific methods.
- *
- * @author Attila Szegedi
  */
 class MaximallySpecific {
     /**
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/OverloadedDynamicMethod.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/OverloadedDynamicMethod.java	Tue Oct 27 01:45:03 2015 -0400
@@ -101,8 +101,6 @@
  * Represents a group of {@link SingleDynamicMethod} objects that represents all overloads of a particular name (or all
  * constructors) for a particular class. Correctly handles overload resolution, variable arity methods, and caller
  * sensitive methods within the overloads.
- *
- * @author Attila Szegedi
  */
 class OverloadedDynamicMethod extends DynamicMethod {
     /**
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/OverloadedMethod.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/OverloadedMethod.java	Tue Oct 27 01:45:03 2015 -0400
@@ -100,8 +100,6 @@
  * a vararg subset depending on the subclass. The method is for a fixed number of arguments though (as it is generated
  * for a concrete call site). As such, all methods in the subset can be invoked with the specified number of arguments
  * (exactly matching for fixargs, or having less than or equal fixed arguments, for varargs).
- *
- * @author Attila Szegedi
  */
 class OverloadedMethod {
     private final Map<ClassString, MethodHandle> argTypesToMethods = new ConcurrentHashMap<>();
@@ -122,7 +120,7 @@
         fixArgMethods = new ArrayList<>(methodHandles.size());
         varArgMethods = new ArrayList<>(methodHandles.size());
         final int argNum = callSiteType.parameterCount();
-        for(MethodHandle mh: methodHandles) {
+        for(final MethodHandle mh: methodHandles) {
             if(mh.isVarargsCollector()) {
                 final MethodHandle asFixed = mh.asFixedArity();
                 if(argNum == asFixed.type().parameterCount()) {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/SimpleDynamicMethod.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/SimpleDynamicMethod.java	Tue Oct 27 01:45:03 2015 -0400
@@ -93,8 +93,6 @@
  * {@link #getTarget(Lookup)}. Can be used in general to represents dynamic methods bound to a single method handle,
  * even if that handle is not mapped to a Java method, i.e. as a wrapper around field getters/setters, array element
  * getters/setters, etc.
- *
- * @author Attila Szegedi
  */
 class SimpleDynamicMethod extends SingleDynamicMethod {
     private final MethodHandle target;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/SingleDynamicMethod.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/SingleDynamicMethod.java	Tue Oct 27 01:45:03 2015 -0400
@@ -97,7 +97,6 @@
  * Base class for dynamic methods that dispatch to a single target Java method or constructor. Handles adaptation of the
  * target method to a call site type (including mapping variable arity methods to a call site signature with different
  * arity).
- * @author Attila Szegedi
  */
 abstract class SingleDynamicMethod extends DynamicMethod {
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/StaticClassLinker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/beans/StaticClassLinker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -99,7 +99,6 @@
 
 /**
  * Provides a linker for the {@link StaticClass} objects.
- * @author Attila Szegedi
  */
 class StaticClassLinker implements TypeBasedGuardingDynamicLinker {
     private static final ClassValue<SingleClassStaticsLinker> linkers = new ClassValue<SingleClassStaticsLinker>() {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/ConversionComparator.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/ConversionComparator.java	Tue Oct 27 01:45:03 2015 -0400
@@ -90,15 +90,17 @@
  * of additional conversions. The static way of selecting the "most specific" method will fail more often, because there
  * will be multiple maximally specific method with unrelated signatures. In these cases, language runtimes can be asked
  * to resolve the ambiguity by expressing preferences for one conversion over the other.
- * @author Attila Szegedi
  */
 public interface ConversionComparator {
     /**
      * Enumeration of possible outcomes of comparing one conversion to another.
      */
     enum Comparison {
+        /** The conversions cannot be compared. **/
         INDETERMINATE,
+        /** The first conversion is better than the second one. **/
         TYPE_1_BETTER,
+        /** The second conversion is better than the first one. **/
         TYPE_2_BETTER,
     }
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/GuardedInvocation.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/GuardedInvocation.java	Tue Oct 27 01:45:03 2015 -0400
@@ -101,8 +101,6 @@
  * external invalidation of the invocation handle. The invocation handle is suitable for invocation if the guard
  * handle returns true for its arguments, and as long as the switch point is not invalidated. Both the guard and the
  * switch point are optional; neither, one, or both can be present.
- *
- * @author Attila Szegedi
  */
 public class GuardedInvocation {
     private final MethodHandle invocation;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/GuardingDynamicLinker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/GuardingDynamicLinker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -89,8 +89,6 @@
  * very least, it depends on the receiver belonging to the language runtime of the linker). Language runtime
  * implementors will normally implement one for their own language, and declare it in the
  * <tt>META-INF/services/jdk.internal.dynalink.linker.GuardingDynamicLinker</tt> file within their JAR file.
- *
- * @author Attila Szegedi
  */
 public interface GuardingDynamicLinker {
     /**
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/GuardingTypeConverterFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/GuardingTypeConverterFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -91,8 +91,6 @@
  * very likely want to implement {@link ConversionComparator} interface too, as your additional language-specific
  * conversions, in absence of a strategy for prioritizing these conversions, will cause more ambiguity in selecting the
  * correct overload when trying to link to an overloaded POJO method.
- *
- * @author Attila Szegedi
  */
 public interface GuardingTypeConverterFactory {
     /**
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/LinkRequest.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/LinkRequest.java	Tue Oct 27 01:45:03 2015 -0400
@@ -89,8 +89,6 @@
 /**
  * Represents a request to link a particular invocation at a particular call site. Instances of these requests are being
  * passed to {@link GuardingDynamicLinker}.
- *
- * @author Attila Szegedi
  */
 public interface LinkRequest {
     /**
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/LinkerServices.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/LinkerServices.java	Tue Oct 27 01:45:03 2015 -0400
@@ -95,8 +95,6 @@
  * Interface for services provided to {@link GuardingDynamicLinker} instances by the {@link DynamicLinker} that owns
  * them. You can think of it as the interface of the {@link DynamicLinker} that faces the {@link GuardingDynamicLinker}
  * s.
- *
- * @author Attila Szegedi
  */
 public interface LinkerServices {
     /**
@@ -130,7 +128,11 @@
      * {@link MethodHandles#filterArguments(MethodHandle, int, MethodHandle...)} with
      * {@link GuardingTypeConverterFactory}-produced type converters as filters.
      */
-    public MethodHandle asTypeLosslessReturn(MethodHandle handle, MethodType fromType);
+    public default MethodHandle asTypeLosslessReturn(final MethodHandle handle, final MethodType fromType) {
+        final Class<?> handleReturnType = handle.type().returnType();
+        return asType(handle, TypeUtilities.isConvertibleWithoutLoss(handleReturnType, fromType.returnType()) ?
+                fromType : fromType.changeReturnType(handleReturnType));
+    }
 
     /**
      * Given a source and target type, returns a method handle that converts between them. Never returns null; in worst
@@ -188,23 +190,4 @@
      * @return a method handle with parameters and/or return type potentially filtered for wrapping and unwrapping.
      */
     public MethodHandle filterInternalObjects(final MethodHandle target);
-
-    /**
-     * If we could just use Java 8 constructs, then {@code asTypeSafeReturn} would be a method with default
-     * implementation. Since we can't do that, we extract common default implementations into this static class.
-     */
-    public static class Implementation {
-        /**
-         * Default implementation for {@link LinkerServices#asTypeLosslessReturn(MethodHandle, MethodType)}.
-         * @param linkerServices the linker services that delegates to this implementation
-         * @param handle the passed handle
-         * @param fromType the passed type
-         * @return the converted method handle, as per the {@code asTypeSafeReturn} semantics.
-         */
-        public static MethodHandle asTypeLosslessReturn(final LinkerServices linkerServices, final MethodHandle handle, final MethodType fromType) {
-            final Class<?> handleReturnType = handle.type().returnType();
-            return linkerServices.asType(handle, TypeUtilities.isConvertibleWithoutLoss(handleReturnType, fromType.returnType()) ?
-                    fromType : fromType.changeReturnType(handleReturnType));
-        }
-    }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/TypeBasedGuardingDynamicLinker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/linker/TypeBasedGuardingDynamicLinker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -88,8 +88,6 @@
  * argument at linking invocation time. (The first argument is usually the receiver class). Most language-specific
  * linkers will fall into this category, as they recognize their native objects as Java objects of classes implementing
  * a specific language-native interface or superclass. The linker mechanism can optimize the dispatch for these linkers.
- *
- * @author Attila Szegedi
  */
 public interface TypeBasedGuardingDynamicLinker extends GuardingDynamicLinker {
     /**
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/AbstractCallSiteDescriptor.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/AbstractCallSiteDescriptor.java	Tue Oct 27 01:45:03 2015 -0400
@@ -91,7 +91,6 @@
 /**
  * A base class for call site descriptor implementations. Provides reconstruction of the name from the tokens, as well
  * as a generally useful {@code equals} and {@code hashCode} methods.
- * @author Attila Szegedi
  */
 public abstract class AbstractCallSiteDescriptor implements CallSiteDescriptor {
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/AbstractRelinkableCallSite.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/AbstractRelinkableCallSite.java	Tue Oct 27 01:45:03 2015 -0400
@@ -90,8 +90,6 @@
 
 /**
  * A basic implementation of the {@link RelinkableCallSite} as a {@link MutableCallSite} subclass.
- *
- * @author Attila Szegedi
  */
 public abstract class AbstractRelinkableCallSite extends MutableCallSite implements RelinkableCallSite {
     private final CallSiteDescriptor descriptor;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/BottomGuardingDynamicLinker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/BottomGuardingDynamicLinker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -91,8 +91,6 @@
 /**
  * A linker that can't link any call site. Only used internally by {@link CompositeTypeBasedGuardingDynamicLinker}. Can
  * be used by other language runtimes if they need it though.
- *
- * @author Attila Szegedi
  */
 public class BottomGuardingDynamicLinker implements TypeBasedGuardingDynamicLinker {
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/CallSiteDescriptorFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/CallSiteDescriptorFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -97,12 +97,12 @@
 import jdk.internal.dynalink.CallSiteDescriptor;
 
 /**
- * Usable as a default factory for call site descriptor implementations. It is weakly canonicalizing, meaning it will
- * return the same immutable call site descriptor for identical inputs, i.e. repeated requests for a descriptor
- * signifying public lookup for "dyn:getProp:color" of type "Object(Object)" will return the same object as long as
- * a previously created, at least softly reachable one exists. It also uses several different implementations of the
- * {@link CallSiteDescriptor} internally, and chooses the most space-efficient one based on the input.
- * @author Attila Szegedi
+ * Usable as a default factory for call site descriptor implementations. It is weakly canonicalizing, meaning
+ * it will return the same immutable call site descriptor for identical inputs, i.e. repeated requests for a
+ * descriptor signifying public lookup for {@code "dyn:getProp:color"} of type {@code Object(Object)} will
+ * return the same object as long as a previously created, at least softly reachable one exists. It also uses
+ * several different implementations of the {@link CallSiteDescriptor} internally, and chooses the most
+ * space-efficient one based on the input.
  */
 public class CallSiteDescriptorFactory {
     private static final WeakHashMap<CallSiteDescriptor, Reference<CallSiteDescriptor>> publicDescs =
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/ClassMap.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/ClassMap.java	Tue Oct 27 01:45:03 2015 -0400
@@ -96,7 +96,6 @@
  * A dual map that can either strongly or weakly reference a given class depending on whether the class is visible from
  * a class loader or not.
  *
- * @author Attila Szegedi
  * @param <T> the type of the values in the map
  */
 public abstract class ClassMap<T> {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/CompositeGuardingDynamicLinker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/CompositeGuardingDynamicLinker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -95,8 +95,6 @@
  * A {@link GuardingDynamicLinker} that delegates sequentially to a list of other guarding dynamic linkers. The first
  * value returned from a component linker other than null is returned. If no component linker returns an invocation,
  * null is returned.
- *
- * @author Attila Szegedi
  */
 public class CompositeGuardingDynamicLinker implements GuardingDynamicLinker, Serializable {
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/CompositeTypeBasedGuardingDynamicLinker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/CompositeTypeBasedGuardingDynamicLinker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -98,8 +98,6 @@
  * are queried sequentially on their {@link TypeBasedGuardingDynamicLinker#canLinkType(Class)} method. The linkers
  * returning true are then bound to the class, and next time a receiver of same type is encountered, the linking is
  * delegated to those linkers only, speeding up dispatch.
- *
- * @author Attila Szegedi
  */
 public class CompositeTypeBasedGuardingDynamicLinker implements TypeBasedGuardingDynamicLinker, Serializable {
     private static final long serialVersionUID = 1L;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/DefaultCallSiteDescriptor.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/DefaultCallSiteDescriptor.java	Tue Oct 27 01:45:03 2015 -0400
@@ -91,7 +91,6 @@
  * A default, fairly light implementation of a call site descriptor used for describing non-standard operations. It does
  * not store {@link Lookup} objects but always returns the public lookup from its {@link #getLookup()} method. If you
  * need to support non-public lookup, you can use {@link LookupCallSiteDescriptor}.
- * @author Attila Szegedi
  */
 class DefaultCallSiteDescriptor extends AbstractCallSiteDescriptor {
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/Guards.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/Guards.java	Tue Oct 27 01:45:03 2015 -0400
@@ -94,7 +94,6 @@
 /**
  * Utility methods for creating typical guards. TODO: introduce reasonable caching of created guards.
  *
- * @author Attila Szegedi
  */
 public class Guards {
     private static final Logger LOG = Logger
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/LinkRequestImpl.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/LinkRequestImpl.java	Tue Oct 27 01:45:03 2015 -0400
@@ -89,8 +89,6 @@
 /**
  * Default implementation of the {@link LinkRequest}, representing a link request to a call site that passes no language
  * runtime specific native context arguments on the stack.
- *
- * @author Attila Szegedi
  */
 public class LinkRequestImpl implements LinkRequest {
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/LinkerServicesImpl.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/LinkerServicesImpl.java	Tue Oct 27 01:45:03 2015 -0400
@@ -94,8 +94,6 @@
 
 /**
  * Default implementation of the {@link LinkerServices} interface.
- *
- * @author Attila Szegedi
  */
 public class LinkerServicesImpl implements LinkerServices {
 
@@ -132,11 +130,6 @@
     }
 
     @Override
-    public MethodHandle asTypeLosslessReturn(final MethodHandle handle, final MethodType fromType) {
-        return Implementation.asTypeLosslessReturn(this, handle, fromType);
-    }
-
-    @Override
     public MethodHandle getTypeConverter(final Class<?> sourceType, final Class<?> targetType) {
         return typeConverterFactory.getTypeConverter(sourceType, targetType);
     }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/Lookup.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/Lookup.java	Tue Oct 27 01:45:03 2015 -0400
@@ -93,8 +93,6 @@
 /**
  * A wrapper around MethodHandles.Lookup that masks checked exceptions in those cases when you're looking up methods
  * within your own codebase (therefore it is an error if they are not present).
- *
- * @author Attila Szegedi
  */
 public class Lookup {
     private final MethodHandles.Lookup lookup;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/LookupCallSiteDescriptor.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/LookupCallSiteDescriptor.java	Tue Oct 27 01:45:03 2015 -0400
@@ -89,7 +89,6 @@
 
 /**
  * A call site descriptor that stores a specific {@link Lookup}. It does not, however, store static bootstrap arguments.
- * @author Attila Szegedi
  */
 class LookupCallSiteDescriptor extends DefaultCallSiteDescriptor {
     private final Lookup lookup;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/NameCodec.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/NameCodec.java	Tue Oct 27 01:45:03 2015 -0400
@@ -99,8 +99,6 @@
  * have your own way of creating call site descriptors, but you still delegate to this method of the default factory
  * (it is recommended that you do), then you have demangling handled for you already, and only need to ensure that you
  * mangle the names when you're emitting them in the bytecode.
- *
- * @author Attila Szegedi
  */
 public class NameCodec {
     private static final char ESCAPE_CHAR = '\\';
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/RuntimeContextLinkRequestImpl.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/RuntimeContextLinkRequestImpl.java	Tue Oct 27 01:45:03 2015 -0400
@@ -89,8 +89,6 @@
 /**
  * A link request implementation for call sites that pass language runtime specific context arguments on the stack. The
  * context specific arguments should be the first "n" arguments.
- *
- * @author Attila Szegedi
  */
 public class RuntimeContextLinkRequestImpl extends LinkRequestImpl {
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/TypeConverterFactory.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/TypeConverterFactory.java	Tue Oct 27 01:45:03 2015 -0400
@@ -103,8 +103,6 @@
  * A factory for type converters. This class is the main implementation behind the
  * {@link LinkerServices#asType(MethodHandle, MethodType)}. It manages the known {@link GuardingTypeConverterFactory}
  * instances and creates appropriate converters for method handles.
- *
- * @author Attila Szegedi
  */
 public class TypeConverterFactory {
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/TypeUtilities.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/support/TypeUtilities.java	Tue Oct 27 01:45:03 2015 -0400
@@ -96,8 +96,6 @@
 
 /**
  * Various static utility methods for testing type relationships.
- *
- * @author Attila Szegedi
  */
 public class TypeUtilities {
     static final Class<Object> OBJECT_CLASS = Object.class;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeJSAdapter.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeJSAdapter.java	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,18 +52,18 @@
 import jdk.nashorn.internal.scripts.JO;
 
 /**
- * This class is the implementation of the Nashorn-specific global object named {@code JSAdapter}. It can be
- * thought of as the {@link java.lang.reflect.Proxy} equivalent for JavaScript. NativeJSAdapter calls specially named
+ * This class is the implementation of the Nashorn-specific global object named {@code JSAdapter}. It can be thought of
+ * as the {@link java.lang.reflect.Proxy} equivalent for JavaScript. A {@code NativeJSAdapter} calls specially named
  * JavaScript methods on an adaptee object when property access/update/call/new/delete is attempted on it. Example:
  *<pre>
  *    var y = {
- *                __get__    : function (name) { ... }
- *                __has__    : function (name) { ... }
- *                __put__    : function (name, value) {...}
- *                __call__   : function (name, arg1, arg2) {...}
- *                __new__    : function (arg1, arg2) {...}
- *                __delete__ : function (name) { ... }
- *                __getIds__ : function () { ... }
+ *                __get__     : function (name) { ... }
+ *                __has__     : function (name) { ... }
+ *                __put__     : function (name, value) {...}
+ *                __call__    : function (name, arg1, arg2) {...}
+ *                __new__     : function (arg1, arg2) {...}
+ *                __delete__  : function (name) { ... }
+ *                __getKeys__ : function () { ... }
  *            };
  *
  *    var x = new JSAdapter(y);
@@ -74,17 +74,21 @@
  *    i in x;                     // calls y.__has__
  *    x.p = 10;                   // calls y.__put__
  *    delete x.p;                 // calls y.__delete__
- *    for (i in x) { print(i); }  // calls y.__getIds__
+ *    for (i in x) { print(i); }  // calls y.__getKeys__
  * </pre>
  * <p>
- * JavaScript caller of adapter object is isolated from the fact that the property access/mutation/deletion are really
- * calls to JavaScript methods on adaptee.
+ * The {@code __getKeys__} and {@code __getIds__} properties are mapped to the same operation. Concrete
+ * {@code JSAdapter} implementations are expected to use only one of these. As {@code __getIds__} exists for
+ * compatibility reasons only, use of {@code __getKeys__} is recommended.
  * </p>
  * <p>
- * JSAdapter constructor can optionally receive an "overrides" object. Properties of overrides object is copied to
- * JSAdapter instance. When user accessed property is one of these, then adaptee's methods like {@code __get__},
- * {@code __put__} etc. are not called for those. This can be used to make certain "preferred" properties that can be
- * accessed in the usual/faster way avoiding proxy mechanism. Example:
+ * The JavaScript caller of an adapter object is oblivious of the property access/mutation/deletion's being adapted.
+ * </p>
+ * <p>
+ * The {@code JSAdapter} constructor can optionally receive an "overrides" object. The properties of overrides object
+ * are copied to the {@code JSAdapter} instance. In case user-accessed properties are among these, the adaptee's methods
+ * like {@code __get__}, {@code __put__} etc. are not called for them. This can be used to make certain "preferred"
+ * properties that can be accessed in the usual/faster way avoiding the proxy mechanism. Example:
  * </p>
  * <pre>
  *     var x = new JSAdapter({ foo: 444, bar: 6546 }) {
@@ -95,13 +99,13 @@
  *     x.bar = 'hello'; // "bar" directly set without __put__ call
  *     x.prop           // calls __get__("prop") as 'prop' is not overridden
  * </pre>
- * It is possible to pass a specific prototype for JSAdapter instance by passing three arguments to JSAdapter
- * constructor. So exact signature of JSAdapter constructor is as follows:
+ * It is possible to pass a specific prototype for the {@code JSAdapter} instance by passing three arguments to the
+ * {@code JSAdapter} constructor. The exact signature of the {@code JSAdapter} constructor is as follows:
  * <pre>
  *     JSAdapter([proto], [overrides], adaptee);
  * </pre>
- * Both proto and overrides are optional - but adaptee is not. When proto is not passed {@code JSAdapter.prototype} is
- * used.
+ * Both the {@code proto} and {@code overrides} arguments are optional - but {@code adaptee} is not. When {@code proto}
+ * is not passed, {@code JSAdapter.prototype} is used.
  */
 @ScriptClass("JSAdapter")
 public final class NativeJSAdapter extends ScriptObject {
@@ -113,7 +117,7 @@
     public static final String __call__      = "__call__";
     /** object new operation */
     public static final String __new__       = "__new__";
-    /** object getIds operation */
+    /** object getIds operation (provided for compatibility reasons; use of getKeys is preferred) */
     public static final String __getIds__    = "__getIds__";
     /** object getKeys operation */
     public static final String __getKeys__   = "__getKeys__";
@@ -142,7 +146,7 @@
     private final ScriptObject adaptee;
     private final boolean overrides;
 
-    private static final MethodHandle IS_JSADAPTOR = findOwnMH("isJSAdaptor", boolean.class, Object.class, Object.class, MethodHandle.class, Object.class, ScriptFunction.class);
+    private static final MethodHandle IS_JSADAPTER = findOwnMH("isJSAdapter", boolean.class, Object.class, Object.class, MethodHandle.class, Object.class, ScriptFunction.class);
 
     // initialized by nasgen
     private static PropertyMap $nasgenmap$;
@@ -626,7 +630,7 @@
                     // to name. Probably not a big deal, but if we can ever make it leaner, it'd be nice.
                     return new GuardedInvocation(MH.dropArguments(MH.constant(Object.class,
                             func.createBound(this, new Object[] { name })), 0, Object.class),
-                            testJSAdaptor(adaptee, null, null, null),
+                            testJSAdapter(adaptee, null, null, null),
                             adaptee.getProtoSwitchPoints(__call__, find.getOwner()), null);
                 }
             }
@@ -697,7 +701,7 @@
                 if (methodHandle != null) {
                     return new GuardedInvocation(
                             methodHandle,
-                            testJSAdaptor(adaptee, findData.getGetter(Object.class, INVALID_PROGRAM_POINT, null), findData.getOwner(), func),
+                            testJSAdapter(adaptee, findData.getGetter(Object.class, INVALID_PROGRAM_POINT, null), findData.getOwner(), func),
                             adaptee.getProtoSwitchPoints(hook, findData.getOwner()), null);
                 }
              }
@@ -710,16 +714,16 @@
             final MethodHandle methodHandle = hook.equals(__put__) ?
             MH.asType(Lookup.EMPTY_SETTER, type) :
             Lookup.emptyGetter(type.returnType());
-            return new GuardedInvocation(methodHandle, testJSAdaptor(adaptee, null, null, null), adaptee.getProtoSwitchPoints(hook, null), null);
+            return new GuardedInvocation(methodHandle, testJSAdapter(adaptee, null, null, null), adaptee.getProtoSwitchPoints(hook, null), null);
         }
     }
 
-    private static MethodHandle testJSAdaptor(final Object adaptee, final MethodHandle getter, final Object where, final ScriptFunction func) {
-        return MH.insertArguments(IS_JSADAPTOR, 1, adaptee, getter, where, func);
+    private static MethodHandle testJSAdapter(final Object adaptee, final MethodHandle getter, final Object where, final ScriptFunction func) {
+        return MH.insertArguments(IS_JSADAPTER, 1, adaptee, getter, where, func);
     }
 
     @SuppressWarnings("unused")
-    private static boolean isJSAdaptor(final Object self, final Object adaptee, final MethodHandle getter, final Object where, final ScriptFunction func) {
+    private static boolean isJSAdapter(final Object self, final Object adaptee, final MethodHandle getter, final Object where, final ScriptFunction func) {
         final boolean res = self instanceof NativeJSAdapter && ((NativeJSAdapter)self).getAdaptee() == adaptee;
         if (res && getter != null) {
             try {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java	Tue Oct 27 01:45:03 2015 -0400
@@ -64,9 +64,6 @@
     private static final String PROFILEFILE = Options.getStringProperty("nashorn.profilefile", "NashornProfile.txt");
 
     private static final MethodHandle INCREASE_MISS_COUNTER = MH.findStatic(MethodHandles.lookup(), LinkerCallSite.class, "increaseMissCount", MH.type(Object.class, String.class, Object.class));
-    private static final MethodHandle ON_CATCH_INVALIDATION = MH.findStatic(MethodHandles.lookup(), LinkerCallSite.class, "onCatchInvalidation", MH.type(ChainedCallSite.class, LinkerCallSite.class));
-
-    private int catchInvalidations;
 
     LinkerCallSite(final NashornCallSiteDescriptor descriptor) {
         super(descriptor);
@@ -75,34 +72,6 @@
         }
     }
 
-    @Override
-    protected MethodHandle getPruneCatches() {
-        return MH.filterArguments(super.getPruneCatches(), 0, ON_CATCH_INVALIDATION);
-    }
-
-    /**
-     * Action to perform when a catch guard around a callsite triggers. Increases
-     * catch invalidation counter
-     * @param callSite callsite
-     * @return the callsite, so this can be used as argument filter
-     */
-    @SuppressWarnings("unused")
-    private static ChainedCallSite onCatchInvalidation(final LinkerCallSite callSite) {
-        ++callSite.catchInvalidations;
-        return callSite;
-    }
-
-    /**
-     * Get the number of catch invalidations that have happened at this call site so far
-     * @param callSiteToken call site token, unique to the callsite.
-     * @return number of catch invalidations, i.e. thrown exceptions caught by the linker
-     */
-    public static int getCatchInvalidationCount(final Object callSiteToken) {
-        if (callSiteToken instanceof LinkerCallSite) {
-            return ((LinkerCallSite)callSiteToken).catchInvalidations;
-        }
-        return 0;
-    }
     /**
      * Construct a new linker call site.
      * @param name     Name of method.
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornBeansLinker.java	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornBeansLinker.java	Tue Oct 27 01:45:03 2015 -0400
@@ -211,11 +211,6 @@
         }
 
         @Override
-        public MethodHandle asTypeLosslessReturn(final MethodHandle handle, final MethodType fromType) {
-            return Implementation.asTypeLosslessReturn(this, handle, fromType);
-        }
-
-        @Override
         public MethodHandle getTypeConverter(final Class<?> sourceType, final Class<?> targetType) {
             return linkerServices.getTypeConverter(sourceType, targetType);
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/jsadapter-ids.js	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Verify that JSAdapter __getIds__ works as expected.
+ *
+ * @test
+ * @run
+ */
+
+var obj = new JSAdapter() {
+    __getIds__: function() {
+        print("__getIds__ called");
+        return [ "foo", "bar" ];
+    }
+};
+
+// calls __getIds__
+for (i in obj) {
+    print(i);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/jsadapter-ids.js.EXPECTED	Tue Oct 27 01:45:03 2015 -0400
@@ -0,0 +1,3 @@
+__getIds__ called
+foo
+bar
--- a/nashorn/test/script/basic/jsadapter.js	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/test/script/basic/jsadapter.js	Tue Oct 27 01:45:03 2015 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,8 +45,8 @@
         print("new with " + arg1 + ", " + arg2);
     },
 
-    __getIds__: function() {
-        print("__getIds__ called");
+    __getKeys__: function() {
+        print("__getKeys__ called");
         return [ "foo", "bar" ];
     },
 
@@ -78,22 +78,28 @@
 // calls __new__
 new obj("hey!", "it works!");
 
+// calls __getKeys__
 for (i in obj) {
     print(i);
 }
 
+// calls __getValues__
 for each (i in obj) {
     print(i);
 }
 
+// calls __has__
 var x = "foo" in obj;
 print(x);
 
+// calls __has__
 var y = "js" in obj;
 print(y);
 
+// calls __delete__
 print(delete obj.prop);
 
+// call __get__ and __set__
 print(obj["js"]);
 obj["js"] = "javascript";
 print(obj["javascript"]);
--- a/nashorn/test/script/basic/jsadapter.js.EXPECTED	Mon Oct 19 17:52:39 2015 +0300
+++ b/nashorn/test/script/basic/jsadapter.js.EXPECTED	Tue Oct 27 01:45:03 2015 -0400
@@ -3,7 +3,7 @@
 setter called for 'foo' with 33
 method 'func' called with hello, world
 new with hey!, it works!
-__getIds__ called
+__getKeys__ called
 foo
 bar
 __getValues__ called