Merge
authorjwilhelm
Mon, 28 Aug 2017 21:46:13 +0200
changeset 47083 4a7708303807
parent 46999 dd86717fe58b (current diff)
parent 46941 0dd027dd507d (diff)
child 47085 eb6459334399
Merge
common/autoconf/lib-elf.m4
jdk/src/java.base/share/classes/java/lang/doc-files/capchi.gif
jdk/src/java.base/share/classes/java/lang/doc-files/capiota.gif
jdk/src/java.base/share/classes/java/lang/doc-files/capsigma.gif
jdk/src/java.base/share/classes/java/lang/doc-files/captheta.gif
jdk/src/java.base/share/classes/java/lang/doc-files/capupsil.gif
jdk/src/java.base/share/classes/java/lang/doc-files/chi.gif
jdk/src/java.base/share/classes/java/lang/doc-files/iota.gif
jdk/src/java.base/share/classes/java/lang/doc-files/javalang.doc.anc21.gif
jdk/src/java.base/share/classes/java/lang/doc-files/javalang.doc.anc38.gif
jdk/src/java.base/share/classes/java/lang/doc-files/javalang.doc.anc40.gif
jdk/src/java.base/share/classes/java/lang/doc-files/javalang.doc.anc41.gif
jdk/src/java.base/share/classes/java/lang/doc-files/sigma1.gif
jdk/src/java.base/share/classes/java/lang/doc-files/theta.gif
jdk/src/java.base/share/classes/java/lang/doc-files/upsilon.gif
jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/PolicyFile.java
jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java
jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java
jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisPrincipal.java
jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/X500Principal.java
jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisLoginModule.java
jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisSystem.java
jdk/src/jdk.security.auth/solaris/native/libjaas/Solaris.c
jdk/test/java/security/Provider/TestSecurityProvider.java
jdk/test/java/security/Provider/TestSecurityProviderClient.java
jdk/test/java/security/modules/ModularTest.java
jdk/test/javax/security/auth/login/modules/TEST.properties
--- a/.hgtags	Mon Aug 28 16:40:01 2017 +0000
+++ b/.hgtags	Mon Aug 28 21:46:13 2017 +0200
@@ -444,3 +444,4 @@
 7db699468b4f84abbcc01647e5a964409737411a jdk-10+17
 3739654290616e533fc6f51bf9ad69ed47a6abba jdk-10+18
 14df107500cc3b8ab238c3e4ad2c74e12bfe6067 jdk-10+19
+4586bc5d28d13d3147b993e6237eaf29a7073bbb jdk-10+20
--- a/.hgtags-top-repo	Mon Aug 28 16:40:01 2017 +0000
+++ b/.hgtags-top-repo	Mon Aug 28 21:46:13 2017 +0200
@@ -444,3 +444,4 @@
 b803e6cff41e72a1e6d8782e1ef7c25a6e3e5ee3 jdk-10+19
 d2982a786f53814367698e63efe6349c9128e1db jdk-9+180
 b656dea9398ef601f7fc08d1a5157a560e0ccbe0 jdk-9+181
+682e2a6df836f4731f92eb2ddcd467075047f6ea jdk-10+20
--- a/common/autoconf/configure.ac	Mon Aug 28 16:40:01 2017 +0000
+++ b/common/autoconf/configure.ac	Mon Aug 28 21:46:13 2017 +0200
@@ -187,6 +187,9 @@
 # Setup the JTReg Regression Test Harness.
 TOOLCHAIN_SETUP_JTREG
 
+# Setup Jib dependency tool
+TOOLCHAIN_SETUP_JIB
+
 FLAGS_SETUP_INIT_FLAGS
 
 # Now we can test some aspects on the target using configure macros.
@@ -220,7 +223,7 @@
 LIB_DETERMINE_DEPENDENCIES
 LIB_SETUP_LIBRARIES
 
-# Hotspot setup depends on lib checks (AOT needs libelf).
+# Hotspot setup depends on lib checks.
 
 HOTSPOT_SETUP_JVM_FEATURES
 
--- a/common/autoconf/flags.m4	Mon Aug 28 16:40:01 2017 +0000
+++ b/common/autoconf/flags.m4	Mon Aug 28 21:46:13 2017 +0200
@@ -760,6 +760,19 @@
 [
 
   FLAGS_SETUP_ABI_PROFILE
+
+  # Optional POSIX functionality needed by the JVM
+  #
+  # Check if clock_gettime is available and in which library. This indicates
+  # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
+  # don't let it update LIBS.
+  save_LIBS="$LIBS"
+  AC_SEARCH_LIBS(clock_gettime, rt, [HAS_CLOCK_GETTIME=true], [])
+  if test "x$LIBS" = "x-lrt "; then
+    CLOCK_GETTIME_IN_LIBRT=true
+  fi
+  LIBS="$save_LIBS"
+
   FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER([TARGET])
   FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER([BUILD], [OPENJDK_BUILD_])
 
@@ -897,7 +910,7 @@
     $2CFLAGS_JDK="[$]$2CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
     $2CXXFLAGS_JDK="[$]$2CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
-    $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
+    $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_REENTRANT"
     $2CFLAGS_JDK="[$]$2CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
     $2CXXFLAGS_JDK="[$]$2CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
@@ -962,6 +975,11 @@
     fi
   fi
 
+  # Always enable optional macros for VM.
+  $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D__STDC_FORMAT_MACROS"
+  $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D__STDC_LIMIT_MACROS"
+  $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
+
   # Setup target OS define. Use OS target name but in upper case.
   OPENJDK_$1_OS_UPPERCASE=`$ECHO $OPENJDK_$1_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
   $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D$OPENJDK_$1_OS_UPPERCASE"
@@ -981,6 +999,16 @@
     $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -DDEBUG"
   fi
 
+  # Optional POSIX functionality needed by the VM
+
+  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
+    $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
+    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
+      $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DNEEDS_LIBRT"
+    fi
+  fi
+
+
   # Set some additional per-OS defines.
   if test "x$OPENJDK_$1_OS" = xlinux; then
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DLINUX"
@@ -989,7 +1017,7 @@
   elif test "x$OPENJDK_$1_OS" = xsolaris; then
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DSOLARIS"
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -template=no%extdef -features=no%split_init \
-        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
+        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
   elif test "x$OPENJDK_$1_OS" = xmacosx; then
     $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_ALLBSD_SOURCE"
--- a/common/autoconf/generated-configure.sh	Mon Aug 28 16:40:01 2017 +0000
+++ b/common/autoconf/generated-configure.sh	Mon Aug 28 21:46:13 2017 +0200
@@ -663,8 +663,6 @@
 JVM_FEATURES_client
 JVM_FEATURES_server
 INCLUDE_GRAAL
-ELF_LIBS
-ELF_CFLAGS
 STLPORT_LIB
 LIBZIP_CAN_USE_MMAP
 LIBDL
@@ -790,6 +788,7 @@
 COMPILER_BINDCMD_FILE_FLAG
 COMPILER_COMMAND_FILE_FLAG
 COMPILER_TARGET_BITS_FLAG
+JIB_JAR
 JT_HOME
 JTREGEXE
 HOTSPOT_TOOLCHAIN_TYPE
@@ -1182,6 +1181,7 @@
 with_toolchain_version
 with_build_devkit
 with_jtreg
+with_jib
 with_abi_profile
 with_macosx_version_max
 enable_warnings_as_errors
@@ -1219,9 +1219,6 @@
 with_dxsdk
 with_dxsdk_lib
 with_dxsdk_include
-with_libelf
-with_libelf_include
-with_libelf_lib
 with_jvm_features
 with_jvm_interpreter
 enable_jtreg_failure_handler
@@ -1351,8 +1348,6 @@
 PNG_LIBS
 LCMS_CFLAGS
 LCMS_LIBS
-ELF_CFLAGS
-ELF_LIBS
 ICECC_CMD
 ICECC_CREATE_ENV
 ICECC_WRAPPER
@@ -2130,6 +2125,7 @@
                           dependent]
   --with-build-devkit     Devkit to use for the build platform toolchain
   --with-jtreg            Regression Test Harness [probed]
+  --with-jib              Jib dependency management tool [not used]
   --with-abi-profile      specify ABI profile for ARM builds
                           (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
                           armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
@@ -2186,11 +2182,6 @@
                           compatibility and is ignored
   --with-dxsdk-include    Deprecated. Option is kept for backwards
                           compatibility and is ignored
-  --with-libelf           specify prefix directory for the libelf package
-                          (expecting the libraries under PATH/lib and the
-                          headers under PATH/include)
-  --with-libelf-include   specify directory for the libelf include files
-  --with-libelf-lib       specify directory for the libelf library
   --with-jvm-features     additional JVM features to enable (separated by
                           comma), use '--help' to show possible values [none]
   --with-jvm-interpreter  Deprecated. Option is kept for backwards
@@ -2327,8 +2318,6 @@
   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
-  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
-  ELF_LIBS    linker flags for ELF, overriding pkg-config
   ICECC_CMD   Override default value for ICECC_CMD
   ICECC_CREATE_ENV
               Override default value for ICECC_CREATE_ENV
@@ -4224,8 +4213,6 @@
       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
     dtrace)
       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
-    elf)
-      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
   esac
 }
 
@@ -4245,8 +4232,6 @@
       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
     ccache)
       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
-    elf)
-      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
   esac
 }
 
@@ -4516,7 +4501,7 @@
 
 
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -4793,36 +4778,6 @@
 ################################################################################
 
 
-#
-# 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 libelf (ELF library)
-################################################################################
-
-
 
 ################################################################################
 # Determine which libraries are needed for this configuration
@@ -4961,7 +4916,7 @@
 
 
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -5092,6 +5047,9 @@
 # Setup the JTReg Regression Test Harness.
 
 
+# Setup the JIB dependency resolver
+
+
 #
 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -5193,7 +5151,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1500423205
+DATE_WHEN_GENERATED=1503411624
 
 ###############################################################################
 #
@@ -49524,6 +49482,41 @@
 
 
 
+# Setup Jib dependency tool
+
+
+# Check whether --with-jib was given.
+if test "${with_jib+set}" = set; then :
+  withval=$with_jib;
+fi
+
+
+  if test "x$with_jib" = xno || test "x$with_jib" = x; then
+    # jib disabled
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
+$as_echo_n "checking for jib... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  elif test "x$with_jib" = xyes; then
+    as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
+  else
+    JIB_HOME="${with_jib}"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
+$as_echo_n "checking for jib... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
+$as_echo "${JIB_HOME}" >&6; }
+    if test ! -d "${JIB_HOME}"; then
+      as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
+    fi
+    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
+    if test ! -f "${JIB_JAR}"; then
+      as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
+    fi
+  fi
+
+
+
+
 
   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
@@ -51066,6 +51059,74 @@
   fi
 
 
+  # Optional POSIX functionality needed by the JVM
+  #
+  # Check if clock_gettime is available and in which library. This indicates
+  # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
+  # don't let it update LIBS.
+  save_LIBS="$LIBS"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' rt; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_clock_gettime+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_clock_gettime+:} false; then :
+
+else
+  ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  HAS_CLOCK_GETTIME=true
+fi
+
+  if test "x$LIBS" = "x-lrt "; then
+    CLOCK_GETTIME_IN_LIBRT=true
+  fi
+  LIBS="$save_LIBS"
+
+
   # Special extras...
   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
@@ -51366,7 +51427,7 @@
     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
-    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
+    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
@@ -51431,6 +51492,11 @@
     fi
   fi
 
+  # Always enable optional macros for VM.
+  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
+  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
+  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
+
   # Setup target OS define. Use OS target name but in upper case.
   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
@@ -51450,6 +51516,16 @@
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
   fi
 
+  # Optional POSIX functionality needed by the VM
+
+  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
+    JVM_CFLAGS="$JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
+    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
+      JVM_CFLAGS="$JVM_CFLAGS -DNEEDS_LIBRT"
+    fi
+  fi
+
+
   # Set some additional per-OS defines.
   if test "x$OPENJDK_TARGET_OS" = xlinux; then
     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
@@ -51458,7 +51534,7 @@
   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
-        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
+        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
@@ -52230,7 +52306,7 @@
     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
-    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
+    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
@@ -52295,6 +52371,11 @@
     fi
   fi
 
+  # Always enable optional macros for VM.
+  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
+  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
+  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
+
   # Setup target OS define. Use OS target name but in upper case.
   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
@@ -52314,6 +52395,16 @@
     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
   fi
 
+  # Optional POSIX functionality needed by the VM
+
+  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
+    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
+    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
+      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DNEEDS_LIBRT"
+    fi
+  fi
+
+
   # Set some additional per-OS defines.
   if test "x$OPENJDK_BUILD_OS" = xlinux; then
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
@@ -52322,7 +52413,7 @@
   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
-        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
+        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
@@ -53989,8 +54080,8 @@
   fi
 
   if test "x$ENABLE_AOT" = "xtrue"; then
-    # Only enable AOT on linux-X64.
-    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
+    # Only enable AOT on X64 platforms.
+    if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
       if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
         if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
           ENABLE_AOT="true"
@@ -54009,7 +54100,7 @@
     else
       ENABLE_AOT="false"
       if test "x$enable_aot" = "xyes"; then
-        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
+        as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
       fi
     fi
   fi
@@ -62526,7 +62617,7 @@
             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
 
   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
-  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
+  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu"
   METHOD="well-known location"
 
   # Let's start with an optimistic view of the world :-)
@@ -65499,298 +65590,18 @@
 
 
 
-# Check whether --with-libelf was given.
-if test "${with_libelf+set}" = set; then :
-  withval=$with_libelf;
-fi
-
-
-# Check whether --with-libelf-include was given.
-if test "${with_libelf_include+set}" = set; then :
-  withval=$with_libelf_include;
-fi
-
-
-# Check whether --with-libelf-lib was given.
-if test "${with_libelf_lib+set}" = set; then :
-  withval=$with_libelf_lib;
-fi
-
-
-  if test "x$ENABLE_AOT" = xfalse; then
-    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
-        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
-        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
-$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
-    fi
-    LIBELF_CFLAGS=
-    LIBELF_LIBS=
-  else
-    LIBELF_FOUND=no
-
-    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
-      ENABLE_AOT="false"
-      if test "x${enable_aot}" = xyes; then
-        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
-      fi
-    else
-      if test "x${with_libelf}" != x; then
-        ELF_LIBS="-L${with_libelf}/lib -lelf"
-        ELF_CFLAGS="-I${with_libelf}/include"
-        LIBELF_FOUND=yes
-      fi
-      if test "x${with_libelf_include}" != x; then
-        ELF_CFLAGS="-I${with_libelf_include}"
-        LIBELF_FOUND=yes
-      fi
-      if test "x${with_libelf_lib}" != x; then
-        ELF_LIBS="-L${with_libelf_lib} -lelf"
-        LIBELF_FOUND=yes
-      fi
-      # Do not try pkg-config if we have a sysroot set.
-      if test "x$SYSROOT" = x; then
-        if test "x$LIBELF_FOUND" = xno; then
-          # Figure out ELF_CFLAGS and ELF_LIBS
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
-$as_echo_n "checking for ELF... " >&6; }
-
-if test -n "$ELF_CFLAGS"; then
-    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$ELF_LIBS"; then
-    pkg_cv_ELF_LIBS="$ELF_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 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
-	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
-        else
-	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$ELF_PKG_ERRORS" >&5
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                LIBELF_FOUND=no
-elif test $pkg_failed = untried; then
-	LIBELF_FOUND=no
-else
-	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
-	ELF_LIBS=$pkg_cv_ELF_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	LIBELF_FOUND=yes
-fi
-        fi
-      fi
-      if test "x$LIBELF_FOUND" = xno; then
-        for ac_header in libelf.h
-do :
-  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
-if test "x$ac_cv_header_libelf_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBELF_H 1
-_ACEOF
-
-              LIBELF_FOUND=yes
-              ELF_CFLAGS=
-              ELF_LIBS=-lelf
-
-else
-  LIBELF_FOUND=no
-
-fi
-
-done
-
-      fi
-      if test "x$LIBELF_FOUND" = xno; then
-        ENABLE_AOT="false"
-
-  # Print a helpful message on how to acquire the necessary build dependency.
-  # elf is the help tag: freetype, cups, alsa etc
-  MISSING_DEPENDENCY=elf
-
-  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 ;;
-      brew)
-        brew_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
-
-        if test "x${enable_aot}" = xyes; then
-          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
-        else
-          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
-$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
-        fi
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
-$as_echo_n "checking if libelf 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 $ELF_CFLAGS"
-        OLD_LIBS="$LIBS"
-        LIBS="$LIBS $ELF_LIBS"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <libelf.h>
-int
-main ()
-{
-
-              elf_version(0);
-              return 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  LIBELF_WORKS=yes
-else
-  LIBELF_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: $LIBELF_WORKS" >&5
-$as_echo "$LIBELF_WORKS" >&6; }
-
-        if test "x$LIBELF_WORKS" = xno; then
-          ENABLE_AOT="false"
-
-  # Print a helpful message on how to acquire the necessary build dependency.
-  # elf is the help tag: freetype, cups, alsa etc
-  MISSING_DEPENDENCY=elf
-
-  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 ;;
-      brew)
-        brew_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
-
-          if test "x$enable_aot" = "xyes"; then
-            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
-          else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
-$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
-          fi
-        fi
-      fi
-    fi
-  fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Hotspot setup depends on lib checks (AOT needs libelf).
+
+
+
+
+
+
+
+
+
+
+
+# Hotspot setup depends on lib checks.
 
 
   # The user can in some cases supply additional jvm features. For the custom
--- a/common/autoconf/help.m4	Mon Aug 28 16:40:01 2017 +0000
+++ b/common/autoconf/help.m4	Mon Aug 28 21:46:13 2017 +0200
@@ -123,8 +123,6 @@
       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
     dtrace)
       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
-    elf)
-      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
   esac
 }
 
@@ -144,8 +142,6 @@
       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
     ccache)
       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
-    elf)
-      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
   esac
 }
 
--- a/common/autoconf/hotspot.m4	Mon Aug 28 16:40:01 2017 +0000
+++ b/common/autoconf/hotspot.m4	Mon Aug 28 21:46:13 2017 +0200
@@ -212,8 +212,8 @@
   fi
 
   if test "x$ENABLE_AOT" = "xtrue"; then
-    # Only enable AOT on linux-X64.
-    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
+    # Only enable AOT on X64 platforms.
+    if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
       if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
         if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
           ENABLE_AOT="true"
@@ -232,7 +232,7 @@
     else
       ENABLE_AOT="false"
       if test "x$enable_aot" = "xyes"; then
-        AC_MSG_ERROR([AOT is currently only supported on Linux-x86_64. Remove --enable-aot.])
+        AC_MSG_ERROR([AOT is currently only supported on x86_64. Remove --enable-aot.])
       fi
     fi
   fi
--- a/common/autoconf/lib-elf.m4	Mon Aug 28 16:40:01 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-#
-# 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 libelf (ELF library)
-################################################################################
-AC_DEFUN_ONCE([LIB_SETUP_LIBELF],
-[
-  AC_ARG_WITH(libelf, [AS_HELP_STRING([--with-libelf],
-      [specify prefix directory for the libelf package
-      (expecting the libraries under PATH/lib and the headers under PATH/include)])])
-  AC_ARG_WITH(libelf-include, [AS_HELP_STRING([--with-libelf-include],
-      [specify directory for the libelf include files])])
-  AC_ARG_WITH(libelf-lib, [AS_HELP_STRING([--with-libelf-lib],
-      [specify directory for the libelf library])])
-
-  if test "x$ENABLE_AOT" = xfalse; then
-    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
-        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
-        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
-      AC_MSG_WARN([[libelf is not used, so --with-libelf[-*] is ignored]])
-    fi
-    LIBELF_CFLAGS=
-    LIBELF_LIBS=
-  else
-    LIBELF_FOUND=no
-
-    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
-      ENABLE_AOT="false"
-      if test "x${enable_aot}" = xyes; then
-        AC_MSG_ERROR([libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT.])
-      fi
-    else
-      if test "x${with_libelf}" != x; then
-        ELF_LIBS="-L${with_libelf}/lib -lelf"
-        ELF_CFLAGS="-I${with_libelf}/include"
-        LIBELF_FOUND=yes
-      fi
-      if test "x${with_libelf_include}" != x; then
-        ELF_CFLAGS="-I${with_libelf_include}"
-        LIBELF_FOUND=yes
-      fi
-      if test "x${with_libelf_lib}" != x; then
-        ELF_LIBS="-L${with_libelf_lib} -lelf"
-        LIBELF_FOUND=yes
-      fi
-      # Do not try pkg-config if we have a sysroot set.
-      if test "x$SYSROOT" = x; then
-        if test "x$LIBELF_FOUND" = xno; then
-          # Figure out ELF_CFLAGS and ELF_LIBS
-          PKG_CHECK_MODULES([ELF], [libelf], [LIBELF_FOUND=yes], [LIBELF_FOUND=no])
-        fi
-      fi
-      if test "x$LIBELF_FOUND" = xno; then
-        AC_CHECK_HEADERS([libelf.h],
-            [
-              LIBELF_FOUND=yes
-              ELF_CFLAGS=
-              ELF_LIBS=-lelf
-            ],
-            [LIBELF_FOUND=no]
-        )
-      fi
-      if test "x$LIBELF_FOUND" = xno; then
-        ENABLE_AOT="false"
-        HELP_MSG_MISSING_DEPENDENCY([elf])
-        if test "x${enable_aot}" = xyes; then
-          AC_MSG_ERROR([libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG])
-        else
-          AC_MSG_WARN([libelf not found, cannot build AOT. $HELP_MSG])
-        fi
-      else
-        AC_MSG_CHECKING([if libelf works])
-        AC_LANG_PUSH(C)
-        OLD_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $ELF_CFLAGS"
-        OLD_LIBS="$LIBS"
-        LIBS="$LIBS $ELF_LIBS"
-        AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <libelf.h>],
-            [
-              elf_version(0);
-              return 0;
-            ])],
-            [LIBELF_WORKS=yes],
-            [LIBELF_WORKS=no]
-        )
-        CFLAGS="$OLD_CFLAGS"
-        LIBS="$OLD_LIBS"
-        AC_LANG_POP(C)
-        AC_MSG_RESULT([$LIBELF_WORKS])
-
-        if test "x$LIBELF_WORKS" = xno; then
-          ENABLE_AOT="false"
-          HELP_MSG_MISSING_DEPENDENCY([elf])
-          if test "x$enable_aot" = "xyes"; then
-            AC_MSG_ERROR([Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG])
-          else
-            AC_MSG_WARN([Found libelf but could not link and compile with it. $HELP_MSG])
-          fi
-        fi
-      fi
-    fi
-  fi
-
-  AC_SUBST(ELF_CFLAGS)
-  AC_SUBST(ELF_LIBS)
-])
--- a/common/autoconf/lib-freetype.m4	Mon Aug 28 16:40:01 2017 +0000
+++ b/common/autoconf/lib-freetype.m4	Mon Aug 28 21:46:13 2017 +0200
@@ -366,7 +366,7 @@
           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])
+              LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-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
--- a/common/autoconf/libraries.m4	Mon Aug 28 16:40:01 2017 +0000
+++ b/common/autoconf/libraries.m4	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,6 @@
 m4_include([lib-freetype.m4])
 m4_include([lib-std.m4])
 m4_include([lib-x11.m4])
-m4_include([lib-elf.m4])
 
 ################################################################################
 # Determine which libraries are needed for this configuration
@@ -91,7 +90,6 @@
   LIB_SETUP_BUNDLED_LIBS
   LIB_SETUP_MISC_LIBS
   LIB_SETUP_SOLARIS_STLPORT
-  LIB_SETUP_LIBELF
 ])
 
 ################################################################################
--- a/common/autoconf/spec.gmk.in	Mon Aug 28 16:40:01 2017 +0000
+++ b/common/autoconf/spec.gmk.in	Mon Aug 28 21:46:13 2017 +0200
@@ -690,6 +690,7 @@
 XATTR:=@XATTR@
 JT_HOME:=@JT_HOME@
 JTREGEXE:=@JTREGEXE@
+JIB_JAR:=@JIB_JAR@
 XCODEBUILD=@XCODEBUILD@
 DTRACE := @DTRACE@
 FIXPATH:=@FIXPATH@
@@ -774,9 +775,6 @@
 PNG_LIBS:=@PNG_LIBS@
 PNG_CFLAGS:=@PNG_CFLAGS@
 
-ELF_CFLAGS:=@ELF_CFLAGS@
-ELF_LIBS:=@ELF_LIBS@
-
 ####################################################
 #
 # Misc
--- a/common/autoconf/toolchain.m4	Mon Aug 28 16:40:01 2017 +0000
+++ b/common/autoconf/toolchain.m4	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -1005,3 +1005,31 @@
   AC_SUBST(JT_HOME)
   AC_SUBST(JTREGEXE)
 ])
+
+# Setup the JIB dependency resolver
+AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JIB],
+[
+  AC_ARG_WITH(jib, [AS_HELP_STRING([--with-jib],
+      [Jib dependency management tool @<:@not used@:>@])])
+
+  if test "x$with_jib" = xno || test "x$with_jib" = x; then
+    # jib disabled
+    AC_MSG_CHECKING([for jib])
+    AC_MSG_RESULT(no)
+  elif test "x$with_jib" = xyes; then
+    AC_MSG_ERROR([Must supply a value to --with-jib])
+  else
+    JIB_HOME="${with_jib}"
+    AC_MSG_CHECKING([for jib])
+    AC_MSG_RESULT(${JIB_HOME})
+    if test ! -d "${JIB_HOME}"; then
+      AC_MSG_ERROR([--with-jib must be a directory])
+    fi
+    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
+    if test ! -f "${JIB_JAR}"; then
+      AC_MSG_ERROR([Could not find jib jar file in ${JIB_HOME}])
+    fi
+  fi
+
+  AC_SUBST(JIB_JAR)
+])
--- a/common/conf/jib-profiles.js	Mon Aug 28 16:40:01 2017 +0000
+++ b/common/conf/jib-profiles.js	Mon Aug 28 21:46:13 2017 +0200
@@ -237,7 +237,7 @@
 
     // These are the base setttings for all the main build profiles.
     common.main_profile_base = {
-        dependencies: ["boot_jdk", "gnumake", "jtreg"],
+        dependencies: ["boot_jdk", "gnumake", "jtreg", "jib"],
         default_make_targets: ["product-bundles", "test-bundles"],
         configure_args: concat(["--enable-jtreg-failure-handler"],
                                versionArgs(input, common))
@@ -590,7 +590,7 @@
         "run-test-jprt": {
             target_os: input.build_os,
             target_cpu: input.build_cpu,
-            dependencies: [ "jtreg", "gnumake", "boot_jdk" ],
+            dependencies: [ "jtreg", "gnumake", "boot_jdk", "devkit", "jib" ],
             labels: "test",
             environment: {
                 "JT_JAVA": common.boot_jdk_home
@@ -600,7 +600,7 @@
         "run-test": {
             target_os: input.build_os,
             target_cpu: input.build_cpu,
-            dependencies: [ "jtreg", "gnumake", "boot_jdk" ],
+            dependencies: [ "jtreg", "gnumake", "boot_jdk", "devkit", "jib" ],
             labels: "test",
             environment: {
                 "JT_JAVA": common.boot_jdk_home
@@ -619,7 +619,7 @@
             target_os: input.build_os,
             target_cpu: input.build_cpu,
             src: "src.conf",
-            dependencies: [ "jtreg", "gnumake", "boot_jdk", testedProfile + ".jdk",
+            dependencies: [ "jtreg", "gnumake", "boot_jdk", "jib", testedProfile + ".jdk",
                 testedProfile + ".test", "src.full"
             ],
             work_dir: input.get("src.full", "install_path") + "/test",
@@ -974,7 +974,7 @@
         jtreg: {
             server: "javare",
             revision: "4.2",
-            build_number: "b07",
+            build_number: "b08",
             checksum_file: "MD5_VALUES",
             file: "jtreg_bin-4.2.zip",
             environment_name: "JT_HOME",
@@ -1023,8 +1023,26 @@
             configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc",
             environment_path: input.get("pandoc", "install_path") + "/pandoc"
         },
+        // This adds java jib as a dependency for the test artifacts resolver
+        jib: {
+            organization: "com.oracle.java.jib",
+            ext: "zip",
+            classifier: "distribution",
+            revision: "3.0-SNAPSHOT",
+            environment_name: "JIB_JAR",
+            environment_value: input.get("jib", "install_path")
+                + "/jib-3.0-SNAPSHOT-distribution/lib/jib-3.0-SNAPSHOT.jar"
+       }
     };
 
+    // Need to add a value for the Visual Studio tools variable to make
+    // jaot be able to pick up the Visual Studio linker in testing.
+    if (input.target_os == "windows") {
+        dependencies.devkit.environment = {
+            VS120COMNTOOLS: input.get("devkit", "install_path") + "/Common7/Tools"
+        };
+    }
+
     return dependencies;
 };
 
--- a/common/doc/building.html	Mon Aug 28 16:40:01 2017 +0000
+++ b/common/doc/building.html	Mon Aug 28 21:46:13 2017 +0200
@@ -58,7 +58,6 @@
 <li><a href="#x11">X11</a></li>
 <li><a href="#alsa">ALSA</a></li>
 <li><a href="#libffi">libffi</a></li>
-<li><a href="#libelf">libelf</a></li>
 </ul></li>
 <li><a href="#other-tooling-requirements">Other Tooling Requirements</a><ul>
 <li><a href="#gnu-make">GNU Make</a></li>
@@ -469,13 +468,6 @@
 <li>To install on an rpm-based Linux, try running <code>sudo yum install libffi-devel</code>.</li>
 </ul>
 <p>Use <code>--with-libffi=&lt;path&gt;</code> if <code>configure</code> does not properly locate your libffi files.</p>
-<h3 id="libelf">libelf</h3>
-<p>libelf from the <a href="http://sourceware.org/elfutils">elfutils project</a> is required when building the AOT feature of Hotspot.</p>
-<ul>
-<li>To install on an apt-based Linux, try running <code>sudo apt-get install libelf-dev</code>.</li>
-<li>To install on an rpm-based Linux, try running <code>sudo yum install elfutils-libelf-devel</code>.</li>
-</ul>
-<p>Use <code>--with-libelf=&lt;path&gt;</code> if <code>configure</code> does not properly locate your libelf files.</p>
 <h2 id="other-tooling-requirements">Other Tooling Requirements</h2>
 <h3 id="gnu-make">GNU Make</h3>
 <p>OpenJDK requires <a href="http://www.gnu.org/software/make">GNU Make</a>. No other flavors of make are supported.</p>
@@ -537,7 +529,6 @@
 <li><code>--with-x=&lt;path&gt;</code> - Set the path to <a href="#x11">X11</a></li>
 <li><code>--with-alsa=&lt;path&gt;</code> - Set the path to <a href="#alsa">ALSA</a></li>
 <li><code>--with-libffi=&lt;path&gt;</code> - Set the path to <a href="#libffi">libffi</a></li>
-<li><code>--with-libelf=&lt;path&gt;</code> - Set the path to <a href="#libelf">libelf</a></li>
 <li><code>--with-jtreg=&lt;path&gt;</code> - Set the path to JTReg. See <a href="#running-tests">Running Tests</a></li>
 </ul>
 <p>Certain third-party libraries used by OpenJDK (libjpeg, giflib, libpng, lcms and zlib) are included in the OpenJDK repository. The default behavior of the OpenJDK build is to use this version of these libraries, but they might be replaced by an external version. To do so, specify <code>system</code> as the <code>&lt;source&gt;</code> option in these arguments. (The default is <code>bundled</code>).</p>
--- a/common/doc/building.md	Mon Aug 28 16:40:01 2017 +0000
+++ b/common/doc/building.md	Mon Aug 28 21:46:13 2017 +0200
@@ -648,19 +648,6 @@
 Use `--with-libffi=<path>` if `configure` does not properly locate your libffi
 files.
 
-### libelf
-
-libelf from the [elfutils project](http://sourceware.org/elfutils) is required
-when building the AOT feature of Hotspot.
-
-  * To install on an apt-based Linux, try running `sudo apt-get install
-    libelf-dev`.
-  * To install on an rpm-based Linux, try running `sudo yum install
-    elfutils-libelf-devel`.
-
-Use `--with-libelf=<path>` if `configure` does not properly locate your libelf
-files.
-
 ## Other Tooling Requirements
 
 ### GNU Make
@@ -813,7 +800,6 @@
   * `--with-x=<path>` - Set the path to [X11](#x11)
   * `--with-alsa=<path>` - Set the path to [ALSA](#alsa)
   * `--with-libffi=<path>` - Set the path to [libffi](#libffi)
-  * `--with-libelf=<path>` - Set the path to [libelf](#libelf)
   * `--with-jtreg=<path>` - Set the path to JTReg. See [Running Tests](
     #running-tests)
 
--- a/corba/.hgtags	Mon Aug 28 16:40:01 2017 +0000
+++ b/corba/.hgtags	Mon Aug 28 21:46:13 2017 +0200
@@ -444,3 +444,4 @@
 28488561cfbcfa4d0d9c489e8afe0155f4231360 jdk-10+19
 6ce6cb8ff41c71c49f23b15e0f0468aca5d52b17 jdk-9+180
 ba71941ad9dba53b8fffb30602ef673eee88696c jdk-9+181
+7a54ec280513a33e49e60546c0cf9ca573925a43 jdk-10+20
--- a/hotspot/.hgtags	Mon Aug 28 16:40:01 2017 +0000
+++ b/hotspot/.hgtags	Mon Aug 28 21:46:13 2017 +0200
@@ -605,3 +605,4 @@
 d7baadc223e790c08bc69bf7e553bce65b4e7e40 jdk-9+180
 4a443796f6f57842d6a0434ac27ca3d1033ccc20 jdk-9+181
 e93ed1a092409351c90b3a76d80b9aa8b44d5e6a jdk-10+20
+bdb2dbc43ff065b74c2121bdfb0d6e1fa8684b73 jdk-10+21
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/TestValidateModules.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8186145
+ * @requires vm.jvmci
+ * @library /test/lib
+ * @build TestValidateModules jdk.test.lib.process.*
+ * @run main TestValidateModules
+ * @summary Ensure java --validate-modules works with --XX:+EnableJVMCI
+ */
+
+import jdk.test.lib.process.ProcessTools;
+
+public class TestValidateModules {
+    public static void main(String... args) throws Exception {
+        ProcessTools.executeTestJava("-XX:+UnlockExperimentalVMOptions",
+                                     "-XX:+EnableJVMCI",
+                                     "--validate-modules")
+                .outputTo(System.out)
+                .errorTo(System.out)
+                .stdoutShouldContain("java.base")
+                .stdoutShouldContain("jdk.internal.vm.ci")
+                .shouldHaveExitValue(0);
+    }
+}
--- a/jaxp/.hgtags	Mon Aug 28 16:40:01 2017 +0000
+++ b/jaxp/.hgtags	Mon Aug 28 21:46:13 2017 +0200
@@ -444,3 +444,4 @@
 f5789425c26cee0274d0e2ebabb21faf268f218f jdk-10+19
 9934a03646f91ce55f61f53d8448c629828f8088 jdk-9+180
 ea18d767c9ec50ea7f40bbe6cf7379d3538110f1 jdk-9+181
+f7d596aa57aece4e5f473b1ac97e26cd0aebc647 jdk-10+20
--- a/jaxp/test/TEST.ROOT	Mon Aug 28 16:40:01 2017 +0000
+++ b/jaxp/test/TEST.ROOT	Mon Aug 28 21:46:13 2017 +0200
@@ -23,7 +23,7 @@
 groups=TEST.groups
 
 # Minimum jtreg version
-requiredVersion=4.2 b07
+requiredVersion=4.2 b08
 
 # Path to libraries in the topmost test directory. This is needed so @library
 # does not need ../../ notation to reach them
--- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8003147Test.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8003147Test.java	Mon Aug 28 21:46:13 2017 +0200
@@ -25,7 +25,7 @@
  * @test
  * @bug 8003147
  * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
- * @compile Bug8003147TestClass.java
+ * @compile -g Bug8003147TestClass.java
  * @run testng/othervm -DrunSecMngr=true parsers.Bug8003147Test
  * @run testng/othervm parsers.Bug8003147Test
  * @summary Test port fix for BCEL bug 39695.
@@ -52,16 +52,17 @@
 import com.sun.org.apache.bcel.internal.classfile.Method;
 import com.sun.org.apache.bcel.internal.generic.ClassGen;
 import com.sun.org.apache.bcel.internal.generic.MethodGen;
+import com.sun.org.apache.bcel.internal.generic.InstructionFactory;
+import com.sun.org.apache.bcel.internal.generic.InstructionList;
 
 @Listeners({ jaxp.library.FilePolicy.class, jaxp.library.InternalAPIPolicy.class })
 public class Bug8003147Test {
 
     @Test
     public void test() throws Exception {
-        // Note: com.sun.org.apache.bcel.internal.classfile.JavaClass doesn't
-        // support InvokeDynamic, so can't use lambda, also can't use string1 +
-        // string2, because javac will generate a dynamic call where invoking
-        // string1.concat(string2), so create a separate Bug8003147TestClass
+        // Note: Because BCEL library is always behind java version, to make sure
+        // JavaClass can parse the class file, create a separate
+        // Bug8003147TestClass.java, which only uses basic features.
         JAXPTestUtilities.tryRunWithTmpPermission(() -> {
             String classfile = getSystemProperty("test.classes") + "/parsers/Bug8003147TestClass.class";
             JavaClass jc = new ClassParser(classfile).parse();
@@ -80,6 +81,16 @@
             }
             Method m = methods[index];
             MethodGen mg = new MethodGen(m, gen.getClassName(), gen.getConstantPool());
+
+            // @bug 8064516, not currently used directly by JAXP, but we may need
+            // to modify preexisting methods in the future.
+            InstructionFactory f = new InstructionFactory(gen);
+            InstructionList il = mg.getInstructionList();
+            InstructionList newInst = new InstructionList();
+            newInst.append(f.createPrintln("Hello Sekai!"));
+            il.insert(newInst);
+            mg.setMaxStack();
+
             gen.replaceMethod(m, mg.getMethod());
             String path = classfile.replace("Bug8003147TestClass", "Bug8003147TestClassPrime");
             gen.getJavaClass().dump(new FileOutputStream(path));
--- a/jaxws/.hgtags	Mon Aug 28 16:40:01 2017 +0000
+++ b/jaxws/.hgtags	Mon Aug 28 21:46:13 2017 +0200
@@ -447,3 +447,4 @@
 0c3c118b0245165ed46dc32d0a28c39648de7cdb jdk-10+19
 f112f294a89ea61260b645f450bd37fd6578a5e8 jdk-9+180
 4f852cc3a1c998e78a989ba4667ffa9b867d9d01 jdk-9+181
+1658a5e7d171e9c3cc2462fac2789ec63294ecca jdk-10+20
--- a/jdk/.hgtags	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/.hgtags	Mon Aug 28 21:46:13 2017 +0200
@@ -444,3 +444,4 @@
 b561eeca30decc6258b4aca8bb23beffbb6e2f7d jdk-10+19
 4feab1acec6a9c3620a19ff379a65ab8618d0e2a jdk-9+180
 bd66ea2fdde3d60a73b5272263a7b8b0ca926a33 jdk-9+181
+6256e94781f55e6f9e04eb284298d00eb9c5e106 jdk-10+20
--- a/jdk/make/launcher/Launcher-jdk.aot.gmk	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/make/launcher/Launcher-jdk.aot.gmk	Mon Aug 28 21:46:13 2017 +0200
@@ -46,6 +46,7 @@
         --add-exports=jdk.internal.vm.ci/jdk.vm.ci.runtime=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
         --add-exports=jdk.internal.vm.ci/jdk.vm.ci.sparc=$(call CommaList, jdk.internal.vm.compiler  jdk.aot)  \
         -XX:+UseAOT \
+        -XX:+CalculateClassFingerprint \
         -Djvmci.UseProfilingInformation=false \
         -Dgraal.UseExceptionProbability=false \
         -Djvmci.Compiler=graal \
--- a/jdk/make/mapfiles/libjaas/mapfile-vers	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/make/mapfiles/libjaas/mapfile-vers	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,6 @@
 
 SUNWprivate_1.1 {
 	global:
-            Java_com_sun_security_auth_module_SolarisSystem_getSolarisInfo;
             Java_com_sun_security_auth_module_UnixSystem_getUnixInfo;
         local:
 	    *;
--- a/jdk/make/test/JtregNative.gmk	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/make/test/JtregNative.gmk	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -35,12 +35,14 @@
 include MakeBase.gmk
 include TestFilesCompilation.gmk
 
+$(eval $(call IncludeCustomExtension, jdk, test/JtregNative.gmk))
+
 ################################################################################
 # Targets for building the native tests themselves.
 ################################################################################
 
 # Add more directories here when needed.
-BUILD_JDK_JTREG_NATIVE_SRC := \
+BUILD_JDK_JTREG_NATIVE_SRC += \
     $(JDK_TOPDIR)/test/native_sanity \
     $(JDK_TOPDIR)/test/java/lang/String/nativeEncoding \
     #
--- a/jdk/src/java.base/aix/native/libnet/aix_close.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/aix/native/libnet/aix_close.c	Mon Aug 28 21:46:13 2017 +0200
@@ -64,7 +64,7 @@
 #include <sys/uio.h>
 #include <unistd.h>
 #include <errno.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include "jvm.h"
 #include "net_util.h"
 
--- a/jdk/src/java.base/aix/native/libnio/ch/AixPollPort.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/aix/native/libnio/ch/AixPollPort.c	Mon Aug 28 21:46:13 2017 +0200
@@ -34,7 +34,7 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/pollset.h>
 #include <fcntl.h>
 #include <stddef.h>
--- a/jdk/src/java.base/linux/native/libnet/linux_close.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/linux/native/libnet/linux_close.c	Mon Aug 28 21:46:13 2017 +0200
@@ -36,7 +36,7 @@
 #include <sys/uio.h>
 #include <unistd.h>
 #include <errno.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include "jvm.h"
 #include "net_util.h"
 
--- a/jdk/src/java.base/linux/native/libnio/fs/LinuxWatchService.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/linux/native/libnio/fs/LinuxWatchService.c	Mon Aug 28 21:46:13 2017 +0200
@@ -32,7 +32,7 @@
 #include <dlfcn.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/inotify.h>
 
 #include "sun_nio_fs_LinuxWatchService.h"
--- a/jdk/src/java.base/macosx/native/include/jvm_md.h	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/macosx/native/include/jvm_md.h	Mon Aug 28 21:46:13 2017 +0200
@@ -60,7 +60,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <errno.h>
-#include <sys/signal.h>
+#include <signal.h>
 
 /* O Flags */
 
--- a/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c	Mon Aug 28 21:46:13 2017 +0200
@@ -290,8 +290,6 @@
  */
 static void *apple_main (void *arg)
 {
-    objc_registerThreadWithCollector();
-
     if (main_fptr == NULL) {
 #ifdef STATIC_BUILD
         extern int main(int argc, char **argv);
@@ -732,6 +730,7 @@
     if (stack_size > 0) {
       pthread_attr_setstacksize(&attr, stack_size);
     }
+    pthread_attr_setguardsize(&attr, 0); // no pthread guard page on java threads
 
     if (pthread_create(&tid, &attr, (void *(*)(void*))continuation, (void*)args) == 0) {
       void * tmp;
@@ -771,7 +770,7 @@
 void
 RegisterThread()
 {
-    objc_registerThreadWithCollector();
+    // stubbed out for windows and *nixes.
 }
 
 static void
--- a/jdk/src/java.base/macosx/native/libnet/bsd_close.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/macosx/native/libnet/bsd_close.c	Mon Aug 28 21:46:13 2017 +0200
@@ -38,7 +38,7 @@
 #include <sys/uio.h>
 #include <unistd.h>
 #include <errno.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include "jvm.h"
 #include "net_util.h"
 
--- a/jdk/src/java.base/share/classes/java/io/BufferedInputStream.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/io/BufferedInputStream.java	Mon Aug 28 21:46:13 2017 +0200
@@ -24,7 +24,8 @@
  */
 
 package java.io;
-import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
+
+import jdk.internal.misc.Unsafe;
 
 /**
  * A <code>BufferedInputStream</code> adds
@@ -61,22 +62,27 @@
     private static int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8;
 
     /**
+     * As this class is used early during bootstrap, it's motivated to use
+     * Unsafe.compareAndSetObject instead of AtomicReferenceFieldUpdater
+     * (or VarHandles) to reduce dependencies and improve startup time.
+     */
+    private static final Unsafe U = Unsafe.getUnsafe();
+
+    private static final long BUF_OFFSET
+            = U.objectFieldOffset(BufferedInputStream.class, "buf");
+
+    /**
      * The internal buffer array where the data is stored. When necessary,
      * it may be replaced by another array of
      * a different size.
      */
-    protected volatile byte buf[];
-
-    /**
-     * Atomic updater to provide compareAndSet for buf. This is
-     * necessary because closes can be asynchronous. We use nullness
-     * of buf[] as primary indicator that this stream is closed. (The
-     * "in" field is also nulled out on close.)
+    /*
+     * We null this out with a CAS on close(), which is necessary since
+     * closes can be asynchronous. We use nullness of buf[] as primary
+     * indicator that this stream is closed. (The "in" field is also
+     * nulled out on close.)
      */
-    private static final
-        AtomicReferenceFieldUpdater<BufferedInputStream, byte[]> bufUpdater =
-        AtomicReferenceFieldUpdater.newUpdater
-        (BufferedInputStream.class,  byte[].class, "buf");
+    protected volatile byte[] buf;
 
     /**
      * The index one greater than the index of the last valid byte in
@@ -230,9 +236,9 @@
                         pos * 2 : MAX_BUFFER_SIZE;
                 if (nsz > marklimit)
                     nsz = marklimit;
-                byte nbuf[] = new byte[nsz];
+                byte[] nbuf = new byte[nsz];
                 System.arraycopy(buffer, 0, nbuf, 0, pos);
-                if (!bufUpdater.compareAndSet(this, buffer, nbuf)) {
+                if (!U.compareAndSetObject(this, BUF_OFFSET, buffer, nbuf)) {
                     // Can't replace buf if there was an async close.
                     // Note: This would need to be changed if fill()
                     // is ever made accessible to multiple threads.
@@ -476,7 +482,7 @@
     public void close() throws IOException {
         byte[] buffer;
         while ( (buffer = buf) != null) {
-            if (bufUpdater.compareAndSet(this, buffer, null)) {
+            if (U.compareAndSetObject(this, BUF_OFFSET, buffer, null)) {
                 InputStream input = in;
                 in = null;
                 if (input != null)
--- a/jdk/src/java.base/share/classes/java/io/File.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/io/File.java	Mon Aug 28 21:46:13 2017 +0200
@@ -2241,22 +2241,12 @@
         UNSAFE.putIntVolatile(this, PREFIX_LENGTH_OFFSET, fs.prefixLength(path));
     }
 
-    private static final long PATH_OFFSET;
-    private static final long PREFIX_LENGTH_OFFSET;
-    private static final jdk.internal.misc.Unsafe UNSAFE;
-    static {
-        try {
-            jdk.internal.misc.Unsafe unsafe = jdk.internal.misc.Unsafe.getUnsafe();
-            PATH_OFFSET = unsafe.objectFieldOffset(
-                    File.class.getDeclaredField("path"));
-            PREFIX_LENGTH_OFFSET = unsafe.objectFieldOffset(
-                    File.class.getDeclaredField("prefixLength"));
-            UNSAFE = unsafe;
-        } catch (ReflectiveOperationException e) {
-            throw new Error(e);
-        }
-    }
-
+    private static final jdk.internal.misc.Unsafe UNSAFE
+            = jdk.internal.misc.Unsafe.getUnsafe();
+    private static final long PATH_OFFSET
+            = UNSAFE.objectFieldOffset(File.class, "path");
+    private static final long PREFIX_LENGTH_OFFSET
+            = UNSAFE.objectFieldOffset(File.class, "prefixLength");
 
     /** use serialVersionUID from JDK 1.0.2 for interoperability */
     private static final long serialVersionUID = 301077366599181567L;
--- a/jdk/src/java.base/share/classes/java/lang/Class.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/Class.java	Mon Aug 28 21:46:13 2017 +0200
@@ -2864,26 +2864,14 @@
         // and have to avoid calling it in the static initializer of the Class class...
         private static final Unsafe unsafe = Unsafe.getUnsafe();
         // offset of Class.reflectionData instance field
-        private static final long reflectionDataOffset;
+        private static final long reflectionDataOffset
+                = unsafe.objectFieldOffset(Class.class, "reflectionData");
         // offset of Class.annotationType instance field
-        private static final long annotationTypeOffset;
+        private static final long annotationTypeOffset
+                = unsafe.objectFieldOffset(Class.class, "annotationType");
         // offset of Class.annotationData instance field
-        private static final long annotationDataOffset;
-
-        static {
-            Field[] fields = Class.class.getDeclaredFields0(false); // bypass caches
-            reflectionDataOffset = objectFieldOffset(fields, "reflectionData");
-            annotationTypeOffset = objectFieldOffset(fields, "annotationType");
-            annotationDataOffset = objectFieldOffset(fields, "annotationData");
-        }
-
-        private static long objectFieldOffset(Field[] fields, String fieldName) {
-            Field field = searchFields(fields, fieldName);
-            if (field == null) {
-                throw new Error("No " + fieldName + " field found in java.lang.Class");
-            }
-            return unsafe.objectFieldOffset(field);
-        }
+        private static final long annotationDataOffset
+                = unsafe.objectFieldOffset(Class.class, "annotationData");
 
         static <T> boolean casReflectionData(Class<?> clazz,
                                              SoftReference<ReflectionData<T>> oldData,
--- a/jdk/src/java.base/share/classes/java/lang/ClassLoader.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/ClassLoader.java	Mon Aug 28 21:46:13 2017 +0200
@@ -30,7 +30,6 @@
 import java.io.UncheckedIOException;
 import java.io.File;
 import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
 import java.net.URL;
 import java.security.AccessController;
 import java.security.AccessControlContext;
@@ -2895,12 +2894,7 @@
         Unsafe unsafe = Unsafe.getUnsafe();
         Class<?> k = ClassLoader.class;
         long offset;
-        try {
-            Field f = k.getDeclaredField(name);
-            offset = unsafe.objectFieldOffset(f);
-        } catch (NoSuchFieldException e) {
-            throw new InternalError(e);
-        }
+        offset = unsafe.objectFieldOffset(k, name);
         return unsafe.compareAndSetObject(this, offset, null, obj);
     }
 }
--- a/jdk/src/java.base/share/classes/java/lang/Module.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/Module.java	Mon Aug 28 21:46:13 2017 +0200
@@ -130,7 +130,7 @@
 
         // define module to VM
 
-        boolean isOpen = descriptor.isOpen();
+        boolean isOpen = descriptor.isOpen() || descriptor.isAutomatic();
         Version version = descriptor.version().orElse(null);
         String vs = Objects.toString(version, null);
         String loc = Objects.toString(uri, null);
@@ -1156,18 +1156,14 @@
                 m.implAddReads(ALL_UNNAMED_MODULE, true);
             }
 
-            // exports and opens
-            if (descriptor.isOpen() || descriptor.isAutomatic()) {
-                // The VM doesn't special case open or automatic modules yet
-                // so need to export all packages
-                for (String source : descriptor.packages()) {
-                    addExportsToAll0(m, source);
+            // exports and opens, skipped for open and automatic
+            if (!descriptor.isOpen() && !descriptor.isAutomatic()) {
+                if (isBootLayer && descriptor.opens().isEmpty()) {
+                    // no open packages, no qualified exports to modules in parent layers
+                    initExports(m, nameToModule);
+                } else {
+                    initExportsAndOpens(m, nameToSource, nameToModule, layer.parents());
                 }
-            } else if (isBootLayer && descriptor.opens().isEmpty()) {
-                // no open packages, no qualified exports to modules in parent layers
-                initExports(m, nameToModule);
-            } else {
-                initExportsAndOpens(m, nameToSource, nameToModule, layer.parents());
             }
         }
 
--- a/jdk/src/java.base/share/classes/java/lang/ProcessHandleImpl.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/ProcessHandleImpl.java	Mon Aug 28 21:46:13 2017 +0200
@@ -132,34 +132,37 @@
                 // newCompletion has just been installed successfully
                 completion = newCompletion;
                 // spawn a thread to wait for and deliver the exit value
-                processReaperExecutor.execute(() -> {
-                    int exitValue = waitForProcessExit0(pid, shouldReap);
-                    if (exitValue == NOT_A_CHILD) {
-                        // pid not alive or not a child of this process
-                        // If it is alive wait for it to terminate
-                        long sleep = 300;     // initial milliseconds to sleep
-                        int incr = 30;        // increment to the sleep time
+                processReaperExecutor.execute(new Runnable() {
+                    // Use inner class to avoid lambda stack overhead
+                    public void run() {
+                        int exitValue = waitForProcessExit0(pid, shouldReap);
+                        if (exitValue == NOT_A_CHILD) {
+                            // pid not alive or not a child of this process
+                            // If it is alive wait for it to terminate
+                            long sleep = 300;     // initial milliseconds to sleep
+                            int incr = 30;        // increment to the sleep time
 
-                        long startTime = isAlive0(pid);
-                        long origStart = startTime;
-                        while (startTime >= 0) {
-                            try {
-                                Thread.sleep(Math.min(sleep, 5000L)); // no more than 5 sec
-                                sleep += incr;
-                            } catch (InterruptedException ie) {
-                                // ignore and retry
+                            long startTime = isAlive0(pid);
+                            long origStart = startTime;
+                            while (startTime >= 0) {
+                                try {
+                                    Thread.sleep(Math.min(sleep, 5000L)); // no more than 5 sec
+                                    sleep += incr;
+                                } catch (InterruptedException ie) {
+                                    // ignore and retry
+                                }
+                                startTime = isAlive0(pid);  // recheck if is alive
+                                if (origStart > 0 && startTime != origStart) {
+                                    // start time changed, pid is not the same process
+                                    break;
+                                }
                             }
-                            startTime = isAlive0(pid);  // recheck if is alive
-                            if (origStart > 0 && startTime != origStart) {
-                                // start time changed, pid is not the same process
-                                break;
-                            }
+                            exitValue = 0;
                         }
-                        exitValue = 0;
+                        newCompletion.complete(exitValue);
+                        // remove from cache afterwards
+                        completions.remove(pid, newCompletion);
                     }
-                    newCompletion.complete(exitValue);
-                    // remove from cache afterwards
-                    completions.remove(pid, newCompletion);
                 });
             }
         }
--- a/jdk/src/java.base/share/classes/java/lang/String.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/String.java	Mon Aug 28 21:46:13 2017 +0200
@@ -2488,12 +2488,8 @@
      * <tr>
      *   <td>(all)</td>
      *   <th scope="row" style="font-weight:normal; text-align:left">
-     *       <img src="doc-files/capiota.gif" alt="capiota"><img src="doc-files/capchi.gif" alt="capchi">
-     *       <img src="doc-files/captheta.gif" alt="captheta"><img src="doc-files/capupsil.gif" alt="capupsil">
-     *       <img src="doc-files/capsigma.gif" alt="capsigma"></th>
-     *   <td><img src="doc-files/iota.gif" alt="iota"><img src="doc-files/chi.gif" alt="chi">
-     *       <img src="doc-files/theta.gif" alt="theta"><img src="doc-files/upsilon.gif" alt="upsilon">
-     *       <img src="doc-files/sigma1.gif" alt="sigma"></td>
+     *       &Iota;&Chi;&Theta;&Upsilon;&Sigma;</th>
+     *   <td>&iota;&chi;&theta;&upsilon;&sigma;</td>
      *   <td>lowercased all chars in String</td>
      * </tr>
      * </tbody>
--- a/jdk/src/java.base/share/classes/java/lang/doc-files/ValueBased.html	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/doc-files/ValueBased.html	Mon Aug 28 21:46:13 2017 +0200
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!doctype html>
 <html lang="en">
 <head>
   <title>Value-based Classes</title>
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/capchi.gif has changed
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/capiota.gif has changed
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/capsigma.gif has changed
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/captheta.gif has changed
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/capupsil.gif has changed
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/chi.gif has changed
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/iota.gif has changed
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/javalang.doc.anc21.gif has changed
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/javalang.doc.anc38.gif has changed
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/javalang.doc.anc40.gif has changed
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/javalang.doc.anc41.gif has changed
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/sigma1.gif has changed
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/theta.gif has changed
--- a/jdk/src/java.base/share/classes/java/lang/doc-files/threadPrimitiveDeprecation.html	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/doc-files/threadPrimitiveDeprecation.html	Mon Aug 28 21:46:13 2017 +0200
@@ -1,3 +1,4 @@
+<!doctype html>
 <!--
  Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -22,7 +23,6 @@
  or visit www.oracle.com if you need additional information or have any
  questions.
 -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
 <head>
   <title>Java Thread Primitive Deprecation</title>
@@ -30,7 +30,7 @@
 </head>
 <body>
 <h2>Java Thread Primitive Deprecation</h2>
-<hr size="3" noshade="noshade" />
+<hr>
 <h3>Why is <code>Thread.stop</code> deprecated?</h3>
 <p>Because it is inherently unsafe. Stopping a thread causes it to
 unlock all the monitors that it has locked. (The monitors are
@@ -45,7 +45,7 @@
 no warning that his program may be corrupted. The corruption can
 manifest itself at any time after the actual damage occurs, even
 hours or days in the future.</p>
-<hr />
+<hr>
 <h3>Couldn't I just catch the <code>ThreadDeath</code> exception
 and fix the damaged object?</h3>
 <p>In theory, perhaps, but it would <em>vastly</em> complicate the
@@ -61,7 +61,7 @@
 it succeeded. The code to ensure this would be quite complex.</li>
 </ol>
 In sum, it just isn't practical.
-<hr />
+<hr>
 <h3>What about <code>Thread.stop(Throwable)</code>?</h3>
 <p>In addition to all of the problems noted above, this method may
 be used to generate exceptions that its target thread is unprepared
@@ -76,7 +76,7 @@
         Thread.currentThread().stop(t);
     }
 </pre>
-<hr />
+<hr>
 <h3>What should I use instead of <code>Thread.stop</code>?</h3>
 <p>Most uses of <code>stop</code> should be replaced by code that
 simply modifies some variable to indicate that the target thread
@@ -84,7 +84,7 @@
 regularly, and return from its run method in an orderly fashion if
 the variable indicates that it is to stop running. To ensure prompt
 communication of the stop-request, the variable must be
-<tt>volatile</tt> (or access to the variable must be
+<code>volatile</code> (or access to the variable must be
 synchronized).</p>
 <p>For example, suppose your applet contains the following
 <code>start</code>, <code>stop</code> and <code>run</code>
@@ -131,7 +131,7 @@
         }
     }
 </pre>
-<hr />
+<hr>
 <h3>How do I stop a thread that waits for long periods (e.g., for
 input)?</h3>
 <p>That's what the <code>Thread.interrupt</code> method is for. The
@@ -159,7 +159,7 @@
 </pre>
 This ensures that the Thread will reraise the
 <code>InterruptedException</code> as soon as it is able.
-<hr />
+<hr>
 <h3>What if a thread doesn't respond to
 <code>Thread.interrupt</code>?</h3>
 <p>In some cases, you can use application specific tricks. For
@@ -172,7 +172,7 @@
 cases include deliberate denial-of-service attacks, and I/O
 operations for which thread.stop and thread.interrupt do not work
 properly.</p>
-<hr />
+<hr>
 <h3>Why are <code>Thread.suspend</code> and
 <code>Thread.resume</code> deprecated?</h3>
 <p><code>Thread.suspend</code> is inherently deadlock-prone. If the
@@ -182,7 +182,7 @@
 would resume the target thread attempts to lock this monitor prior
 to calling <code>resume</code>, deadlock results. Such deadlocks
 typically manifest themselves as "frozen" processes.</p>
-<hr />
+<hr>
 <h3>What should I use instead of <code>Thread.suspend</code> and
 <code>Thread.resume</code>?</h3>
 <p>As with <code>Thread.stop</code>, the prudent approach is to
@@ -274,7 +274,7 @@
                 }
 </pre>
 <p>In the absence of explicit synchronization,
-<tt>threadSuspended</tt> must be made <tt>volatile</tt> to ensure
+<code>threadSuspended</code> must be made <code>volatile</code> to ensure
 prompt communication of the suspend-request.</p>
 The resulting <code>run</code> method is:
 <pre>
@@ -302,17 +302,17 @@
 be safely "stopped" or "suspended"?</h3>
 Yes, it's reasonably straightforward. The one subtlety is that the
 target thread may already be suspended at the time that another
-thread tries to stop it. If the <tt>stop</tt> method merely sets
-the state variable (<tt>blinker</tt>) to null, the target thread
+thread tries to stop it. If the <code>stop</code> method merely sets
+the state variable (<code>blinker</code>) to null, the target thread
 will remain suspended (waiting on the monitor), rather than exiting
 gracefully as it should. If the applet is restarted, multiple
 threads could end up waiting on the monitor at the same time,
 resulting in erratic behavior.
-<p>To rectify this situation, the <tt>stop</tt> method must ensure
+<p>To rectify this situation, the <code>stop</code> method must ensure
 that the target thread resumes immediately if it is suspended. Once
 the target thread resumes, it must recognize immediately that it
 has been stopped, and exit gracefully. Here's how the resulting
-<tt>run</tt> and <tt>stop</tt> methods look:</p>
+<code>run</code> and <code>stop</code> methods look:</p>
 <pre>
     public void run() {
         Thread thisThread = Thread.currentThread();
@@ -335,18 +335,18 @@
         notify();
     }
 </pre>
-If the <tt>stop</tt> method calls <tt>Thread.interrupt</tt>, as
-described above, it needn't call <tt>notify</tt> as well, but it
+If the <code>stop</code> method calls <code>Thread.interrupt</code>, as
+described above, it needn't call <code>notify</code> as well, but it
 still must be synchronized. This ensures that the target thread
 won't miss an interrupt due to a race condition.
-<hr />
+<hr>
 <h3>What about <code>Thread.destroy</code>?</h3>
 <code>Thread.destroy</code> was never implemented and has been
 deprecated. If it were implemented, it would be deadlock-prone in
 the manner of <code>Thread.suspend</code>. (In fact, it is roughly
 equivalent to <code>Thread.suspend</code> without the possibility
 of a subsequent <code>Thread.resume</code>.)
-<hr />
+<hr>
 <h3>Why is <code>Runtime.runFinalizersOnExit</code>
 deprecated?</h3>
 Because it is inherently unsafe. It may result in finalizers being
Binary file jdk/src/java.base/share/classes/java/lang/doc-files/upsilon.gif has changed
--- a/jdk/src/java.base/share/classes/java/lang/invoke/CallSite.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/CallSite.java	Mon Aug 28 21:46:13 2017 +0200
@@ -276,11 +276,9 @@
         if (offset > 0) {
             return offset;
         }
-        try {
-            offset = TARGET_OFFSET = UNSAFE.objectFieldOffset(CallSite.class.getDeclaredField("target"));
-            assert(offset > 0);
-            return offset;
-        } catch (Exception ex) { throw newInternalError(ex); }
+        offset = TARGET_OFFSET = UNSAFE.objectFieldOffset(CallSite.class, "target");
+        assert(offset > 0);
+        return offset;
     }
 
     /*package-private*/
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -70,13 +70,18 @@
  * and those seven fields omit much of the information in Method.
  * @author jrose
  */
+/*non-public*/ final class ResolvedMethodName {
+    //@Injected JVM_Method* vmtarget;
+    //@Injected Class<?>    vmholder;
+};
+
 /*non-public*/ final class MemberName implements Member, Cloneable {
-    private Class<?> clazz;       // class in which the method is defined
+    private Class<?> clazz;       // class in which the member is defined
     private String   name;        // may be null if not yet materialized
     private Object   type;        // may be null if not yet materialized
     private int      flags;       // modifier bits; see reflect.Modifier
-    //@Injected JVM_Method* vmtarget;
-    //@Injected int         vmindex;
+    private ResolvedMethodName method;    // cached resolved method information
+    //@Injected intptr_t       vmindex;   // vtable index or offset of resolved member
     Object   resolution;  // if null, this guy is resolved
 
     /** Return the declaring class of this member.
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandle.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandle.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1587,12 +1587,6 @@
         }
     }
 
-    private static final long FORM_OFFSET;
-    static {
-        try {
-            FORM_OFFSET = UNSAFE.objectFieldOffset(MethodHandle.class.getDeclaredField("form"));
-        } catch (ReflectiveOperationException ex) {
-            throw newInternalError(ex);
-        }
-    }
+    private static final long FORM_OFFSET
+            = UNSAFE.objectFieldOffset(MethodHandle.class, "form");
 }
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1239,17 +1239,11 @@
     // Support for resetting final fields while deserializing. Implement Holder
     // pattern to make the rarely needed offset calculation lazy.
     private static class OffsetHolder {
-        private static final long rtypeOffset, ptypesOffset;
-        static {
-            try {
-                rtypeOffset = UNSAFE.objectFieldOffset
-                    (MethodType.class.getDeclaredField("rtype"));
-                ptypesOffset = UNSAFE.objectFieldOffset
-                    (MethodType.class.getDeclaredField("ptypes"));
-            } catch (Exception ex) {
-                throw new Error(ex);
-            }
-        }
+        static final long rtypeOffset
+                = UNSAFE.objectFieldOffset(MethodType.class, "rtype");
+
+        static final long ptypesOffset
+                = UNSAFE.objectFieldOffset(MethodType.class, "ptypes");
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java	Mon Aug 28 21:46:13 2017 +0200
@@ -25,19 +25,24 @@
 
 package java.lang.invoke;
 
+import jdk.internal.misc.Unsafe;
 import jdk.internal.org.objectweb.asm.ClassWriter;
 import jdk.internal.org.objectweb.asm.Label;
 import jdk.internal.org.objectweb.asm.MethodVisitor;
 import jdk.internal.org.objectweb.asm.Opcodes;
 import jdk.internal.vm.annotation.ForceInline;
-import jdk.internal.misc.Unsafe;
+import sun.invoke.util.Wrapper;
+import sun.security.action.GetPropertyAction;
 
 import java.lang.invoke.MethodHandles.Lookup;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+import java.util.Properties;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.function.Function;
-import sun.security.action.GetPropertyAction;
 
 import static jdk.internal.org.objectweb.asm.Opcodes.*;
 
@@ -319,12 +324,12 @@
     }
 
     private static final class RecipeElement {
-        private final Object value;
+        private final String value;
         private final int argPos;
         private final char tag;
 
         public RecipeElement(Object cnst) {
-            this.value = Objects.requireNonNull(cnst);
+            this.value = String.valueOf(Objects.requireNonNull(cnst));
             this.argPos = -1;
             this.tag = TAG_CONST;
         }
@@ -335,7 +340,7 @@
             this.tag = TAG_ARG;
         }
 
-        public Object getValue() {
+        public String getValue() {
             assert (tag == TAG_CONST);
             return value;
         }
@@ -923,8 +928,7 @@
                 for (RecipeElement el : recipe.getElements()) {
                     switch (el.getTag()) {
                         case TAG_CONST:
-                            Object cnst = el.getValue();
-                            len += cnst.toString().length();
+                            len += el.getValue().length();
                             break;
                         case TAG_ARG:
                             /*
@@ -983,9 +987,8 @@
                     String desc;
                     switch (el.getTag()) {
                         case TAG_CONST:
-                            Object cnst = el.getValue();
-                            mv.visitLdcInsn(cnst);
-                            desc = getSBAppendDesc(cnst.getClass());
+                            mv.visitLdcInsn(el.getValue());
+                            desc = getSBAppendDesc(String.class);
                             break;
                         case TAG_ARG:
                             Class<?> cl = arr[el.getArgPos()];
@@ -1273,8 +1276,7 @@
             for (RecipeElement el : recipe.getElements()) {
                 switch (el.getTag()) {
                     case TAG_CONST:
-                        Object cnst = el.getValue();
-                        initial += cnst.toString().length();
+                        initial += el.getValue().length();
                         break;
                     case TAG_ARG:
                         final int i = el.getArgPos();
@@ -1303,9 +1305,8 @@
                 MethodHandle appender;
                 switch (el.getTag()) {
                     case TAG_CONST:
-                        Object constant = el.getValue();
-                        MethodHandle mh = appender(adaptToStringBuilder(constant.getClass()));
-                        appender = MethodHandles.insertArguments(mh, 1, constant);
+                        MethodHandle mh = appender(adaptToStringBuilder(String.class));
+                        appender = MethodHandles.insertArguments(mh, 1, el.getValue());
                         break;
                     case TAG_ARG:
                         int ac = el.getArgPos();
@@ -1506,8 +1507,7 @@
                 mh = MethodHandles.dropArguments(mh, 2, int.class);
                 switch (el.getTag()) {
                     case TAG_CONST: {
-                        Object cnst = el.getValue();
-                        MethodHandle prepender = MethodHandles.insertArguments(prepender(cnst.getClass()), 3, cnst);
+                        MethodHandle prepender = MethodHandles.insertArguments(prepender(String.class), 3, el.getValue());
                         mh = MethodHandles.foldArguments(mh, 1, prepender,
                                 2, 0, 3 // index, storage, coder
                         );
@@ -1550,10 +1550,9 @@
             for (RecipeElement el : recipe.getElements()) {
                 switch (el.getTag()) {
                     case TAG_CONST:
-                        Object constant = el.getValue();
-                        String s = constant.toString();
-                        initialCoder = (byte) coderMixer(String.class).invoke(initialCoder, s);
-                        initialLen += s.length();
+                        String constant = el.getValue();
+                        initialCoder = (byte) coderMixer(String.class).invoke(initialCoder, constant);
+                        initialLen += constant.length();
                         break;
                     case TAG_ARG:
                         int ac = el.getArgPos();
@@ -1621,7 +1620,8 @@
         private static final Function<Class<?>, MethodHandle> PREPEND = new Function<Class<?>, MethodHandle>() {
             @Override
             public MethodHandle apply(Class<?> c) {
-                return lookupStatic(Lookup.IMPL_LOOKUP, STRING_HELPER, "prepend", int.class, int.class, byte[].class, byte.class, c);
+                return lookupStatic(Lookup.IMPL_LOOKUP, STRING_HELPER, "prepend", int.class, int.class, byte[].class, byte.class,
+                        Wrapper.asPrimitiveType(c));
             }
         };
 
@@ -1629,7 +1629,8 @@
         private static final Function<Class<?>, MethodHandle> CODER_MIX = new Function<Class<?>, MethodHandle>() {
             @Override
             public MethodHandle apply(Class<?> c) {
-                return lookupStatic(Lookup.IMPL_LOOKUP, STRING_HELPER, "mixCoder", byte.class, byte.class, c);
+                return lookupStatic(Lookup.IMPL_LOOKUP, STRING_HELPER, "mixCoder", byte.class, byte.class,
+                        Wrapper.asPrimitiveType(c));
             }
         };
 
@@ -1637,7 +1638,8 @@
         private static final Function<Class<?>, MethodHandle> LENGTH_MIX = new Function<Class<?>, MethodHandle>() {
             @Override
             public MethodHandle apply(Class<?> c) {
-                return lookupStatic(Lookup.IMPL_LOOKUP, STRING_HELPER, "mixLen", int.class, int.class, c);
+                return lookupStatic(Lookup.IMPL_LOOKUP, STRING_HELPER, "mixLen", int.class, int.class,
+                        Wrapper.asPrimitiveType(c));
             }
         };
 
--- a/jdk/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Mon Aug 28 21:46:13 2017 +0200
@@ -2014,12 +2014,7 @@
     private static final long VFORM_OFFSET;
 
     static {
-        try {
-            VFORM_OFFSET = UNSAFE.objectFieldOffset(VarHandle.class.getDeclaredField("vform"));
-        }
-        catch (ReflectiveOperationException e) {
-            throw newInternalError(e);
-        }
+        VFORM_OFFSET = UNSAFE.objectFieldOffset(VarHandle.class, "vform");
 
         // The VarHandleGuards must be initialized to ensure correct
         // compilation of the guard methods
--- a/jdk/src/java.base/share/classes/java/lang/invoke/VarHandleByteArrayBase.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/VarHandleByteArrayBase.java	Mon Aug 28 21:46:13 2017 +0200
@@ -35,32 +35,20 @@
  */
 abstract class VarHandleByteArrayBase {
     // Buffer.address
-    static final long BUFFER_ADDRESS;
+    static final long BUFFER_ADDRESS
+            = UNSAFE.objectFieldOffset(Buffer.class, "address");
+
     // Buffer.limit
-    static final long BUFFER_LIMIT;
-    // ByteBuffer.hb
-    static final long BYTE_BUFFER_HB;
-    // ByteBuffer.isReadOnly
-    static final long BYTE_BUFFER_IS_READ_ONLY;
-
-    static {
-        try {
-            BUFFER_ADDRESS = UNSAFE.objectFieldOffset(
-                    Buffer.class.getDeclaredField("address"));
+    static final long BUFFER_LIMIT
+            = UNSAFE.objectFieldOffset(Buffer.class, "limit");
 
-            BUFFER_LIMIT = UNSAFE.objectFieldOffset(
-                    Buffer.class.getDeclaredField("limit"));
-
-            BYTE_BUFFER_HB = UNSAFE.objectFieldOffset(
-                    ByteBuffer.class.getDeclaredField("hb"));
+    // ByteBuffer.hb
+    static final long BYTE_BUFFER_HB
+            = UNSAFE.objectFieldOffset(ByteBuffer.class, "hb");
 
-            BYTE_BUFFER_IS_READ_ONLY = UNSAFE.objectFieldOffset(
-                    ByteBuffer.class.getDeclaredField("isReadOnly"));
-        }
-        catch (ReflectiveOperationException e) {
-            throw new Error(e);
-        }
-    }
+    // ByteBuffer.isReadOnly
+    static final long BYTE_BUFFER_IS_READ_ONLY
+            = UNSAFE.objectFieldOffset(ByteBuffer.class, "isReadOnly");
 
     static final boolean BE = UNSAFE.isBigEndian();
 
--- a/jdk/src/java.base/share/classes/java/math/BigDecimal.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/math/BigDecimal.java	Mon Aug 28 21:46:13 2017 +0200
@@ -4067,20 +4067,13 @@
     }
 
     private static class UnsafeHolder {
-        private static final jdk.internal.misc.Unsafe unsafe;
-        private static final long intCompactOffset;
-        private static final long intValOffset;
-        static {
-            try {
-                unsafe = jdk.internal.misc.Unsafe.getUnsafe();
-                intCompactOffset = unsafe.objectFieldOffset
-                    (BigDecimal.class.getDeclaredField("intCompact"));
-                intValOffset = unsafe.objectFieldOffset
-                    (BigDecimal.class.getDeclaredField("intVal"));
-            } catch (Exception ex) {
-                throw new ExceptionInInitializerError(ex);
-            }
-        }
+        private static final jdk.internal.misc.Unsafe unsafe
+                = jdk.internal.misc.Unsafe.getUnsafe();
+        private static final long intCompactOffset
+                = unsafe.objectFieldOffset(BigDecimal.class, "intCompact");
+        private static final long intValOffset
+                = unsafe.objectFieldOffset(BigDecimal.class, "intVal");
+
         static void setIntCompact(BigDecimal bd, long val) {
             unsafe.putLong(bd, intCompactOffset, val);
         }
--- a/jdk/src/java.base/share/classes/java/math/BigInteger.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/math/BigInteger.java	Mon Aug 28 21:46:13 2017 +0200
@@ -4582,20 +4582,12 @@
 
     // Support for resetting final fields while deserializing
     private static class UnsafeHolder {
-        private static final jdk.internal.misc.Unsafe unsafe;
-        private static final long signumOffset;
-        private static final long magOffset;
-        static {
-            try {
-                unsafe = jdk.internal.misc.Unsafe.getUnsafe();
-                signumOffset = unsafe.objectFieldOffset
-                    (BigInteger.class.getDeclaredField("signum"));
-                magOffset = unsafe.objectFieldOffset
-                    (BigInteger.class.getDeclaredField("mag"));
-            } catch (Exception ex) {
-                throw new ExceptionInInitializerError(ex);
-            }
-        }
+        private static final jdk.internal.misc.Unsafe unsafe
+                = jdk.internal.misc.Unsafe.getUnsafe();
+        private static final long signumOffset
+                = unsafe.objectFieldOffset(BigInteger.class, "signum");
+        private static final long magOffset
+                = unsafe.objectFieldOffset(BigInteger.class, "mag");
 
         static void putSign(BigInteger bi, int sign) {
             unsafe.putInt(bi, signumOffset, sign);
--- a/jdk/src/java.base/share/classes/java/net/Inet6Address.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/net/Inet6Address.java	Mon Aug 28 21:46:13 2017 +0200
@@ -576,19 +576,10 @@
          new ObjectStreamField("ifname", String.class)
     };
 
-    private static final long FIELDS_OFFSET;
-    private static final jdk.internal.misc.Unsafe UNSAFE;
-
-    static {
-        try {
-            jdk.internal.misc.Unsafe unsafe = jdk.internal.misc.Unsafe.getUnsafe();
-            FIELDS_OFFSET = unsafe.objectFieldOffset(
-                    Inet6Address.class.getDeclaredField("holder6"));
-            UNSAFE = unsafe;
-        } catch (ReflectiveOperationException e) {
-            throw new Error(e);
-        }
-    }
+    private static final jdk.internal.misc.Unsafe UNSAFE
+            = jdk.internal.misc.Unsafe.getUnsafe();
+    private static final long FIELDS_OFFSET = UNSAFE.objectFieldOffset(
+                Inet6Address.class, "holder6");
 
     /**
      * restore the state of this object from stream
--- a/jdk/src/java.base/share/classes/java/net/InetAddress.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1707,20 +1707,10 @@
         }
     }
 
-    private static final long FIELDS_OFFSET;
-    private static final jdk.internal.misc.Unsafe UNSAFE;
-
-    static {
-        try {
-            jdk.internal.misc.Unsafe unsafe = jdk.internal.misc.Unsafe.getUnsafe();
-            FIELDS_OFFSET = unsafe.objectFieldOffset(
-                InetAddress.class.getDeclaredField("holder")
-            );
-            UNSAFE = unsafe;
-        } catch (ReflectiveOperationException e) {
-            throw new Error(e);
-        }
-    }
+    private static final jdk.internal.misc.Unsafe UNSAFE
+            = jdk.internal.misc.Unsafe.getUnsafe();
+    private static final long FIELDS_OFFSET
+            = UNSAFE.objectFieldOffset(InetAddress.class, "holder");
 
     private void readObject (ObjectInputStream s) throws
                          IOException, ClassNotFoundException {
--- a/jdk/src/java.base/share/classes/java/net/InetSocketAddress.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/net/InetSocketAddress.java	Mon Aug 28 21:46:13 2017 +0200
@@ -302,18 +302,10 @@
         throw new InvalidObjectException("Stream data required");
     }
 
-    private static final long FIELDS_OFFSET;
-    private static final jdk.internal.misc.Unsafe UNSAFE;
-    static {
-        try {
-            jdk.internal.misc.Unsafe unsafe = jdk.internal.misc.Unsafe.getUnsafe();
-            FIELDS_OFFSET = unsafe.objectFieldOffset(
-                    InetSocketAddress.class.getDeclaredField("holder"));
-            UNSAFE = unsafe;
-        } catch (ReflectiveOperationException e) {
-            throw new Error(e);
-        }
-    }
+    private static final jdk.internal.misc.Unsafe UNSAFE
+            = jdk.internal.misc.Unsafe.getUnsafe();
+    private static final long FIELDS_OFFSET
+            = UNSAFE.objectFieldOffset(InetSocketAddress.class, "holder");
 
     /**
      * Gets the port number.
--- a/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java	Mon Aug 28 21:46:13 2017 +0200
@@ -202,26 +202,26 @@
                 segments[part].append(ch);
             } else if (ch == '<' || ch == '#' || ch == '\u2264') {
                 if (segments[0].length() == 0) {
-                    throw new IllegalArgumentException();
+                    throw new IllegalArgumentException("Each interval must"
+                            + " contain a number before a format");
                 }
-                try {
-                    String tempBuffer = segments[0].toString();
-                    if (tempBuffer.equals("\u221E")) {
-                        startValue = Double.POSITIVE_INFINITY;
-                    } else if (tempBuffer.equals("-\u221E")) {
-                        startValue = Double.NEGATIVE_INFINITY;
-                    } else {
-                        startValue = Double.valueOf(segments[0].toString()).doubleValue();
-                    }
-                } catch (Exception e) {
-                    throw new IllegalArgumentException();
+
+                String tempBuffer = segments[0].toString();
+                if (tempBuffer.equals("\u221E")) {
+                    startValue = Double.POSITIVE_INFINITY;
+                } else if (tempBuffer.equals("-\u221E")) {
+                    startValue = Double.NEGATIVE_INFINITY;
+                } else {
+                    startValue = Double.valueOf(tempBuffer);
                 }
+
                 if (ch == '<' && startValue != Double.POSITIVE_INFINITY &&
                         startValue != Double.NEGATIVE_INFINITY) {
                     startValue = nextDouble(startValue);
                 }
                 if (startValue <= oldStartValue) {
-                    throw new IllegalArgumentException();
+                    throw new IllegalArgumentException("Incorrect order of"
+                            + " intervals, must be in ascending order");
                 }
                 segments[0].setLength(0);
                 part = 1;
--- a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java	Mon Aug 28 21:46:13 2017 +0200
@@ -223,7 +223,7 @@
  * <tr>
  * <th scope="row"> {@link #ISO_OFFSET_DATE_TIME}</th>
  * <td> Date Time with Offset
- * </td><td>2011-12-03T10:15:30+01:00'</td>
+ * </td><td>'2011-12-03T10:15:30+01:00'</td>
  * </tr>
  * <tr>
  * <th scope="row"> {@link #ISO_ZONED_DATE_TIME}</th>
@@ -243,7 +243,7 @@
  * <tr>
  * <th scope="row"> {@link #ISO_WEEK_DATE}</th>
  * <td> Year and Week </td>
- * <td>2012-W48-6'</td></tr>
+ * <td>'2012-W48-6'</td></tr>
  * <tr>
  * <th scope="row"> {@link #ISO_INSTANT}</th>
  * <td> Date and Time of an Instant </td>
--- a/jdk/src/java.base/share/classes/java/util/Deque.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/Deque.java	Mon Aug 28 21:46:13 2017 +0200
@@ -56,41 +56,44 @@
  * <p>The twelve methods described above are summarized in the
  * following table:
  *
- * <table class="plain">
+ * <table class="striped">
  * <caption>Summary of Deque methods</caption>
+ *  <thead>
  *  <tr>
- *    <td></td>
- *    <td style="text-align:center" COLSPAN = 2> <b>First Element (Head)</b></td>
- *    <td style="text-align:center" COLSPAN = 2> <b>Last Element (Tail)</b></td>
+ *    <td rowspan="2"></td>
+ *    <th scope="col" colspan="2"> First Element (Head)</th>
+ *    <th scope="col" colspan="2"> Last Element (Tail)</th>
  *  </tr>
  *  <tr>
- *    <td></td>
- *    <td style="text-align:center"><em>Throws exception</em></td>
- *    <td style="text-align:center"><em>Special value</em></td>
- *    <td style="text-align:center"><em>Throws exception</em></td>
- *    <td style="text-align:center"><em>Special value</em></td>
+ *    <th scope="col" style="font-weight:normal; font-style:italic">Throws exception</th>
+ *    <th scope="col" style="font-weight:normal; font-style:italic">Special value</th>
+ *    <th scope="col" style="font-weight:normal; font-style:italic">Throws exception</th>
+ *    <th scope="col" style="font-weight:normal; font-style:italic">Special value</th>
  *  </tr>
+ *  </thead>
+ *  <tbody>
  *  <tr>
- *    <td><b>Insert</b></td>
+ *    <th scope="row">Insert</th>
  *    <td>{@link #addFirst(Object) addFirst(e)}</td>
  *    <td>{@link #offerFirst(Object) offerFirst(e)}</td>
  *    <td>{@link #addLast(Object) addLast(e)}</td>
  *    <td>{@link #offerLast(Object) offerLast(e)}</td>
  *  </tr>
  *  <tr>
- *    <td><b>Remove</b></td>
+ *    <th scope="row">Remove</th>
  *    <td>{@link #removeFirst() removeFirst()}</td>
  *    <td>{@link #pollFirst() pollFirst()}</td>
  *    <td>{@link #removeLast() removeLast()}</td>
  *    <td>{@link #pollLast() pollLast()}</td>
  *  </tr>
  *  <tr>
- *    <td><b>Examine</b></td>
+ *    <th scope="row">Examine</th>
  *    <td>{@link #getFirst() getFirst()}</td>
  *    <td>{@link #peekFirst() peekFirst()}</td>
  *    <td>{@link #getLast() getLast()}</td>
  *    <td>{@link #peekLast() peekLast()}</td>
  *  </tr>
+ *  </tbody>
  * </table>
  *
  * <p>This interface extends the {@link Queue} interface.  When a deque is
@@ -99,36 +102,40 @@
  * inherited from the {@code Queue} interface are precisely equivalent to
  * {@code Deque} methods as indicated in the following table:
  *
- * <table class="plain">
+ * <table class="striped">
  * <caption>Comparison of Queue and Deque methods</caption>
+ *  <thead>
  *  <tr>
- *    <td style="text-align:center"> <b>{@code Queue} Method</b></td>
- *    <td style="text-align:center"> <b>Equivalent {@code Deque} Method</b></td>
+ *    <th scope="col"> {@code Queue} Method</th>
+ *    <th scope="col"> Equivalent {@code Deque} Method</th>
  *  </tr>
+ *  </thead>
+ *  <tbody>
  *  <tr>
- *    <td>{@link #add(Object) add(e)}</td>
+ *    <th scope="row">{@link #add(Object) add(e)}</th>
  *    <td>{@link #addLast(Object) addLast(e)}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #offer(Object) offer(e)}</td>
+ *    <th scope="row">{@link #offer(Object) offer(e)}</th>
  *    <td>{@link #offerLast(Object) offerLast(e)}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #remove() remove()}</td>
+ *    <th scope="row">{@link #remove() remove()}</th>
  *    <td>{@link #removeFirst() removeFirst()}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #poll() poll()}</td>
+ *    <th scope="row">{@link #poll() poll()}</th>
  *    <td>{@link #pollFirst() pollFirst()}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #element() element()}</td>
+ *    <th scope="row">{@link #element() element()}</th>
  *    <td>{@link #getFirst() getFirst()}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #peek() peek()}</td>
+ *    <th scope="row">{@link #peek() peek()}</th>
  *    <td>{@link #peekFirst() peekFirst()}</td>
  *  </tr>
+ *  </tbody>
  * </table>
  *
  * <p>Deques can also be used as LIFO (Last-In-First-Out) stacks.  This
@@ -137,24 +144,28 @@
  * beginning of the deque.  Stack methods are precisely equivalent to
  * {@code Deque} methods as indicated in the table below:
  *
- * <table class="plain">
+ * <table class="striped">
  * <caption>Comparison of Stack and Deque methods</caption>
+ *  <thead>
  *  <tr>
- *    <td style="text-align:center"> <b>Stack Method</b></td>
- *    <td style="text-align:center"> <b>Equivalent {@code Deque} Method</b></td>
+ *    <th scope="col"> Stack Method</th>
+ *    <th scope="col"> Equivalent {@code Deque} Method</th>
  *  </tr>
+ *  </thead>
+ *  <tbody>
  *  <tr>
- *    <td>{@link #push(Object) push(e)}</td>
+ *    <th scope="row">{@link #push(Object) push(e)}</th>
  *    <td>{@link #addFirst(Object) addFirst(e)}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #pop() pop()}</td>
+ *    <th scope="row">{@link #pop() pop()}</th>
  *    <td>{@link #removeFirst() removeFirst()}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #peek() peek()}</td>
+ *    <th scope="row">{@link #peek() peek()}</th>
  *    <td>{@link #peekFirst() peekFirst()}</td>
  *  </tr>
+ *  </tbody>
  * </table>
  *
  * <p>Note that the {@link #peek peek} method works equally well when
--- a/jdk/src/java.base/share/classes/java/util/Queue.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/Queue.java	Mon Aug 28 21:46:13 2017 +0200
@@ -46,28 +46,32 @@
  * use with capacity-restricted {@code Queue} implementations; in most
  * implementations, insert operations cannot fail.
  *
- * <table class="plain">
+ * <table class="striped">
  * <caption>Summary of Queue methods</caption>
+ *  <thead>
  *  <tr>
  *    <td></td>
- *    <td style="text-align:center"><em>Throws exception</em></td>
- *    <td style="text-align:center"><em>Returns special value</em></td>
+ *    <th scope="col" style="font-weight:normal; font-style:italic">Throws exception</th>
+ *    <th scope="col" style="font-weight:normal; font-style:italic">Returns special value</th>
  *  </tr>
+ *  </thead>
+ *  <tbody>
  *  <tr>
- *    <td><b>Insert</b></td>
+ *    <th scope="row">Insert</th>
  *    <td>{@link #add(Object) add(e)}</td>
  *    <td>{@link #offer(Object) offer(e)}</td>
  *  </tr>
  *  <tr>
- *    <td><b>Remove</b></td>
+ *    <th scope="row">Remove</th>
  *    <td>{@link #remove() remove()}</td>
  *    <td>{@link #poll() poll()}</td>
  *  </tr>
  *  <tr>
- *    <td><b>Examine</b></td>
+ *    <th scope="row">Examine</th>
  *    <td>{@link #element() element()}</td>
  *    <td>{@link #peek() peek()}</td>
  *  </tr>
+ *  </tbody>
  * </table>
  *
  * <p>Queues typically, but do not necessarily, order elements in a
--- a/jdk/src/java.base/share/classes/java/util/ResourceBundle.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/ResourceBundle.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1210,15 +1210,15 @@
      * <strong>Example:</strong></a>
      * <p>
      * The following class and property files are provided:
-     * <pre>
-     *     MyResources.class
-     *     MyResources.properties
-     *     MyResources_fr.properties
-     *     MyResources_fr_CH.class
-     *     MyResources_fr_CH.properties
-     *     MyResources_en.properties
-     *     MyResources_es_ES.class
-     * </pre>
+     * <ul>
+     *     <li>MyResources.class
+     *     <li>MyResources.properties
+     *     <li>MyResources_fr.properties
+     *     <li>MyResources_fr_CH.class
+     *     <li>MyResources_fr_CH.properties
+     *     <li>MyResources_en.properties
+     *     <li>MyResources_es_ES.class
+     * </ul>
      *
      * The contents of all files are valid (that is, public non-abstract
      * subclasses of <code>ResourceBundle</code> for the ".class" files,
@@ -1228,14 +1228,17 @@
      * <p>Calling <code>getBundle</code> with the locale arguments below will
      * instantiate resource bundles as follows:
      *
-     * <table class="borderless">
+     * <table class="striped">
      * <caption style="display:none">getBundle() locale to resource bundle mapping</caption>
+     * <thead>
+     * <tr><th scope="col">Locale</th><th scope="col">Resource bundle</th></tr>
+     * </thead>
      * <tbody>
-     * <tr><td>Locale("fr", "CH")</td><td>MyResources_fr_CH.class, parent MyResources_fr.properties, parent MyResources.class</td></tr>
-     * <tr><td>Locale("fr", "FR")</td><td>MyResources_fr.properties, parent MyResources.class</td></tr>
-     * <tr><td>Locale("de", "DE")</td><td>MyResources_en.properties, parent MyResources.class</td></tr>
-     * <tr><td>Locale("en", "US")</td><td>MyResources_en.properties, parent MyResources.class</td></tr>
-     * <tr><td>Locale("es", "ES")</td><td>MyResources_es_ES.class, parent MyResources.class</td></tr>
+     * <tr><th scope="row">Locale("fr", "CH")</th><td>MyResources_fr_CH.class, parent MyResources_fr.properties, parent MyResources.class</td></tr>
+     * <tr><th scope="row">Locale("fr", "FR")</th><td>MyResources_fr.properties, parent MyResources.class</td></tr>
+     * <tr><th scope="row">Locale("de", "DE")</th><td>MyResources_en.properties, parent MyResources.class</td></tr>
+     * <tr><th scope="row">Locale("en", "US")</th><td>MyResources_en.properties, parent MyResources.class</td></tr>
+     * <tr><th scope="row">Locale("es", "ES")</th><td>MyResources_es_ES.class, parent MyResources.class</td></tr>
      * </tbody>
      * </table>
      *
@@ -1324,42 +1327,41 @@
      * <caption style="display:none">locale-format combinations for newBundle</caption>
      * <thead>
      * <tr>
-     * <td
-     * style="vertical-align: top; text-align: left; font-weight: bold; width: 50%;"><code>Locale</code><br>
-     * </td>
-     * <td
-     * style="vertical-align: top; text-align: left; font-weight: bold; width: 50%;"><code>format</code><br>
-     * </td>
+     * <th scope="col">Index</th>
+     * <th scope="col"><code>Locale</code></th>
+     * <th scope="col"><code>format</code></th>
      * </tr>
      * </thead>
      * <tbody>
      * <tr>
-     * <td style="vertical-align: top; width: 50%;"><code>Locale("de", "DE")</code><br>
-     * </td>
-     * <td style="vertical-align: top; width: 50%;"><code>java.class</code><br>
-     * </td>
+     * <th scope="row">1</th>
+     * <td><code>Locale("de", "DE")</code></td>
+     * <td><code>java.class</code></td>
      * </tr>
      * <tr>
-     * <td style="vertical-align: top; width: 50%;"><code>Locale("de", "DE")</code></td>
-     * <td style="vertical-align: top; width: 50%;"><code>java.properties</code><br>
-     * </td>
+     * <th scope="row">2</th>
+     * <td><code>Locale("de", "DE")</code></td>
+     * <td><code>java.properties</code></td>
      * </tr>
      * <tr>
-     * <td style="vertical-align: top; width: 50%;"><code>Locale("de")</code></td>
-     * <td style="vertical-align: top; width: 50%;"><code>java.class</code></td>
-     * </tr>
-     * <tr>
-     * <td style="vertical-align: top; width: 50%;"><code>Locale("de")</code></td>
-     * <td style="vertical-align: top; width: 50%;"><code>java.properties</code></td>
+     * <th scope="row">3</th>
+     * <td><code>Locale("de")</code></td>
+     * <td><code>java.class</code></td>
      * </tr>
      * <tr>
-     * <td style="vertical-align: top; width: 50%;"><code>Locale("")</code><br>
-     * </td>
-     * <td style="vertical-align: top; width: 50%;"><code>java.class</code></td>
+     * <th scope="row">4</th>
+     * <td><code>Locale("de")</code></td>
+     * <td><code>java.properties</code></td>
      * </tr>
      * <tr>
-     * <td style="vertical-align: top; width: 50%;"><code>Locale("")</code></td>
-     * <td style="vertical-align: top; width: 50%;"><code>java.properties</code></td>
+     * <th scope="row">5</th>
+     * <td><code>Locale("")</code></td>
+     * <td><code>java.class</code></td>
+     * </tr>
+     * <tr>
+     * <th scope="row">6</th>
+     * <td><code>Locale("")</code></td>
+     * <td><code>java.properties</code></td>
      * </tr>
      * </tbody>
      * </table>
@@ -3453,15 +3455,15 @@
         }
 
         /**
-         * Converts the given <code>bundleName</code> to the form required
+         * Converts the given {@code bundleName} to the form required
          * by the {@link ClassLoader#getResource ClassLoader.getResource}
-         * method by replacing all occurrences of <code>'.'</code> in
-         * <code>bundleName</code> with <code>'/'</code> and appending a
-         * <code>'.'</code> and the given file <code>suffix</code>. For
-         * example, if <code>bundleName</code> is
-         * <code>"foo.bar.MyResources_ja_JP"</code> and <code>suffix</code>
-         * is <code>"properties"</code>, then
-         * <code>"foo/bar/MyResources_ja_JP.properties"</code> is returned.
+         * method by replacing all occurrences of {@code '.'} in
+         * {@code bundleName} with {@code '/'} and appending a
+         * {@code '.'} and the given file {@code suffix}. For
+         * example, if {@code bundleName} is
+         * {@code "foo.bar.MyResources_ja_JP"} and {@code suffix}
+         * is {@code "properties"}, then
+         * {@code "foo/bar/MyResources_ja_JP.properties"} is returned.
          *
          * @param bundleName
          *        the bundle name
@@ -3469,8 +3471,8 @@
          *        the file type suffix
          * @return the converted resource name
          * @exception NullPointerException
-         *         if <code>bundleName</code> or <code>suffix</code>
-         *         is <code>null</code>
+         *         if {@code bundleName} or {@code suffix}
+         *         is {@code null}
          */
         public final String toResourceName(String bundleName, String suffix) {
             StringBuilder sb = new StringBuilder(bundleName.length() + 1 + suffix.length());
--- a/jdk/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java	Mon Aug 28 21:46:13 2017 +0200
@@ -56,66 +56,66 @@
  * <table class="plain">
  * <caption>Summary of BlockingDeque methods</caption>
  *  <tr>
- *    <td style="text-align:center" COLSPAN = 5> <b>First Element (Head)</b></td>
+ *    <th id="First" colspan="5"> First Element (Head)</th>
  *  </tr>
  *  <tr>
  *    <td></td>
- *    <td style="text-align:center"><em>Throws exception</em></td>
- *    <td style="text-align:center"><em>Special value</em></td>
- *    <td style="text-align:center"><em>Blocks</em></td>
- *    <td style="text-align:center"><em>Times out</em></td>
+ *    <th id="FThrow" style="font-weight:normal; font-style: italic">Throws exception</th>
+ *    <th id="FValue" style="font-weight:normal; font-style: italic">Special value</th>
+ *    <th id="FBlock" style="font-weight:normal; font-style: italic">Blocks</th>
+ *    <th id="FTimes" style="font-weight:normal; font-style: italic">Times out</th>
  *  </tr>
  *  <tr>
- *    <td><b>Insert</b></td>
- *    <td>{@link #addFirst(Object) addFirst(e)}</td>
- *    <td>{@link #offerFirst(Object) offerFirst(e)}</td>
- *    <td>{@link #putFirst(Object) putFirst(e)}</td>
- *    <td>{@link #offerFirst(Object, long, TimeUnit) offerFirst(e, time, unit)}</td>
+ *    <th id="FInsert" style="text-align:left">Insert</th>
+ *    <td headers="First FInsert FThrow">{@link #addFirst(Object) addFirst(e)}</td>
+ *    <td headers="First FInsert FValue">{@link #offerFirst(Object) offerFirst(e)}</td>
+ *    <td headers="First FInsert FBlock">{@link #putFirst(Object) putFirst(e)}</td>
+ *    <td headers="First FInsert FTimes">{@link #offerFirst(Object, long, TimeUnit) offerFirst(e, time, unit)}</td>
  *  </tr>
  *  <tr>
- *    <td><b>Remove</b></td>
- *    <td>{@link #removeFirst() removeFirst()}</td>
- *    <td>{@link #pollFirst() pollFirst()}</td>
- *    <td>{@link #takeFirst() takeFirst()}</td>
- *    <td>{@link #pollFirst(long, TimeUnit) pollFirst(time, unit)}</td>
+ *    <th id="FRemove" style="text-align:left">Remove</th>
+ *    <td headers="First FRemove FThrow">{@link #removeFirst() removeFirst()}</td>
+ *    <td headers="First FRemove FValue">{@link #pollFirst() pollFirst()}</td>
+ *    <td headers="First FRemove FBlock">{@link #takeFirst() takeFirst()}</td>
+ *    <td headers="First FRemove FTimes">{@link #pollFirst(long, TimeUnit) pollFirst(time, unit)}</td>
  *  </tr>
  *  <tr>
- *    <td><b>Examine</b></td>
- *    <td>{@link #getFirst() getFirst()}</td>
- *    <td>{@link #peekFirst() peekFirst()}</td>
- *    <td><em>not applicable</em></td>
- *    <td><em>not applicable</em></td>
+ *    <th id="FExamine" style="text-align:left">Examine</th>
+ *    <td headers="First FExamine FThrow">{@link #getFirst() getFirst()}</td>
+ *    <td headers="First FExamine FValue">{@link #peekFirst() peekFirst()}</td>
+ *    <td headers="First FExamine FBlock" style="font-style:italic">not applicable</td>
+ *    <td headers="First FExamine FTimes" style="font-style:italic">not applicable</td>
  *  </tr>
  *  <tr>
- *    <td style="text-align:center" COLSPAN = 5> <b>Last Element (Tail)</b></td>
+ *    <th id="Last" colspan="5"> Last Element (Tail)</th>
  *  </tr>
  *  <tr>
  *    <td></td>
- *    <td style="text-align:center"><em>Throws exception</em></td>
- *    <td style="text-align:center"><em>Special value</em></td>
- *    <td style="text-align:center"><em>Blocks</em></td>
- *    <td style="text-align:center"><em>Times out</em></td>
+ *    <th id="LThrow" style="font-weight:normal; font-style: italic">Throws exception</th>
+ *    <th id="LValue" style="font-weight:normal; font-style: italic">Special value</th>
+ *    <th id="LBlock" style="font-weight:normal; font-style: italic">Blocks</th>
+ *    <th id="LTimes" style="font-weight:normal; font-style: italic">Times out</th>
  *  </tr>
  *  <tr>
- *    <td><b>Insert</b></td>
- *    <td>{@link #addLast(Object) addLast(e)}</td>
- *    <td>{@link #offerLast(Object) offerLast(e)}</td>
- *    <td>{@link #putLast(Object) putLast(e)}</td>
- *    <td>{@link #offerLast(Object, long, TimeUnit) offerLast(e, time, unit)}</td>
+ *    <th id="LInsert" style="text-align:left">Insert</th>
+ *    <td headers="Last LInsert LThrow">{@link #addLast(Object) addLast(e)}</td>
+ *    <td headers="Last LInsert LValue">{@link #offerLast(Object) offerLast(e)}</td>
+ *    <td headers="Last LInsert LBlock">{@link #putLast(Object) putLast(e)}</td>
+ *    <td headers="Last LInsert LTimes">{@link #offerLast(Object, long, TimeUnit) offerLast(e, time, unit)}</td>
  *  </tr>
  *  <tr>
- *    <td><b>Remove</b></td>
- *    <td>{@link #removeLast() removeLast()}</td>
- *    <td>{@link #pollLast() pollLast()}</td>
- *    <td>{@link #takeLast() takeLast()}</td>
- *    <td>{@link #pollLast(long, TimeUnit) pollLast(time, unit)}</td>
+ *    <th id="LRemove" style="text-align:left">Remove</th>
+ *    <td headers="Last LRemove LThrow">{@link #removeLast() removeLast()}</td>
+ *    <td headers="Last LRemove LValue">{@link #pollLast() pollLast()}</td>
+ *    <td headers="Last LRemove LBlock">{@link #takeLast() takeLast()}</td>
+ *    <td headers="Last LRemove LTimes">{@link #pollLast(long, TimeUnit) pollLast(time, unit)}</td>
  *  </tr>
  *  <tr>
- *    <td><b>Examine</b></td>
- *    <td>{@link #getLast() getLast()}</td>
- *    <td>{@link #peekLast() peekLast()}</td>
- *    <td><em>not applicable</em></td>
- *    <td><em>not applicable</em></td>
+ *    <th id="LExamine" style="text-align:left">Examine</th>
+ *    <td headers="Last LExamine LThrow">{@link #getLast() getLast()}</td>
+ *    <td headers="Last LExamine LValue">{@link #peekLast() peekLast()}</td>
+ *    <td headers="Last LExamine LBlock" style="font-style:italic">not applicable</td>
+ *    <td headers="Last LExamine LTimes" style="font-style:italic">not applicable</td>
  *  </tr>
  * </table>
  *
@@ -131,57 +131,52 @@
  * <table class="plain">
  * <caption>Comparison of BlockingQueue and BlockingDeque methods</caption>
  *  <tr>
- *    <td style="text-align:center"> <b>{@code BlockingQueue} Method</b></td>
- *    <td style="text-align:center"> <b>Equivalent {@code BlockingDeque} Method</b></td>
+ *    <td></td>
+ *    <th id="BQueue"> {@code BlockingQueue} Method</th>
+ *    <th id="BDeque"> Equivalent {@code BlockingDeque} Method</th>
  *  </tr>
  *  <tr>
- *    <td style="text-align:center" COLSPAN = 2> <b>Insert</b></td>
- *  </tr>
- *  <tr>
- *    <td>{@link #add(Object) add(e)}</td>
- *    <td>{@link #addLast(Object) addLast(e)}</td>
+ *    <th id="Insert" rowspan="4" style="text-align:left; vertical-align:top">Insert</th>
+ *    <th id="add" style="font-weight:normal; text-align:left">{@link #add(Object) add(e)}</th>
+ *    <td headers="Insert BDeque add">{@link #addLast(Object) addLast(e)}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #offer(Object) offer(e)}</td>
- *    <td>{@link #offerLast(Object) offerLast(e)}</td>
+ *    <th id="offer1" style="font-weight:normal; text-align:left">{@link #offer(Object) offer(e)}</th>
+ *    <td headers="Insert BDeque offer1">{@link #offerLast(Object) offerLast(e)}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #put(Object) put(e)}</td>
- *    <td>{@link #putLast(Object) putLast(e)}</td>
+ *    <th id="put" style="font-weight:normal; text-align:left">{@link #put(Object) put(e)}</th>
+ *    <td headers="Insert BDeque put">{@link #putLast(Object) putLast(e)}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #offer(Object, long, TimeUnit) offer(e, time, unit)}</td>
- *    <td>{@link #offerLast(Object, long, TimeUnit) offerLast(e, time, unit)}</td>
- *  </tr>
- *  <tr>
- *    <td style="text-align:center" COLSPAN = 2> <b>Remove</b></td>
+ *    <th id="offer2" style="font-weight:normal; text-align:left">{@link #offer(Object, long, TimeUnit) offer(e, time, unit)}</th>
+ *    <td headers="Insert BDeque offer2">{@link #offerLast(Object, long, TimeUnit) offerLast(e, time, unit)}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #remove() remove()}</td>
- *    <td>{@link #removeFirst() removeFirst()}</td>
+ *    <th id="Remove" rowspan="4" style="text-align:left; vertical-align:top">Remove</th>
+ *    <th id="remove" style="font-weight:normal; text-align:left">{@link #remove() remove()}</th>
+ *    <td headers="Remove BDeque remove">{@link #removeFirst() removeFirst()}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #poll() poll()}</td>
- *    <td>{@link #pollFirst() pollFirst()}</td>
- *  </tr>
- *  <tr>
- *    <td>{@link #take() take()}</td>
- *    <td>{@link #takeFirst() takeFirst()}</td>
+ *    <th id="poll1" style="font-weight:normal; text-align:left">{@link #poll() poll()}</th>
+ *    <td headers="Remove BDeque poll1">{@link #pollFirst() pollFirst()}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #poll(long, TimeUnit) poll(time, unit)}</td>
- *    <td>{@link #pollFirst(long, TimeUnit) pollFirst(time, unit)}</td>
+ *    <th id="take" style="font-weight:normal; text-align:left">{@link #take() take()}</th>
+ *    <td headers="Remove BDeque take">{@link #takeFirst() takeFirst()}</td>
  *  </tr>
  *  <tr>
- *    <td style="text-align:center" COLSPAN = 2> <b>Examine</b></td>
+ *    <th id="poll2" style="font-weight:normal; text-align:left">{@link #poll(long, TimeUnit) poll(time, unit)}</th>
+ *    <td headers="Remove BDeque poll2">{@link #pollFirst(long, TimeUnit) pollFirst(time, unit)}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #element() element()}</td>
- *    <td>{@link #getFirst() getFirst()}</td>
+ *    <th id="Examine" rowspan="2" style="text-align:left; vertical-align:top">Examine</th>
+ *    <th id="element" style="font-weight:normal; text-align:left">{@link #element() element()}</th>
+ *    <td headers="Examine BDeque element">{@link #getFirst() getFirst()}</td>
  *  </tr>
  *  <tr>
- *    <td>{@link #peek() peek()}</td>
- *    <td>{@link #peekFirst() peekFirst()}</td>
+ *    <th id="peek" style="font-weight:normal; text-align:left">{@link #peek() peek()}</th>
+ *    <td headers="Examine BDeque peek">{@link #peekFirst() peekFirst()}</td>
  *  </tr>
  * </table>
  *
--- a/jdk/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java	Mon Aug 28 21:46:13 2017 +0200
@@ -56,31 +56,31 @@
  * <caption>Summary of BlockingQueue methods</caption>
  *  <tr>
  *    <td></td>
- *    <td style="text-align:center"><em>Throws exception</em></td>
- *    <td style="text-align:center"><em>Special value</em></td>
- *    <td style="text-align:center"><em>Blocks</em></td>
- *    <td style="text-align:center"><em>Times out</em></td>
+ *    <th scope="col" style="font-weight:normal; font-style:italic">Throws exception</th>
+ *    <th scope="col" style="font-weight:normal; font-style:italic">Special value</th>
+ *    <th scope="col" style="font-weight:normal; font-style:italic">Blocks</th>
+ *    <th scope="col" style="font-weight:normal; font-style:italic">Times out</th>
  *  </tr>
  *  <tr>
- *    <td><b>Insert</b></td>
+ *    <th scope="row" style="text-align:left">Insert</th>
  *    <td>{@link #add(Object) add(e)}</td>
  *    <td>{@link #offer(Object) offer(e)}</td>
  *    <td>{@link #put(Object) put(e)}</td>
  *    <td>{@link #offer(Object, long, TimeUnit) offer(e, time, unit)}</td>
  *  </tr>
  *  <tr>
- *    <td><b>Remove</b></td>
+ *    <th scope="row" style="text-align:left">Remove</th>
  *    <td>{@link #remove() remove()}</td>
  *    <td>{@link #poll() poll()}</td>
  *    <td>{@link #take() take()}</td>
  *    <td>{@link #poll(long, TimeUnit) poll(time, unit)}</td>
  *  </tr>
  *  <tr>
- *    <td><b>Examine</b></td>
+ *    <th scope="row" style="text-align:left">Examine</th>
  *    <td>{@link #element() element()}</td>
  *    <td>{@link #peek() peek()}</td>
- *    <td><em>not applicable</em></td>
- *    <td><em>not applicable</em></td>
+ *    <td style="font-style: italic">not applicable</td>
+ *    <td style="font-style: italic">not applicable</td>
  *  </tr>
  * </table>
  *
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java	Mon Aug 28 21:46:13 2017 +0200
@@ -3306,15 +3306,8 @@
         }
 
         private static final Unsafe U = Unsafe.getUnsafe();
-        private static final long LOCKSTATE;
-        static {
-            try {
-                LOCKSTATE = U.objectFieldOffset
-                    (TreeBin.class.getDeclaredField("lockState"));
-            } catch (ReflectiveOperationException e) {
-                throw new Error(e);
-            }
-        }
+        private static final long LOCKSTATE
+                = U.objectFieldOffset(TreeBin.class, "lockState");
     }
 
     /* ----------------Table Traversal -------------- */
@@ -6380,27 +6373,23 @@
     private static final int ASHIFT;
 
     static {
-        try {
-            SIZECTL = U.objectFieldOffset
-                (ConcurrentHashMap.class.getDeclaredField("sizeCtl"));
-            TRANSFERINDEX = U.objectFieldOffset
-                (ConcurrentHashMap.class.getDeclaredField("transferIndex"));
-            BASECOUNT = U.objectFieldOffset
-                (ConcurrentHashMap.class.getDeclaredField("baseCount"));
-            CELLSBUSY = U.objectFieldOffset
-                (ConcurrentHashMap.class.getDeclaredField("cellsBusy"));
-
-            CELLVALUE = U.objectFieldOffset
-                (CounterCell.class.getDeclaredField("value"));
-
-            ABASE = U.arrayBaseOffset(Node[].class);
-            int scale = U.arrayIndexScale(Node[].class);
-            if ((scale & (scale - 1)) != 0)
-                throw new Error("array index scale not a power of two");
-            ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
-        } catch (ReflectiveOperationException e) {
-            throw new Error(e);
-        }
+        SIZECTL = U.objectFieldOffset
+            (ConcurrentHashMap.class, "sizeCtl");
+        TRANSFERINDEX = U.objectFieldOffset
+            (ConcurrentHashMap.class, "transferIndex");
+        BASECOUNT = U.objectFieldOffset
+            (ConcurrentHashMap.class, "baseCount");
+        CELLSBUSY = U.objectFieldOffset
+            (ConcurrentHashMap.class, "cellsBusy");
+
+        CELLVALUE = U.objectFieldOffset
+            (CounterCell.class, "value");
+
+        ABASE = U.arrayBaseOffset(Node[].class);
+        int scale = U.arrayIndexScale(Node[].class);
+        if ((scale & (scale - 1)) != 0)
+            throw new Error("array index scale not a power of two");
+        ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
 
         // Reduce the risk of rare disastrous classloading in first call to
         // LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Mon Aug 28 21:46:13 2017 +0200
@@ -113,21 +113,21 @@
  * <caption>Summary of task execution methods</caption>
  *  <tr>
  *    <td></td>
- *    <td style="text-align:center"> <b>Call from non-fork/join clients</b></td>
- *    <td style="text-align:center"> <b>Call from within fork/join computations</b></td>
+ *    <th scope="col"> Call from non-fork/join clients</th>
+ *    <th scope="col"> Call from within fork/join computations</th>
  *  </tr>
  *  <tr>
- *    <td> <b>Arrange async execution</b></td>
+ *    <th scope="row" style="text-align:left"> Arrange async execution</th>
  *    <td> {@link #execute(ForkJoinTask)}</td>
  *    <td> {@link ForkJoinTask#fork}</td>
  *  </tr>
  *  <tr>
- *    <td> <b>Await and obtain result</b></td>
+ *    <th scope="row" style="text-align:left"> Await and obtain result</th>
  *    <td> {@link #invoke(ForkJoinTask)}</td>
  *    <td> {@link ForkJoinTask#invoke}</td>
  *  </tr>
  *  <tr>
- *    <td> <b>Arrange exec and obtain Future</b></td>
+ *    <th scope="row" style="text-align:left"> Arrange exec and obtain Future</th>
  *    <td> {@link #submit(ForkJoinTask)}</td>
  *    <td> {@link ForkJoinTask#fork} (ForkJoinTasks <em>are</em> Futures)</td>
  *  </tr>
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1050,30 +1050,18 @@
 
     // Unsafe mechanics
     private static final Unsafe U = Unsafe.getUnsafe();
-    private static final long SEED;
-    private static final long PROBE;
-    private static final long SECONDARY;
-    private static final long THREADLOCALS;
-    private static final long INHERITABLETHREADLOCALS;
-    private static final long INHERITEDACCESSCONTROLCONTEXT;
-    static {
-        try {
-            SEED = U.objectFieldOffset
-                (Thread.class.getDeclaredField("threadLocalRandomSeed"));
-            PROBE = U.objectFieldOffset
-                (Thread.class.getDeclaredField("threadLocalRandomProbe"));
-            SECONDARY = U.objectFieldOffset
-                (Thread.class.getDeclaredField("threadLocalRandomSecondarySeed"));
-            THREADLOCALS = U.objectFieldOffset
-                (Thread.class.getDeclaredField("threadLocals"));
-            INHERITABLETHREADLOCALS = U.objectFieldOffset
-                (Thread.class.getDeclaredField("inheritableThreadLocals"));
-            INHERITEDACCESSCONTROLCONTEXT = U.objectFieldOffset
-                (Thread.class.getDeclaredField("inheritedAccessControlContext"));
-        } catch (ReflectiveOperationException e) {
-            throw new Error(e);
-        }
-    }
+    private static final long SEED = U.objectFieldOffset
+            (Thread.class, "threadLocalRandomSeed");
+    private static final long PROBE = U.objectFieldOffset
+            (Thread.class, "threadLocalRandomProbe");
+    private static final long SECONDARY = U.objectFieldOffset
+            (Thread.class, "threadLocalRandomSecondarySeed");
+    private static final long THREADLOCALS = U.objectFieldOffset
+            (Thread.class, "threadLocals");
+    private static final long INHERITABLETHREADLOCALS = U.objectFieldOffset
+            (Thread.class, "inheritableThreadLocals");
+    private static final long INHERITEDACCESSCONTROLCONTEXT = U.objectFieldOffset
+            (Thread.class, "inheritedAccessControlContext");
 
     /** Rarely-used holder for the second of a pair of Gaussians */
     private static final ThreadLocal<Double> nextLocalGaussian =
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Mon Aug 28 21:46:13 2017 +0200
@@ -59,16 +59,7 @@
      * are unresolved cyclic startup dependencies.
      */
     private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe();
-    private static final long VALUE;
-
-    static {
-        try {
-            VALUE = U.objectFieldOffset
-                (AtomicInteger.class.getDeclaredField("value"));
-        } catch (ReflectiveOperationException e) {
-            throw new Error(e);
-        }
-    }
+    private static final long VALUE = U.objectFieldOffset(AtomicInteger.class, "value");
 
     private volatile int value;
 
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Mon Aug 28 21:46:13 2017 +0200
@@ -73,16 +73,7 @@
      * are unresolved cyclic startup dependencies.
      */
     private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe();
-    private static final long VALUE;
-
-    static {
-        try {
-            VALUE = U.objectFieldOffset
-                (AtomicLong.class.getDeclaredField("value"));
-        } catch (ReflectiveOperationException e) {
-            throw new Error(e);
-        }
-    }
+    private static final long VALUE = U.objectFieldOffset(AtomicLong.class, "value");
 
     private volatile long value;
 
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java	Mon Aug 28 21:46:13 2017 +0200
@@ -421,21 +421,11 @@
 
     // Hotspot implementation via intrinsics API
     private static final Unsafe U = Unsafe.getUnsafe();
-    private static final long PARKBLOCKER;
-    private static final long SECONDARY;
-    private static final long TID;
-    static {
-        try {
-            PARKBLOCKER = U.objectFieldOffset
-                (Thread.class.getDeclaredField("parkBlocker"));
-            SECONDARY = U.objectFieldOffset
-                (Thread.class.getDeclaredField("threadLocalRandomSecondarySeed"));
-            TID = U.objectFieldOffset
-                (Thread.class.getDeclaredField("tid"));
-
-        } catch (ReflectiveOperationException e) {
-            throw new Error(e);
-        }
-    }
+    private static final long PARKBLOCKER = U.objectFieldOffset
+            (Thread.class, "parkBlocker");
+    private static final long SECONDARY = U.objectFieldOffset
+            (Thread.class, "threadLocalRandomSecondarySeed");
+    private static final long TID = U.objectFieldOffset
+            (Thread.class, "tid");
 
 }
--- a/jdk/src/java.base/share/classes/java/util/doc-files/coll-designfaq.html	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/doc-files/coll-designfaq.html	Mon Aug 28 21:46:13 2017 +0200
@@ -1,7 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
+<!DOCTYPE html>
 <!--
  Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,16 +23,15 @@
  or visit www.oracle.com if you need additional information or have any
  questions.
 -->
-
-<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" xml:lang=
-"en-US">
+<html lang="en-US">
 <head>
 <title>Java Collections API Design FAQ</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 </head>
 <body>
 <h2>Java Collections API Design FAQ</h2>
 <!-- Body text begins here -->
-<hr />
+<hr>
 This document answers frequently asked questions concerning the
 design of the Java collections framework. It is derived from the
 large volume of traffic on the collections-comments alias. It
@@ -105,10 +101,10 @@
 collections that send out Events when they're
 modified?</b></a></li>
 </ol>
-<hr size="3" noshade="noshade" />
+<hr>
 <h3>Core Interfaces - General Questions</h3>
 <ol>
-<li><a name="a1" id="a1"><b>Why don't you support immutability
+<li><a id="a1"><b>Why don't you support immutability
 directly in the core collection interfaces so that you can do away
 with <em>optional operations</em> (and
 UnsupportedOperationException)?</b></a>
@@ -168,7 +164,7 @@
 very small set of core interfaces that can throw a runtime
 exception.</p>
 </li>
-<li><a name="a2" id="a2"><b>Won't programmers have to surround any
+<li><a id="a2"><b>Won't programmers have to surround any
 code that calls optional operations with a try-catch clause in case
 they throw an UnsupportedOperationException?</b></a>
 <p>It was never our intention that programs should catch these
@@ -176,7 +172,7 @@
 should only arise as a result of programming errors, in which case,
 your program will halt due to the uncaught exception.</p>
 </li>
-<li><a name="a3" id="a3"><b>Why isn't there a core interface for
+<li><a id="a3"><b>Why isn't there a core interface for
 "bags" (AKA multisets)?</b></a>
 <p>The Collection interface provides this functionality. We are not
 providing any public implementations of this interface, as we think
@@ -185,7 +181,7 @@
 atop AbstractCollection (for example, the Collection returned by
 Map.values).</p>
 </li>
-<li><a name="a28" id="a28"><b>Why didn't you use "Beans-style
+<li><a id="a28"><b>Why didn't you use "Beans-style
 names" for consistency?</b></a>
 <p>While the names of the new collections methods do not adhere to
 the "Beans naming conventions", we believe that they are
@@ -207,10 +203,10 @@
 case. Thus, we adopted the "traditional" JDK style rather than the
 Beans style.</li>
 </ol>
-<hr />
+<hr>
 <h3>Collection Interface</h3>
 <ol>
-<li><a name="a5" id="a5"><b>Why doesn't Collection extend Cloneable
+<li><a id="a5"><b>Why doesn't Collection extend Cloneable
 and Serializable?</b></a>
 <p>Many Collection implementations (including all of the ones
 provided by the JDK) will have a public clone method, but it would
@@ -224,7 +220,7 @@
 this type, and use the addAll method to copy the elements of the
 original collection into the new one.</p>
 </li>
-<li><a name="a6" id="a6"><b>Why don't you provide an "apply" method
+<li><a id="a6"><b>Why don't you provide an "apply" method
 in Collection to apply a given method ("upcall") to all the
 elements of the Collection?</b></a>
 <p>This is what is referred to as an "Internal Iterator" in the
@@ -235,7 +231,7 @@
 this functionality is increased by the fact that it requires a
 public interface to describe upcalls.</p>
 </li>
-<li><a name="a7" id="a7"><b>Why didn't you provide a "Predicate"
+<li><a id="a7"><b>Why didn't you provide a "Predicate"
 interface, and related methods (e.g., a method to find the first
 element in the Collection satisfying the predicate)?</b></a>
 <p>It's easy to implement this functionality atop Iterators, and
@@ -244,14 +240,14 @@
 weight. It could be added to the Collections class at a later date
 (implemented atop Iterator), if it's deemed useful.</p>
 </li>
-<li><a name="a8" id="a8"><b>Why don't you provide a form of the
+<li><a id="a8"><b>Why don't you provide a form of the
 addAll method that takes an Enumeration (or an Iterator)?</b></a>
 <p>Because we don't believe in using Enumerations (or Iterators) as
 "poor man's collections." This was occasionally done in prior
 releases, but now that we have the Collection interface, it is the
 preferred way to pass around abstract collections of objects.</p>
 </li>
-<li><a name="a9" id="a9"><b>Why don't the concrete implementations
+<li><a id="a9"><b>Why don't the concrete implementations
 in the JDK have Enumeration (or Iterator) constructors?</b></a>
 <p>Again, this is an instance of an Enumeration serving as a "poor
 man's collection" and we're trying to discourage that. Note
@@ -259,7 +255,7 @@
 should have constructors that take a Collection (and create a new
 Collection with the same elements).</p>
 </li>
-<li><a name="a10" id="a10"><b>Why don't you provide an Iterator.add
+<li><a id="a10"><b>Why don't you provide an Iterator.add
 method?</b></a>
 <p>The semantics are unclear, given that the contract for Iterator
 makes no guarantees about the order of iteration. Note, however,
@@ -267,10 +263,10 @@
 guarantee the order of the iteration.</p>
 </li>
 </ol>
-<hr />
+<hr>
 <h3>List Interface</h3>
 <ol>
-<li><a name="a11" id="a11"><b>Why don't you rename the List
+<li><a id="a11"><b>Why don't you rename the List
 interface to Sequence; doesn't "list" generally suggest "linked
 list"? Also, doesn't it conflict with java.awt.List?</b></a>
 <p>People were evenly divided as to whether List suggests linked
@@ -285,16 +281,16 @@
     import java.awt.*;
     import java.util.List;   // Dictates interpretation of "List"
 </pre></li>
-<li><a name="a12" id="a12"><b>Why don't you rename List's set
+<li><a id="a12"><b>Why don't you rename List's set
 method to replace, to avoid confusion with Set.</b></a>
 <p>It was decided that the "set/get" naming convention was strongly
 enough enshrined in the language that we'd stick with it.</p>
 </li>
 </ol>
-<hr />
+<hr>
 <h3>Map Interface</h3>
 <ol>
-<li><a name="a14" id="a14"><b>Why doesn't Map extend
+<li><a id="a14"><b>Why doesn't Map extend
 Collection?</b></a>
 <p>This was by design. We feel that mappings are not collections
 and collections are not mappings. Thus, it makes little sense for
@@ -317,10 +313,10 @@
 Lists.</p>
 </li>
 </ol>
-<hr />
+<hr>
 <h3>Iterator Interface</h3>
 <ol>
-<li><a name="a18" id="a18"><b>Why doesn't Iterator extend
+<li><a id="a18"><b>Why doesn't Iterator extend
 Enumeration?</b></a>
 <p>We view the method names for Enumeration as unfortunate. They're
 very long, and very frequently used. Given that we were adding a
@@ -329,7 +325,7 @@
 names. Of course we could support the new and old names in
 Iterator, but it doesn't seem worthwhile.</p>
 </li>
-<li><a name="a19" id="a19"><b>Why don't you provide an
+<li><a id="a19"><b>Why don't you provide an
 Iterator.peek method that allows you to look at the next element in
 an iteration without advancing the iterator?</b></a>
 <p>It can be implemented atop the current Iterators (a similar
@@ -338,10 +334,10 @@
 that everyone has to implement.</p>
 </li>
 </ol>
-<hr />
+<hr>
 <h3>Miscellaneous</h3>
 <ol>
-<li><a name="a23" id="a23"><b>Why did you write a new collections
+<li><a id="a23"><b>Why did you write a new collections
 framework instead of adopting JGL (a preexisting collections
 package from ObjectSpace, Inc.) into the JDK?</b></a>
 <p>If you examine the goals for our Collections framework (in the
@@ -363,7 +359,7 @@
 as we can to keep them small and manageable, so that Java continues
 to be an easy, fun language to learn and to use.</p>
 </li>
-<li><a name="a26" id="a26"><b>Why don't you eliminate all of the
+<li><a id="a26"><b>Why don't you eliminate all of the
 methods and classes that return "views" (Collections backed by
 other collection-like objects). This would greatly reduce
 aliasing.</b></a>
@@ -380,7 +376,7 @@
 taking List on input do not have to write secondary forms taking an
 offset and a length (as they do for arrays).</p>
 </li>
-<li><a name="a27" id="a27"><b>Why don't you provide for
+<li><a id="a27"><b>Why don't you provide for
 "observable" collections that send out Events when they're
 modified?</b></a>
 <p>Primarily, resource constraints. If we're going to commit to
@@ -390,9 +386,9 @@
 facility on top of the public APIs.</p>
 </li>
 </ol>
-<hr />
+<hr>
 <p style="font-size:smaller">
-Copyright &copy; 1998, 2017, Oracle and/or its affiliates. 500 Oracle Parkway<br />
+Copyright &copy; 1998, 2017, Oracle and/or its affiliates. 500 Oracle Parkway<br>
     Redwood Shores, CA 94065 USA. All rights reserved.</p>
 <!-- Body text ends here -->
 </body>
--- a/jdk/src/java.base/share/classes/java/util/doc-files/coll-index.html	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/doc-files/coll-index.html	Mon Aug 28 21:46:13 2017 +0200
@@ -1,6 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html>
 
 <!--
  Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
@@ -27,8 +25,7 @@
  questions.
 -->
 
-<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" xml:lang=
-"en-US">
+<html lang="en-US">
 <head>
 <meta name="generator" content="HTML Tidy, see www.w3.org" />
 <title>The Collections Framework</title>
@@ -71,7 +68,7 @@
 frequently asked questions (FAQ) about the design of the
 collections framework.</li>
 </ul>
-<hr />
+<hr>
 <p style="font-size:smaller">
 Copyright &copy; 1998, 2017, Oracle and/or its affiliates. 500 Oracle Parkway<br />
     Redwood Shores, CA 94065 USA. All rights reserved.</p>
--- a/jdk/src/java.base/share/classes/java/util/doc-files/coll-overview.html	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/doc-files/coll-overview.html	Mon Aug 28 21:46:13 2017 +0200
@@ -1,7 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
+<!DOCTYPE html>
 <!--
  Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,11 +23,29 @@
  or visit www.oracle.com if you need additional information or have any
  questions.
 -->
-
-<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" xml:lang=
-"en-US">
+<html lang="en-US">
 <head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>Collections Framework Overview</title>
+<style>
+#impls { 
+  border: 1px solid black;
+  border-collapse: collapse; 
+  margin: 0 auto;
+}
+#impls caption {
+    font-weight: bold;
+    font-size: smaller;
+}
+#impls, #impls th, #impls td {
+  border: 1px solid black;
+  padding: 2px .5em;
+}
+#impls tbody th {
+  font-weight: normal;
+  text-align:left;
+}
+</style>
 </head>
 <body>
 <h1>Collections Framework Overview</h1>
@@ -73,7 +88,7 @@
 <li><strong>General-purpose implementations</strong>. Primary
 implementations of the collection interfaces.</li>
 <li><strong>Legacy implementations</strong>. The collection classes
-from earlier releases, <tt>Vector</tt> and <tt>Hashtable</tt>, were
+from earlier releases, <code>Vector</code> and <code>Hashtable</code>, were
 retrofitted to implement the collection interfaces.</li>
 <li><strong>Special-purpose implementations</strong>.
 Implementations designed for use in special situations. These
@@ -101,57 +116,57 @@
 <hr />
 <h2>Collection Interfaces</h2>
 <p>The <i>collection interfaces</i> are divided into two groups.
-The most basic interface, <tt><a href=
-"../Collection.html">java.util.Collection</a></tt>,
+The most basic interface, <code><a href=
+"../Collection.html">java.util.Collection</a></code>,
 has the following descendants:</p>
 <ul>
-<li><tt><a href=
-"../Set.html">java.util.Set</a></tt></li>
-<li><tt><a href=
-"../SortedSet.html">java.util.SortedSet</a></tt></li>
-<li><tt><a href=
-"../NavigableSet.html">java.util.NavigableSet</a></tt></li>
-<li><tt><a href=
-"../Queue.html">java.util.Queue</a></tt></li>
-<li><tt><a href=
-"../concurrent/BlockingQueue.html">java.util.concurrent.BlockingQueue</a></tt></li>
-<li><tt><a href=
-"../concurrent/TransferQueue.html">java.util.concurrent.TransferQueue</a></tt></li>
-<li><tt><a href=
-"../Deque.html">java.util.Deque</a></tt></li>
-<li><tt><a href=
-"../concurrent/BlockingDeque.html">java.util.concurrent.BlockingDeque</a></tt></li>
+<li><code><a href=
+"../Set.html">java.util.Set</a></code></li>
+<li><code><a href=
+"../SortedSet.html">java.util.SortedSet</a></code></li>
+<li><code><a href=
+"../NavigableSet.html">java.util.NavigableSet</a></code></li>
+<li><code><a href=
+"../Queue.html">java.util.Queue</a></code></li>
+<li><code><a href=
+"../concurrent/BlockingQueue.html">java.util.concurrent.BlockingQueue</a></code></li>
+<li><code><a href=
+"../concurrent/TransferQueue.html">java.util.concurrent.TransferQueue</a></code></li>
+<li><code><a href=
+"../Deque.html">java.util.Deque</a></code></li>
+<li><code><a href=
+"../concurrent/BlockingDeque.html">java.util.concurrent.BlockingDeque</a></code></li>
 </ul>
-<p>The other collection interfaces are based on <tt><a href=
-"../Map.html">java.util.Map</a></tt> and are
+<p>The other collection interfaces are based on <code><a href=
+"../Map.html">java.util.Map</a></code> and are
 not true collections. However, these interfaces contain
 <i>collection-view</i> operations, which enable them to be
-manipulated as collections. <tt>Map</tt> has the following
+manipulated as collections. <code>Map</code> has the following
 offspring:</p>
 <ul>
-<li><tt><a href=
-"../SortedMap.html">java.util.SortedMap</a></tt></li>
-<li><tt><a href=
-"../NavigableMap.html">java.util.NavigableMap</a></tt></li>
-<li><tt><a href=
-"../concurrent/ConcurrentMap.html">java.util.concurrent.ConcurrentMap</a></tt></li>
-<li><tt><a href=
-"../concurrent/ConcurrentNavigableMap.html">java.util.concurrent.ConcurrentNavigableMap</a></tt></li>
+<li><code><a href=
+"../SortedMap.html">java.util.SortedMap</a></code></li>
+<li><code><a href=
+"../NavigableMap.html">java.util.NavigableMap</a></code></li>
+<li><code><a href=
+"../concurrent/ConcurrentMap.html">java.util.concurrent.ConcurrentMap</a></code></li>
+<li><code><a href=
+"../concurrent/ConcurrentNavigableMap.html">java.util.concurrent.ConcurrentNavigableMap</a></code></li>
 </ul>
 <p>Many of the modification methods in the collection interfaces
 are labeled <i>optional</i>. Implementations are permitted to not
 perform one or more of these operations, throwing a runtime
-exception (<tt>UnsupportedOperationException</tt>) if they are
+exception (<code>UnsupportedOperationException</code>) if they are
 attempted. The documentation for each implementation must specify
 which optional operations are supported. Several terms are
 introduced to aid in this specification:</p>
 <ul>
 <li>Collections that do not support modification operations (such
-as <tt>add</tt>, <tt>remove</tt> and <tt>clear</tt>) are referred
+as <code>add</code>, <code>remove</code> and <code>clear</code>) are referred
 to as <i>unmodifiable</i>. Collections that are not unmodifiable
 are <i>modifiable.</i></li>
 <li>Collections that additionally guarantee that no change in the
-<tt>Collection</tt> object will be visible are referred to as
+<code>Collection</code> object will be visible are referred to as
 <i>immutable</i>. Collections that are not immutable are
 <i>mutable</i>.</li>
 <li>Lists that guarantee that their size remains constant even
@@ -161,15 +176,15 @@
 <li>Lists that support fast (generally constant time) indexed
 element access are known as <i>random access</i> lists. Lists that
 do not support fast indexed element access are known as
-<i>sequential access</i> lists. The <tt><a href=
-"../RandomAccess.html">RandomAccess</a></tt>
+<i>sequential access</i> lists. The <code><a href=
+"../RandomAccess.html">RandomAccess</a></code>
 marker interface enables lists to advertise the fact that they
 support random access. This enables generic algorithms to change
 their behavior to provide good performance when applied to either
 random or sequential access lists.</li>
 </ul>
 <p>Some implementations restrict what elements (or in the case of
-<tt>Maps</tt>, keys and values) can be stored. Possible
+<code>Maps</code>, keys and values) can be stored. Possible
 restrictions include requiring elements to:</p>
 <ul>
 <li>Be of a particular type.</li>
@@ -178,77 +193,70 @@
 </ul>
 <p>Attempting to add an element that violates an implementation's
 restrictions results in a runtime exception, typically a
-<tt>ClassCastException</tt>, an <tt>IllegalArgumentException</tt>,
-or a <tt>NullPointerException</tt>. Attempting to remove or test
+<code>ClassCastException</code>, an <code>IllegalArgumentException</code>,
+or a <code>NullPointerException</code>. Attempting to remove or test
 for the presence of an element that violates an implementation's
 restrictions can result in an exception. Some restricted
 collections permit this usage.</p>
-<hr />
+<hr>
 <h2>Collection Implementations</h2>
 <p>Classes that implement the collection interfaces typically have
 names in the form of
 &lt;<em>Implementation-style</em>&gt;&lt;<em>Interface</em>&gt;.
 The general purpose implementations are summarized in the following
 table:</p>
-<table border="2" summary=
-"general purpose implementations and interfaces" align="center">
+<table id="impls">
+<caption>General purpose implementations</caption>
 <thead>
 <tr>
-<th id="interfaces">Interface</th>
-<th id="hashtable">Hash Table</th>
-<th id="resizablearray">Resizable Array</th>
-<th id="balancedtree">Balanced Tree</th>
-<th id="linkedlist">Linked List</th>
-<th id="hashtableandlinkedlist">Hash Table + Linked List</th>
+<th scope="col">Interface</th>
+<th scope="col">Hash Table</th>
+<th scope="col">Resizable Array</th>
+<th scope="col">Balanced Tree</th>
+<th scope="col">Linked List</th>
+<th scope="col">Hash Table + Linked List</th>
 </tr>
+</thead>
+<tbody>
 <tr>
-<td headers="interfaces"><code>Set</code></td>
-<td headers="hashtable"><a href=
-"../HashSet.html"><tt>HashSet</tt></a></td>
-<td headers="resizablearray">&nbsp;</td>
-<td headers="balancedtree"><a href=
-"../TreeSet.html"><tt>TreeSet</tt></a></td>
-<td headers="linkedlist">&nbsp;</td>
-<td headers="hashtableandlinkedlist"><a href=
-"../LinkedHashSet.html"><tt>LinkedHashSet</tt></a></td>
+<th scope="row"><code>Set</code></th>
+<td><a href="../HashSet.html"><code>HashSet</code></a></td>
+<td>&nbsp;</td>
+<td><a href="../TreeSet.html"><code>TreeSet</code></a></td>
+<td>&nbsp;</td>
+<td><a href=
+"../LinkedHashSet.html"><code>LinkedHashSet</code></a></td>
 </tr>
 <tr>
-<td headers="interfaces"><code>List</code></td>
-<td headers="hashtable">&nbsp;</td>
-<td headers="resizablearray"><a href=
-"../ArrayList.html"><tt>ArrayList</tt></a></td>
-<td headers="balancedtree">&nbsp;</td>
-<td headers="linkedlist"><a href=
-"../LinkedList.html"><tt>LinkedList</tt></a></td>
-<td headers="hashtableandlinkedlist">&nbsp;</td>
+<th scope="row"><code>List</code></th>
+<td>&nbsp;</td>
+<td><a href="../ArrayList.html"><code>ArrayList</code></a></td>
+<td>&nbsp;</td>
+<td><a href="../LinkedList.html"><code>LinkedList</code></a></td>
+<td>&nbsp;</td>
 </tr>
 <tr>
-<td headers="interfaces"><code>Deque</code></td>
-<td headers="hashtable">&nbsp;</td>
-<td headers="resizablearray"><a href=
-"../ArrayDeque.html"><tt>ArrayDeque</tt></a></td>
-<td headers="balancedtree">&nbsp;</td>
-<td headers="linkedlist"><a href=
-"../LinkedList.html"><tt>LinkedList</tt></a></td>
-<td headers="hashtableandlinkedlist">&nbsp;</td>
+<th scope="row"><code>Deque</code></th>
+<td>&nbsp;</td>
+<td><a href="../ArrayDeque.html"><code>ArrayDeque</code></a></td>
+<td>&nbsp;</td>
+<td><a href="../LinkedList.html"><code>LinkedList</code></a></td>
+<td>&nbsp;</td>
 </tr>
 <tr>
-<td headers="interfaces"><code>Map</code></td>
-<td headers="hashtable"><a href=
-"../HashMap.html"><tt>HashMap</tt></a></td>
-<td headers="resizablearray">&nbsp;</td>
-<td headers="balancedtree"><a href=
-"../TreeMap.html"><tt>TreeMap</tt></a></td>
-<td headers="linkedlist">&nbsp;</td>
-<td headers="hashtableandlinkedlist"><a href=
-"../LinkedHashMap.html"><tt>LinkedHashMap</tt></a></td>
+<th scope="row"><code>Map</code></th>
+<td><a href="../HashMap.html"><code>HashMap</code></a></td>
+<td>&nbsp;</td>
+<td><a href="../TreeMap.html"><code>TreeMap</code></a></td>
+<td>&nbsp;</td>
+<td><a href="../LinkedHashMap.html"><code>LinkedHashMap</code></a></td>
 </tr>
-</thead>
+</tbody>
 </table>
 <p>The general-purpose implementations support all of the
 <i>optional operations</i> in the collection interfaces and have no
 restrictions on the elements they may contain. They are
-unsynchronized, but the <tt>Collections</tt> class contains static
+unsynchronized, but the <code>Collections</code> class contains static
 factories called <a href=
 "../Collections.html#synchronizedCollection-java.util.Collection-">
 <em>synchronization wrappers</em></a> that can be used to add
@@ -256,15 +264,15 @@
 implementations have <i>fail-fast iterators</i>, which detect
 invalid concurrent modification, and fail quickly and cleanly
 (rather than behaving erratically).</p>
-<p>The <tt>AbstractCollection</tt>, <tt>AbstractSet</tt>,
-<tt>AbstractList</tt>, <tt>AbstractSequentialList</tt> and
-<tt>AbstractMap</tt> classes provide basic implementations of the
+<p>The <code>AbstractCollection</code>, <code>AbstractSet</code>,
+<code>AbstractList</code>, <code>AbstractSequentialList</code> and
+<code>AbstractMap</code> classes provide basic implementations of the
 core collection interfaces, to minimize the effort required to
 implement them. The API documentation for these classes describes
 precisely how each method is implemented so the implementer knows
 which methods must be overridden, given the performance of the
 basic operations of a specific implementation.</p>
-<hr />
+<hr>
 <h2>Concurrent Collections</h2>
 <p>Applications that use collections from more than one thread must
 be carefully programmed. In general, this is known as <i>concurrent
@@ -279,47 +287,47 @@
 in concurrent programming.</p>
 <p>These concurrent-aware interfaces are available:</p>
 <ul>
-<li><tt><a href=
-"../concurrent/BlockingQueue.html">BlockingQueue</a></tt></li>
-<li><tt><a href=
-"../concurrent/TransferQueue.html">TransferQueue</a></tt></li>
-<li><tt><a href=
-"../concurrent/BlockingDeque.html">BlockingDeque</a></tt></li>
-<li><tt><a href=
-"../concurrent/ConcurrentMap.html">ConcurrentMap</a></tt></li>
-<li><tt><a href=
-"../concurrent/ConcurrentNavigableMap.html">ConcurrentNavigableMap</a></tt></li>
+<li><code><a href=
+"../concurrent/BlockingQueue.html">BlockingQueue</a></code></li>
+<li><code><a href=
+"../concurrent/TransferQueue.html">TransferQueue</a></code></li>
+<li><code><a href=
+"../concurrent/BlockingDeque.html">BlockingDeque</a></code></li>
+<li><code><a href=
+"../concurrent/ConcurrentMap.html">ConcurrentMap</a></code></li>
+<li><code><a href=
+"../concurrent/ConcurrentNavigableMap.html">ConcurrentNavigableMap</a></code></li>
 </ul>
 <p>The following concurrent-aware implementation classes are
 available. See the API documentation for the correct usage of these
 implementations.</p>
 <ul>
-<li><tt><a href=
-"../concurrent/LinkedBlockingQueue.html">LinkedBlockingQueue</a></tt></li>
-<li><tt><a href=
-"../concurrent/ArrayBlockingQueue.html">ArrayBlockingQueue</a></tt></li>
-<li><tt><a href=
-"../concurrent/PriorityBlockingQueue.html">PriorityBlockingQueue</a></tt></li>
-<li><tt><a href=
-"../concurrent/DelayQueue.html">DelayQueue</a></tt></li>
-<li><tt><a href=
-"../concurrent/SynchronousQueue.html">SynchronousQueue</a></tt></li>
+<li><code><a href=
+"../concurrent/LinkedBlockingQueue.html">LinkedBlockingQueue</a></code></li>
+<li><code><a href=
+"../concurrent/ArrayBlockingQueue.html">ArrayBlockingQueue</a></code></li>
+<li><code><a href=
+"../concurrent/PriorityBlockingQueue.html">PriorityBlockingQueue</a></code></li>
+<li><code><a href=
+"../concurrent/DelayQueue.html">DelayQueue</a></code></li>
+<li><code><a href=
+"../concurrent/SynchronousQueue.html">SynchronousQueue</a></code></li>
 <li><a href=
-"../concurrent/LinkedBlockingDeque.html"><tt>LinkedBlockingDeque</tt></a></li>
+"../concurrent/LinkedBlockingDeque.html"><code>LinkedBlockingDeque</code></a></li>
 <li><a href=
-"../concurrent/LinkedTransferQueue.html"><tt>LinkedTransferQueue</tt></a></li>
-<li><tt><a href=
-"../concurrent/CopyOnWriteArrayList.html">CopyOnWriteArrayList</a></tt></li>
-<li><tt><a href=
-"../concurrent/CopyOnWriteArraySet.html">CopyOnWriteArraySet</a></tt></li>
-<li><tt><a href=
-"../concurrent/ConcurrentSkipListSet.html">ConcurrentSkipListSet</a></tt></li>
-<li><tt><a href=
-"../concurrent/ConcurrentHashMap.html">ConcurrentHashMap</a></tt></li>
-<li><tt><a href=
-"../concurrent/ConcurrentSkipListMap.html">ConcurrentSkipListMap</a></tt></li>
+"../concurrent/LinkedTransferQueue.html"><code>LinkedTransferQueue</code></a></li>
+<li><code><a href=
+"../concurrent/CopyOnWriteArrayList.html">CopyOnWriteArrayList</a></code></li>
+<li><code><a href=
+"../concurrent/CopyOnWriteArraySet.html">CopyOnWriteArraySet</a></code></li>
+<li><code><a href=
+"../concurrent/ConcurrentSkipListSet.html">ConcurrentSkipListSet</a></code></li>
+<li><code><a href=
+"../concurrent/ConcurrentHashMap.html">ConcurrentHashMap</a></code></li>
+<li><code><a href=
+"../concurrent/ConcurrentSkipListMap.html">ConcurrentSkipListMap</a></code></li>
 </ul>
-<hr />
+<hr>
 <h2>Design Goals</h2>
 <p>The main design goal was to produce an API that was small in
 size and, more importantly, in &quot;conceptual weight.&quot; It
@@ -332,7 +340,7 @@
 not attempt to capture such subtle distinctions as mutability,
 modifiability, and resizability. Instead, certain calls in the core
 interfaces are <i>optional</i>, enabling implementations to throw
-an <tt>UnsupportedOperationException</tt> to indicate that they do
+an <code>UnsupportedOperationException</code> to indicate that they do
 not support a specified optional operation. Collection implementers
 must clearly document which optional operations are supported by an
 implementation.</p>
@@ -346,13 +354,13 @@
 </ul>
 <p>It was critical that all reasonable representations of
 collections interoperate well. This included arrays, which cannot
-be made to implement the <tt>Collection</tt> interface directly
+be made to implement the <code>Collection</code> interface directly
 without changing the language. Thus, the framework includes methods
 to enable collections to be moved into arrays, arrays to be viewed
 as collections, and maps to be viewed as collections.</p>
-<hr />
+<hr>
 <p style="font-size:smaller">
-Copyright &copy; 1998, 2017, Oracle and/or its affiliates. 500 Oracle Parkway<br />
+Copyright &copy; 1998, 2017, Oracle and/or its affiliates. 500 Oracle Parkway<br>
     Redwood Shores, CA 94065 USA. All rights reserved.</p>
 <!-- Body text ends here -->
 </body>
--- a/jdk/src/java.base/share/classes/java/util/doc-files/coll-reference.html	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/doc-files/coll-reference.html	Mon Aug 28 21:46:13 2017 +0200
@@ -1,7 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
+<!DOCTYPE html>
 <!--
  Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,10 +24,10 @@
  questions.
 -->
 
-<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" xml:lang=
-"en-US">
+<html lang="en-US">
 <head>
 <title>Outline of the Collections Framework</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 </head>
 <body>
 <h1>Outline of the Collections Framework</h1>
@@ -48,21 +45,21 @@
 <li><a href=
 "../Set.html"><strong>Set</strong></a> - The
 familiar set abstraction. No duplicate elements permitted. May or
-may not be ordered. Extends the <tt>Collection</tt> interface.</li>
+may not be ordered. Extends the <code>Collection</code> interface.</li>
 <li><a href=
 "../List.html"><strong>List</strong></a> -
 Ordered collection, also known as a <i>sequence</i>. Duplicates are
 generally permitted. Allows positional access. Extends the
-<tt>Collection</tt> interface.</li>
+<code>Collection</code> interface.</li>
 <li><a href=
 "../Queue.html"><strong>Queue</strong></a> - A
 collection designed for holding elements before processing. Besides
-basic <tt>Collection</tt> operations, queues provide additional
+basic <code>Collection</code> operations, queues provide additional
 insertion, extraction, and inspection operations.</li>
 <li><a href=
 "../Deque.html"><strong>Deque</strong></a> - A
 <em>double ended queue</em>, supporting element insertion and
-removal at both ends. Extends the <tt>Queue</tt> interface.</li>
+removal at both ends. Extends the <code>Queue</code> interface.</li>
 <li><a href=
 "../Map.html"><strong>Map</strong></a> - A
 mapping from keys to values. Each key can map to one value.</li>
@@ -70,62 +67,62 @@
 "../SortedSet.html"><strong>SortedSet</strong></a>
 - A set whose elements are automatically sorted, either in their
 <i>natural ordering</i> (see the <a href=
-"../../lang/Comparable.html"><tt>Comparable</tt></a>
+"../../lang/Comparable.html"><code>Comparable</code></a>
 interface) or by a <a href=
-"../Comparator.html"><tt>Comparator</tt></a>
-object provided when a <tt>SortedSet</tt> instance is created.
-Extends the <tt>Set</tt> interface.</li>
+"../Comparator.html"><code>Comparator</code></a>
+object provided when a <code>SortedSet</code> instance is created.
+Extends the <code>Set</code> interface.</li>
 <li><a href=
 "../SortedMap.html"><strong>SortedMap</strong></a>
 - A map whose mappings are automatically sorted by key, either
 using the <i>natural ordering</i> of the keys or by a comparator
-provided when a <tt>SortedMap</tt> instance is created. Extends the
-<tt>Map</tt> interface.</li>
+provided when a <code>SortedMap</code> instance is created. Extends the
+<code>Map</code> interface.</li>
 <li><a href=
 "../NavigableSet.html"><strong>NavigableSet</strong></a>
-- A <tt>SortedSet</tt> extended with navigation methods reporting
-closest matches for given search targets. A <tt>NavigableSet</tt>
+- A <code>SortedSet</code> extended with navigation methods reporting
+closest matches for given search targets. A <code>NavigableSet</code>
 may be accessed and traversed in either ascending or descending
 order.</li>
 <li><a href=
 "../NavigableMap.html"><strong>NavigableMap</strong></a>
-- A <tt>SortedMap</tt> extended with navigation methods returning
+- A <code>SortedMap</code> extended with navigation methods returning
 the closest matches for given search targets. A
-<tt>NavigableMap</tt> can be accessed and traversed in either
+<code>NavigableMap</code> can be accessed and traversed in either
 ascending or descending key order.</li>
 <li><a href=
 "../concurrent/BlockingQueue.html"><strong>BlockingQueue</strong></a>
-- A <tt>Queue</tt> with operations that wait for the queue to
+- A <code>Queue</code> with operations that wait for the queue to
 become nonempty when retrieving an element and that wait for space
 to become available in the queue when storing an element. (This
-interface is part of the <tt><a href=
-"../concurrent/package-summary.html">java.util.concurrent</a></tt>
+interface is part of the <code><a href=
+"../concurrent/package-summary.html">java.util.concurrent</a></code>
 package.)</li>
 <li><a href=
 "../concurrent/TransferQueue.html"><strong>TransferQueue</strong></a>
-- A <tt>BlockingQueue</tt> in which producers can wait for
+- A <code>BlockingQueue</code> in which producers can wait for
 consumers to receive elements. (This interface is part of the
-<tt><a href=
-"../concurrent/package-summary.html">java.util.concurrent</a></tt>
+<code><a href=
+"../concurrent/package-summary.html">java.util.concurrent</a></code>
 package.)</li>
 <li><a href=
 "../concurrent/BlockingDeque.html"><strong>BlockingDeque</strong></a>
-- A <tt>Deque</tt> with operations that wait for the deque to
+- A <code>Deque</code> with operations that wait for the deque to
 become nonempty when retrieving an element and wait for space to
 become available in the deque when storing an element. Extends both
-the <tt>Deque</tt> and <tt>BlockingQueue</tt> interfaces. (This
-interface is part of the <tt><a href=
-"../concurrent/package-summary.html">java.util.concurrent</a></tt>
+the <code>Deque</code> and <code>BlockingQueue</code> interfaces. (This
+interface is part of the <code><a href=
+"../concurrent/package-summary.html">java.util.concurrent</a></code>
 package.)</li>
 <li><a href=
 "../concurrent/ConcurrentMap.html"><strong>ConcurrentMap</strong></a>
-- A <tt>Map</tt> with atomic <tt>putIfAbsent</tt>, <tt>remove</tt>,
-and <tt>replace</tt> methods. (This interface is part of the
-<tt>java.util.concurrent</tt> package.)</li>
+- A <code>Map</code> with atomic <code>putIfAbsent</code>, <code>remove</code>,
+and <code>replace</code> methods. (This interface is part of the
+<code>java.util.concurrent</code> package.)</li>
 <li><a href=
 "../concurrent/ConcurrentNavigableMap.html"><strong>
-ConcurrentNavigableMap</strong></a> - A <tt>ConcurrentMap</tt> that
-is also a <tt>NavigableMap</tt>.</li>
+ConcurrentNavigableMap</strong></a> - A <code>ConcurrentMap</code> that
+is also a <code>NavigableMap</code>.</li>
 </ul>
 </li>
 <li><strong>General-purpose implementations</strong> - The primary
@@ -133,52 +130,52 @@
 <ul>
 <li><strong><a href=
 "../HashSet.html">HashSet</a></strong> - Hash
-table implementation of the <tt>Set</tt> interface. The best
-all-around implementation of the <tt>Set</tt> interface.</li>
+table implementation of the <code>Set</code> interface. The best
+all-around implementation of the <code>Set</code> interface.</li>
 <li><a href=
 "../TreeSet.html"><strong>TreeSet</strong></a>
-- Red-black tree implementation of the <tt>NavigableSet</tt>
+- Red-black tree implementation of the <code>NavigableSet</code>
 interface.</li>
 <li><strong><a href=
 "../LinkedHashSet.html">LinkedHashSet</a></strong>
-- Hash table and linked list implementation of the <tt>Set</tt>
-interface. An insertion-ordered <tt>Set</tt> implementation that
-runs nearly as fast as <tt>HashSet</tt>.</li>
+- Hash table and linked list implementation of the <code>Set</code>
+interface. An insertion-ordered <code>Set</code> implementation that
+runs nearly as fast as <code>HashSet</code>.</li>
 <li><strong><a href=
 "../ArrayList.html">ArrayList</a></strong> -
-Resizable array implementation of the <tt>List</tt> interface (an
-unsynchronized <tt>Vector</tt>). The best all-around implementation
-of the <tt>List</tt> interface.</li>
+Resizable array implementation of the <code>List</code> interface (an
+unsynchronized <code>Vector</code>). The best all-around implementation
+of the <code>List</code> interface.</li>
 <li><strong><a href=
 "../ArrayDeque.html">ArrayDeque</a></strong> -
-Efficient, resizable array implementation of the <tt>Deque</tt>
+Efficient, resizable array implementation of the <code>Deque</code>
 interface.</li>
 <li><a href=
 "../LinkedList.html"><strong>LinkedList</strong></a>
-- Doubly-linked list implementation of the <tt>List</tt> interface.
-Provides better performance than the <tt>ArrayList</tt>
+- Doubly-linked list implementation of the <code>List</code> interface.
+Provides better performance than the <code>ArrayList</code>
 implementation if elements are frequently inserted or deleted
-within the list. Also implements the <tt>Deque</tt> interface. When
-accessed through the <tt>Queue</tt> interface, <tt>LinkedList</tt>
+within the list. Also implements the <code>Deque</code> interface. When
+accessed through the <code>Queue</code> interface, <code>LinkedList</code>
 acts as a FIFO queue.</li>
 <li><strong><a href=
 "../PriorityQueue.html">PriorityQueue</a></strong>
 - Heap implementation of an unbounded priority queue.</li>
 <li><strong><a href=
 "../HashMap.html">HashMap</a></strong> - Hash
-table implementation of the <tt>Map</tt> interface (an
-unsynchronized <tt>Hashtable</tt> that supports <tt>null</tt> keys
-and values). The best all-around implementation of the <tt>Map</tt>
+table implementation of the <code>Map</code> interface (an
+unsynchronized <code>Hashtable</code> that supports <code>null</code> keys
+and values). The best all-around implementation of the <code>Map</code>
 interface.</li>
 <li><a href=
 "../TreeMap.html"><strong>TreeMap</strong></a>
-Red-black tree implementation of the <tt>NavigableMap</tt>
+Red-black tree implementation of the <code>NavigableMap</code>
 interface.</li>
 <li><strong><a href=
 "../LinkedHashMap.html">LinkedHashMap</a></strong>
-- Hash table and linked list implementation of the <tt>Map</tt>
-interface. An insertion-ordered <tt>Map</tt> implementation that
-runs nearly as fast as <tt>HashMap</tt>. Also useful for building
+- Hash table and linked list implementation of the <code>Map</code>
+interface. An insertion-ordered <code>Map</code> implementation that
+runs nearly as fast as <code>HashMap</code>. Also useful for building
 caches (see <a href=
 "../LinkedHashMap.html#removeEldestEntry-java.util.Map.Entry-">
 removeEldestEntry(Map.Entry)</a> ).</li>
@@ -192,9 +189,9 @@
 "../Collections.html#unmodifiableCollection-java.util.Collection-">
 <strong>Collections.unmodifiable<i>Interface</i></strong></a> -
 Returns an unmodifiable view of a specified collection that throws
-an <tt>UnsupportedOperationException</tt> if the user attempts to
+an <code>UnsupportedOperationException</code> if the user attempts to
 modify it.</li>
-<li><a name="synchWrappers" href=
+<li><a href=
 "../Collections.html#synchronizedCollection-java.util.Collection-"
 id=
 "synchWrappers"><strong>Collections.synchronized<i>Interface</i></strong></a>
@@ -206,7 +203,7 @@
 "../Collections.html#checkedCollection-java.util.Collection-java.lang.Class-">
 <strong>Collections.checked<i>Interface</i></strong></a> - Returns
 a dynamically type-safe view of the specified collection, which
-throws a <tt>ClassCastException</tt> if a client attempts to add an
+throws a <code>ClassCastException</code> if a client attempts to add an
 element of the wrong type. The generics mechanism in the language
 provides compile-time (static) type checking, but it is possible to
 bypass this mechanism. Dynamically type-safe views eliminate this
@@ -219,12 +216,12 @@
 <li><strong><a href=
 "../Collections.html#newSetFromMap-java.util.Map-">
 newSetFromMap(Map)</a></strong> - Creates a general-purpose
-<tt>Set</tt> implementation from a general-purpose <tt>Map</tt>
+<code>Set</code> implementation from a general-purpose <code>Map</code>
 implementation.</li>
 <li><strong><a href=
 "../Collections.html#asLifoQueue-java.util.Deque-">
 asLifoQueue(Deque)</a></strong> - Returns a view of a
-<tt>Deque</tt> as a Last In First Out (LIFO) <tt>Queue</tt>.</li>
+<code>Deque</code> as a Last In First Out (LIFO) <code>Queue</code>.</li>
 </ul>
 </li>
 <li><strong>Convenience implementations</strong> - High-performance
@@ -259,12 +256,12 @@
 <ul>
 <li><a href=
 "../Vector.html"><strong>Vector</strong></a> -
-Synchronized resizable array implementation of the <tt>List</tt>
+Synchronized resizable array implementation of the <code>List</code>
 interface with additional legacy methods.</li>
 <li><a href=
 "../Hashtable.html"><strong>Hashtable</strong></a>
-- Synchronized hash table implementation of the <tt>Map</tt>
-interface that does not allow <tt>null</tt> keys or values, plus
+- Synchronized hash table implementation of the <code>Map</code>
+interface that does not allow <code>null</code> keys or values, plus
 additional legacy methods.</li>
 </ul>
 </li>
@@ -272,18 +269,18 @@
 <ul>
 <li><strong><a href=
 "../WeakHashMap.html">WeakHashMap</a></strong>
-- An implementation of the <tt>Map</tt> interface that stores only
+- An implementation of the <code>Map</code> interface that stores only
 <a href="../../lang/ref/WeakReference.html"><i>weak
 references</i></a> to its keys. Storing only weak references
 enables key-value pairs to be garbage collected when the key is no
-longer referenced outside of the <tt>WeakHashMap</tt>. This class
+longer referenced outside of the <code>WeakHashMap</code>. This class
 is the easiest way to use the power of weak references. It is
 useful for implementing registry-like data structures, where the
 utility of an entry vanishes when its key is no longer reachable by
 any thread.</li>
 <li><strong><a href=
 "../IdentityHashMap.html">IdentityHashMap</a></strong>
-- Identity-based <tt>Map</tt> implementation based on a hash table.
+- Identity-based <code>Map</code> implementation based on a hash table.
 This class is useful for topology-preserving object graph
 transformations (such as serialization or deep copying). To perform
 these transformations, you must maintain an identity-based "node
@@ -292,43 +289,43 @@
 object-to-meta-information mappings in dynamic debuggers and
 similar systems. Finally, identity-based maps are useful in
 preventing "spoof attacks" resulting from intentionally perverse
-equals methods. (<tt>IdentityHashMap</tt> never invokes the equals
+equals methods. (<code>IdentityHashMap</code> never invokes the equals
 method on its keys.) An added benefit of this implementation is
 that it is fast.</li>
 <li><strong><a href=
 "../concurrent/CopyOnWriteArrayList.html">CopyOnWriteArrayList</a></strong>
-- A <tt>List</tt> implementation backed by an copy-on-write array.
-All mutative operations (such as <tt>add</tt>, <tt>set</tt>, and
-<tt>remove</tt>) are implemented by making a new copy of the array.
+- A <code>List</code> implementation backed by an copy-on-write array.
+All mutative operations (such as <code>add</code>, <code>set</code>, and
+<code>remove</code>) are implemented by making a new copy of the array.
 No synchronization is necessary, even during iteration, and
 iterators are guaranteed never to throw
-<tt>ConcurrentModificationException</tt>. This implementation is
+<code>ConcurrentModificationException</code>. This implementation is
 well-suited to maintaining event-handler lists (where change is
 infrequent, and traversal is frequent and potentially
 time-consuming).</li>
 <li><strong><a href=
 "../concurrent/CopyOnWriteArraySet.html">CopyOnWriteArraySet</a></strong>
-- A <tt>Set</tt> implementation backed by a copy-on-write array.
-This implementation is similar to <tt>CopyOnWriteArrayList</tt>.
-Unlike most <tt>Set</tt> implementations, the <tt>add</tt>,
-<tt>remove</tt>, and <tt>contains</tt> methods require time
+- A <code>Set</code> implementation backed by a copy-on-write array.
+This implementation is similar to <code>CopyOnWriteArrayList</code>.
+Unlike most <code>Set</code> implementations, the <code>add</code>,
+<code>remove</code>, and <code>contains</code> methods require time
 proportional to the size of the set. This implementation is well
 suited to maintaining event-handler lists that must prevent
 duplicates.</li>
 <li><strong><a href=
 "../EnumSet.html">EnumSet</a></strong> - A
-high-performance <tt>Set</tt> implementation backed by a bit
-vector. All elements of each <tt>EnumSet</tt> instance must be
+high-performance <code>Set</code> implementation backed by a bit
+vector. All elements of each <code>EnumSet</code> instance must be
 elements of a single enum type.</li>
 <li><strong><a href=
 "../EnumMap.html">EnumMap</a></strong> - A
-high-performance <tt>Map</tt> implementation backed by an array.
-All keys in each <tt>EnumMap</tt> instance must be elements of a
+high-performance <code>Map</code> implementation backed by an array.
+All keys in each <code>EnumMap</code> instance must be elements of a
 single enum type.</li>
 </ul>
 </li>
 <li><strong>Concurrent implementations</strong> - These
-implementations are part of <tt>java.util.concurrent</tt>.
+implementations are part of <code>java.util.concurrent</code>.
 <ul>
 <li><strong><a href=
 "../concurrent/ConcurrentLinkedQueue.html">ConcurrentLinkedQueue</a></strong>
@@ -352,7 +349,7 @@
 <li><a href=
 "../concurrent/SynchronousQueue.html"><strong>SynchronousQueue</strong></a>
 - A simple rendezvous mechanism that uses the
-<tt>BlockingQueue</tt> interface.</li>
+<code>BlockingQueue</code> interface.</li>
 <li><a href=
 "../concurrent/LinkedBlockingDeque.html"><strong>
 LinkedBlockingDeque</strong></a> - An optionally bounded FIFO
@@ -360,25 +357,25 @@
 <li><a href=
 "../concurrent/LinkedTransferQueue.html"><strong>
 LinkedTransferQueue</strong></a> - An unbounded
-<tt>TransferQueue</tt> backed by linked nodes.</li>
+<code>TransferQueue</code> backed by linked nodes.</li>
 <li><a href=
 "../concurrent/ConcurrentHashMap.html"><strong>ConcurrentHashMap</strong></a>
-- A highly concurrent, high-performance <tt>ConcurrentMap</tt>
+- A highly concurrent, high-performance <code>ConcurrentMap</code>
 implementation based on a hash table. This implementation never
 blocks when performing retrievals and enables the client to select
 the concurrency level for updates. It is intended as a drop-in
-replacement for <tt><a href=
-"../Hashtable.html">Hashtable</a></tt>. In
-addition to implementing <tt>ConcurrentMap</tt>, it supports all of
-the legacy methods of <tt>Hashtable</tt>.</li>
+replacement for <code><a href=
+"../Hashtable.html">Hashtable</a></code>. In
+addition to implementing <code>ConcurrentMap</code>, it supports all of
+the legacy methods of <code>Hashtable</code>.</li>
 <li><a href=
 "../concurrent/ConcurrentSkipListSet.html"><strong>
 ConcurrentSkipListSet</strong></a> - Skips list implementation of
-the <tt>NavigableSet</tt> interface.</li>
+the <code>NavigableSet</code> interface.</li>
 <li><a href=
 "../concurrent/ConcurrentSkipListMap.html"><strong>
 ConcurrentSkipListMap</strong></a> - Skips list implementation of
-the <tt>ConcurrentNavigableMap</tt> interface.</li>
+the <code>ConcurrentNavigableMap</code> interface.</li>
 </ul>
 </li>
 <li><strong>Abstract implementations</strong> - Skeletal
@@ -387,25 +384,25 @@
 <ul>
 <li><a href=
 "../AbstractCollection.html"><strong>AbstractCollection</strong></a>
-- Skeletal <tt>Collection</tt> implementation that is neither a set
+- Skeletal <code>Collection</code> implementation that is neither a set
 nor a list (such as a "bag" or multiset).</li>
 <li><a href=
 "../AbstractSet.html"><strong>AbstractSet</strong></a>
-- Skeletal <tt>Set</tt> implementation.</li>
+- Skeletal <code>Set</code> implementation.</li>
 <li><a href=
 "../AbstractList.html"><strong>AbstractList</strong></a>
-- Skeletal <tt>List</tt> implementation backed by a random access
+- Skeletal <code>List</code> implementation backed by a random access
 data store (such as an array).</li>
 <li><a href=
 "../AbstractSequentialList.html"><strong>AbstractSequentialList</strong></a>
-- Skeletal <tt>List</tt> implementation backed by a sequential
+- Skeletal <code>List</code> implementation backed by a sequential
 access data store (such as a linked list).</li>
 <li><a href=
 "../AbstractQueue.html"><strong>AbstractQueue</strong></a>
-- Skeletal <tt>Queue</tt> implementation.</li>
+- Skeletal <code>Queue</code> implementation.</li>
 <li><a href=
 "../AbstractMap.html"><strong>AbstractMap</strong></a>
-- Skeletal <tt>Map</tt> implementation.</li>
+- Skeletal <code>Map</code> implementation.</li>
 </ul>
 </li>
 <li><strong>Algorithms</strong> - The <a href=
@@ -491,13 +488,13 @@
 <ul>
 <li><a href=
 "../Iterator.html"><strong>Iterator</strong></a>
-- In addition to the functionality of the <tt>Enumeration</tt>
+- In addition to the functionality of the <code>Enumeration</code>
 interface, enables the user to remove elements from the backing
 collection with well-defined, useful semantics.</li>
 <li><a href=
 "../ListIterator.html"><strong>ListIterator</strong></a>
 - Iterator for use with lists. In addition to the functionality of
-the <tt>Iterator</tt> interface, supports bidirectional iteration,
+the <code>Iterator</code> interface, supports bidirectional iteration,
 element replacement, element insertion, and index retrieval.</li>
 </ul>
 </li>
@@ -514,7 +511,7 @@
 - Represents an order relation, which can be used to sort a list or
 maintain order in a sorted set or map. Can override a type's
 natural ordering or order objects of a type that does not implement
-the <tt>Comparable</tt> interface.</li>
+the <code>Comparable</code> interface.</li>
 </ul>
 </li>
 <li><strong>Runtime exceptions</strong>
@@ -536,7 +533,7 @@
 <ul>
 <li><strong><a href=
 "../RandomAccess.html">RandomAccess</a></strong>
-- Marker interface that lets <tt>List</tt> implementations indicate
+- Marker interface that lets <code>List</code> implementations indicate
 that they support fast (generally constant time) random access.
 This lets generic algorithms change their behavior to provide good
 performance when applied to either random or sequential access
@@ -550,14 +547,14 @@
 <li><a href=
 "../Arrays.html"><strong>Arrays</strong></a> -
 Contains static methods to sort, search, compare, hash, copy,
-resize, convert to <tt>String</tt>, and fill arrays of primitives
+resize, convert to <code>String</code>, and fill arrays of primitives
 and objects.</li>
 </ul>
 </li>
 </ul>
-<hr />
+<hr>
 <p style="font-size:smaller">
-Copyright &copy; 1998, 2017, Oracle and/or its affiliates. 500 Oracle Parkway<br />
+Copyright &copy; 1998, 2017, Oracle and/or its affiliates. 500 Oracle Parkway<br>
     Redwood Shores, CA 94065 USA. All rights reserved.</p>
 <!-- Body text ends here -->
 </body>
--- a/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Mon Aug 28 21:46:13 2017 +0200
@@ -25,21 +25,36 @@
 
 package java.util.jar;
 
-import java.io.*;
-import java.lang.ref.SoftReference;
-import java.net.URL;
-import java.util.*;
-import java.util.stream.Stream;
-import java.util.stream.StreamSupport;
-import java.util.zip.*;
-import java.security.CodeSigner;
-import java.security.cert.Certificate;
-import java.security.CodeSource;
 import jdk.internal.misc.SharedSecrets;
 import sun.security.action.GetPropertyAction;
 import sun.security.util.ManifestEntryVerifier;
 import sun.security.util.SignatureFileVerifier;
 
+import java.io.ByteArrayInputStream;
+import java.io.EOFException;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.ref.SoftReference;
+import java.net.URL;
+import java.security.CodeSigner;
+import java.security.CodeSource;
+import java.security.cert.Certificate;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Spliterator;
+import java.util.Spliterators;
+import java.util.stream.Stream;
+import java.util.stream.StreamSupport;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipException;
+import java.util.zip.ZipFile;
+
 /**
  * The {@code JarFile} class is used to read the contents of a jar file
  * from any file that can be opened with {@code java.io.RandomAccessFile}.
@@ -848,7 +863,7 @@
     private static final byte[] MULTIRELEASE_OPTOSFT;
 
     static {
-        CLASSPATH_LASTOCC = new byte[64];
+        CLASSPATH_LASTOCC = new byte[65];
         CLASSPATH_OPTOSFT = new byte[12];
         CLASSPATH_LASTOCC[(int)'C' - 32] = 1;
         CLASSPATH_LASTOCC[(int)'L' - 32] = 2;
@@ -865,7 +880,7 @@
         }
         CLASSPATH_OPTOSFT[11] = 1;
 
-        MULTIRELEASE_LASTOCC = new byte[64];
+        MULTIRELEASE_LASTOCC = new byte[65];
         MULTIRELEASE_OPTOSFT = new byte[19];
         MULTIRELEASE_LASTOCC[(int)'M' - 32] = 1;
         MULTIRELEASE_LASTOCC[(int)'I' - 32] = 5;
--- a/jdk/src/java.base/share/classes/java/util/regex/Pattern.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/regex/Pattern.java	Mon Aug 28 21:46:13 2017 +0200
@@ -81,309 +81,296 @@
  *
  * <table class="borderless">
  * <caption style="display:none">Regular expression constructs, and what they match</caption>
- * <thead>
- * <tr style="text-align:left">
- * <th style="text-align:left" id="construct">Construct</th>
- * <th style="text-align:left" id="matches">Matches</th>
+ * <thead style="text-align:left">
+ * <tr>
+ * <th id="construct">Construct</th>
+ * <th id="matches">Matches</th>
  * </tr>
  * </thead>
- * <tbody>
+ * <tbody style="text-align:left">
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="characters">Characters</th></tr>
+ * <tr><th colspan="2" style="padding-top:20px" id="characters">Characters</th></tr>
  *
- * <tr><td style="vertical-align:top" headers="construct characters"><i>x</i></td>
- *     <td headers="matches">The character <i>x</i></td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters">{@code \\}</td>
- *     <td headers="matches">The backslash character</td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters">{@code \0}<i>n</i></td>
- *     <td headers="matches">The character with octal value {@code 0}<i>n</i>
+ * <tr><th style="vertical-align:top; font-weight: normal" id="x"><i>x</i></th>
+ *     <td headers="matches characters x">The character <i>x</i></td></tr>
+ * <tr><th style="vertical-align:top; font-weight: normal" id="backslash">{@code \\}</th>
+ *     <td headers="matches characters backslash">The backslash character</td></tr>
+ * <tr><th style="vertical-align:top; font-weight: normal" id="octal_n">{@code \0}<i>n</i></th>
+ *     <td headers="matches characters octal_n">The character with octal value {@code 0}<i>n</i>
  *         (0&nbsp;{@code <=}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;7)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters">{@code \0}<i>nn</i></td>
- *     <td headers="matches">The character with octal value {@code 0}<i>nn</i>
+ * <tr><th style="vertical-align:top; font-weight: normal" id="octal_nn">{@code \0}<i>nn</i></th>
+ *     <td headers="matches characters octal_nn">The character with octal value {@code 0}<i>nn</i>
  *         (0&nbsp;{@code <=}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;7)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters">{@code \0}<i>mnn</i></td>
- *     <td headers="matches">The character with octal value {@code 0}<i>mnn</i>
+ * <tr><th style="vertical-align:top; font-weight: normal" id="octal_nnn">{@code \0}<i>mnn</i></th>
+ *     <td headers="matches characters octal_nnn">The character with octal value {@code 0}<i>mnn</i>
  *         (0&nbsp;{@code <=}&nbsp;<i>m</i>&nbsp;{@code <=}&nbsp;3,
  *         0&nbsp;{@code <=}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;7)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters">{@code \x}<i>hh</i></td>
- *     <td headers="matches">The character with hexadecimal&nbsp;value&nbsp;{@code 0x}<i>hh</i></td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters"><code>&#92;u</code><i>hhhh</i></td>
- *     <td headers="matches">The character with hexadecimal&nbsp;value&nbsp;{@code 0x}<i>hhhh</i></td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters"><code>&#92;x</code><i>{h...h}</i></td>
- *     <td headers="matches">The character with hexadecimal&nbsp;value&nbsp;{@code 0x}<i>h...h</i>
+ * <tr><th style="vertical-align:top; font-weight: normal" id="hex_hh">{@code \x}<i>hh</i></th>
+ *     <td headers="matches characters hex_hh">The character with hexadecimal value {@code 0x}<i>hh</i></td></tr>
+ * <tr><th style="vertical-align:top; font-weight: normal" id="hex_hhhh"><code>&#92;u</code><i>hhhh</i></th>
+ *     <td headers="matches characters hex_hhhh">The character with hexadecimal&nbsp;value&nbsp;{@code 0x}<i>hhhh</i></td></tr>
+ * <tr><th style="vertical-align:top; font-weight: normal" id="hex_h_h"><code>&#92;x</code><i>{h...h}</i></th>
+ *     <td headers="matches characters hex_h_h">The character with hexadecimal value {@code 0x}<i>h...h</i>
  *         ({@link java.lang.Character#MIN_CODE_POINT Character.MIN_CODE_POINT}
  *         &nbsp;&lt;=&nbsp;{@code 0x}<i>h...h</i>&nbsp;&lt;=&nbsp;
  *          {@link java.lang.Character#MAX_CODE_POINT Character.MAX_CODE_POINT})</td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters"><code>&#92;N{</code><i>name</i><code>}</code></td>
- *     <td headers="matches">The character with Unicode character name <i>'name'</i></td></tr>
- * <tr><td style="vertical-align:top" headers="matches">{@code \t}</td>
- *     <td headers="matches">The tab character (<code>'&#92;u0009'</code>)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters">{@code \n}</td>
- *     <td headers="matches">The newline (line feed) character (<code>'&#92;u000A'</code>)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters">{@code \r}</td>
- *     <td headers="matches">The carriage-return character (<code>'&#92;u000D'</code>)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters">{@code \f}</td>
- *     <td headers="matches">The form-feed character (<code>'&#92;u000C'</code>)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters">{@code \a}</td>
- *     <td headers="matches">The alert (bell) character (<code>'&#92;u0007'</code>)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters">{@code \e}</td>
- *     <td headers="matches">The escape character (<code>'&#92;u001B'</code>)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct characters">{@code \c}<i>x</i></td>
- *     <td headers="matches">The control character corresponding to <i>x</i></td></tr>
+ * <tr><th style="vertical-align:top; font-weight: normal" id="unicode_name"><code>&#92;N{</code><i>name</i><code>}</code></th>
+ *     <td headers="matches characters unicode_name">The character with Unicode character name <i>'name'</i></td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="tab">{@code \t}</th>
+ *     <td headers="matches characters tab">The tab character (<code>'&#92;u0009'</code>)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="newline">{@code \n}</th>
+ *     <td headers="matches characters newline">The newline (line feed) character (<code>'&#92;u000A'</code>)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="return">{@code \r}</th>
+ *     <td headers="matches characters return">The carriage-return character (<code>'&#92;u000D'</code>)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="form_feed">{@code \f}</th>
+ *     <td headers="matches characters form_feed">The form-feed character (<code>'&#92;u000C'</code>)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="bell">{@code \a}</th>
+ *     <td headers="matches characters bell">The alert (bell) character (<code>'&#92;u0007'</code>)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="escape">{@code \e}</th>
+ *     <td headers="matches characters escape">The escape character (<code>'&#92;u001B'</code>)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="ctrl_x">{@code \c}<i>x</i></th>
+ *     <td headers="matches characters ctrl_x">The control character corresponding to <i>x</i></td></tr>
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="classes">Character classes</th></tr>
+ *  <tr><th colspan="2" style="padding-top:20px" id="classes">Character classes</th></tr>
  *
- * <tr><td style="vertical-align:top" headers="construct classes">{@code [abc]}</td>
- *     <td headers="matches">{@code a}, {@code b}, or {@code c} (simple class)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct classes">{@code [^abc]}</td>
- *     <td headers="matches">Any character except {@code a}, {@code b}, or {@code c} (negation)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct classes">{@code [a-zA-Z]}</td>
- *     <td headers="matches">{@code a} through {@code z}
+ * <tr><th style="vertical-align:top; font-weight:normal" id="simple">{@code [abc]}</th>
+ *     <td headers="matches classes simple">{@code a}, {@code b}, or {@code c} (simple class)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="negation">{@code [^abc]}</th>
+ *     <td headers="matches classes negation">Any character except {@code a}, {@code b}, or {@code c} (negation)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="range">{@code [a-zA-Z]}</th>
+ *     <td headers="matches classes range">{@code a} through {@code z}
  *         or {@code A} through {@code Z}, inclusive (range)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct classes">{@code [a-d[m-p]]}</td>
- *     <td headers="matches">{@code a} through {@code d},
+ * <tr><th style="vertical-align:top; font-weight:normal" id="union">{@code [a-d[m-p]]}</th>
+ *     <td headers="matches classes union">{@code a} through {@code d},
  *      or {@code m} through {@code p}: {@code [a-dm-p]} (union)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct classes">{@code [a-z&&[def]]}</td>
- *     <td headers="matches">{@code d}, {@code e}, or {@code f} (intersection)</tr>
- * <tr><td style="vertical-align:top" headers="construct classes">{@code [a-z&&[^bc]]}</td>
- *     <td headers="matches">{@code a} through {@code z},
+ * <tr><th style="vertical-align:top; font-weight:normal" id="intersection">{@code [a-z&&[def]]}</th>
+ *     <td headers="matches classes intersection">{@code d}, {@code e}, or {@code f} (intersection)</tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="subtraction1">{@code [a-z&&[^bc]]}</th>
+ *     <td headers="matches classes subtraction1">{@code a} through {@code z},
  *         except for {@code b} and {@code c}: {@code [ad-z]} (subtraction)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct classes">{@code [a-z&&[^m-p]]}</td>
- *     <td headers="matches">{@code a} through {@code z},
+ * <tr><th style="vertical-align:top; font-weight:normal" id="subtraction2">{@code [a-z&&[^m-p]]}</th>
+ *     <td headers="matches classes subtraction2">{@code a} through {@code z},
  *          and not {@code m} through {@code p}: {@code [a-lq-z]}(subtraction)</td></tr>
- * <tr><th>&nbsp;</th></tr>
  *
- * <tr style="text-align:left"><th colspan="2" id="predef">Predefined character classes</th></tr>
+ * <tr><th colspan="2" style="padding-top:20px" id="predef">Predefined character classes</th></tr>
  *
- * <tr><td style="vertical-align:top" headers="construct predef">{@code .}</td>
- *     <td headers="matches">Any character (may or may not match <a href="#lt">line terminators</a>)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct predef">{@code \d}</td>
- *     <td headers="matches">A digit: {@code [0-9]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct predef">{@code \D}</td>
- *     <td headers="matches">A non-digit: {@code [^0-9]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct predef">{@code \h}</td>
- *     <td headers="matches">A horizontal whitespace character:
+ * <tr><th style="vertical-align:top; font-weight:normal" id="any">{@code .}</th>
+ *     <td headers="matches predef any">Any character (may or may not match <a href="#lt">line terminators</a>)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="digit">{@code \d}</th>
+ *     <td headers="matches predef digit">A digit: {@code [0-9]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="non_digit">{@code \D}</th>
+ *     <td headers="matches predef non_digit">A non-digit: {@code [^0-9]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="horiz_white">{@code \h}</th>
+ *     <td headers="matches predef horiz_white">A horizontal whitespace character:
  *     <code>[ \t\xA0&#92;u1680&#92;u180e&#92;u2000-&#92;u200a&#92;u202f&#92;u205f&#92;u3000]</code></td></tr>
- * <tr><td style="vertical-align:top" headers="construct predef">{@code \H}</td>
- *     <td headers="matches">A non-horizontal whitespace character: {@code [^\h]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct predef">{@code \s}</td>
- *     <td headers="matches">A whitespace character: {@code [ \t\n\x0B\f\r]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct predef">{@code \S}</td>
- *     <td headers="matches">A non-whitespace character: {@code [^\s]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct predef">{@code \v}</td>
- *     <td headers="matches">A vertical whitespace character: <code>[\n\x0B\f\r\x85&#92;u2028&#92;u2029]</code>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="non_horiz_white">{@code \H}</th>
+ *     <td headers="matches predef non_horiz_white">A non-horizontal whitespace character: {@code [^\h]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="white">{@code \s}</th>
+ *     <td headers="matches predef white">A whitespace character: {@code [ \t\n\x0B\f\r]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="non_white">{@code \S}</th>
+ *     <td headers="matches predef non_white">A non-whitespace character: {@code [^\s]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="vert_white">{@code \v}</th>
+ *     <td headers="matches predef vert_white">A vertical whitespace character: <code>[\n\x0B\f\r\x85&#92;u2028&#92;u2029]</code>
  *     </td></tr>
- * <tr><td style="vertical-align:top" headers="construct predef">{@code \V}</td>
- *     <td headers="matches">A non-vertical whitespace character: {@code [^\v]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct predef">{@code \w}</td>
- *     <td headers="matches">A word character: {@code [a-zA-Z_0-9]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct predef">{@code \W}</td>
- *     <td headers="matches">A non-word character: {@code [^\w]}</td></tr>
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="posix"><b>POSIX character classes (US-ASCII only)</b></th></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="non_vert_white">{@code \V}</th>
+ *     <td headers="matches predef non_vert_white">A non-vertical whitespace character: {@code [^\v]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="word">{@code \w}</th>
+ *     <td headers="matches predef word">A word character: {@code [a-zA-Z_0-9]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="non_word">{@code \W}</th>
+ *     <td headers="matches predef non_word">A non-word character: {@code [^\w]}</td></tr>
+ *
+ * <tr><th colspan="2" style="padding-top:20px" id="posix"><b>POSIX character classes (US-ASCII only)</b></th></tr>
  *
- * <tr><td style="vertical-align:top" headers="construct posix">{@code \p{Lower}}</td>
- *     <td headers="matches">A lower-case alphabetic character: {@code [a-z]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct posix">{@code \p{Upper}}</td>
- *     <td headers="matches">An upper-case alphabetic character:{@code [A-Z]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct posix">{@code \p{ASCII}}</td>
- *     <td headers="matches">All ASCII:{@code [\x00-\x7F]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct posix">{@code \p{Alpha}}</td>
- *     <td headers="matches">An alphabetic character:{@code [\p{Lower}\p{Upper}]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct posix">{@code \p{Digit}}</td>
- *     <td headers="matches">A decimal digit: {@code [0-9]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct posix">{@code \p{Alnum}}</td>
- *     <td headers="matches">An alphanumeric character:{@code [\p{Alpha}\p{Digit}]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct posix">{@code \p{Punct}}</td>
- *     <td headers="matches">Punctuation: One of {@code !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="Lower">{@code \p{Lower}}</th>
+ *     <td headers="matches posix Lower">A lower-case alphabetic character: {@code [a-z]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="Upper">{@code \p{Upper}}</th>
+ *     <td headers="matches posix Upper">An upper-case alphabetic character:{@code [A-Z]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="ASCII">{@code \p{ASCII}}</th>
+ *     <td headers="matches posix ASCII">All ASCII:{@code [\x00-\x7F]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="Alpha">{@code \p{Alpha}}</th>
+ *     <td headers="matches posix Alpha">An alphabetic character:{@code [\p{Lower}\p{Upper}]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="Digit">{@code \p{Digit}}</th>
+ *     <td headers="matches posix Digit">A decimal digit: {@code [0-9]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="Alnum">{@code \p{Alnum}}</th>
+ *     <td headers="matches posix Alnum">An alphanumeric character:{@code [\p{Alpha}\p{Digit}]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="Punct">{@code \p{Punct}}</th>
+ *     <td headers="matches posix Punct">Punctuation: One of {@code !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~}</td></tr>
  *     <!-- {@code [\!"#\$%&'\(\)\*\+,\-\./:;\<=\>\?@\[\\\]\^_`\{\|\}~]}
  *          {@code [\X21-\X2F\X31-\X40\X5B-\X60\X7B-\X7E]} -->
- * <tr><td style="vertical-align:top" headers="construct posix">{@code \p{Graph}}</td>
- *     <td headers="matches">A visible character: {@code [\p{Alnum}\p{Punct}]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct posix">{@code \p{Print}}</td>
- *     <td headers="matches">A printable character: {@code [\p{Graph}\x20]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct posix">{@code \p{Blank}}</td>
- *     <td headers="matches">A space or a tab: {@code [ \t]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct posix">{@code \p{Cntrl}}</td>
- *     <td headers="matches">A control character: {@code [\x00-\x1F\x7F]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct posix">{@code \p{XDigit}}</td>
- *     <td headers="matches">A hexadecimal digit: {@code [0-9a-fA-F]}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct posix">{@code \p{Space}}</td>
- *     <td headers="matches">A whitespace character: {@code [ \t\n\x0B\f\r]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="Graph">{@code \p{Graph}}</th>
+ *     <td headers="matches posix Graph">A visible character: {@code [\p{Alnum}\p{Punct}]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="Print">{@code \p{Print}}</th>
+ *     <td headers="matches posix Print">A printable character: {@code [\p{Graph}\x20]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="Blank">{@code \p{Blank}}</th>
+ *     <td headers="matches posix Blank">A space or a tab: {@code [ \t]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="Cntrl">{@code \p{Cntrl}}</th>
+ *     <td headers="matches posix Cntrl">A control character: {@code [\x00-\x1F\x7F]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="XDigit">{@code \p{XDigit}}</th>
+ *     <td headers="matches posix XDigit">A hexadecimal digit: {@code [0-9a-fA-F]}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="Space">{@code \p{Space}}</th>
+ *     <td headers="matches posix Space">A whitespace character: {@code [ \t\n\x0B\f\r]}</td></tr>
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2">java.lang.Character classes (simple <a href="#jcc">java character type</a>)</th></tr>
+ * <tr><th colspan="2" style="padding-top:20px" id="java">java.lang.Character classes (simple <a href="#jcc">java character type</a>)</th></tr>
  *
- * <tr><td style="vertical-align:top">{@code \p{javaLowerCase}}</td>
- *     <td>Equivalent to java.lang.Character.isLowerCase()</td></tr>
- * <tr><td style="vertical-align:top">{@code \p{javaUpperCase}}</td>
- *     <td>Equivalent to java.lang.Character.isUpperCase()</td></tr>
- * <tr><td style="vertical-align:top">{@code \p{javaWhitespace}}</td>
- *     <td>Equivalent to java.lang.Character.isWhitespace()</td></tr>
- * <tr><td style="vertical-align:top">{@code \p{javaMirrored}}</td>
- *     <td>Equivalent to java.lang.Character.isMirrored()</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="javaLowerCase">{@code \p{javaLowerCase}}</th>
+ *     <td headers="matches java javaLowerCase">Equivalent to java.lang.Character.isLowerCase()</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="javaUpperCase">{@code \p{javaUpperCase}}</th>
+ *     <td headers="matches java javaUpperCase">Equivalent to java.lang.Character.isUpperCase()</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="javaWhitespace">{@code \p{javaWhitespace}}</th>
+ *     <td headers="matches java javaWhitespace">Equivalent to java.lang.Character.isWhitespace()</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="javaMirrored">{@code \p{javaMirrored}}</th>
+ *     <td headers="matches java javaMirrored">Equivalent to java.lang.Character.isMirrored()</td></tr>
+ *
+ * <tr><th colspan="2" style="padding-top:20px"  id="unicode">Classes for Unicode scripts, blocks, categories and binary properties</th></tr>
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="unicode">Classes for Unicode scripts, blocks, categories and binary properties</th></tr>
- * <tr><td style="vertical-align:top" headers="construct unicode">{@code \p{IsLatin}}</td>
- *     <td headers="matches">A Latin&nbsp;script character (<a href="#usc">script</a>)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct unicode">{@code \p{InGreek}}</td>
- *     <td headers="matches">A character in the Greek&nbsp;block (<a href="#ubc">block</a>)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct unicode">{@code \p{Lu}}</td>
- *     <td headers="matches">An uppercase letter (<a href="#ucc">category</a>)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct unicode">{@code \p{IsAlphabetic}}</td>
- *     <td headers="matches">An alphabetic character (<a href="#ubpc">binary property</a>)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct unicode">{@code \p{Sc}}</td>
- *     <td headers="matches">A currency symbol</td></tr>
- * <tr><td style="vertical-align:top" headers="construct unicode">{@code \P{InGreek}}</td>
- *     <td headers="matches">Any character except one in the Greek block (negation)</td></tr>
- * <tr><td style="vertical-align:top" headers="construct unicode">{@code [\p{L}&&[^\p{Lu}]]}</td>
- *     <td headers="matches">Any letter except an uppercase letter (subtraction)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="IsLatin">{@code \p{IsLatin}}</th>
+ *     <td headers="matches unicode IsLatin">A Latin&nbsp;script character (<a href="#usc">script</a>)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="InGreek">{@code \p{InGreek}}</th>
+ *     <td headers="matches unicode InGreek">A character in the Greek&nbsp;block (<a href="#ubc">block</a>)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="Lu">{@code \p{Lu}}</th>
+ *     <td headers="matches unicode Lu">An uppercase letter (<a href="#ucc">category</a>)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="IsAlphabetic">{@code \p{IsAlphabetic}}</th>
+ *     <td headers="matches unicode IsAlphabetic">An alphabetic character (<a href="#ubpc">binary property</a>)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="Sc">{@code \p{Sc}}</th>
+ *     <td headers="matches unicode Sc">A currency symbol</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="not_InGreek">{@code \P{InGreek}}</th>
+ *     <td headers="matches unicode not_InGreek">Any character except one in the Greek block (negation)</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="not_uppercase">{@code [\p{L}&&[^\p{Lu}]]}</th>
+ *     <td headers="matches unicode not_uppercase">Any letter except an uppercase letter (subtraction)</td></tr>
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="bounds">Boundary matchers</th></tr>
+ * <tr><th colspan="2" style="padding-top:20px" id="bounds">Boundary matchers</th></tr>
  *
- * <tr><td style="vertical-align:top" headers="construct bounds">{@code ^}</td>
- *     <td headers="matches">The beginning of a line</td></tr>
- * <tr><td style="vertical-align:top" headers="construct bounds">{@code $}</td>
- *     <td headers="matches">The end of a line</td></tr>
- * <tr><td style="vertical-align:top" headers="construct bounds">{@code \b}</td>
- *     <td headers="matches">A word boundary</td></tr>
- * <tr><td style="vertical-align:top" headers="construct bounds">{@code \b{g}}</td>
- *     <td headers="matches">A Unicode extended grapheme cluster boundary</td></tr>
- * <tr><td style="vertical-align:top" headers="construct bounds">{@code \B}</td>
- *     <td headers="matches">A non-word boundary</td></tr>
- * <tr><td style="vertical-align:top" headers="construct bounds">{@code \A}</td>
- *     <td headers="matches">The beginning of the input</td></tr>
- * <tr><td style="vertical-align:top" headers="construct bounds">{@code \G}</td>
- *     <td headers="matches">The end of the previous match</td></tr>
- * <tr><td style="vertical-align:top" headers="construct bounds">{@code \Z}</td>
- *     <td headers="matches">The end of the input but for the final
+ * <tr><th style="vertical-align:top; font-weight:normal" id="begin_line">{@code ^}</th>
+ *     <td headers="matches bounds begin_line">The beginning of a line</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="end_line">{@code $}</th>
+ *     <td headers="matches bounds end_line">The end of a line</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="word_boundary">{@code \b}</th>
+ *     <td headers="matches bounds word_boundary">A word boundary</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="grapheme_cluster_boundary">{@code \b{g}}</th>
+ *     <td headers="matches bounds grapheme_cluster_boundary">A Unicode extended grapheme cluster boundary</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="non_word_boundary">{@code \B}</th>
+ *     <td headers="matches bounds non_word_boundary">A non-word boundary</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="begin_input">{@code \A}</th>
+ *     <td headers="matches bounds begin_input">The beginning of the input</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="end_prev_match">{@code \G}</th>
+ *     <td headers="matches bounds end_prev_match">The end of the previous match</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="end_input_except_term">{@code \Z}</th>
+ *     <td headers="matches bounds end_input_except_term">The end of the input but for the final
  *         <a href="#lt">terminator</a>, if&nbsp;any</td></tr>
- * <tr><td style="vertical-align:top" headers="construct bounds">{@code \z}</td>
- *     <td headers="matches">The end of the input</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="end_input">{@code \z}</th>
+ *     <td headers="matches bounds end_input">The end of the input</td></tr>
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="lineending">Linebreak matcher</th></tr>
- * <tr><td style="vertical-align:top" headers="construct lineending">{@code \R}</td>
- *     <td headers="matches">Any Unicode linebreak sequence, is equivalent to
+ * <tr><th colspan="2" style="padding-top:20px" id="linebreak">Linebreak matcher</th></tr>
+ *
+ * <tr><th style="vertical-align:top; font-weight:normal" id="any_unicode_linebreak">{@code \R}</th>
+ *     <td headers="matches linebreak any_unicode_linebreak">Any Unicode linebreak sequence, is equivalent to
  *     <code>&#92;u000D&#92;u000A|[&#92;u000A&#92;u000B&#92;u000C&#92;u000D&#92;u0085&#92;u2028&#92;u2029]
  *     </code></td></tr>
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="grapheme">Unicode Extended Grapheme matcher</th></tr>
- * <tr><td style="vertical-align:top" headers="construct grapheme">{@code \X}</td>
- *     <td headers="matches">Any Unicode extended grapheme cluster</td></tr>
+ * <tr><th colspan="2" style="padding-top:20px" id="grapheme">Unicode Extended Grapheme matcher</th></tr>
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="greedy">Greedy quantifiers</th></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="grapheme_any">{@code \X}</th>
+ *     <td headers="matches grapheme grapheme_any">Any Unicode extended grapheme cluster</td></tr>
+ *
+ * <tr><th colspan="2" style="padding-top:20px" id="greedy">Greedy quantifiers</th></tr>
  *
- * <tr><td style="vertical-align:top" headers="construct greedy"><i>X</i>{@code ?}</td>
- *     <td headers="matches"><i>X</i>, once or not at all</td></tr>
- * <tr><td style="vertical-align:top" headers="construct greedy"><i>X</i>{@code *}</td>
- *     <td headers="matches"><i>X</i>, zero or more times</td></tr>
- * <tr><td style="vertical-align:top" headers="construct greedy"><i>X</i>{@code +}</td>
- *     <td headers="matches"><i>X</i>, one or more times</td></tr>
- * <tr><td style="vertical-align:top" headers="construct greedy"><i>X</i><code>{</code><i>n</i><code>}</code></td>
- *     <td headers="matches"><i>X</i>, exactly <i>n</i> times</td></tr>
- * <tr><td style="vertical-align:top" headers="construct greedy"><i>X</i><code>{</code><i>n</i>{@code ,}}</td>
- *     <td headers="matches"><i>X</i>, at least <i>n</i> times</td></tr>
- * <tr><td style="vertical-align:top" headers="construct greedy"><i>X</i><code>{</code><i>n</i>{@code ,}<i>m</i><code>}</code></td>
- *     <td headers="matches"><i>X</i>, at least <i>n</i> but not more than <i>m</i> times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="greedy_once_or_not"><i>X</i>{@code ?}</th>
+ *     <td headers="matches greedy greedy_once_or_not"><i>X</i>, once or not at all</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="greedy_zero_or_more"><i>X</i>{@code *}</th>
+ *     <td headers="matches greedy greedy_zero_or_more"><i>X</i>, zero or more times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="greedy_one_or_more"><i>X</i>{@code +}</th>
+ *     <td headers="matches greedy greedy_one_or_more"><i>X</i>, one or more times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="greedy_exactly"><i>X</i><code>{</code><i>n</i><code>}</code></th>
+ *     <td headers="matches greedy greedy_exactly"><i>X</i>, exactly <i>n</i> times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="greedy_at_least"><i>X</i><code>{</code><i>n</i>{@code ,}}</th>
+ *     <td headers="matches greedy greedy_at_least"><i>X</i>, at least <i>n</i> times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="greedy_at_least_up_to"><i>X</i><code>{</code><i>n</i>{@code ,}<i>m</i><code>}</code></th>
+ *     <td headers="matches greedy greedy_at_least_up_to"><i>X</i>, at least <i>n</i> but not more than <i>m</i> times</td></tr>
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="reluc">Reluctant quantifiers</th></tr>
+ * <tr><th colspan="2" style="padding-top:20px" id="reluc">Reluctant quantifiers</th></tr>
  *
- * <tr><td style="vertical-align:top" headers="construct reluc"><i>X</i>{@code ??}</td>
- *     <td headers="matches"><i>X</i>, once or not at all</td></tr>
- * <tr><td style="vertical-align:top" headers="construct reluc"><i>X</i>{@code *?}</td>
- *     <td headers="matches"><i>X</i>, zero or more times</td></tr>
- * <tr><td style="vertical-align:top" headers="construct reluc"><i>X</i>{@code +?}</td>
- *     <td headers="matches"><i>X</i>, one or more times</td></tr>
- * <tr><td style="vertical-align:top" headers="construct reluc"><i>X</i><code>{</code><i>n</i><code>}?</code></td>
- *     <td headers="matches"><i>X</i>, exactly <i>n</i> times</td></tr>
- * <tr><td style="vertical-align:top" headers="construct reluc"><i>X</i><code>{</code><i>n</i><code>,}?</code></td>
- *     <td headers="matches"><i>X</i>, at least <i>n</i> times</td></tr>
- * <tr><td style="vertical-align:top" headers="construct reluc"><i>X</i><code>{</code><i>n</i>{@code ,}<i>m</i><code>}?</code></td>
- *     <td headers="matches"><i>X</i>, at least <i>n</i> but not more than <i>m</i> times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="reluc_once_or_not"><i>X</i>{@code ??}</th>
+ *     <td headers="matches reluc reluc_once_or_not"><i>X</i>, once or not at all</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="reluc_zero_or_more"><i>X</i>{@code *?}</th>
+ *     <td headers="matches reluc reluc_zero_or_more"><i>X</i>, zero or more times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="reluc_one_or_more"><i>X</i>{@code +?}</th>
+ *     <td headers="matches reluc reluc_one_or_more"><i>X</i>, one or more times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="reluc_exactly"><i>X</i><code>{</code><i>n</i><code>}?</code></th>
+ *     <td headers="matches reluc reluc_exactly"><i>X</i>, exactly <i>n</i> times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="reluc_at_least"><i>X</i><code>{</code><i>n</i><code>,}?</code></th>
+ *     <td headers="matches reluc reluc_at_least"><i>X</i>, at least <i>n</i> times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="reluc_at_least_up_to"><i>X</i><code>{</code><i>n</i>{@code ,}<i>m</i><code>}?</code></th>
+ *     <td headers="matches reluc reluc_at_least_up_to"><i>X</i>, at least <i>n</i> but not more than <i>m</i> times</td></tr>
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="poss">Possessive quantifiers</th></tr>
+ * <tr><th colspan="2" style="padding-top:20px" id="poss">Possessive quantifiers</th></tr>
  *
- * <tr><td style="vertical-align:top" headers="construct poss"><i>X</i>{@code ?+}</td>
- *     <td headers="matches"><i>X</i>, once or not at all</td></tr>
- * <tr><td style="vertical-align:top" headers="construct poss"><i>X</i>{@code *+}</td>
- *     <td headers="matches"><i>X</i>, zero or more times</td></tr>
- * <tr><td style="vertical-align:top" headers="construct poss"><i>X</i>{@code ++}</td>
- *     <td headers="matches"><i>X</i>, one or more times</td></tr>
- * <tr><td style="vertical-align:top" headers="construct poss"><i>X</i><code>{</code><i>n</i><code>}+</code></td>
- *     <td headers="matches"><i>X</i>, exactly <i>n</i> times</td></tr>
- * <tr><td style="vertical-align:top" headers="construct poss"><i>X</i><code>{</code><i>n</i><code>,}+</code></td>
- *     <td headers="matches"><i>X</i>, at least <i>n</i> times</td></tr>
- * <tr><td style="vertical-align:top" headers="construct poss"><i>X</i><code>{</code><i>n</i>{@code ,}<i>m</i><code>}+</code></td>
- *     <td headers="matches"><i>X</i>, at least <i>n</i> but not more than <i>m</i> times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="poss_once_or_not"><i>X</i>{@code ?+}</th>
+ *     <td headers="matches poss poss_once_or_not"><i>X</i>, once or not at all</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="poss_zero_or_more"><i>X</i>{@code *+}</th>
+ *     <td headers="matches poss poss_zero_or_more"><i>X</i>, zero or more times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="poss_one_or_more"><i>X</i>{@code ++}</th>
+ *     <td headers="matches poss poss_one_or_more"><i>X</i>, one or more times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="poss_exactly"><i>X</i><code>{</code><i>n</i><code>}+</code></th>
+ *     <td headers="matches poss poss_exactly"><i>X</i>, exactly <i>n</i> times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="poss_at_least"><i>X</i><code>{</code><i>n</i><code>,}+</code></th>
+ *     <td headers="matches poss poss_at_least"><i>X</i>, at least <i>n</i> times</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="poss_at_least_up_to"><i>X</i><code>{</code><i>n</i>{@code ,}<i>m</i><code>}+</code></th>
+ *     <td headers="matches poss poss_at_least_up_to"><i>X</i>, at least <i>n</i> but not more than <i>m</i> times</td></tr>
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="logical">Logical operators</th></tr>
+ * <tr><th colspan="2" style="padding-top:20px" id="logical">Logical operators</th></tr>
  *
- * <tr><td style="vertical-align:top" headers="construct logical"><i>XY</i></td>
- *     <td headers="matches"><i>X</i> followed by <i>Y</i></td></tr>
- * <tr><td style="vertical-align:top" headers="construct logical"><i>X</i>{@code |}<i>Y</i></td>
- *     <td headers="matches">Either <i>X</i> or <i>Y</i></td></tr>
- * <tr><td style="vertical-align:top" headers="construct logical">{@code (}<i>X</i>{@code )}</td>
- *     <td headers="matches">X, as a <a href="#cg">capturing group</a></td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="concat"><i>XY</i></th>
+ *     <td headers="matches logical concat"><i>X</i> followed by <i>Y</i></td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="alternate"><i>X</i>{@code |}<i>Y</i></th>
+ *     <td headers="matches logical alternate">Either <i>X</i> or <i>Y</i></td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="group">{@code (}<i>X</i>{@code )}</th>
+ *     <td headers="matches logical group">X, as a <a href="#cg">capturing group</a></td></tr>
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="backref">Back references</th></tr>
+ * <tr><th colspan="2" style="padding-top:20px" id="backref">Back references</th></tr>
  *
- * <tr><td style="vertical-align:bottom" headers="construct backref">{@code \}<i>n</i></td>
- *     <td style="vertical-align:bottom" headers="matches">Whatever the <i>n</i><sup>th</sup>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="back_nth">{@code \}<i>n</i></th>
+ *     <td headers="matches backref back_nth">Whatever the <i>n</i><sup>th</sup>
  *     <a href="#cg">capturing group</a> matched</td></tr>
- *
- * <tr><td style="vertical-align:bottom" headers="construct backref">{@code \}<i>k</i>&lt;<i>name</i>&gt;</td>
- *     <td style="vertical-align:bottom" headers="matches">Whatever the
+ * <tr><th style="vertical-align:top; font-weight:normal" id="back_named">{@code \}<i>k</i>&lt;<i>name</i>&gt;</th>
+ *     <td headers="matches backref back_named">Whatever the
  *     <a href="#groupname">named-capturing group</a> "name" matched</td></tr>
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="quot">Quotation</th></tr>
+ * <tr><th colspan="2" style="padding-top:20px" id="quote">Quotation</th></tr>
  *
- * <tr><td style="vertical-align:top" headers="construct quot">{@code \}</td>
- *     <td headers="matches">Nothing, but quotes the following character</td></tr>
- * <tr><td style="vertical-align:top" headers="construct quot">{@code \Q}</td>
- *     <td headers="matches">Nothing, but quotes all characters until {@code \E}</td></tr>
- * <tr><td style="vertical-align:top" headers="construct quot">{@code \E}</td>
- *     <td headers="matches">Nothing, but ends quoting started by {@code \Q}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="quote_follow">{@code \}</th>
+ *     <td headers="matches quote quote_follow">Nothing, but quotes the following character</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="quote_begin">{@code \Q}</th>
+ *     <td headers="matches quote quote_begin">Nothing, but quotes all characters until {@code \E}</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="quote_end">{@code \E}</th>
+ *     <td headers="matches quote quote_end">Nothing, but ends quoting started by {@code \Q}</td></tr>
  *     <!-- Metachars: !$()*+.<>?[\]^{|} -->
  *
- * <tr><th>&nbsp;</th></tr>
- * <tr style="text-align:left"><th colspan="2" id="special">Special constructs (named-capturing and non-capturing)</th></tr>
+ * <tr><th colspan="2" style="padding-top:20px" id="special">Special constructs (named-capturing and non-capturing)</th></tr>
  *
- * <tr><td style="vertical-align:top" headers="construct special"><code>(?&lt;<a href="#groupname">name</a>&gt;</code><i>X</i>{@code )}</td>
- *     <td headers="matches"><i>X</i>, as a named-capturing group</td></tr>
- * <tr><td style="vertical-align:top" headers="construct special">{@code (?:}<i>X</i>{@code )}</td>
- *     <td headers="matches"><i>X</i>, as a non-capturing group</td></tr>
- * <tr><td style="vertical-align:top" headers="construct special"><code>(?idmsuxU-idmsuxU)&nbsp;</code></td>
- *     <td headers="matches">Nothing, but turns match flags <a href="#CASE_INSENSITIVE">i</a>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="named_group"><code>(?&lt;<a href="#groupname">name</a>&gt;</code><i>X</i>{@code )}</th>
+ *     <td headers="matches special named_group"><i>X</i>, as a named-capturing group</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="non_capture_group">{@code (?:}<i>X</i>{@code )}</th>
+ *     <td headers="matches special non_capture_group"><i>X</i>, as a non-capturing group</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="flags"><code>(?idmsuxU-idmsuxU)&nbsp;</code></th>
+ *     <td headers="matches special flags">Nothing, but turns match flags <a href="#CASE_INSENSITIVE">i</a>
  * <a href="#UNIX_LINES">d</a> <a href="#MULTILINE">m</a> <a href="#DOTALL">s</a>
  * <a href="#UNICODE_CASE">u</a> <a href="#COMMENTS">x</a> <a href="#UNICODE_CHARACTER_CLASS">U</a>
  * on - off</td></tr>
- * <tr><td style="vertical-align:top" headers="construct special"><code>(?idmsux-idmsux:</code><i>X</i>{@code )}&nbsp;&nbsp;</td>
- *     <td headers="matches"><i>X</i>, as a <a href="#cg">non-capturing group</a> with the
+ * <tr><th style="vertical-align:top; font-weight:normal" id="non_capture_group_flags"><code>(?idmsux-idmsux:</code><i>X</i>{@code )}&nbsp;&nbsp;</th>
+ *     <td headers="matches special non_capture_group_flags"><i>X</i>, as a <a href="#cg">non-capturing group</a> with the
  *         given flags <a href="#CASE_INSENSITIVE">i</a> <a href="#UNIX_LINES">d</a>
  * <a href="#MULTILINE">m</a> <a href="#DOTALL">s</a> <a href="#UNICODE_CASE">u</a >
  * <a href="#COMMENTS">x</a> on - off</td></tr>
- * <tr><td style="vertical-align:top" headers="construct special">{@code (?=}<i>X</i>{@code )}</td>
- *     <td headers="matches"><i>X</i>, via zero-width positive lookahead</td></tr>
- * <tr><td style="vertical-align:top" headers="construct special">{@code (?!}<i>X</i>{@code )}</td>
- *     <td headers="matches"><i>X</i>, via zero-width negative lookahead</td></tr>
- * <tr><td style="vertical-align:top" headers="construct special">{@code (?<=}<i>X</i>{@code )}</td>
- *     <td headers="matches"><i>X</i>, via zero-width positive lookbehind</td></tr>
- * <tr><td style="vertical-align:top" headers="construct special">{@code (?<!}<i>X</i>{@code )}</td>
- *     <td headers="matches"><i>X</i>, via zero-width negative lookbehind</td></tr>
- * <tr><td style="vertical-align:top" headers="construct special">{@code (?>}<i>X</i>{@code )}</td>
- *     <td headers="matches"><i>X</i>, as an independent, non-capturing group</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="pos_lookahead">{@code (?=}<i>X</i>{@code )}</th>
+ *     <td headers="matches special pos_lookahead"><i>X</i>, via zero-width positive lookahead</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="neg_lookahead">{@code (?!}<i>X</i>{@code )}</th>
+ *     <td headers="matches special neg_lookahead"><i>X</i>, via zero-width negative lookahead</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="pos_lookbehind">{@code (?<=}<i>X</i>{@code )}</th>
+ *     <td headers="matches special pos_lookbehind"><i>X</i>, via zero-width positive lookbehind</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="neg_lookbehind">{@code (?<!}<i>X</i>{@code )}</th>
+ *     <td headers="matches special neg_lookbehind"><i>X</i>, via zero-width negative lookbehind</td></tr>
+ * <tr><th style="vertical-align:top; font-weight:normal" id="indep_non_capture_group">{@code (?>}<i>X</i>{@code )}</th>
+ *     <td headers="matches special indep_non_capture_group"><i>X</i>, as an independent, non-capturing group</td></tr>
  *
  * </tbody>
  * </table>
@@ -432,26 +419,29 @@
  *    <p> The precedence of character-class operators is as follows, from
  *    highest to lowest:
  *
- *    <blockquote><table>
+ *    <table class="striped" style="margin-left: 2em;">
  *      <caption style="display:none">Precedence of character class operators.</caption>
+ *      <thead>
+ *      <tr><th scope="col">Precedence<th scope="col">Name<th scope="col">Example
+ *      </thead>
  *      <tbody>
- *      <tr><th>1&nbsp;&nbsp;&nbsp;&nbsp;</th>
+ *      <tr><th scope="row">1</th>
  *        <td>Literal escape&nbsp;&nbsp;&nbsp;&nbsp;</td>
  *        <td>{@code \x}</td></tr>
- *     <tr><th>2&nbsp;&nbsp;&nbsp;&nbsp;</th>
+ *     <tr><th scope="row">2</th>
  *        <td>Grouping</td>
  *        <td>{@code [...]}</td></tr>
- *     <tr><th>3&nbsp;&nbsp;&nbsp;&nbsp;</th>
+ *     <tr><th scope="row">3</th>
  *        <td>Range</td>
  *        <td>{@code a-z}</td></tr>
- *      <tr><th>4&nbsp;&nbsp;&nbsp;&nbsp;</th>
+ *      <tr><th scope="row">4</th>
  *        <td>Union</td>
  *        <td>{@code [a-e][i-u]}</td></tr>
- *      <tr><th>5&nbsp;&nbsp;&nbsp;&nbsp;</th>
+ *      <tr><th scope="row">5</th>
  *        <td>Intersection</td>
  *        <td>{@code [a-z&&[aeiou]]}</td></tr>
  *      </tbody>
- *    </table></blockquote>
+ *    </table>
  *
  *    <p> Note that a different set of metacharacters are in effect inside
  *    a character class than outside a character class. For instance, the
@@ -467,18 +457,18 @@
  *
  * <ul>
  *
- *   <li> A newline (line feed) character&nbsp;({@code '\n'}),
+ *   <li> A newline (line feed) character ({@code '\n'}),
  *
  *   <li> A carriage-return character followed immediately by a newline
- *   character&nbsp;({@code "\r\n"}),
+ *   character ({@code "\r\n"}),
  *
- *   <li> A standalone carriage-return character&nbsp;({@code '\r'}),
+ *   <li> A standalone carriage-return character ({@code '\r'}),
  *
- *   <li> A next-line character&nbsp;(<code>'&#92;u0085'</code>),
+ *   <li> A next-line character (<code>'&#92;u0085'</code>),
  *
- *   <li> A line-separator character&nbsp;(<code>'&#92;u2028'</code>), or
+ *   <li> A line-separator character (<code>'&#92;u2028'</code>), or
  *
- *   <li> A paragraph-separator character&nbsp;(<code>'&#92;u2029'</code>).
+ *   <li> A paragraph-separator character (<code>'&#92;u2029'</code>).
  *
  * </ul>
  * <p>If {@link #UNIX_LINES} mode is activated, then the only line terminators
@@ -501,19 +491,12 @@
  * left to right.  In the expression {@code ((A)(B(C)))}, for example, there
  * are four such groups: </p>
  *
- * <blockquote><table>
- * <caption style="display:none">Capturing group numberings</caption>
- * <tbody>
- * <tr><th>1&nbsp;&nbsp;&nbsp;&nbsp;</th>
- *     <td>{@code ((A)(B(C)))}</td></tr>
- * <tr><th>2&nbsp;&nbsp;&nbsp;&nbsp;</th>
- *     <td>{@code (A)}</td></tr>
- * <tr><th>3&nbsp;&nbsp;&nbsp;&nbsp;</th>
- *     <td>{@code (B(C))}</td></tr>
- * <tr><th>4&nbsp;&nbsp;&nbsp;&nbsp;</th>
- *     <td>{@code (C)}</td></tr>
- * </tbody>
- * </table></blockquote>
+ * <ol style="margin-left:2em;">
+ *   <li> {@code ((A)(B(C)))}
+ *   <li> {@code (A)}
+ *   <li> {@code (B(C))}
+ *   <li> {@code (C)}
+ * </ol>
  *
  * <p> Group zero always stands for the entire expression.
  *
@@ -649,52 +632,52 @@
  * of <a href="http://www.unicode.org/reports/tr18/"><i>Unicode Regular Expression
  * </i></a>, when {@link #UNICODE_CHARACTER_CLASS} flag is specified.
  *
- * <table>
+ * <table class="striped">
  * <caption style="display:none">predefined and posix character classes in Unicode mode</caption>
  * <thead>
- * <tr style="text-align:left">
- * <th style="text-align:left" id="predef_classes">Classes</th>
- * <th style="text-align:left" id="predef_matches">Matches</th>
+ * <tr>
+ * <th scope="col" id="predef_classes">Classes</th>
+ * <th scope="col" id="predef_matches">Matches</th>
  * </tr>
  * </thead>
  * <tbody>
- * <tr><td>{@code \p{Lower}}</td>
+ * <tr><th scope="row">{@code \p{Lower}}</th>
  *     <td>A lowercase character:{@code \p{IsLowercase}}</td></tr>
- * <tr><td>{@code \p{Upper}}</td>
+ * <tr><th scope="row">{@code \p{Upper}}</th>
  *     <td>An uppercase character:{@code \p{IsUppercase}}</td></tr>
- * <tr><td>{@code \p{ASCII}}</td>
+ * <tr><th scope="row">{@code \p{ASCII}}</th>
  *     <td>All ASCII:{@code [\x00-\x7F]}</td></tr>
- * <tr><td>{@code \p{Alpha}}</td>
+ * <tr><th scope="row">{@code \p{Alpha}}</th>
  *     <td>An alphabetic character:{@code \p{IsAlphabetic}}</td></tr>
- * <tr><td>{@code \p{Digit}}</td>
+ * <tr><th scope="row">{@code \p{Digit}}</th>
  *     <td>A decimal digit character:{@code \p{IsDigit}}</td></tr>
- * <tr><td>{@code \p{Alnum}}</td>
+ * <tr><th scope="row">{@code \p{Alnum}}</th>
  *     <td>An alphanumeric character:{@code [\p{IsAlphabetic}\p{IsDigit}]}</td></tr>
- * <tr><td>{@code \p{Punct}}</td>
+ * <tr><th scope="row">{@code \p{Punct}}</th>
  *     <td>A punctuation character:{@code \p{IsPunctuation}}</td></tr>
- * <tr><td>{@code \p{Graph}}</td>
+ * <tr><th scope="row">{@code \p{Graph}}</th>
  *     <td>A visible character: {@code [^\p{IsWhite_Space}\p{gc=Cc}\p{gc=Cs}\p{gc=Cn}]}</td></tr>
- * <tr><td>{@code \p{Print}}</td>
+ * <tr><th scope="row">{@code \p{Print}}</th>
  *     <td>A printable character: {@code [\p{Graph}\p{Blank}&&[^\p{Cntrl}]]}</td></tr>
- * <tr><td>{@code \p{Blank}}</td>
+ * <tr><th scope="row">{@code \p{Blank}}</th>
  *     <td>A space or a tab: {@code [\p{IsWhite_Space}&&[^\p{gc=Zl}\p{gc=Zp}\x0a\x0b\x0c\x0d\x85]]}</td></tr>
- * <tr><td>{@code \p{Cntrl}}</td>
+ * <tr><th scope="row">{@code \p{Cntrl}}</th>
  *     <td>A control character: {@code \p{gc=Cc}}</td></tr>
- * <tr><td>{@code \p{XDigit}}</td>
+ * <tr><th scope="row">{@code \p{XDigit}}</th>
  *     <td>A hexadecimal digit: {@code [\p{gc=Nd}\p{IsHex_Digit}]}</td></tr>
- * <tr><td>{@code \p{Space}}</td>
+ * <tr><th scope="row">{@code \p{Space}}</th>
  *     <td>A whitespace character:{@code \p{IsWhite_Space}}</td></tr>
- * <tr><td>{@code \d}</td>
+ * <tr><th scope="row">{@code \d}</th>
  *     <td>A digit: {@code \p{IsDigit}}</td></tr>
- * <tr><td>{@code \D}</td>
+ * <tr><th scope="row">{@code \D}</th>
  *     <td>A non-digit: {@code [^\d]}</td></tr>
- * <tr><td>{@code \s}</td>
+ * <tr><th scope="row">{@code \s}</th>
  *     <td>A whitespace character: {@code \p{IsWhite_Space}}</td></tr>
- * <tr><td>{@code \S}</td>
+ * <tr><th scope="row">{@code \S}</th>
  *     <td>A non-whitespace character: {@code [^\s]}</td></tr>
- * <tr><td>{@code \w}</td>
+ * <tr><th scope="row">{@code \w}</th>
  *     <td>A word character: {@code [\p{Alpha}\p{gc=Mn}\p{gc=Me}\p{gc=Mc}\p{Digit}\p{gc=Pc}\p{IsJoin_Control}]}</td></tr>
- * <tr><td>{@code \W}</td>
+ * <tr><th scope="row">{@code \W}</th>
  *     <td>A non-word character: {@code [^\w]}</td></tr>
  * </tbody>
  * </table>
@@ -1219,34 +1202,36 @@
      * <p> The input {@code "boo:and:foo"}, for example, yields the following
      * results with these parameters:
      *
-     * <blockquote><table>
-     * <caption>Split examples showing regex, limit, and result</caption>
+     * <table class="plain" style="margin-left:2em;">
+     * <caption style="display:none">Split example showing regex, limit, and result</caption>
      * <thead>
-     * <tr><th style="text-align:left"><i>Regex&nbsp;&nbsp;&nbsp;&nbsp;</i></th>
-     *     <th style="text-align:left"><i>Limit&nbsp;&nbsp;&nbsp;&nbsp;</i></th>
-     *     <th style="text-align:left"><i>Result&nbsp;&nbsp;&nbsp;&nbsp;</i></th></tr>
+     * <tr>
+     *     <th scope="col">Regex</th>
+     *     <th scope="col">Limit</th>
+     *     <th scope="col">Result</th>
+     * </tr>
      * </thead>
      * <tbody>
-     * <tr><td style="text-align:center">:</td>
-     *     <td style="text-align:center">2</td>
+     * <tr><th scope="row" rowspan="3" style="font-weight:normal">:</th>
+     *     <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">2</th>
      *     <td>{@code { "boo", "and:foo" }}</td></tr>
-     * <tr><td style="text-align:center">:</td>
-     *     <td style="text-align:center">5</td>
+     * <tr><!-- : -->
+     *     <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">5</th>
      *     <td>{@code { "boo", "and", "foo" }}</td></tr>
-     * <tr><td style="text-align:center">:</td>
-     *     <td style="text-align:center">-2</td>
+     * <tr><!-- : -->
+     *     <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">-2</th>
      *     <td>{@code { "boo", "and", "foo" }}</td></tr>
-     * <tr><td style="text-align:center">o</td>
-     *     <td style="text-align:center">5</td>
+     * <tr><th scope="row" rowspan="3" style="font-weight:normal">o</th>
+     *     <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">5</th>
      *     <td>{@code { "b", "", ":and:f", "", "" }}</td></tr>
-     * <tr><td style="text-align:center">o</td>
-     *     <td style="text-align:center">-2</td>
+     * <tr><!-- o -->
+     *     <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">-2</th>
      *     <td>{@code { "b", "", ":and:f", "", "" }}</td></tr>
-     * <tr><td style="text-align:center">o</td>
-     *     <td style="text-align:center">0</td>
+     * <tr><!-- o -->
+     *     <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">0</th>
      *     <td>{@code { "b", "", ":and:f" }}</td></tr>
      * </tbody>
-     * </table></blockquote>
+     * </table>
      *
      * @param  input
      *         The character sequence to be split
@@ -1310,19 +1295,21 @@
      * <p> The input {@code "boo:and:foo"}, for example, yields the following
      * results with these expressions:
      *
-     * <blockquote><table>
+     * <table class="plain" style="margin-left:2em">
      * <caption style="display:none">Split examples showing regex and result</caption>
      * <thead>
-     * <tr><th style="text-align:left"><i>Regex&nbsp;&nbsp;&nbsp;&nbsp;</i></th>
-     *     <th style="text-align:left"><i>Result</i></th></tr>
+     * <tr>
+     *  <th scope="col">Regex</th>
+     *  <th scope="col">Result</th>
+     * </tr>
      * </thead>
      * <tbody>
-     * <tr><td style="text-align:center">:</td>
+     * <tr><th scope="row" style="text-weight:normal">:</th>
      *     <td>{@code { "boo", "and", "foo" }}</td></tr>
-     * <tr><td style="text-align:center">o</td>
+     * <tr><th scope="row" style="text-weight:normal">o</th>
      *     <td>{@code { "b", "", ":and:f" }}</td></tr>
      * </tbody>
-     * </table></blockquote>
+     * </table>
      *
      *
      * @param  input
--- a/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java	Mon Aug 28 21:46:13 2017 +0200
@@ -46,18 +46,18 @@
  * Calendar}. The following are calendar-common fields and their values to be
  * supported for each calendar system.
  *
- *  <table class="plain">
+ * <table class="striped">
  * <caption style="display:none">Field values</caption>
  * <thead>
  *   <tr>
- *     <th>Field</th>
- *     <th>Value</th>
- *     <th>Description</th>
+ *     <th scope="col">Field</th>
+ *     <th scope="col">Value</th>
+ *     <th scope="col">Description</th>
  *   </tr>
  * </thead>
  * <tbody>
  *   <tr>
- *     <td style="vertical-align:top">{@link Calendar#MONTH}</td>
+ *     <th scope="row" style="vertical-align:top">{@link Calendar#MONTH}</th>
  *     <td style="vertical-align:top">{@link Calendar#JANUARY} to {@link Calendar#UNDECIMBER}</td>
  *     <td>Month numbering is 0-based (e.g., 0 - January, ..., 11 -
  *         December). Some calendar systems have 13 months. Month
@@ -67,13 +67,13 @@
  *         in both of the forms.</td>
  *   </tr>
  *   <tr>
- *     <td style="vertical-align:top">{@link Calendar#DAY_OF_WEEK}</td>
+ *     <th scope="row" style="vertical-align:top">{@link Calendar#DAY_OF_WEEK}</th>
  *     <td style="vertical-align:top">{@link Calendar#SUNDAY} to {@link Calendar#SATURDAY}</td>
  *     <td>Day-of-week numbering is 1-based starting from Sunday (i.e., 1 - Sunday,
  *         ..., 7 - Saturday).</td>
  *   </tr>
  *   <tr>
- *     <td style="vertical-align:top">{@link Calendar#AM_PM}</td>
+ *     <th scope="row" style="vertical-align:top">{@link Calendar#AM_PM}</th>
  *     <td style="vertical-align:top">{@link Calendar#AM} to {@link Calendar#PM}</td>
  *     <td>0 - AM, 1 - PM</td>
  *   </tr>
@@ -86,81 +86,81 @@
  * <caption style="display:none">Calendar type and field values</caption>
  * <thead>
  *   <tr>
- *     <th>Calendar Type</th>
- *     <th>Field</th>
- *     <th>Value</th>
- *     <th>Description</th>
+ *     <th scope="col">Calendar Type</th>
+ *     <th scope="col">Field</th>
+ *     <th scope="col">Value</th>
+ *     <th scope="col">Description</th>
  *   </tr>
  * </thead>
  * <tbody>
  *   <tr>
- *     <td rowspan="2" style="vertical-align:top">{@code "gregory"}</td>
- *     <td rowspan="2" style="vertical-align:top">{@link Calendar#ERA}</td>
- *     <td>0</td>
+ *     <th scope="row"rowspan="2" style="font-weight:normal; text-align:left; vertical-align:top">{@code "gregory"}</th>
+ *     <th scope="row" rowspan="2" style="font-weight:normal; text-align:left; vertical-align:top">{@link Calendar#ERA}</th>
+ *     <th scope="row" style="font-weight:normal">0</th>
  *     <td>{@link java.util.GregorianCalendar#BC} (BCE)</td>
  *   </tr>
  *   <tr>
- *     <td>1</td>
+ *     <th scope="row" style="font-weight:normal">1</th>
  *     <td>{@link java.util.GregorianCalendar#AD} (CE)</td>
  *   </tr>
  *   <tr>
- *     <td rowspan="2" style="vertical-align:top">{@code "buddhist"}</td>
- *     <td rowspan="2" style="vertical-align:top">{@link Calendar#ERA}</td>
- *     <td>0</td>
+ *     <th scope="row" rowspan="2" style="font-weight:normal; text-align:left; vertical-align:top">{@code "buddhist"}</th>
+ *     <th scope="row" rowspan="2" style="font-weight:normal; text-align:left; vertical-align:top">{@link Calendar#ERA}</th>
+ *     <th scope="row" style="font-weight:normal">0</th>
  *     <td>BC (BCE)</td>
  *   </tr>
  *   <tr>
- *     <td>1</td>
+ *     <th scope="row" style="font-weight:normal">1</th>
  *     <td>B.E. (Buddhist Era)</td>
  *   </tr>
  *   <tr>
- *     <td rowspan="6" style="vertical-align:top">{@code "japanese"}</td>
- *     <td rowspan="5" style="vertical-align:top">{@link Calendar#ERA}</td>
- *     <td>0</td>
+ *     <th scope="row" rowspan="6" style="font-weight:normal; text-align:left; vertical-align:top">{@code "japanese"}</th>
+ *     <th scope="row" rowspan="5" style="font-weight:normal; text-align:left; vertical-align:top">{@link Calendar#ERA}</th>
+ *     <th scope="row" style="font-weight:normal">0</th>
  *     <td>Seireki (Before Meiji)</td>
  *   </tr>
  *   <tr>
- *     <td>1</td>
+ *     <th scope="row" style="font-weight:normal">1</th>
  *     <td>Meiji</td>
  *   </tr>
  *   <tr>
- *     <td>2</td>
+ *     <th scope="row" style="font-weight:normal">2</th>
  *     <td>Taisho</td>
  *   </tr>
  *   <tr>
- *     <td>3</td>
+ *     <th scope="row" style="font-weight:normal">3</th>
  *     <td>Showa</td>
  *   </tr>
  *   <tr>
- *     <td>4</td>
+ *     <th scope="row" style="font-weight:normal">4</th>
  *     <td >Heisei</td>
  *   </tr>
  *   <tr>
- *     <td>{@link Calendar#YEAR}</td>
- *     <td>1</td>
+ *     <th scope="row" style="font-weight:normal; text-align:left; vertical-align:top">{@link Calendar#YEAR}</th>
+ *     <th scope="row" style="font-weight:normal">1</th>
  *     <td>the first year in each era. It should be returned when a long
  *     style ({@link Calendar#LONG_FORMAT} or {@link Calendar#LONG_STANDALONE}) is
  *     specified. See also the <a href="../../text/SimpleDateFormat.html#year">
  *     Year representation in {@code SimpleDateFormat}</a>.</td>
  *   </tr>
  *   <tr>
- *     <td rowspan="2" style="vertical-align:top">{@code "roc"}</td>
- *     <td rowspan="2" style="vertical-align:top">{@link Calendar#ERA}</td>
- *     <td>0</td>
+ *     <th scope="row" rowspan="2" style="font-weight:normal; text-align:left; vertical-align:top">{@code "roc"}</th>
+ *     <th scope="row" rowspan="2" style="font-weight:normal; text-align:left; vertical-align:top">{@link Calendar#ERA}</th>
+ *     <th scope="row" style="font-weight:normal">0</th>
  *     <td>Before R.O.C.</td>
  *   </tr>
  *   <tr>
- *     <td>1</td>
+ *     <th scope="row" style="font-weight:normal">1</th>
  *     <td>R.O.C.</td>
  *   </tr>
  *   <tr>
- *     <td rowspan="2" style="vertical-align:top">{@code "islamic"}</td>
- *     <td rowspan="2" style="vertical-align:top">{@link Calendar#ERA}</td>
- *     <td>0</td>
+ *     <th scope="row" rowspan="2" style="font-weight:normal; text-align:left; vertical-align:top">{@code "islamic"}</th>
+ *     <th scope="row" rowspan="2" style="font-weight:normal; text-align:left; vertical-align:top">{@link Calendar#ERA}</th>
+ *     <th scope="row" style="font-weight:normal">0</th>
  *     <td>Before AH</td>
  *   </tr>
  *   <tr>
- *     <td>1</td>
+ *     <th scope="row" style="font-weight:normal">1</th>
  *     <td>Anno Hijrah (AH)</td>
  *   </tr>
  * </tbody>
--- a/jdk/src/java.base/share/classes/javax/security/auth/Policy.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/javax/security/auth/Policy.java	Mon Aug 28 21:46:13 2017 +0200
@@ -82,13 +82,13 @@
  *
  * <pre>
  *      grant CodeBase "foo.com", Signedby "foo",
- *            Principal com.sun.security.auth.SolarisPrincipal "duke" {
+ *            Principal com.sun.security.auth.UnixPrincipal "duke" {
  *          permission java.io.FilePermission "/home/duke", "read, write";
  *      };
  * </pre>
  *
  * This <b><i>grant</i></b> entry specifies that code from "foo.com",
- * signed by "foo', and running as a {@code SolarisPrincipal} with the
+ * signed by "foo', and running as a {@code UnixPrincipal} with the
  * name, duke, has one {@code Permission}.  This {@code Permission}
  * permits the executing code to read and write files in the directory,
  * "/home/duke".
@@ -107,8 +107,8 @@
  * for that {@code Subject} to be granted the specified Permissions.
  *
  * <pre>
- *      grant Principal com.sun.security.auth.SolarisPrincipal "duke",
- *            Principal com.sun.security.auth.SolarisNumericUserPrincipal "0" {
+ *      grant Principal com.sun.security.auth.UnixPrincipal "duke",
+ *            Principal com.sun.security.auth.UnixNumericUserPrincipal "0" {
  *          permission java.io.FilePermission "/home/duke", "read, write";
  *          permission java.net.SocketPermission "duke.com", "connect";
  *      };
--- a/jdk/src/java.base/share/classes/jdk/internal/misc/InnocuousThread.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/InnocuousThread.java	Mon Aug 28 21:46:13 2017 +0200
@@ -135,17 +135,16 @@
             Class<?> tk = Thread.class;
             Class<?> gk = ThreadGroup.class;
 
-            THREAD_LOCALS = UNSAFE.objectFieldOffset
-                    (tk.getDeclaredField("threadLocals"));
+            THREAD_LOCALS = UNSAFE.objectFieldOffset(tk, "threadLocals");
             INHERITABLE_THREAD_LOCALS = UNSAFE.objectFieldOffset
-                    (tk.getDeclaredField("inheritableThreadLocals"));
+                    (tk, "inheritableThreadLocals");
             INHERITEDACCESSCONTROLCONTEXT = UNSAFE.objectFieldOffset
-                (tk.getDeclaredField("inheritedAccessControlContext"));
+                (tk, "inheritedAccessControlContext");
             CONTEXTCLASSLOADER = UNSAFE.objectFieldOffset
-                (tk.getDeclaredField("contextClassLoader"));
+                (tk, "contextClassLoader");
 
-            long tg = UNSAFE.objectFieldOffset(tk.getDeclaredField("group"));
-            long gp = UNSAFE.objectFieldOffset(gk.getDeclaredField("parent"));
+            long tg = UNSAFE.objectFieldOffset(tk, "group");
+            long gp = UNSAFE.objectFieldOffset(gk, "parent");
             ThreadGroup group = (ThreadGroup)
                 UNSAFE.getObject(Thread.currentThread(), tg);
 
--- a/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java	Mon Aug 28 21:46:13 2017 +0200
@@ -954,6 +954,25 @@
     }
 
     /**
+     * Reports the location of the field with a given name in the storage
+     * allocation of its class.
+     *
+     * @throws NullPointerException if any parameter is {@code null}.
+     * @throws InternalError if there is no field named {@code name} declared
+     *         in class {@code c}, i.e., if {@code c.getDeclaredField(name)}
+     *         would throw {@code java.lang.NoSuchFieldException}.
+     *
+     * @see #objectFieldOffset(Field)
+     */
+    public long objectFieldOffset(Class<?> c, String name) {
+        if (c == null || name == null) {
+            throw new NullPointerException();
+        }
+
+        return objectFieldOffset1(c, name);
+    }
+
+    /**
      * Reports the location of a given static field, in conjunction with {@link
      * #staticFieldBase}.
      * <p>Do not expect to perform any sort of arithmetic on this offset;
@@ -3685,6 +3704,7 @@
     private native void copyMemory0(Object srcBase, long srcOffset, Object destBase, long destOffset, long bytes);
     private native void copySwapMemory0(Object srcBase, long srcOffset, Object destBase, long destOffset, long bytes, long elemSize);
     private native long objectFieldOffset0(Field f);
+    private native long objectFieldOffset1(Class<?> c, String name);
     private native long staticFieldOffset0(Field f);
     private native Object staticFieldBase0(Field f);
     private native boolean shouldBeInitialized0(Class<?> c);
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java	Mon Aug 28 21:46:13 2017 +0200
@@ -614,20 +614,13 @@
     }
 
     private static class UnsafeAccessor {
-        private static final jdk.internal.misc.Unsafe unsafe;
-        private static final long typeOffset;
-        private static final long memberValuesOffset;
-        static {
-            try {
-                unsafe = jdk.internal.misc.Unsafe.getUnsafe();
-                typeOffset = unsafe.objectFieldOffset
-                        (AnnotationInvocationHandler.class.getDeclaredField("type"));
-                memberValuesOffset = unsafe.objectFieldOffset
-                        (AnnotationInvocationHandler.class.getDeclaredField("memberValues"));
-            } catch (Exception ex) {
-                throw new ExceptionInInitializerError(ex);
-            }
-        }
+        private static final jdk.internal.misc.Unsafe unsafe
+                = jdk.internal.misc.Unsafe.getUnsafe();
+        private static final long typeOffset = unsafe.objectFieldOffset
+                (AnnotationInvocationHandler.class, "type");
+        private static final long memberValuesOffset = unsafe.objectFieldOffset
+                (AnnotationInvocationHandler.class, "memberValues");
+
         static void setType(AnnotationInvocationHandler o,
                             Class<? extends Annotation> type) {
             unsafe.putObject(o, typeOffset, type);
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,51 +95,6 @@
                 "Kerberos username [{0}]: "},
         {"Kerberos.password.for.username.",
                 "Kerberos password for {0}: "},
-
-        /***    EVERYTHING BELOW IS DEPRECATED  ***/
-
-        // com.sun.security.auth.PolicyFile
-        {".error.parsing.", ": error parsing "},
-        {"COLON", ": "},
-        {".error.adding.Permission.", ": error adding Permission "},
-        {"SPACE", " "},
-        {"NEWLINE", "\n"},
-        {".error.adding.Entry.", ": error adding Entry "},
-        {"LPARAM", "("},
-        {"RPARAM", ")"},
-        {"attempt.to.add.a.Permission.to.a.readonly.PermissionCollection",
-            "attempt to add a Permission to a readonly PermissionCollection"},
-
-        // com.sun.security.auth.PolicyParser
-        {"expected.keystore.type", "expected keystore type"},
-        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
-                "can not specify Principal with a wildcard class without a wildcard name"},
-        {"expected.codeBase.or.SignedBy", "expected codeBase or SignedBy"},
-        {"only.Principal.based.grant.entries.permitted",
-                "only Principal-based grant entries permitted"},
-        {"expected.permission.entry", "expected permission entry"},
-        {"number.", "number "},
-        {"expected.expect.read.end.of.file.",
-                "expected {0}, read end of file"},
-        {"expected.read.end.of.file", "expected ';', read end of file"},
-        {"line.", "line "},
-        {".expected.", ": expected '"},
-        {".found.", "', found '"},
-        {"QUOTE", "'"},
-
-        // SolarisPrincipals
-        {"SolarisNumericGroupPrincipal.Primary.Group.",
-                "SolarisNumericGroupPrincipal [Primary Group]: "},
-        {"SolarisNumericGroupPrincipal.Supplementary.Group.",
-                "SolarisNumericGroupPrincipal [Supplementary Group]: "},
-        {"SolarisNumericUserPrincipal.",
-                "SolarisNumericUserPrincipal: "},
-        {"SolarisPrincipal.", "SolarisPrincipal: "},
-        // provided.null.name is the NullPointerException message when a
-        // developer incorrectly passes a null name to the constructor of
-        // subclasses of java.security.Principal
-        {"provided.null.name", "provided null name"}
-
     };
 
     /**
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_de.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_de.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,50 +95,6 @@
                 "Kerberos-Benutzername [{0}]: "},
         {"Kerberos.password.for.username.",
                 "Kerberos-Kennwort f\u00FCr {0}: "},
-
-        /***    EVERYTHING BELOW IS DEPRECATED  ***/
-
-        // com.sun.security.auth.PolicyFile
-        {".error.parsing.", ": Parsefehler "},
-        {"COLON", ": "},
-        {".error.adding.Permission.", ": Fehler beim Hinzuf\u00FCgen der Berechtigung "},
-        {"SPACE", " "},
-        {".error.adding.Entry.", ": Fehler beim Hinzuf\u00FCgen des Eintrags "},
-        {"LPARAM", "("},
-        {"RPARAM", ")"},
-        {"attempt.to.add.a.Permission.to.a.readonly.PermissionCollection",
-            "Es wurde versucht, eine Berechtigung zu einer schreibgesch\u00FCtzten PermissionCollection hinzuzuf\u00FCgen"},
-
-        // com.sun.security.auth.PolicyParser
-        {"expected.keystore.type", "Keystore-Typ erwartet"},
-        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
-                "Principal kann nicht mit einer Platzhalterklasse ohne Platzhalternamen angegeben werden"},
-        {"expected.codeBase.or.SignedBy", "codeBase oder SignedBy erwartet"},
-        {"only.Principal.based.grant.entries.permitted",
-                "Nur Principal-basierte Berechtigungseintr\u00E4ge zul\u00E4ssig"},
-        {"expected.permission.entry", "Berechtigungseintrag erwartet"},
-        {"number.", "Nummer "},
-        {"expected.expect.read.end.of.file.",
-                "{0} erwartet, Dateiende gelesen"},
-        {"expected.read.end.of.file", "\";\" erwartet, Dateiende gelesen"},
-        {"line.", "Zeile "},
-        {".expected.", ": erwartet: \""},
-        {".found.", "\", gefunden: \""},
-        {"QUOTE", "'"},
-
-        // SolarisPrincipals
-        {"SolarisNumericGroupPrincipal.Primary.Group.",
-                "SolarisNumericGroupPrincipal [Prim\u00E4rgruppe]: "},
-        {"SolarisNumericGroupPrincipal.Supplementary.Group.",
-                "SolarisNumericGroupPrincipal [Zusatzgruppe]: "},
-        {"SolarisNumericUserPrincipal.",
-                "SolarisNumericUserPrincipal: "},
-        {"SolarisPrincipal.", "SolarisPrincipal: "},
-        // provided.null.name is the NullPointerException message when a
-        // developer incorrectly passes a null name to the constructor of
-        // subclasses of java.security.Principal
-        {"provided.null.name", "Nullname angegeben"}
-
     };
 
     /**
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_es.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_es.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,50 +95,6 @@
                 "Nombre de usuario de Kerberos [{0}]: "},
         {"Kerberos.password.for.username.",
                 "Contrase\u00F1a de Kerberos de {0}: "},
-
-        /***    EVERYTHING BELOW IS DEPRECATED  ***/
-
-        // com.sun.security.auth.PolicyFile
-        {".error.parsing.", ": error de an\u00E1lisis "},
-        {"COLON", ": "},
-        {".error.adding.Permission.", ": error al agregar el permiso "},
-        {"SPACE", " "},
-        {".error.adding.Entry.", ": error al agregar la entrada "},
-        {"LPARAM", "("},
-        {"RPARAM", ")"},
-        {"attempt.to.add.a.Permission.to.a.readonly.PermissionCollection",
-            "se ha intentado agregar un permiso a una recopilaci\u00F3n de permisos de s\u00F3lo lectura"},
-
-        // com.sun.security.auth.PolicyParser
-        {"expected.keystore.type", "se esperaba un tipo de almac\u00E9n de claves"},
-        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
-                "no se puede especificar Principal con una clase de comod\u00EDn sin un nombre de comod\u00EDn"},
-        {"expected.codeBase.or.SignedBy", "se esperaba codeBase o SignedBy"},
-        {"only.Principal.based.grant.entries.permitted",
-                "s\u00F3lo se permite otorgar entradas basadas en Principal"},
-        {"expected.permission.entry", "se esperaba un permiso de entrada"},
-        {"number.", "n\u00FAmero "},
-        {"expected.expect.read.end.of.file.",
-                "se esperaba [{0}], se ha le\u00EDdo final de archivo"},
-        {"expected.read.end.of.file", "se esperaba ';', se ha le\u00EDdo el final de archivo"},
-        {"line.", "l\u00EDnea "},
-        {".expected.", ": se esperaba '"},
-        {".found.", "', se ha encontrado '"},
-        {"QUOTE", "'"},
-
-        // SolarisPrincipals
-        {"SolarisNumericGroupPrincipal.Primary.Group.",
-                "SolarisNumericGroupPrincipal [Grupo Principal]: "},
-        {"SolarisNumericGroupPrincipal.Supplementary.Group.",
-                "SolarisNumericGroupPrincipal [Grupo Adicional]: "},
-        {"SolarisNumericUserPrincipal.",
-                "SolarisNumericUserPrincipal: "},
-        {"SolarisPrincipal.", "SolarisPrincipal: "},
-        // provided.null.name is the NullPointerException message when a
-        // developer incorrectly passes a null name to the constructor of
-        // subclasses of java.security.Principal
-        {"provided.null.name", "se ha proporcionado un nombre nulo"}
-
     };
 
     /**
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_fr.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_fr.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,50 +95,6 @@
                 "Nom utilisateur Kerberos [{0}] : "},
         {"Kerberos.password.for.username.",
                 "Mot de passe Kerberos pour {0} : "},
-
-        /***    EVERYTHING BELOW IS DEPRECATED  ***/
-
-        // com.sun.security.auth.PolicyFile
-        {".error.parsing.", ": erreur d'analyse "},
-        {"COLON", ": "},
-        {".error.adding.Permission.", ": erreur d'ajout de droit "},
-        {"SPACE", " "},
-        {".error.adding.Entry.", ": erreur d'ajout d'entr\u00E9e "},
-        {"LPARAM", "("},
-        {"RPARAM", ")"},
-        {"attempt.to.add.a.Permission.to.a.readonly.PermissionCollection",
-            "tentative d'ajout de droit \u00E0 un ensemble de droits en lecture seule"},
-
-        // com.sun.security.auth.PolicyParser
-        {"expected.keystore.type", "type de fichier de cl\u00E9s attendu"},
-        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
-                "impossible de sp\u00E9cifier le principal avec une classe g\u00E9n\u00E9rique sans nom g\u00E9n\u00E9rique"},
-        {"expected.codeBase.or.SignedBy", "codeBase ou SignedBy attendu"},
-        {"only.Principal.based.grant.entries.permitted",
-                "seules les entr\u00E9es bas\u00E9es sur Principal sont autoris\u00E9es"},
-        {"expected.permission.entry", "entr\u00E9e de droit attendue"},
-        {"number.", "nombre "},
-        {"expected.expect.read.end.of.file.",
-                "attendu {0}, lecture de fin de fichier"},
-        {"expected.read.end.of.file", "attendu ';', lecture de fin de fichier"},
-        {"line.", "ligne "},
-        {".expected.", ": attendu '"},
-        {".found.", "', trouv\u00E9 '"},
-        {"QUOTE", "'"},
-
-        // SolarisPrincipals
-        {"SolarisNumericGroupPrincipal.Primary.Group.",
-                "SolarisNumericGroupPrincipal [groupe principal] : "},
-        {"SolarisNumericGroupPrincipal.Supplementary.Group.",
-                "SolarisNumericGroupPrincipal [groupe suppl\u00E9mentaire] : "},
-        {"SolarisNumericUserPrincipal.",
-                "SolarisNumericUserPrincipal : "},
-        {"SolarisPrincipal.", "SolarisPrincipal : "},
-        // provided.null.name is the NullPointerException message when a
-        // developer incorrectly passes a null name to the constructor of
-        // subclasses of java.security.Principal
-        {"provided.null.name", "nom NULL fourni"}
-
     };
 
     /**
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_it.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_it.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,50 +95,6 @@
                 "Nome utente Kerberos [{0}]: "},
         {"Kerberos.password.for.username.",
                 "Password Kerberos per {0}: "},
-
-        /***    EVERYTHING BELOW IS DEPRECATED  ***/
-
-        // com.sun.security.auth.PolicyFile
-        {".error.parsing.", ": errore durante l'analisi "},
-        {"COLON", ": "},
-        {".error.adding.Permission.", ": errore durante l'aggiunta dell'autorizzazione "},
-        {"SPACE", " "},
-        {".error.adding.Entry.", ": errore durante l'aggiunta della voce "},
-        {"LPARAM", "("},
-        {"RPARAM", ")"},
-        {"attempt.to.add.a.Permission.to.a.readonly.PermissionCollection",
-            "tentativo di aggiungere un'autorizzazione a una PermissionCollection di sola lettura"},
-
-        // com.sun.security.auth.PolicyParser
-        {"expected.keystore.type", "tipo keystore previsto"},
-        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
-                "impossibile specificare un principal con una classe carattere jolly senza un nome carattere jolly"},
-        {"expected.codeBase.or.SignedBy", "previsto codeBase o SignedBy"},
-        {"only.Principal.based.grant.entries.permitted",
-                "sono consentiti solo valori garantiti basati sul principal"},
-        {"expected.permission.entry", "prevista voce di autorizzazione"},
-        {"number.", "numero "},
-        {"expected.expect.read.end.of.file.",
-                "previsto {0}, letto end of file"},
-        {"expected.read.end.of.file", "previsto ';', letto end of file"},
-        {"line.", "riga "},
-        {".expected.", ": previsto '"},
-        {".found.", "', trovato '"},
-        {"QUOTE", "'"},
-
-        // SolarisPrincipals
-        {"SolarisNumericGroupPrincipal.Primary.Group.",
-                "SolarisNumericGroupPrincipal [gruppo primario]: "},
-        {"SolarisNumericGroupPrincipal.Supplementary.Group.",
-                "SolarisNumericGroupPrincipal [gruppo supplementare]: "},
-        {"SolarisNumericUserPrincipal.",
-                "SolarisNumericUserPrincipal: "},
-        {"SolarisPrincipal.", "SolarisPrincipal: "},
-        // provided.null.name is the NullPointerException message when a
-        // developer incorrectly passes a null name to the constructor of
-        // subclasses of java.security.Principal
-        {"provided.null.name", "il nome fornito \u00E8 nullo"}
-
     };
 
     /**
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_ja.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_ja.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,50 +95,6 @@
                 "Kerberos\u30E6\u30FC\u30B6\u30FC\u540D[{0}]: "},
         {"Kerberos.password.for.username.",
                 "{0}\u306EKerberos\u30D1\u30B9\u30EF\u30FC\u30C9: "},
-
-        /***    EVERYTHING BELOW IS DEPRECATED  ***/
-
-        // com.sun.security.auth.PolicyFile
-        {".error.parsing.", ": \u89E3\u6790\u30A8\u30E9\u30FC "},
-        {"COLON", ": "},
-        {".error.adding.Permission.", ": \u30A2\u30AF\u30BB\u30B9\u6A29\u306E\u8FFD\u52A0\u30A8\u30E9\u30FC "},
-        {"SPACE", " "},
-        {".error.adding.Entry.", ": \u30A8\u30F3\u30C8\u30EA\u306E\u8FFD\u52A0\u30A8\u30E9\u30FC "},
-        {"LPARAM", "("},
-        {"RPARAM", ")"},
-        {"attempt.to.add.a.Permission.to.a.readonly.PermissionCollection",
-            "\u8AAD\u53D6\u308A\u5C02\u7528\u306EPermissionCollection\u306B\u30A2\u30AF\u30BB\u30B9\u6A29\u306E\u8FFD\u52A0\u304C\u8A66\u884C\u3055\u308C\u307E\u3057\u305F"},
-
-        // com.sun.security.auth.PolicyParser
-        {"expected.keystore.type", "\u4E88\u60F3\u3055\u308C\u305F\u30AD\u30FC\u30B9\u30C8\u30A2\u30FB\u30BF\u30A4\u30D7"},
-        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
-                "\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9\u540D\u306E\u306A\u3044\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9\u30FB\u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u3057\u3066\u3001\u30D7\u30EA\u30F3\u30B7\u30D1\u30EB\u3092\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
-        {"expected.codeBase.or.SignedBy", "\u4E88\u60F3\u3055\u308C\u305FcodeBase\u307E\u305F\u306FSignedBy"},
-        {"only.Principal.based.grant.entries.permitted",
-                "\u30D7\u30EA\u30F3\u30B7\u30D1\u30EB\u30FB\u30D9\u30FC\u30B9\u306E\u30A8\u30F3\u30C8\u30EA\u306E\u307F\u304C\u8A31\u53EF\u3055\u308C\u307E\u3059\u3002"},
-        {"expected.permission.entry", "\u4E88\u60F3\u3055\u308C\u305F\u30A2\u30AF\u30BB\u30B9\u6A29\u30A8\u30F3\u30C8\u30EA"},
-        {"number.", "\u6570 "},
-        {"expected.expect.read.end.of.file.",
-                "{0}\u3067\u306F\u306A\u304F\u30D5\u30A1\u30A4\u30EB\u306E\u7D42\u308F\u308A\u304C\u8AAD\u307F\u8FBC\u307E\u308C\u307E\u3057\u305F"},
-        {"expected.read.end.of.file", "\u4E88\u60F3\u5024\u306F';'\u3067\u3059\u304C\u3001\u30D5\u30A1\u30A4\u30EB\u306E\u7D42\u308F\u308A\u304C\u8AAD\u307F\u8FBC\u307E\u308C\u307E\u3057\u305F"},
-        {"line.", "\u884C\u756A\u53F7 "},
-        {".expected.", ": \u4E88\u60F3\u5024'"},
-        {".found.", "',\u691C\u51FA\u5024'"},
-        {"QUOTE", "'"},
-
-        // SolarisPrincipals
-        {"SolarisNumericGroupPrincipal.Primary.Group.",
-                "SolarisNumericGroupPrincipal [\u4E3B\u30B0\u30EB\u30FC\u30D7]: "},
-        {"SolarisNumericGroupPrincipal.Supplementary.Group.",
-                "SolarisNumericGroupPrincipal [\u88DC\u52A9\u30B0\u30EB\u30FC\u30D7]: "},
-        {"SolarisNumericUserPrincipal.",
-                "SolarisNumericUserPrincipal: "},
-        {"SolarisPrincipal.", "SolarisPrincipal: "},
-        // provided.null.name is the NullPointerException message when a
-        // developer incorrectly passes a null name to the constructor of
-        // subclasses of java.security.Principal
-        {"provided.null.name", "null\u306E\u540D\u524D\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F"}
-
     };
 
     /**
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_ko.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_ko.java	Mon Aug 28 21:46:13 2017 +0200
@@ -95,50 +95,6 @@
                 "Kerberos \uC0AC\uC6A9\uC790 \uC774\uB984 [{0}]: "},
         {"Kerberos.password.for.username.",
                 "{0}\uC758 Kerberos \uBE44\uBC00\uBC88\uD638: "},
-
-        /***    EVERYTHING BELOW IS DEPRECATED  ***/
-
-        // com.sun.security.auth.PolicyFile
-        {".error.parsing.", ": \uAD6C\uBB38\uBD84\uC11D \uC624\uB958 "},
-        {"COLON", ": "},
-        {".error.adding.Permission.", ": \uAD8C\uD55C \uCD94\uAC00 \uC624\uB958 "},
-        {"SPACE", " "},
-        {".error.adding.Entry.", ": \uD56D\uBAA9 \uCD94\uAC00 \uC624\uB958 "},
-        {"LPARAM", "("},
-        {"RPARAM", ")"},
-        {"attempt.to.add.a.Permission.to.a.readonly.PermissionCollection",
-            "\uC77D\uAE30 \uC804\uC6A9 PermissionCollection\uC5D0 \uAD8C\uD55C\uC744 \uCD94\uAC00\uD558\uB824\uACE0 \uC2DC\uB3C4\uD588\uC2B5\uB2C8\uB2E4."},
-
-        // com.sun.security.auth.PolicyParser
-        {"expected.keystore.type", "\uD0A4 \uC800\uC7A5\uC18C \uC720\uD615\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
-        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
-                "\uC640\uC77C\uB4DC \uCE74\uB4DC \uBB38\uC790 \uC774\uB984 \uC5C6\uC774 \uC640\uC77C\uB4DC \uCE74\uB4DC \uBB38\uC790 \uD074\uB798\uC2A4\uB97C \uC0AC\uC6A9\uD558\uB294 \uC8FC\uCCB4\uB97C \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
-        {"expected.codeBase.or.SignedBy", "codeBase \uB610\uB294 SignedBy\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."},
-        {"only.Principal.based.grant.entries.permitted",
-                "\uC8FC\uCCB4 \uAE30\uBC18 \uAD8C\uD55C \uBD80\uC5EC \uD56D\uBAA9\uB9CC \uD5C8\uC6A9\uB429\uB2C8\uB2E4."},
-        {"expected.permission.entry", "\uAD8C\uD55C \uD56D\uBAA9\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
-        {"number.", "\uC22B\uC790 "},
-        {"expected.expect.read.end.of.file.",
-                "{0}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC \uD30C\uC77C\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4."},
-        {"expected.read.end.of.file", "';'\uC774 \uD544\uC694\uD558\uC9C0\uB9CC \uD30C\uC77C\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4."},
-        {"line.", "\uD589 "},
-        {".expected.", ": \uD544\uC694\uD55C \uD56D\uBAA9: '"},
-        {".found.", "', \uBC1C\uACAC\uB41C \uD56D\uBAA9: '"},
-        {"QUOTE", "'"},
-
-        // SolarisPrincipals
-        {"SolarisNumericGroupPrincipal.Primary.Group.",
-                "SolarisNumericGroupPrincipal [\uAE30\uBCF8 \uADF8\uB8F9]: "},
-        {"SolarisNumericGroupPrincipal.Supplementary.Group.",
-                "SolarisNumericGroupPrincipal [\uBCF4\uC870 \uADF8\uB8F9]: "},
-        {"SolarisNumericUserPrincipal.",
-                "SolarisNumericUserPrincipal: "},
-        {"SolarisPrincipal.", "SolarisPrincipal: "},
-        // provided.null.name is the NullPointerException message when a
-        // developer incorrectly passes a null name to the constructor of
-        // subclasses of java.security.Principal
-        {"provided.null.name", "\uB110 \uC774\uB984\uC744 \uC81C\uACF5\uD588\uC2B5\uB2C8\uB2E4."}
-
     };
 
     /**
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_pt_BR.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_pt_BR.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,50 +95,6 @@
                 "Nome do usu\u00E1rio de Kerberos [{0}]: "},
         {"Kerberos.password.for.username.",
                 "Senha de Kerberos de {0}: "},
-
-        /***    EVERYTHING BELOW IS DEPRECATED  ***/
-
-        // com.sun.security.auth.PolicyFile
-        {".error.parsing.", ": erro de parsing "},
-        {"COLON", ": "},
-        {".error.adding.Permission.", ": erro ao adicionar a Permiss\u00E3o "},
-        {"SPACE", " "},
-        {".error.adding.Entry.", ": erro ao adicionar a Entrada "},
-        {"LPARAM", "("},
-        {"RPARAM", ")"},
-        {"attempt.to.add.a.Permission.to.a.readonly.PermissionCollection",
-            "tentativa de adicionar uma Permiss\u00E3o a um PermissionCollection somente para leitura"},
-
-        // com.sun.security.auth.PolicyParser
-        {"expected.keystore.type", "tipo de armazenamento de chaves esperado"},
-        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
-                "n\u00E3o \u00E9 poss\u00EDvel especificar um principal com uma classe curinga sem um nome curinga"},
-        {"expected.codeBase.or.SignedBy", "CodeBase ou SignedBy esperado"},
-        {"only.Principal.based.grant.entries.permitted",
-                "somente \u00E9 permitido conceder entradas com base no Principal"},
-        {"expected.permission.entry", "entrada de permiss\u00E3o esperada"},
-        {"number.", "n\u00FAmero "},
-        {"expected.expect.read.end.of.file.",
-                "esperado {0}, ler fim do arquivo"},
-        {"expected.read.end.of.file", "esperado ';', fim de arquivo lido"},
-        {"line.", "linha "},
-        {".expected.", ": esperado '"},
-        {".found.", "', encontrado '"},
-        {"QUOTE", "'"},
-
-        // SolarisPrincipals
-        {"SolarisNumericGroupPrincipal.Primary.Group.",
-                "SolarisNumericGroupPrincipal [Grupo Principal]: "},
-        {"SolarisNumericGroupPrincipal.Supplementary.Group.",
-                "SolarisNumericGroupPrincipal [Grupo Complementar]: "},
-        {"SolarisNumericUserPrincipal.",
-                "SolarisNumericUserPrincipal: "},
-        {"SolarisPrincipal.", "SolarisPrincipal: "},
-        // provided.null.name is the NullPointerException message when a
-        // developer incorrectly passes a null name to the constructor of
-        // subclasses of java.security.Principal
-        {"provided.null.name", "nome nulo fornecido"}
-
     };
 
     /**
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_sv.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_sv.java	Mon Aug 28 21:46:13 2017 +0200
@@ -95,50 +95,6 @@
                 "Kerberos-anv\u00E4ndarnamn [{0}]: "},
         {"Kerberos.password.for.username.",
                 "Kerberos-l\u00F6senord f\u00F6r {0}: "},
-
-        /***    EVERYTHING BELOW IS DEPRECATED  ***/
-
-        // com.sun.security.auth.PolicyFile
-        {".error.parsing.", ": tolkningsfel "},
-        {"COLON", ": "},
-        {".error.adding.Permission.", ": fel vid till\u00E4gg av beh\u00F6righet "},
-        {"SPACE", " "},
-        {".error.adding.Entry.", ": fel vid till\u00E4gg av post "},
-        {"LPARAM", "("},
-        {"RPARAM", ")"},
-        {"attempt.to.add.a.Permission.to.a.readonly.PermissionCollection",
-            "f\u00F6rs\u00F6k att l\u00E4gga till beh\u00F6righet till skrivskyddad PermissionCollection"},
-
-        // com.sun.security.auth.PolicyParser
-        {"expected.keystore.type", "f\u00F6rv\u00E4ntad nyckellagertyp"},
-        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
-                "kan inte ange identitetshavare med en jokerteckenklass utan ett jokerteckennamn"},
-        {"expected.codeBase.or.SignedBy", "f\u00F6rv\u00E4ntade codeBase eller SignedBy"},
-        {"only.Principal.based.grant.entries.permitted",
-                "endast identitetshavarbaserade poster till\u00E5ts"},
-        {"expected.permission.entry", "f\u00F6rv\u00E4ntade beh\u00F6righetspost"},
-        {"number.", "nummer"},
-        {"expected.expect.read.end.of.file.",
-                "f\u00F6rv\u00E4ntade {0}, l\u00E4ste filslut"},
-        {"expected.read.end.of.file", "f\u00F6rv\u00E4ntade ';', l\u00E4ste filslut"},
-        {"line.", "rad "},
-        {".expected.", ": f\u00F6rv\u00E4ntade '"},
-        {".found.", "', hittade '"},
-        {"QUOTE", "'"},
-
-        // SolarisPrincipals
-        {"SolarisNumericGroupPrincipal.Primary.Group.",
-                "SolarisNumericGroupPrincipal [prim\u00E4r grupp]: "},
-        {"SolarisNumericGroupPrincipal.Supplementary.Group.",
-                "SolarisNumericGroupPrincipal [till\u00E4ggsgrupp]: "},
-        {"SolarisNumericUserPrincipal.",
-                "SolarisNumericUserPrincipal: "},
-        {"SolarisPrincipal.", "SolarisPrincipal: "},
-        // provided.null.name is the NullPointerException message when a
-        // developer incorrectly passes a null name to the constructor of
-        // subclasses of java.security.Principal
-        {"provided.null.name", "null-namn angavs"}
-
     };
 
     /**
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_zh_CN.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_zh_CN.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,50 +95,6 @@
                 "Kerberos \u7528\u6237\u540D [{0}]: "},
         {"Kerberos.password.for.username.",
                 "{0}\u7684 Kerberos \u53E3\u4EE4: "},
-
-        /***    EVERYTHING BELOW IS DEPRECATED  ***/
-
-        // com.sun.security.auth.PolicyFile
-        {".error.parsing.", ": \u89E3\u6790\u65F6\u51FA\u9519 "},
-        {"COLON", ": "},
-        {".error.adding.Permission.", ": \u6DFB\u52A0\u6743\u9650\u65F6\u51FA\u9519 "},
-        {"SPACE", " "},
-        {".error.adding.Entry.", ": \u6DFB\u52A0\u6761\u76EE\u65F6\u51FA\u9519 "},
-        {"LPARAM", "("},
-        {"RPARAM", ")"},
-        {"attempt.to.add.a.Permission.to.a.readonly.PermissionCollection",
-            "\u5C1D\u8BD5\u5C06\u6743\u9650\u6DFB\u52A0\u81F3\u53EA\u8BFB\u7684 PermissionCollection"},
-
-        // com.sun.security.auth.PolicyParser
-        {"expected.keystore.type", "\u5E94\u4E3A\u5BC6\u94A5\u5E93\u7C7B\u578B"},
-        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
-                "\u6CA1\u6709\u901A\u914D\u7B26\u540D\u79F0, \u65E0\u6CD5\u4F7F\u7528\u901A\u914D\u7B26\u7C7B\u6307\u5B9A\u4E3B\u7528\u6237"},
-        {"expected.codeBase.or.SignedBy", "\u5E94\u4E3A codeBase \u6216 SignedBy"},
-        {"only.Principal.based.grant.entries.permitted",
-                "\u53EA\u5141\u8BB8\u57FA\u4E8E\u4E3B\u7528\u6237\u7684\u6388\u6743\u6761\u76EE"},
-        {"expected.permission.entry", "\u5E94\u4E3A\u6743\u9650\u6761\u76EE"},
-        {"number.", "\u7F16\u53F7 "},
-        {"expected.expect.read.end.of.file.",
-                "\u5E94\u4E3A{0}, \u8BFB\u53D6\u7684\u662F\u6587\u4EF6\u7ED3\u5C3E"},
-        {"expected.read.end.of.file", "\u5E94\u4E3A ';', \u8BFB\u53D6\u7684\u662F\u6587\u4EF6\u7ED3\u5C3E"},
-        {"line.", "\u884C "},
-        {".expected.", ": \u5E94\u4E3A '"},
-        {".found.", "', \u627E\u5230 '"},
-        {"QUOTE", "'"},
-
-        // SolarisPrincipals
-        {"SolarisNumericGroupPrincipal.Primary.Group.",
-                "SolarisNumericGroupPrincipal [\u4E3B\u7EC4]: "},
-        {"SolarisNumericGroupPrincipal.Supplementary.Group.",
-                "SolarisNumericGroupPrincipal [\u8865\u5145\u7EC4]: "},
-        {"SolarisNumericUserPrincipal.",
-                "SolarisNumericUserPrincipal: "},
-        {"SolarisPrincipal.", "SolarisPrincipal: "},
-        // provided.null.name is the NullPointerException message when a
-        // developer incorrectly passes a null name to the constructor of
-        // subclasses of java.security.Principal
-        {"provided.null.name", "\u63D0\u4F9B\u7684\u540D\u79F0\u4E3A\u7A7A\u503C"}
-
     };
 
     /**
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_zh_TW.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_zh_TW.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,50 +95,6 @@
                 "Kerberos \u4F7F\u7528\u8005\u540D\u7A31 [{0}]: "},
         {"Kerberos.password.for.username.",
                 "Kerberos \u5BC6\u78BC {0}: "},
-
-        /***    EVERYTHING BELOW IS DEPRECATED  ***/
-
-        // com.sun.security.auth.PolicyFile
-        {".error.parsing.", ": \u5256\u6790\u932F\u8AA4 "},
-        {"COLON", ": "},
-        {".error.adding.Permission.", ": \u65B0\u589E\u6B0A\u9650\u932F\u8AA4 "},
-        {"SPACE", " "},
-        {".error.adding.Entry.", ": \u65B0\u589E\u8F38\u5165\u932F\u8AA4 "},
-        {"LPARAM", "("},
-        {"RPARAM", ")"},
-        {"attempt.to.add.a.Permission.to.a.readonly.PermissionCollection",
-            "\u8A66\u8457\u65B0\u589E\u6B0A\u9650\u81F3\u552F\u8B80\u7684 PermissionCollection"},
-
-        // com.sun.security.auth.PolicyParser
-        {"expected.keystore.type", "\u9810\u671F\u7684\u91D1\u9470\u5132\u5B58\u5EAB\u985E\u578B"},
-        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
-                "\u6C92\u6709\u842C\u7528\u5B57\u5143\u540D\u7A31\uFF0C\u7121\u6CD5\u6307\u5B9A\u542B\u6709\u842C\u7528\u5B57\u5143\u985E\u5225\u7684 Principal"},
-        {"expected.codeBase.or.SignedBy", "\u9810\u671F\u7684 codeBase \u6216 SignedBy"},
-        {"only.Principal.based.grant.entries.permitted",
-                "\u53EA\u5141\u8A31\u4EE5 Principal \u70BA\u57FA\u790E\u7684\u6388\u6B0A\u9805\u76EE"},
-        {"expected.permission.entry", "\u9810\u671F\u7684\u6B0A\u9650\u9805\u76EE"},
-        {"number.", "\u865F\u78BC "},
-        {"expected.expect.read.end.of.file.",
-                "\u9810\u671F\u70BA {0}, \u8B80\u53D6\u6A94\u6848\u7D50\u5C3E"},
-        {"expected.read.end.of.file", "\u9810\u671F\u7684 ';'\uFF0C\u8B80\u53D6\u6A94\u6848\u7D50\u5C3E"},
-        {"line.", "\u884C "},
-        {".expected.", ": \u9810\u671F '"},
-        {".found.", "'\uFF0C\u767C\u73FE '"},
-        {"QUOTE", "'"},
-
-        // SolarisPrincipals
-        {"SolarisNumericGroupPrincipal.Primary.Group.",
-                "SolarisNumericGroupPrincipal [\u4E3B\u7FA4\u7D44]: "},
-        {"SolarisNumericGroupPrincipal.Supplementary.Group.",
-                "SolarisNumericGroupPrincipal [\u9644\u52A0\u7FA4\u7D44]: "},
-        {"SolarisNumericUserPrincipal.",
-                "SolarisNumericUserPrincipal: "},
-        {"SolarisPrincipal.", "SolarisPrincipal: "},
-        // provided.null.name is the NullPointerException message when a
-        // developer incorrectly passes a null name to the constructor of
-        // subclasses of java.security.Principal
-        {"provided.null.name", "\u63D0\u4F9B\u7A7A\u503C\u540D\u7A31"}
-
     };
 
     /**
--- a/jdk/src/java.base/share/native/libfdlibm/fdlibm.h	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/native/libfdlibm/fdlibm.h	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
 #ifdef __NEWVALID       /* special setup for Sun test regime */
 #if defined(i386) || defined(i486) || \
     defined(intel) || defined(x86) || defined(arm) || \
-    defined(i86pc) || defined(_M_IA64) || defined(ia64)
+    defined(i86pc) || defined(ia64)
 #define _LITTLE_ENDIAN
 #endif
 #endif
--- a/jdk/src/java.base/share/native/libjli/java.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/share/native/libjli/java.c	Mon Aug 28 21:46:13 2017 +0200
@@ -206,7 +206,7 @@
  * A minimum -Xss stack size suitable for all platforms.
  */
 #ifndef STACK_SIZE_MINIMUM
-#define STACK_SIZE_MINIMUM (32 * KB)
+#define STACK_SIZE_MINIMUM (64 * KB)
 #endif
 
 /*
--- a/jdk/src/java.base/solaris/native/libnio/ch/DevPollArrayWrapper.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/solaris/native/libnio/ch/DevPollArrayWrapper.c	Mon Aug 28 21:46:13 2017 +0200
@@ -28,7 +28,7 @@
 #include "jvm.h"
 #include "jlong.h"
 #include "sun_nio_ch_DevPollArrayWrapper.h"
-#include <sys/poll.h>
+#include <poll.h>
 #include <unistd.h>
 #include <sys/time.h>
 
--- a/jdk/src/java.base/unix/classes/module-info.java.extra	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/unix/classes/module-info.java.extra	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,5 +23,3 @@
  * questions.
  */
 
-// AOT uses jdk.internal.misc.Unsafe
-exports jdk.internal.misc to jdk.aot;
--- a/jdk/src/java.base/unix/native/include/jvm_md.h	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/unix/native/include/jvm_md.h	Mon Aug 28 21:46:13 2017 +0200
@@ -65,7 +65,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <errno.h>
-#include <sys/signal.h>
+#include <signal.h>
 
 /* O Flags */
 
--- a/jdk/src/java.base/unix/native/libjli/java_md_solinux.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/unix/native/libjli/java_md_solinux.c	Mon Aug 28 21:46:13 2017 +0200
@@ -742,6 +742,7 @@
     if (stack_size > 0) {
       pthread_attr_setstacksize(&attr, stack_size);
     }
+    pthread_attr_setguardsize(&attr, 0); // no pthread guard page on java threads
 
     if (pthread_create(&tid, &attr, (void *(*)(void*))continuation, (void*)args) == 0) {
       void * tmp;
--- a/jdk/src/java.base/unix/native/libnet/net_util_md.h	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/unix/native/libnet/net_util_md.h	Mon Aug 28 21:46:13 2017 +0200
@@ -27,7 +27,7 @@
 #define NET_UTILS_MD_H
 
 #include <netdb.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/socket.h>
 
 /************************************************************************
--- a/jdk/src/java.base/unix/native/libnio/ch/NativeThread.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/unix/native/libnio/ch/NativeThread.c	Mon Aug 28 21:46:13 2017 +0200
@@ -31,24 +31,21 @@
 #include "jlong.h"
 #include "sun_nio_ch_NativeThread.h"
 #include "nio_util.h"
+#include <signal.h>
 
 #ifdef __linux__
   #include <pthread.h>
-  #include <sys/signal.h>
   /* Also defined in net/linux_close.c */
   #define INTERRUPT_SIGNAL (__SIGRTMAX - 2)
 #elif _AIX
   #include <pthread.h>
-  #include <sys/signal.h>
   /* Also defined in net/aix_close.c */
   #define INTERRUPT_SIGNAL (SIGRTMAX - 1)
 #elif __solaris__
   #include <thread.h>
-  #include <signal.h>
   #define INTERRUPT_SIGNAL (SIGRTMAX - 2)
 #elif _ALLBSD_SOURCE
   #include <pthread.h>
-  #include <signal.h>
   /* Also defined in net/bsd_close.c */
   #define INTERRUPT_SIGNAL SIGIO
 #else
--- a/jdk/src/java.base/unix/native/libnio/ch/Net.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/unix/native/libnio/ch/Net.c	Mon Aug 28 21:46:13 2017 +0200
@@ -23,7 +23,7 @@
  * questions.
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <string.h>
--- a/jdk/src/java.base/windows/classes/module-info.java.extra	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/windows/classes/module-info.java.extra	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,3 +26,4 @@
 exports sun.security.rsa to jdk.crypto.mscapi;
 exports sun.security.internal.spec to jdk.crypto.mscapi;
 exports sun.security.util to jdk.crypto.mscapi;
+
--- a/jdk/src/java.base/windows/native/libjava/java_props_md.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.base/windows/native/libjava/java_props_md.c	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -559,9 +559,7 @@
         }
         sprintf(buf, "%d.%d", majorVersion, minorVersion);
         sprops.os_version = _strdup(buf);
-#if _M_IA64
-        sprops.os_arch = "ia64";
-#elif _M_AMD64
+#if _M_AMD64
         sprops.os_arch = "amd64";
 #elif _X86_
         sprops.os_arch = "x86";
--- a/jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -332,7 +332,15 @@
 
 #define DRAGMASK (NSMouseMovedMask | NSLeftMouseDraggedMask | NSRightMouseDownMask | NSRightMouseDraggedMask | NSLeftMouseUpMask | NSRightMouseUpMask | NSFlagsChangedMask | NSKeyDownMask)
 
-- (NSEvent *)nextEventMatchingMask:(NSUInteger)mask untilDate:(NSDate *)expiration inMode:(NSString *)mode dequeue:(BOOL)deqFlag {
+#if defined(MAC_OS_X_VERSION_10_12) && \
+   MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12 && \
+   __LP64__
+   // 10.12 changed `mask` to NSEventMask (unsigned long long) for x86_64 builds.
+- (NSEvent *)nextEventMatchingMask:(NSEventMask)mask
+#else
+- (NSEvent *)nextEventMatchingMask:(NSUInteger)mask
+#endif
+untilDate:(NSDate *)expiration inMode:(NSString *)mode dequeue:(BOOL)deqFlag {
     if (mask == DRAGMASK && [((NSString *)kCFRunLoopDefaultMode) isEqual:mode]) {
         postEventDuringEventSynthesis = YES;
     }
@@ -449,4 +457,3 @@
         }
     }
 }
-
--- a/jdk/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -394,8 +394,6 @@
 
 void *
 SplashScreenThread(void *param) {
-    objc_registerThreadWithCollector();
-
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
     Splash *splash = (Splash *) param;
 
--- a/jdk/src/java.desktop/share/native/libjavajpeg/jdhuff.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.desktop/share/native/libjavajpeg/jdhuff.c	Mon Aug 28 21:46:13 2017 +0200
@@ -455,10 +455,15 @@
     0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };
 
 static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
-  { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,
-    ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,
-    ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,
-    ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
+  { 0,
+    (int)(((unsigned)(~0)<<1)  + 1), (int)(((unsigned)(~0)<<2)  + 1),
+    (int)(((unsigned)(~0)<<3)  + 1), (int)(((unsigned)(~0)<<4)  + 1),
+    (int)(((unsigned)(~0)<<5)  + 1), (int)(((unsigned)(~0)<<6)  + 1),
+    (int)(((unsigned)(~0)<<7)  + 1), (int)(((unsigned)(~0)<<8)  + 1),
+    (int)(((unsigned)(~0)<<9)  + 1), (int)(((unsigned)(~0)<<10) + 1),
+    (int)(((unsigned)(~0)<<11) + 1), (int)(((unsigned)(~0)<<12) + 1),
+    (int)(((unsigned)(~0)<<13) + 1), (int)(((unsigned)(~0)<<14) + 1),
+    (int)(((unsigned)(~0)<<15) + 1) };
 
 #endif /* AVOID_TABLES */
 
--- a/jdk/src/java.desktop/share/native/libjavajpeg/jdphuff.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.desktop/share/native/libjavajpeg/jdphuff.c	Mon Aug 28 21:46:13 2017 +0200
@@ -215,10 +215,15 @@
     0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };
 
 static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
-  { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,
-    ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,
-    ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,
-    ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
+  { 0,
+    (int)(((unsigned)(~0)<<1)  + 1), (int)(((unsigned)(~0)<<2)  + 1),
+    (int)(((unsigned)(~0)<<3)  + 1), (int)(((unsigned)(~0)<<4)  + 1),
+    (int)(((unsigned)(~0)<<5)  + 1), (int)(((unsigned)(~0)<<6)  + 1),
+    (int)(((unsigned)(~0)<<7)  + 1), (int)(((unsigned)(~0)<<8)  + 1),
+    (int)(((unsigned)(~0)<<9)  + 1), (int)(((unsigned)(~0)<<10) + 1),
+    (int)(((unsigned)(~0)<<11) + 1), (int)(((unsigned)(~0)<<12) + 1),
+    (int)(((unsigned)(~0)<<13) + 1), (int)(((unsigned)(~0)<<14) + 1),
+    (int)(((unsigned)(~0)<<15) + 1) };
 
 #endif /* AVOID_TABLES */
 
--- a/jdk/src/java.desktop/share/native/libjavajpeg/jpegdecoder.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.desktop/share/native/libjavajpeg/jpegdecoder.c	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -483,15 +483,6 @@
                                                   "available", "()I"));
 }
 
-
-/*
- * The Windows Itanium Aug 2002 SDK generates bad code
- * for this routine.  Disable optimization for now.
- */
-#ifdef _M_IA64
-#pragma optimize ("", off)
-#endif
-
 JNIEXPORT void JNICALL
 Java_sun_awt_image_JPEGImageDecoder_readImage(JNIEnv *env,
                                               jobject this,
@@ -745,10 +736,6 @@
   RELEASE_ARRAYS(env, &jsrc);
   return;
 }
-#ifdef _M_IA64
-#pragma optimize ("", on)
-#endif
-
 
 /*
  * SOME FINE POINTS:
--- a/jdk/src/java.sql/share/classes/javax/transaction/xa/Xid.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/java.sql/share/classes/javax/transaction/xa/Xid.java	Mon Aug 28 21:46:13 2017 +0200
@@ -38,12 +38,12 @@
 public interface Xid {
 
     /**
-     * Maximum number of bytes returned by getGtrid.
+     * Maximum number of bytes returned by {@link #getGlobalTransactionId }.
      */
     final static int MAXGTRIDSIZE = 64;
 
     /**
-     * Maximum number of bytes returned by getBqual.
+     * Maximum number of bytes returned by {@link #getBranchQualifier }.
      */
     final static int MAXBQUALSIZE = 64;
 
--- a/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/AttachNotSupportedException.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/AttachNotSupportedException.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
 
 /**
  * Thrown by {@link com.sun.tools.attach.VirtualMachine#attach
- * VirtalMachine.attach} when attempting to attach to a Java virtual machine
+ * VirtualMachine.attach} when attempting to attach to a Java virtual machine
  * for which a compatible {@link com.sun.tools.attach.spi.AttachProvider
  * AttachProvider} does not exist. It is also thrown by {@link
  * com.sun.tools.attach.spi.AttachProvider#attachVirtualMachine
--- a/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/AttachPermission.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/AttachPermission.java	Mon Aug 28 21:46:13 2017 +0200
@@ -28,7 +28,7 @@
 /**
  * When a {@link java.lang.SecurityManager SecurityManager} set, this
  * is the permission which will be checked when code invokes {@link
- * VirtualMachine#attach VirtalMachine.attach} to attach to a target virtual
+ * VirtualMachine#attach VirtualMachine.attach} to attach to a target virtual
  * machine.
  * This permission is also checked when an {@link
  * com.sun.tools.attach.spi.AttachProvider AttachProvider} is created.
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AsyncSSLDelegate.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AsyncSSLDelegate.java	Mon Aug 28 21:46:13 2017 +0200
@@ -196,7 +196,7 @@
      * This same method is called to try and resume output after a blocking
      * handshaking operation has completed.
      */
-    private void upperWrite(ByteBufferReference[] refs, AsyncWriteQueue delayCallback) {
+    private boolean upperWrite(ByteBufferReference[] refs, AsyncWriteQueue delayCallback) {
         // currently delayCallback is not used. Use it when it's needed to execute handshake in another thread.
         try {
             ByteBuffer[] buffers = ByteBufferReference.toBuffers(refs);
@@ -230,6 +230,9 @@
             closeExceptionally(t);
             errorHandler.accept(t);
         }
+        // We always return true: either all the data was sent, or
+        // an exception happened and we have closed the queue.
+        return true;
     }
 
     // Connecting at this level means the initial handshake has completed.
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainHttpConnection.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainHttpConnection.java	Mon Aug 28 21:46:13 2017 +0200
@@ -231,7 +231,7 @@
         assert false;
     }
 
-    void asyncOutput(ByteBufferReference[] refs, AsyncWriteQueue delayCallback) {
+    boolean asyncOutput(ByteBufferReference[] refs, AsyncWriteQueue delayCallback) {
         try {
             ByteBuffer[] bufs = ByteBufferReference.toBuffers(refs);
             while (Utils.remaining(bufs) > 0) {
@@ -239,13 +239,14 @@
                 if (n == 0) {
                     delayCallback.setDelayed(refs);
                     client.registerEvent(new WriteEvent());
-                    return;
+                    return false;
                 }
             }
             ByteBufferReference.clear(refs);
         } catch (IOException e) {
             shutdown();
         }
+        return true;
     }
 
     @Override
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/AsyncWriteQueue.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/AsyncWriteQueue.java	Mon Aug 28 21:46:13 2017 +0200
@@ -27,17 +27,31 @@
 
 import java.io.Closeable;
 import java.io.IOException;
-import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Deque;
 import java.util.List;
 import java.util.concurrent.ConcurrentLinkedDeque;
 import java.util.concurrent.atomic.AtomicInteger;
-import java.util.function.BiConsumer;
 
 public class AsyncWriteQueue implements Closeable {
 
+    @FunctionalInterface
+    public static interface AsyncConsumer {
+        /**
+         * Takes an array of buffer reference and attempt to send the data
+         * downstream. If not all the data can be sent, then push back
+         * to the source queue by calling {@code source.setDelayed(buffers)}
+         * and return false. If all the data was successfully sent downstream
+         * then returns true.
+         * @param buffers An array of ButeBufferReference containing data
+         *                to send downstream.
+         * @param source This AsyncWriteQueue.
+         * @return true if all the data could be sent downstream, false otherwise.
+         */
+        boolean trySend(ByteBufferReference[] buffers, AsyncWriteQueue source);
+    }
+
     private static final int IDLE    = 0;     // nobody is flushing from the queue
     private static final int FLUSHING = 1;    // there is the only thread flushing from the queue
     private static final int REFLUSHING = 2;  // while one thread was flushing from the queue
@@ -51,7 +65,7 @@
 
     private final AtomicInteger state = new AtomicInteger(IDLE);
     private final Deque<ByteBufferReference[]> queue = new ConcurrentLinkedDeque<>();
-    private final BiConsumer<ByteBufferReference[], AsyncWriteQueue> consumeAction;
+    private final AsyncConsumer consumeAction;
 
     // Queue may be processed in two modes:
     // 1. if(!doFullDrain) - invoke callback on each chunk
@@ -60,11 +74,11 @@
 
     private ByteBufferReference[] delayedElement = null;
 
-    public AsyncWriteQueue(BiConsumer<ByteBufferReference[], AsyncWriteQueue> consumeAction) {
+    public AsyncWriteQueue(AsyncConsumer consumeAction) {
         this(consumeAction, true);
     }
 
-    public AsyncWriteQueue(BiConsumer<ByteBufferReference[], AsyncWriteQueue> consumeAction, boolean doFullDrain) {
+    public AsyncWriteQueue(AsyncConsumer consumeAction, boolean doFullDrain) {
         this.consumeAction = consumeAction;
         this.doFullDrain = doFullDrain;
     }
@@ -156,8 +170,7 @@
         }
         while(true) {
             while (element != null) {
-                consumeAction.accept(element, this);
-                if (state.get() == DELAYED) {
+                if (!consumeAction.trySend(element, this)) {
                     return;
                 }
                 element = drain();
--- a/jdk/src/jdk.internal.le/share/classes/jdk/internal/jline/console/ConsoleReader.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/jdk.internal.le/share/classes/jdk/internal/jline/console/ConsoleReader.java	Mon Aug 28 21:46:13 2017 +0200
@@ -29,6 +29,7 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.URL;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -2338,8 +2339,6 @@
                 out.flush();
             }
 
-            Stack<Character> pushBackChar = new Stack<Character>();
-
             if (terminal.isAnsiSupported() && System.console() != null) {
                 //detect the prompt length by reading the cursor position from the terminal
                 //the real prompt length could differ from the simple prompt length due to
@@ -2357,9 +2356,11 @@
                     if (m.matches()) {
                         promptLen = Integer.parseInt(m.group("column")) - 1;
                         String prefix = m.group("prefix");
+                        List<Character> chars = new ArrayList<>();
                         for (int i = prefix.length() - 1; i >= 0; i--) {
-                            pushBackChar.push(prefix.charAt(i));
+                            chars.add(prefix.charAt(i));
                         }
+                        pushBackChar.addAll(0, chars);
                         break;
                     }
                 }
@@ -3224,6 +3225,7 @@
     //where:
         private Pattern CURSOR_COLUMN_PATTERN =
                 Pattern.compile("(?<prefix>.*)\033\\[[0-9]+;(?<column>[0-9]+)R", Pattern.DOTALL);
+        private Stack<Character> pushBackChar = new Stack<Character>();
 
     /**
      * Read a line for unsupported terminals.
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/TargetVM.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/TargetVM.java	Mon Aug 28 21:46:13 2017 +0200
@@ -41,7 +41,7 @@
 
 public class TargetVM implements Runnable {
     private Map<String, Packet> waitingQueue = new HashMap<>(32,0.75f);
-    private boolean shouldListen = true;
+    private volatile boolean shouldListen = true;
     private List<EventQueue> eventQueues = Collections.synchronizedList(new ArrayList<>(2));
     private VirtualMachineImpl vm;
     private Connection connection;
@@ -179,6 +179,9 @@
 
         // inform the VM mamager that this VM is history
         vm.vmManager.disposeVirtualMachine(vm);
+        if (eventController != null) {
+            eventController.release();
+        }
 
         // close down all the event queues
         // Closing a queue causes a VMDisconnectEvent to
@@ -237,7 +240,7 @@
 
     private EventController eventController() {
         if (eventController == null) {
-            eventController = new EventController(vm);
+            eventController = new EventController();
         }
         return eventController;
     }
@@ -326,13 +329,11 @@
         } catch (IOException ioe) { }
     }
 
-    static private class EventController extends Thread {
-        VirtualMachineImpl vm;
+    private class EventController extends Thread {
         int controlRequest = 0;
 
-        EventController(VirtualMachineImpl vm) {
+        EventController() {
             super(vm.threadGroupForJDI(), "JDI Event Control Thread");
-            this.vm = vm;
             setDaemon(true);
             setPriority((MAX_PRIORITY + NORM_PRIORITY)/2);
             super.start();
@@ -354,6 +355,9 @@
                 synchronized(this) {
                     while (controlRequest == 0) {
                         try {wait();} catch (InterruptedException e) {}
+                        if (!shouldListen) {
+                           return;
+                        }
                     }
                     currentRequest = controlRequest;
                     controlRequest = 0;
--- a/jdk/src/jdk.jdwp.agent/share/native/libjdwp/debugLoop.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/jdk.jdwp.agent/share/native/libjdwp/debugLoop.c	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -125,15 +125,13 @@
             jboolean replyToSender = JNI_TRUE;
 
             /*
-             * For VirtualMachine commands we hold the vmDeathLock
+             * For all commands we hold the vmDeathLock
              * while executing and replying to the command. This ensures
-             * that a VM command after VM_DEATH will be allowed to complete
+             * that a command after VM_DEATH will be allowed to complete
              * before the thread posting the VM_DEATH continues VM
              * termination.
              */
-            if (cmd->cmdSet == JDWP_COMMAND_SET(VirtualMachine)){
-                debugMonitorEnter(vmDeathLock);
-            }
+            debugMonitorEnter(vmDeathLock);
 
             /* Initialize the input and output streams */
             inStream_init(&in, p);
@@ -172,9 +170,7 @@
             /*
              * Release the vmDeathLock as the reply has been posted.
              */
-            if (cmd->cmdSet == JDWP_COMMAND_SET(VirtualMachine)){
-               debugMonitorExit(vmDeathLock);
-            }
+            debugMonitorExit(vmDeathLock);
 
             inStream_destroy(&in);
             outStream_destroy(&out);
--- a/jdk/src/jdk.jdwp.agent/share/native/libjdwp/eventHelper.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/jdk.jdwp.agent/share/native/libjdwp/eventHelper.c	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -240,10 +240,10 @@
 
         size = commandSize(command);
         /*
-         * Immediately close out any commands enqueued from a
-         * previously attached debugger.
+         * Immediately close out any commands enqueued from
+         * a dead VM or a previously attached debugger.
          */
-        if (command->sessionID != currentSessionID) {
+        if (gdata->vmDead || command->sessionID != currentSessionID) {
             log_debugee_location("dequeueCommand(): command session removal", NULL, NULL, 0);
             completeCommand(command);
             command = NULL;
--- a/jdk/src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c	Mon Aug 28 21:46:13 2017 +0200
@@ -37,7 +37,7 @@
 #include <thread.h>
 #else
 #include <pthread.h>
-#include <sys/poll.h>
+#include <poll.h>
 #endif
 
 #include "socket_md.h"
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/PolicyFile.java	Mon Aug 28 16:40:01 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.security.auth;
-
-import java.security.CodeSource;
-import java.security.PermissionCollection;
-import javax.security.auth.Subject;
-
-/**
- * This class represents a default implementation for
- * {@code javax.security.auth.Policy}.
- *
- * <p> This object stores the policy for entire Java runtime,
- * and is the amalgamation of multiple static policy
- * configurations that resides in files.
- * The algorithm for locating the policy file(s) and reading their
- * information into this {@code Policy} object is:
- *
- * <ol>
- * <li>
- *   Loop through the security properties,
- *   <i>auth.policy.url.1</i>, <i>auth.policy.url.2</i>, ...,
- *   <i>auth.policy.url.X</i>".
- *   Each property value specifies a {@code URL} pointing to a
- *   policy file to be loaded.  Read in and load each policy.
- *
- * <li>
- *   The {@code java.lang.System} property <i>java.security.auth.policy</i>
- *   may also be set to a {@code URL} pointing to another policy file
- *   (which is the case when a user uses the -D switch at runtime).
- *   If this property is defined, and its use is allowed by the
- *   security property file (the Security property,
- *   <i>policy.allowSystemProperty</i> is set to <i>true</i>),
- *   also load that policy.
- *
- * <li>
- *   If the <i>java.security.auth.policy</i> property is defined using
- *   "==" (rather than "="), then ignore all other specified
- *   policies and only load this policy.
- * </ol>
- *
- * Each policy file consists of one or more grant entries, each of
- * which consists of a number of permission entries.
- *
- * <pre>
- *   grant signedBy "<b>alias</b>", codeBase "<b>URL</b>",
- *         principal <b>principalClass</b> "<b>principalName</b>",
- *         principal <b>principalClass</b> "<b>principalName</b>",
- *         ... {
- *
- *     permission <b>Type</b> "<b>name</b> "<b>action</b>",
- *         signedBy "<b>alias</b>";
- *     permission <b>Type</b> "<b>name</b> "<b>action</b>",
- *         signedBy "<b>alias</b>";
- *     ....
- *   };
- * </pre>
- *
- * All non-bold items above must appear as is (although case
- * doesn't matter and some are optional, as noted below).
- * Italicized items represent variable values.
- *
- * <p> A grant entry must begin with the word {@code grant}.
- * The {@code signedBy} and {@code codeBase}
- * name/value pairs are optional.
- * If they are not present, then any signer (including unsigned code)
- * will match, and any codeBase will match.  Note that the
- * {@code principal} name/value pair is not optional.
- * This {@code Policy} implementation only permits
- * Principal-based grant entries.  Note that the <i>principalClass</i>
- * may be set to the wildcard value, *, which allows it to match
- * any {@code Principal} class.  In addition, the <i>principalName</i>
- * may also be set to the wildcard value, *, allowing it to match
- * any {@code Principal} name.  When setting the <i>principalName</i>
- * to the *, do not surround the * with quotes.
- *
- * <p> A permission entry must begin with the word {@code permission}.
- * The word <i>{@code Type}</i> in the template above is
- * a specific permission type, such as {@code java.io.FilePermission}
- * or {@code java.lang.RuntimePermission}.
- *
- * <p> The "<i>action</i>" is required for
- * many permission types, such as {@code java.io.FilePermission}
- * (where it specifies what type of file access that is permitted).
- * It is not required for categories such as
- * {@code java.lang.RuntimePermission}
- * where it is not necessary - you either have the
- * permission specified by the "<i>{@code name}</i>"
- * value following the type name or you don't.
- *
- * <p> The {@code signedBy} name/value pair for a permission entry
- * is optional. If present, it indicates a signed permission. That is,
- * the permission class itself must be signed by the given alias in
- * order for it to be granted. For example,
- * suppose you have the following grant entry:
- *
- * <pre>
- *   grant principal foo.com.Principal "Duke" {
- *     permission Foo "foobar", signedBy "FooSoft";
- *   }
- * </pre>
- *
- * <p> Then this permission of type <i>Foo</i> is granted if the
- * {@code Foo.class} permission has been signed by the
- * "FooSoft" alias, or if {@code Foo.class} is a
- * system class (i.e., is found on the CLASSPATH).
- *
- * <p> Items that appear in an entry must appear in the specified order
- * ({@code permission}, <i>Type</i>, "<i>name</i>", and
- * "<i>action</i>"). An entry is terminated with a semicolon.
- *
- * <p> Case is unimportant for the identifiers ({@code permission},
- * {@code signedBy}, {@code codeBase}, etc.) but is
- * significant for the <i>Type</i>
- * or for any string that is passed in as a value.
- *
- * <p> An example of two entries in a policy configuration file is
- * <pre>
- *   // if the code is comes from "foo.com" and is running as "Duke",
- *   // grant it read/write to all files in /tmp.
- *
- *   grant codeBase "foo.com", principal foo.com.Principal "Duke" {
- *              permission java.io.FilePermission "/tmp/*", "read,write";
- *   };
- *
- *   // grant any code running as "Duke" permission to read
- *   // the "java.vendor" Property.
- *
- *   grant principal foo.com.Principal "Duke" {
- *         permission java.util.PropertyPermission "java.vendor";
- * </pre>
- *
- * <p> This {@code Policy} implementation supports
- * special handling for PrivateCredentialPermissions.
- * If a grant entry is configured with a
- * {@code PrivateCredentialPermission},
- * and the "Principal Class/Principal Name" for that
- * {@code PrivateCredentialPermission} is "self",
- * then the entry grants the specified {@code Subject} permission to
- * access its own private Credential.  For example,
- * the following grants the {@code Subject} "Duke"
- * access to its own a.b.Credential.
- *
- * <pre>
- *   grant principal foo.com.Principal "Duke" {
- *      permission javax.security.auth.PrivateCredentialPermission
- *              "a.b.Credential self",
- *              "read";
- *    };
- * </pre>
- *
- * The following grants the {@code Subject} "Duke"
- * access to all of its own private Credentials:
- *
- * <pre>
- *   grant principal foo.com.Principal "Duke" {
- *      permission javax.security.auth.PrivateCredentialPermission
- *              "* self",
- *              "read";
- *    };
- * </pre>
- *
- * The following grants all Subjects authenticated as a
- * {@code SolarisPrincipal} (regardless of their respective names)
- * permission to access their own private Credentials:
- *
- * <pre>
- *   grant principal com.sun.security.auth.SolarisPrincipal * {
- *      permission javax.security.auth.PrivateCredentialPermission
- *              "* self",
- *              "read";
- *    };
- * </pre>
- *
- * The following grants all Subjects permission to access their own
- * private Credentials:
- *
- * <pre>
- *   grant principal * * {
- *      permission javax.security.auth.PrivateCredentialPermission
- *              "* self",
- *              "read";
- *    };
- * </pre>
-
- * @deprecated As of JDK&nbsp;1.4, replaced by
- *             {@code sun.security.provider.PolicyFile}.
- *             This class is entirely deprecated.
- * This class is subject to removal in a future version of Java SE.
- *
- * @see java.security.CodeSource
- * @see java.security.Permissions
- * @see java.security.ProtectionDomain
- * @see java.security.Security security properties
- */
-@Deprecated(since="1.4", forRemoval=true)
-public class PolicyFile extends javax.security.auth.Policy {
-
-    private final sun.security.provider.AuthPolicyFile apf;
-
-    /**
-     * Initializes the Policy object and reads the default policy
-     * configuration file(s) into the Policy object.
-     */
-    public PolicyFile() {
-        apf = new sun.security.provider.AuthPolicyFile();
-    }
-
-    /**
-     * Refreshes the policy object by re-reading all the policy files.
-     *
-     * @exception SecurityException if the caller doesn't have permission
-     *          to refresh the {@code Policy}.
-     */
-    @Override
-    public void refresh() {
-        apf.refresh();
-    }
-
-    /**
-     * Examines this {@code Policy} and returns the Permissions granted
-     * to the specified {@code Subject} and {@code CodeSource}.
-     *
-     * <p> Permissions for a particular <i>grant</i> entry are returned
-     * if the {@code CodeSource} constructed using the codebase and
-     * signedby values specified in the entry {@code implies}
-     * the {@code CodeSource} provided to this method, and if the
-     * {@code Subject} provided to this method contains all of the
-     * Principals specified in the entry.
-     *
-     * <p> The {@code Subject} provided to this method contains all
-     * of the Principals specified in the entry if, for each
-     * {@code Principal}, "P1", specified in the <i>grant</i> entry
-     * one of the following two conditions is met:
-     *
-     * <ol>
-     * <li> the {@code Subject} has a
-     *      {@code Principal}, "P2", where
-     *      {@code P2.getClass().getName()} equals the
-     *      P1's class name, and where
-     *      {@code P2.getName()} equals the P1's name.
-     *
-     * <li> P1 implements
-     *      {@code com.sun.security.auth.PrincipalComparator},
-     *      and {@code P1.implies} the provided {@code Subject}.
-     * </ol>
-     *
-     * <p> Note that this {@code Policy} implementation has
-     * special handling for PrivateCredentialPermissions.
-     * When this method encounters a {@code PrivateCredentialPermission}
-     * which specifies "self" as the {@code Principal} class and name,
-     * it does not add that {@code Permission} to the returned
-     * {@code PermissionCollection}.  Instead, it builds
-     * a new {@code PrivateCredentialPermission}
-     * for each {@code Principal} associated with the provided
-     * {@code Subject}.  Each new {@code PrivateCredentialPermission}
-     * contains the same Credential class as specified in the
-     * originally granted permission, as well as the Class and name
-     * for the respective {@code Principal}.
-     *
-     * @param subject the Permissions granted to this {@code Subject}
-     *          and the additionally provided {@code CodeSource}
-     *          are returned.
-     *
-     * @param codesource the Permissions granted to this {@code CodeSource}
-     *          and the additionally provided {@code Subject}
-     *          are returned.
-     *
-     * @return the Permissions granted to the provided {@code Subject}
-     *          {@code CodeSource}.
-     */
-    @Override
-    public PermissionCollection getPermissions(final Subject subject,
-                                               final CodeSource codesource) {
-        return apf.getPermissions(subject, codesource);
-    }
-}
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java	Mon Aug 28 16:40:01 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.security.auth;
-
-import java.security.Principal;
-import static sun.security.util.ResourcesMgr.getAuthResourceString;
-
-/**
- * This class implements the {@code Principal} interface
- * and represents a user's Solaris group identification number (GID).
- *
- * <p> Principals such as this {@code SolarisNumericGroupPrincipal}
- * may be associated with a particular {@code Subject}
- * to augment that {@code Subject} with an additional
- * identity.  Refer to the {@code Subject} class for more information
- * on how to achieve this.  Authorization decisions can then be based upon
- * the Principals associated with a {@code Subject}.
-
- * @deprecated As of JDK&nbsp;1.4, replaced by
- *             {@link UnixNumericGroupPrincipal}.
- *             This class is entirely deprecated.
- * This class is subject to removal in a future version of Java SE.
- *
- * @see java.security.Principal
- * @see javax.security.auth.Subject
- */
-@Deprecated(since="1.4", forRemoval=true)
-public class SolarisNumericGroupPrincipal implements
-                                        Principal,
-                                        java.io.Serializable {
-
-    private static final long serialVersionUID = 2345199581042573224L;
-
-    /**
-     * @serial
-     */
-    private String name;
-
-    /**
-     * @serial
-     */
-    private boolean primaryGroup;
-
-    /**
-     * Create a {@code SolarisNumericGroupPrincipal} using a
-     * {@code String} representation of the user's
-     * group identification number (GID).
-     *
-     * @param name the user's group identification number (GID)
-     *                  for this user.
-     *
-     * @param primaryGroup true if the specified GID represents the
-     *                  primary group to which this user belongs.
-     *
-     * @exception NullPointerException if the {@code name}
-     *                  is {@code null}.
-     */
-    public SolarisNumericGroupPrincipal(String name, boolean primaryGroup) {
-        if (name == null)
-            throw new NullPointerException(getAuthResourceString("provided.null.name"));
-
-        this.name = name;
-        this.primaryGroup = primaryGroup;
-    }
-
-    /**
-     * Create a {@code SolarisNumericGroupPrincipal} using a
-     * long representation of the user's group identification number (GID).
-     *
-     * @param name the user's group identification number (GID) for this user
-     *                  represented as a long.
-     *
-     * @param primaryGroup true if the specified GID represents the
-     *                  primary group to which this user belongs.
-     *
-     */
-    public SolarisNumericGroupPrincipal(long name, boolean primaryGroup) {
-        this.name = Long.toString(name);
-        this.primaryGroup = primaryGroup;
-    }
-
-    /**
-     * Return the user's group identification number (GID) for this
-     * {@code SolarisNumericGroupPrincipal}.
-     *
-     * @return the user's group identification number (GID) for this
-     *          {@code SolarisNumericGroupPrincipal}
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Return the user's group identification number (GID) for this
-     * {@code SolarisNumericGroupPrincipal} as a long.
-     *
-     * @return the user's group identification number (GID) for this
-     *          {@code SolarisNumericGroupPrincipal} as a long.
-     */
-    public long longValue() {
-        return Long.parseLong(name);
-    }
-
-    /**
-     * Return whether this group identification number (GID) represents
-     * the primary group to which this user belongs.
-     *
-     * @return true if this group identification number (GID) represents
-     *          the primary group to which this user belongs,
-     *          or false otherwise.
-     */
-    public boolean isPrimaryGroup() {
-        return primaryGroup;
-    }
-
-    /**
-     * Return a string representation of this
-     * {@code SolarisNumericGroupPrincipal}.
-     *
-     * @return a string representation of this
-     *          {@code SolarisNumericGroupPrincipal}.
-     */
-    public String toString() {
-        return primaryGroup ?
-            getAuthResourceString
-            ("SolarisNumericGroupPrincipal.Primary.Group.") + name :
-            getAuthResourceString
-            ("SolarisNumericGroupPrincipal.Supplementary.Group.") + name;
-    }
-
-    /**
-     * Compares the specified Object with this
-     * {@code SolarisNumericGroupPrincipal}
-     * for equality.  Returns true if the given object is also a
-     * {@code SolarisNumericGroupPrincipal} and the two
-     * SolarisNumericGroupPrincipals
-     * have the same group identification number (GID).
-     *
-     * @param o Object to be compared for equality with this
-     *          {@code SolarisNumericGroupPrincipal}.
-     *
-     * @return true if the specified Object is equal to this
-     *          {@code SolarisNumericGroupPrincipal}.
-     */
-    public boolean equals(Object o) {
-        if (o == null)
-            return false;
-
-        if (this == o)
-            return true;
-
-        if (!(o instanceof SolarisNumericGroupPrincipal))
-            return false;
-        SolarisNumericGroupPrincipal that = (SolarisNumericGroupPrincipal)o;
-
-        if (this.getName().equals(that.getName()) &&
-            this.isPrimaryGroup() == that.isPrimaryGroup())
-            return true;
-        return false;
-    }
-
-    /**
-     * Return a hash code for this {@code SolarisNumericGroupPrincipal}.
-     *
-     * @return a hash code for this {@code SolarisNumericGroupPrincipal}.
-     */
-    public int hashCode() {
-        return toString().hashCode();
-    }
-}
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java	Mon Aug 28 16:40:01 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.security.auth;
-
-import java.security.Principal;
-import static sun.security.util.ResourcesMgr.getAuthResourceString;
-
-/**
- * This class implements the {@code Principal} interface
- * and represents a user's Solaris identification number (UID).
- *
- * <p> Principals such as this {@code SolarisNumericUserPrincipal}
- * may be associated with a particular {@code Subject}
- * to augment that {@code Subject} with an additional
- * identity.  Refer to the {@code Subject} class for more information
- * on how to achieve this.  Authorization decisions can then be based upon
- * the Principals associated with a {@code Subject}.
- * @deprecated As of JDK&nbsp;1.4, replaced by
- *             {@link UnixNumericUserPrincipal}.
- *             This class is entirely deprecated.
- * This class is subject to removal in a future version of Java SE.
- *
- * @see java.security.Principal
- * @see javax.security.auth.Subject
- */
-@Deprecated(since="1.4", forRemoval=true)
-public class SolarisNumericUserPrincipal implements
-                                        Principal,
-                                        java.io.Serializable {
-
-    private static final long serialVersionUID = -3178578484679887104L;
-
-    /**
-     * @serial
-     */
-    private String name;
-
-    /**
-     * Create a {@code SolarisNumericUserPrincipal} using a
-     * {@code String} representation of the
-     * user's identification number (UID).
-     *
-     * @param name the user identification number (UID) for this user.
-     *
-     * @exception NullPointerException if the {@code name}
-     *                  is {@code null}.
-     */
-    public SolarisNumericUserPrincipal(String name) {
-        if (name == null)
-            throw new NullPointerException(getAuthResourceString("provided.null.name"));
-
-        this.name = name;
-    }
-
-    /**
-     * Create a {@code SolarisNumericUserPrincipal} using a
-     * long representation of the user's identification number (UID).
-     *
-     * @param name the user identification number (UID) for this user
-     *                  represented as a long.
-     */
-    public SolarisNumericUserPrincipal(long name) {
-        this.name = Long.toString(name);
-    }
-
-    /**
-     * Return the user identification number (UID) for this
-     * {@code SolarisNumericUserPrincipal}.
-     *
-     * @return the user identification number (UID) for this
-     *          {@code SolarisNumericUserPrincipal}
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Return the user identification number (UID) for this
-     * {@code SolarisNumericUserPrincipal} as a long.
-     *
-     * @return the user identification number (UID) for this
-     *          {@code SolarisNumericUserPrincipal} as a long.
-     */
-    public long longValue() {
-        return Long.parseLong(name);
-    }
-
-    /**
-     * Return a string representation of this
-     * {@code SolarisNumericUserPrincipal}.
-     *
-     * @return a string representation of this
-     *          {@code SolarisNumericUserPrincipal}.
-     */
-    public String toString() {
-        return(getAuthResourceString("SolarisNumericUserPrincipal.") + name);
-    }
-
-    /**
-     * Compares the specified Object with this
-     * {@code SolarisNumericUserPrincipal}
-     * for equality.  Returns true if the given object is also a
-     * {@code SolarisNumericUserPrincipal} and the two
-     * SolarisNumericUserPrincipals
-     * have the same user identification number (UID).
-     *
-     * @param o Object to be compared for equality with this
-     *          {@code SolarisNumericUserPrincipal}.
-     *
-     * @return true if the specified Object is equal to this
-     *          {@code SolarisNumericUserPrincipal}.
-     */
-    public boolean equals(Object o) {
-        if (o == null)
-            return false;
-
-        if (this == o)
-            return true;
-
-        if (!(o instanceof SolarisNumericUserPrincipal))
-            return false;
-        SolarisNumericUserPrincipal that = (SolarisNumericUserPrincipal)o;
-
-        if (this.getName().equals(that.getName()))
-            return true;
-
-       return false;
-    }
-
-    /**
-     * Return a hash code for this {@code SolarisNumericUserPrincipal}.
-     *
-     * @return a hash code for this {@code SolarisNumericUserPrincipal}.
-     */
-    public int hashCode() {
-        return name.hashCode();
-    }
-}
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisPrincipal.java	Mon Aug 28 16:40:01 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.security.auth;
-
-import java.security.Principal;
-import static sun.security.util.ResourcesMgr.getAuthResourceString;
-
-
-/**
- * This class implements the {@code Principal} interface
- * and represents a Solaris user.
- *
- * <p> Principals such as this {@code SolarisPrincipal}
- * may be associated with a particular {@code Subject}
- * to augment that {@code Subject} with an additional
- * identity.  Refer to the {@code Subject} class for more information
- * on how to achieve this.  Authorization decisions can then be based upon
- * the Principals associated with a {@code Subject}.
- *
- * @deprecated As of JDK&nbsp;1.4, replaced by
- *             {@link UnixPrincipal}.
- *             This class is entirely deprecated.
- * This class is subject to removal in a future version of Java SE.
- * @see java.security.Principal
- * @see javax.security.auth.Subject
- */
-@Deprecated(since="1.4", forRemoval=true)
-public class SolarisPrincipal implements Principal, java.io.Serializable {
-
-    private static final long serialVersionUID = -7840670002439379038L;
-
-    /**
-     * @serial
-     */
-    private String name;
-
-    /**
-     * Create a SolarisPrincipal with a Solaris username.
-     *
-     * @param name the Unix username for this user.
-     *
-     * @exception NullPointerException if the {@code name}
-     *                  is {@code null}.
-     */
-    public SolarisPrincipal(String name) {
-        if (name == null)
-            throw new NullPointerException(getAuthResourceString("provided.null.name"));
-
-        this.name = name;
-    }
-
-    /**
-     * Return the Unix username for this {@code SolarisPrincipal}.
-     *
-     * @return the Unix username for this {@code SolarisPrincipal}
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Return a string representation of this {@code SolarisPrincipal}.
-     *
-     * @return a string representation of this {@code SolarisPrincipal}.
-     */
-    public String toString() {
-        return(getAuthResourceString("SolarisPrincipal.") + name);
-    }
-
-    /**
-     * Compares the specified Object with this {@code SolarisPrincipal}
-     * for equality.  Returns true if the given object is also a
-     * {@code SolarisPrincipal} and the two SolarisPrincipals
-     * have the same username.
-     *
-     * @param o Object to be compared for equality with this
-     *          {@code SolarisPrincipal}.
-     *
-     * @return true if the specified Object is equal to this
-     *          {@code SolarisPrincipal}.
-     */
-    public boolean equals(Object o) {
-        if (o == null)
-            return false;
-
-        if (this == o)
-            return true;
-
-        if (!(o instanceof SolarisPrincipal))
-            return false;
-        SolarisPrincipal that = (SolarisPrincipal)o;
-
-        if (this.getName().equals(that.getName()))
-            return true;
-        return false;
-    }
-
-    /**
-     * Return a hash code for this {@code SolarisPrincipal}.
-     *
-     * @return a hash code for this {@code SolarisPrincipal}.
-     */
-    public int hashCode() {
-        return name.hashCode();
-    }
-}
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/X500Principal.java	Mon Aug 28 16:40:01 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.security.auth;
-
-import java.security.Principal;
-import sun.security.x509.X500Name;
-import static sun.security.util.ResourcesMgr.getAuthResourceString;
-
-/**
- * This class represents an X.500 {@code Principal}.
- * X500Principals have names such as,
- * "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US"
- * (RFC 1779 style).
- *
- * <p> Principals such as this {@code X500Principal}
- * may be associated with a particular {@code Subject}
- * to augment that {@code Subject} with an additional
- * identity.  Refer to the {@code Subject} class for more information
- * on how to achieve this.  Authorization decisions can then be based upon
- * the Principals associated with a {@code Subject}.
- *
- * @see java.security.Principal
- * @see javax.security.auth.Subject
- * @deprecated A new X500Principal class is available in the Java platform.
- *             This X500Principal classs is entirely deprecated and
- *             is here to allow for a smooth transition to the new
- *             class.
- * This class is subject to removal in a future version of Java SE.
- * @see javax.security.auth.x500.X500Principal
-*/
-@Deprecated(since="1.4", forRemoval=true)
-public class X500Principal implements Principal, java.io.Serializable {
-
-    private static final long serialVersionUID = -8222422609431628648L;
-
-    /**
-     * @serial
-     */
-    private String name;
-
-    transient private X500Name thisX500Name;
-
-    /**
-     * Create a X500Principal with an X.500 Name,
-     * such as "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US"
-     * (RFC 1779 style).
-     *
-     * @param name the X.500 name
-     *
-     * @exception NullPointerException if the {@code name}
-     *                  is {@code null}.
-     *
-     * @exception IllegalArgumentException if the {@code name}
-     *                  is improperly specified.
-     */
-    public X500Principal(String name) {
-        if (name == null)
-            throw new NullPointerException(getAuthResourceString("provided.null.name"));
-
-        try {
-            thisX500Name = new X500Name(name);
-        } catch (Exception e) {
-            throw new IllegalArgumentException(e.toString());
-        }
-
-        this.name = name;
-    }
-
-    /**
-     * Return the Unix username for this {@code X500Principal}.
-     *
-     * @return the Unix username for this {@code X500Principal}
-     */
-    public String getName() {
-        return thisX500Name.getName();
-    }
-
-    /**
-     * Return a string representation of this {@code X500Principal}.
-     *
-     * @return a string representation of this {@code X500Principal}.
-     */
-    public String toString() {
-        return thisX500Name.toString();
-    }
-
-    /**
-     * Compares the specified Object with this {@code X500Principal}
-     * for equality.
-     *
-     * @param o Object to be compared for equality with this
-     *          {@code X500Principal}.
-     *
-     * @return true if the specified Object is equal to this
-     *          {@code X500Principal}.
-     */
-    public boolean equals(Object o) {
-        if (o == null)
-            return false;
-
-        if (this == o)
-            return true;
-
-        if (o instanceof X500Principal) {
-            X500Principal that = (X500Principal)o;
-            try {
-                X500Name thatX500Name = new X500Name(that.getName());
-                return thisX500Name.equals(thatX500Name);
-            } catch (Exception e) {
-                // any parsing exceptions, return false
-                return false;
-            }
-        } else if (o instanceof Principal) {
-            // this will return 'true' if 'o' is a sun.security.x509.X500Name
-            // and the X500Names are equal
-            return o.equals(thisX500Name);
-        }
-
-        return false;
-    }
-
-    /**
-     * Return a hash code for this {@code X500Principal}.
-     *
-     * @return a hash code for this {@code X500Principal}.
-     */
-    public int hashCode() {
-        return thisX500Name.hashCode();
-    }
-
-    /**
-     * Reads this object from a stream (i.e., deserializes it)
-     */
-    private void readObject(java.io.ObjectInputStream s) throws
-                                        java.io.IOException,
-                                        java.io.NotActiveException,
-                                        ClassNotFoundException {
-
-        s.defaultReadObject();
-
-        // re-create thisX500Name
-        thisX500Name = new X500Name(name);
-    }
-}
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisLoginModule.java	Mon Aug 28 16:40:01 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,313 +0,0 @@
-/*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 com.sun.security.auth.module;
-
-import java.util.*;
-import java.io.IOException;
-import javax.security.auth.*;
-import javax.security.auth.callback.*;
-import javax.security.auth.login.*;
-import javax.security.auth.spi.*;
-import com.sun.security.auth.SolarisPrincipal;
-import com.sun.security.auth.SolarisNumericUserPrincipal;
-import com.sun.security.auth.SolarisNumericGroupPrincipal;
-
-/**
- * This {@code LoginModule} imports a user's Solaris
- * {@code Principal} information ({@code SolarisPrincipal},
- * {@code SolarisNumericUserPrincipal},
- * and {@code SolarisNumericGroupPrincipal})
- * and associates them with the current {@code Subject}.
- *
- * <p> This LoginModule recognizes the debug option.
- * If set to true in the login Configuration,
- * debug messages will be output to the output stream, System.out.
- * @deprecated  As of JDK1.4, replaced by
- * {@code com.sun.security.auth.module.UnixLoginModule}.
- *             This LoginModule is entirely deprecated and
- *             is here to allow for a smooth transition to the new
- *             UnixLoginModule.
- * This class is subject to removal in a future version of Java SE.
- *
- */
-@Deprecated(since="1.4", forRemoval=true)
-public class SolarisLoginModule implements LoginModule {
-
-    // initial state
-    private Subject subject;
-    private CallbackHandler callbackHandler;
-    private Map<String, ?> sharedState;
-    private Map<String, ?> options;
-
-    // configurable option
-    private boolean debug = true;
-
-    // SolarisSystem to retrieve underlying system info
-    @SuppressWarnings("removal")
-    private SolarisSystem ss;
-
-    // the authentication status
-    private boolean succeeded = false;
-    private boolean commitSucceeded = false;
-
-    // Underlying system info
-    @SuppressWarnings("removal")
-    private SolarisPrincipal userPrincipal;
-    @SuppressWarnings("removal")
-    private SolarisNumericUserPrincipal UIDPrincipal;
-    @SuppressWarnings("removal")
-    private SolarisNumericGroupPrincipal GIDPrincipal;
-    @SuppressWarnings("removal")
-    private LinkedList<SolarisNumericGroupPrincipal> supplementaryGroups =
-                new LinkedList<>();
-
-    /**
-     * Initialize this {@code LoginModule}.
-     *
-     * @param subject the {@code Subject} to be authenticated.
-     *
-     * @param callbackHandler a {@code CallbackHandler} for communicating
-     *                  with the end user (prompting for usernames and
-     *                  passwords, for example).
-     *
-     * @param sharedState shared {@code LoginModule} state.
-     *
-     * @param options options specified in the login
-     *                  {@code Configuration} for this particular
-     *                  {@code LoginModule}.
-     */
-    public void initialize(Subject subject, CallbackHandler callbackHandler,
-                           Map<String,?> sharedState,
-                           Map<String,?> options)
-    {
-
-        this.subject = subject;
-        this.callbackHandler = callbackHandler;
-        this.sharedState = sharedState;
-        this.options = options;
-
-        // initialize any configured options
-        debug = "true".equalsIgnoreCase((String)options.get("debug"));
-    }
-
-    /**
-     * Authenticate the user (first phase).
-     *
-     * <p> The implementation of this method attempts to retrieve the user's
-     * Solaris {@code Subject} information by making a native Solaris
-     * system call.
-     *
-     * @exception FailedLoginException if attempts to retrieve the underlying
-     *          system information fail.
-     *
-     * @return true in all cases (this {@code LoginModule}
-     *          should not be ignored).
-     */
-    @SuppressWarnings("removal")
-    public boolean login() throws LoginException {
-
-        long[] solarisGroups = null;
-
-        try {
-            ss = new SolarisSystem();
-        } catch (UnsatisfiedLinkError ule) {
-            succeeded = false;
-            throw new FailedLoginException
-                                ("Failed in attempt to import " +
-                                "the underlying system identity information" +
-                                " on " + System.getProperty("os.name"));
-        }
-        userPrincipal = new SolarisPrincipal(ss.getUsername());
-        UIDPrincipal = new SolarisNumericUserPrincipal(ss.getUid());
-        GIDPrincipal = new SolarisNumericGroupPrincipal(ss.getGid(), true);
-        if (ss.getGroups() != null && ss.getGroups().length > 0)
-            solarisGroups = ss.getGroups();
-            for (int i = 0; i < solarisGroups.length; i++) {
-                SolarisNumericGroupPrincipal ngp =
-                    new SolarisNumericGroupPrincipal
-                    (solarisGroups[i], false);
-                if (!ngp.getName().equals(GIDPrincipal.getName()))
-                    supplementaryGroups.add(ngp);
-            }
-        if (debug) {
-            System.out.println("\t\t[SolarisLoginModule]: " +
-                    "succeeded importing info: ");
-            System.out.println("\t\t\tuid = " + ss.getUid());
-            System.out.println("\t\t\tgid = " + ss.getGid());
-            solarisGroups = ss.getGroups();
-            for (int i = 0; i < solarisGroups.length; i++) {
-                System.out.println("\t\t\tsupp gid = " + solarisGroups[i]);
-            }
-        }
-        succeeded = true;
-        return true;
-    }
-
-    /**
-     * Commit the authentication (second phase).
-     *
-     * <p> This method is called if the LoginContext's
-     * overall authentication succeeded
-     * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules
-     * succeeded).
-     *
-     * <p> If this LoginModule's own authentication attempt
-     * succeeded (the importing of the Solaris authentication information
-     * succeeded), then this method associates the Solaris Principals
-     * with the {@code Subject} currently tied to the
-     * {@code LoginModule}.  If this LoginModule's
-     * authentication attempted failed, then this method removes
-     * any state that was originally saved.
-     *
-     * @exception LoginException if the commit fails
-     *
-     * @return true if this LoginModule's own login and commit attempts
-     *          succeeded, or false otherwise.
-     */
-    public boolean commit() throws LoginException {
-        if (succeeded == false) {
-            if (debug) {
-                System.out.println("\t\t[SolarisLoginModule]: " +
-                    "did not add any Principals to Subject " +
-                    "because own authentication failed.");
-            }
-            return false;
-        }
-        if (subject.isReadOnly()) {
-            throw new LoginException ("Subject is Readonly");
-        }
-        if (!subject.getPrincipals().contains(userPrincipal))
-            subject.getPrincipals().add(userPrincipal);
-        if (!subject.getPrincipals().contains(UIDPrincipal))
-            subject.getPrincipals().add(UIDPrincipal);
-        if (!subject.getPrincipals().contains(GIDPrincipal))
-            subject.getPrincipals().add(GIDPrincipal);
-        for (int i = 0; i < supplementaryGroups.size(); i++) {
-            if (!subject.getPrincipals().contains(supplementaryGroups.get(i)))
-                subject.getPrincipals().add(supplementaryGroups.get(i));
-        }
-
-        if (debug) {
-            System.out.println("\t\t[SolarisLoginModule]: " +
-                               "added SolarisPrincipal,");
-            System.out.println("\t\t\t\tSolarisNumericUserPrincipal,");
-            System.out.println("\t\t\t\tSolarisNumericGroupPrincipal(s),");
-            System.out.println("\t\t\t to Subject");
-        }
-
-        commitSucceeded = true;
-        return true;
-    }
-
-
-    /**
-     * Abort the authentication (second phase).
-     *
-     * <p> This method is called if the LoginContext's
-     * overall authentication failed.
-     * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules
-     * did not succeed).
-     *
-     * <p> This method cleans up any state that was originally saved
-     * as part of the authentication attempt from the {@code login}
-     * and {@code commit} methods.
-     *
-     * @exception LoginException if the abort fails
-     *
-     * @return false if this LoginModule's own login and/or commit attempts
-     *          failed, and true otherwise.
-     */
-    @SuppressWarnings("removal")
-    public boolean abort() throws LoginException {
-        if (debug) {
-            System.out.println("\t\t[SolarisLoginModule]: " +
-                "aborted authentication attempt");
-        }
-
-        if (succeeded == false) {
-            return false;
-        } else if (succeeded == true && commitSucceeded == false) {
-
-            // Clean out state
-            succeeded = false;
-            ss = null;
-            userPrincipal = null;
-            UIDPrincipal = null;
-            GIDPrincipal = null;
-            supplementaryGroups =
-                        new LinkedList<SolarisNumericGroupPrincipal>();
-        } else {
-            // overall authentication succeeded and commit succeeded,
-            // but someone else's commit failed
-            logout();
-        }
-        return true;
-    }
-
-    /**
-     * Logout the user
-     *
-     * <p> This method removes the Principals associated
-     * with the {@code Subject}.
-     *
-     * @exception LoginException if the logout fails
-     *
-     * @return true in all cases (this {@code LoginModule}
-     *          should not be ignored).
-     */
-    @SuppressWarnings("removal")
-    public boolean logout() throws LoginException {
-        if (debug) {
-            System.out.println("\t\t[SolarisLoginModule]: " +
-                "Entering logout");
-        }
-        if (subject.isReadOnly()) {
-            throw new LoginException ("Subject is Readonly");
-        }
-        // remove the added Principals from the Subject
-        subject.getPrincipals().remove(userPrincipal);
-        subject.getPrincipals().remove(UIDPrincipal);
-        subject.getPrincipals().remove(GIDPrincipal);
-        for (int i = 0; i < supplementaryGroups.size(); i++) {
-            subject.getPrincipals().remove(supplementaryGroups.get(i));
-        }
-
-        // clean out state
-        ss = null;
-        succeeded = false;
-        commitSucceeded = false;
-        userPrincipal = null;
-        UIDPrincipal = null;
-        GIDPrincipal = null;
-        supplementaryGroups = new LinkedList<SolarisNumericGroupPrincipal>();
-
-        if (debug) {
-            System.out.println("\t\t[SolarisLoginModule]: " +
-                "logged out Subject");
-        }
-        return true;
-    }
-}
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisSystem.java	Mon Aug 28 16:40:01 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.security.auth.module;
-
-/**
- * This class implementation retrieves and makes available Solaris
- * UID/GID/groups information for the current user.
- *
- * @deprecated replaced by {@link UnixSystem}.
- * This class is subject to removal in a future version of Java SE.
- */
-@Deprecated(since="1.4", forRemoval=true)
-public class SolarisSystem {
-
-    private native void getSolarisInfo();
-
-    protected String username;
-    protected long uid;
-    protected long gid;
-    protected long[] groups;
-
-    /**
-     * Instantiate a {@code SolarisSystem} and load
-     * the native library to access the underlying system information.
-     */
-    public SolarisSystem() {
-        System.loadLibrary("jaas_unix");
-        getSolarisInfo();
-    }
-
-    /**
-     * Get the username for the current Solaris user.
-     *
-     * @return the username for the current Solaris user.
-     */
-    public String getUsername() {
-        return username;
-    }
-
-    /**
-     * Get the UID for the current Solaris user.
-     *
-     * @return the UID for the current Solaris user.
-     */
-    public long getUid() {
-        return uid;
-    }
-
-    /**
-     * Get the GID for the current Solaris user.
-     *
-     * @return the GID for the current Solaris user.
-     */
-    public long getGid() {
-        return gid;
-    }
-
-    /**
-     * Get the supplementary groups for the current Solaris user.
-     *
-     * @return the supplementary groups for the current Solaris user.
-     */
-    public long[] getGroups() {
-        return groups == null ? null : groups.clone();
-    }
-}
--- a/jdk/src/jdk.security.auth/solaris/native/libjaas/Solaris.c	Mon Aug 28 16:40:01 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include <jni.h>
-#include "com_sun_security_auth_module_SolarisSystem.h"
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* For POSIX-compliant getpwuid_r on Solaris */
-#if defined(__solaris__)
-#define _POSIX_PTHREAD_SEMANTICS
-#endif
-#include <pwd.h>
-
-static void throwIllegalArgumentException(JNIEnv *env, const char *msg) {
-    jclass clazz = (*env)->FindClass(env, "java/lang/IllegalArgumentException");
-    if (clazz != NULL)
-        (*env)->ThrowNew(env, clazz, msg);
-}
-
-JNIEXPORT void JNICALL
-Java_com_sun_security_auth_module_SolarisSystem_getSolarisInfo
-                                                (JNIEnv *env, jobject obj) {
-
-    int i;
-    long pwd_bufsize;
-    char *pwd_buf = NULL;
-    struct passwd pwd;
-    struct passwd* p = NULL;
-    jsize numSuppGroups = getgroups(0, NULL);
-    jfieldID fid;
-    jstring jstr;
-    jlongArray jgroups;
-    jlong *jgroupsAsArray;
-    gid_t *groups;
-    jclass cls;
-
-    pwd_bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);
-    if (pwd_bufsize == -1) {
-        pwd_bufsize = 1024;
-    }
-    pwd_buf = (char *)malloc(pwd_bufsize);
-    groups = (gid_t *)calloc(numSuppGroups, sizeof(gid_t));
-
-    if (pwd_buf == NULL || groups == NULL) {
-        if (pwd_buf != NULL) {
-            free(pwd_buf);
-        }
-        if (groups != NULL) {
-            free(groups);
-        }
-        cls = (*env)->FindClass(env,"java/lang/OutOfMemoryError");
-        if (cls != NULL) {
-            (*env)->ThrowNew(env, cls, NULL);
-        }
-        return;
-    }
-
-    cls = (*env)->GetObjectClass(env, obj);
-
-    if (getpwuid_r(getuid(), &pwd, pwd_buf, sizeof(pwd_buf), &p) != 0 &&
-        p != NULL && getgroups(numSuppGroups, groups) != -1) {
-
-        /*
-         * set username
-         */
-        fid = (*env)->GetFieldID(env, cls, "username", "Ljava/lang/String;");
-        if (fid == 0) {
-            (*env)->ExceptionClear(env);
-            throwIllegalArgumentException(env, "invalid field: username");
-            goto cleanupAndReturn;
-        }
-        jstr = (*env)->NewStringUTF(env, pwd.pw_name);
-        if (jstr == NULL) {
-            goto cleanupAndReturn;
-        }
-        (*env)->SetObjectField(env, obj, fid, jstr);
-
-        /*
-         * set uid
-         */
-        fid = (*env)->GetFieldID(env, cls, "uid", "J");
-        if (fid == 0) {
-            (*env)->ExceptionClear(env);
-            throwIllegalArgumentException(env, "invalid field: uid");
-            goto cleanupAndReturn;
-        }
-        (*env)->SetLongField(env, obj, fid, pwd.pw_uid);
-
-        /*
-         * set gid
-         */
-        fid = (*env)->GetFieldID(env, cls, "gid", "J");
-        if (fid == 0) {
-            (*env)->ExceptionClear(env);
-            throwIllegalArgumentException(env, "invalid field: gid");
-            goto cleanupAndReturn;
-        }
-        (*env)->SetLongField(env, obj, fid, pwd.pw_gid);
-
-        /*
-         * set supplementary groups
-         */
-        fid = (*env)->GetFieldID(env, cls, "groups", "[J");
-        if (fid == 0) {
-            (*env)->ExceptionClear(env);
-            throwIllegalArgumentException(env, "invalid field: groups");
-            goto cleanupAndReturn;
-        }
-
-        jgroups = (*env)->NewLongArray(env, numSuppGroups);
-        if (jgroups == NULL) {
-            goto cleanupAndReturn;
-        }
-        jgroupsAsArray = (*env)->GetLongArrayElements(env, jgroups, 0);
-        if (jgroupsAsArray == NULL) {
-            goto cleanupAndReturn;
-        }
-        for (i = 0; i < numSuppGroups; i++)
-            jgroupsAsArray[i] = groups[i];
-        (*env)->ReleaseLongArrayElements(env, jgroups, jgroupsAsArray, 0);
-        (*env)->SetObjectField(env, obj, fid, jgroups);
-    }
-cleanupAndReturn:
-    free(pwd_buf);
-    free(groups);
-    return;
-}
--- a/jdk/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipPath.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipPath.java	Mon Aug 28 21:46:13 2017 +0200
@@ -310,7 +310,10 @@
 
     @Override
     public boolean startsWith(Path other) {
-        final ZipPath o = checkPath(other);
+        Objects.requireNonNull(other, "other");
+        if (!(other instanceof ZipPath))
+            return false;
+        final ZipPath o = (ZipPath)other;
         if (o.isAbsolute() != this.isAbsolute() ||
             o.path.length > this.path.length)
             return false;
@@ -327,7 +330,10 @@
 
     @Override
     public boolean endsWith(Path other) {
-        final ZipPath o = checkPath(other);
+        Objects.requireNonNull(other, "other");
+        if (!(other instanceof ZipPath))
+            return false;
+        final ZipPath o = (ZipPath)other;
         int olast = o.path.length - 1;
         if (olast > 0 && o.path[olast] == '/')
             olast--;
--- a/jdk/test/ProblemList.txt	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/ProblemList.txt	Mon Aug 28 21:46:13 2017 +0200
@@ -153,6 +153,7 @@
 com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java 8030957 aix-all
 com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java  8030957 aix-all
 sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java    8174734 generic-all
+sun/management/jdp/JdpOffTest.java                              8175542 generic-all
 
 ############################################################################
 
@@ -302,6 +303,14 @@
 
 com/sun/tools/attach/StartManagementAgent.java                  8179700 generic-all
 
+sun/tools/jhsdb/AlternateHashingTest.java                       8184042 macosx-all
+
+sun/tools/jhsdb/BasicLauncherTest.java                          8184042 macosx-all
+
+sun/tools/jhsdb/HeapDumpTest.java                               8184042 macosx-all
+
+sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java              8184042 macosx-all
+
 ############################################################################
 
 # jdk_other
--- a/jdk/test/TEST.ROOT	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/TEST.ROOT	Mon Aug 28 21:46:13 2017 +0200
@@ -11,7 +11,7 @@
 #
 # A "headful" test requires a graphical environment to meaningfully
 # run. Tests that are not headful are "headless".
-# A test flagged with key "printer" requires a printer to succeed, else 
+# A test flagged with key "printer" requires a printer to succeed, else
 # throws a PrinterException or the like.
 
 keys=2d dnd headful i18n intermittent printer randomness
@@ -28,8 +28,8 @@
 # Allow querying of various System properties in @requires clauses
 requires.properties=sun.arch.data.model java.runtime.name
 
-# Tests using jtreg 4.2 b07 features
-requiredVersion=4.2 b07
+# Minimum jtreg version
+requiredVersion=4.2 b08
 
 # Path to libraries in the topmost test directory. This is needed so @library
 # does not need ../../ notation to reach them
--- a/jdk/test/com/sun/jdi/JdbExprTest.sh	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/com/sun/jdi/JdbExprTest.sh	Mon Aug 28 21:46:13 2017 +0200
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 #  @test
 #  @bug 4660158
 #  @author Staffan Larsen
+#  @requires os.family != "windows"
 #  @key intermittent
 #  @run shell JdbExprTest.sh
 
--- a/jdk/test/java/lang/String/concat/StringConcatFactoryInvariants.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/java/lang/String/concat/StringConcatFactoryInvariants.java	Mon Aug 28 21:46:13 2017 +0200
@@ -70,7 +70,33 @@
         String methodName = "foo";
         MethodType mt = MethodType.methodType(String.class, String.class, int.class);
         String recipe = "" + TAG_ARG + TAG_ARG + TAG_CONST;
-        String[] constants = new String[]{"bar"};
+        Object[][] constants = new Object[][] {
+                new String[] { "bar" },
+                new Integer[] { 1 },
+                new Short[] { 2 },
+                new Long[] { 3L },
+                new Boolean[] { true },
+                new Character[] { 'a' },
+                new Byte[] { -128 },
+                new Class[] { String.class },
+                new MethodHandle[] { MethodHandles.constant(String.class, "constant") },
+                new MethodType[] { MethodType.methodType(String.class) }
+        };
+        // The string representation that should end up if the corresponding
+        // Object[] in constants is used as an argument to makeConcatWithConstants
+        String[] constantString = new String[] {
+                "bar",
+                "1",
+                "2",
+                "3",
+                "true",
+                "a",
+                "-128",
+                "class java.lang.String",
+                "MethodHandle()String",
+                "()String"
+        };
+
 
         final int LIMIT = 200;
 
@@ -109,8 +135,10 @@
         }
 
         {
-            CallSite cs = StringConcatFactory.makeConcatWithConstants(lookup, methodName, mt, recipe, constants);
-            test("foo42bar", (String) cs.getTarget().invokeExact("foo", 42));
+            for (int i = 0; i < constants.length; i++) {
+                CallSite cs = StringConcatFactory.makeConcatWithConstants(lookup, methodName, mt, recipe, constants[i]);
+                test("foo42".concat(constantString[i]), (String) cs.getTarget().invokeExact("foo", 42));
+            }
         }
 
         // Simple factory, check for nulls:
@@ -124,20 +152,27 @@
                 () -> StringConcatFactory.makeConcat(lookup, methodName, null));
 
         // Advanced factory, check for nulls:
-        failNPE("Lookup is null",
-                () -> StringConcatFactory.makeConcatWithConstants(null, methodName, mt, recipe, constants));
+        for (int i = 0; i < constants.length; i++) {
+            final Object[] consts = constants[i];
 
-        failNPE("Method name is null",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, null, mt, recipe, constants));
+            failNPE("Lookup is null",
+                    () -> StringConcatFactory.makeConcatWithConstants(null, methodName, mt, recipe, consts));
 
-        failNPE("MethodType is null",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, null, recipe, constants));
+            failNPE("Method name is null",
+                    () -> StringConcatFactory.makeConcatWithConstants(lookup, null, mt, recipe, consts));
 
-        failNPE("Recipe is null",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mt, null, constants));
+            failNPE("MethodType is null",
+                    () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, null, recipe, consts));
+
+            failNPE("Recipe is null",
+                    () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mt, null, consts));
+        }
 
         failNPE("Constants vararg is null",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mt, recipe, null));
+                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mt, recipe, (Object[]) null));
+
+        failNPE("Constant argument is null",
+                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mt, recipe, new Object[] { null }));
 
         // Simple factory, check for return type
         fail("Return type: void",
@@ -159,23 +194,26 @@
                 () -> StringConcatFactory.makeConcat(lookup, methodName, MethodType.methodType(Serializable.class, String.class, int.class)));
 
         // Advanced factory, check for return types
-        fail("Return type: void",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(void.class, String.class, int.class), recipe, constants));
+        for (int i = 0; i < constants.length; i++) {
+            final Object[] consts = constants[i];
+            fail("Return type: void",
+                    () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(void.class, String.class, int.class), recipe, consts));
 
-        fail("Return type: int",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(int.class, String.class, int.class), recipe, constants));
-
-        fail("Return type: StringBuilder",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(StringBuilder.class, String.class, int.class), recipe, constants));
+            fail("Return type: int",
+                    () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(int.class, String.class, int.class), recipe, consts));
 
-        ok("Return type: Object",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(Object.class, String.class, int.class), recipe, constants));
+            fail("Return type: StringBuilder",
+                    () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(StringBuilder.class, String.class, int.class), recipe, consts));
+
+            ok("Return type: Object",
+                    () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(Object.class, String.class, int.class), recipe, consts));
 
-        ok("Return type: CharSequence",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(CharSequence.class, String.class, int.class), recipe, constants));
+            ok("Return type: CharSequence",
+                    () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(CharSequence.class, String.class, int.class), recipe, consts));
 
-        ok("Return type: Serializable",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(Serializable.class, String.class, int.class), recipe, constants));
+            ok("Return type: Serializable",
+                    () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(Serializable.class, String.class, int.class), recipe, consts));
+        }
 
         // Simple factory: check for dynamic arguments overflow
         ok("Dynamic arguments is under limit",
@@ -189,13 +227,13 @@
 
         // Advanced factory: check for dynamic arguments overflow
         ok("Dynamic arguments is under limit",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtUnderThreshold, recipeUnderThreshold, constants));
+                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtUnderThreshold, recipeUnderThreshold, constants[0]));
 
         ok("Dynamic arguments is at the limit",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeThreshold, constants));
+                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeThreshold, constants[0]));
 
         fail("Dynamic arguments is over the limit",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtOverThreshold, recipeOverThreshold, constants));
+                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtOverThreshold, recipeOverThreshold, constants[0]));
 
         // Advanced factory: check for mismatched recipe and Constants
         ok("Static arguments and recipe match",
@@ -206,17 +244,17 @@
 
         // Advanced factory: check for mismatched recipe and dynamic arguments
         fail("Dynamic arguments and recipe mismatch",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeUnderThreshold, constants));
+                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeUnderThreshold, constants[0]));
 
         ok("Dynamic arguments and recipe match",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeThreshold, constants));
+                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeThreshold, constants[0]));
 
         fail("Dynamic arguments and recipe mismatch",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeOverThreshold, constants));
+                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeOverThreshold, constants[0]));
 
         // Test passing array as constant
         {
-            String[] arg = {"boo", "bar"};
+            Object[] arg = {"boo", "bar"};
 
             CallSite cs1 = StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(String.class, int.class), "" + TAG_ARG + TAG_CONST + TAG_CONST, arg);
             test("42boobar", (String) cs1.getTarget().invokeExact(42));
@@ -227,7 +265,7 @@
                 () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(String.class, int.class), "" + TAG_ARG + TAG_CONST, "foo"));
 
         failNPE("Cannot pass null constants",
-                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(String.class, int.class), "" + TAG_ARG + TAG_CONST, new String[]{null}));
+                () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(String.class, int.class), "" + TAG_ARG + TAG_CONST, new Object[]{null}));
 
         // Simple factory: test empty arguments
         ok("Ok to pass empty arguments",
--- a/jdk/test/java/net/httpclient/http2/FixedThreadPoolTest.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/java/net/httpclient/http2/FixedThreadPoolTest.java	Mon Aug 28 21:46:13 2017 +0200
@@ -23,8 +23,7 @@
 
 /*
  * @test
- * @bug 8087112
- * @key intermittent
+ * @bug 8087112 8177935
  * @library /lib/testlibrary server
  * @build jdk.testlibrary.SimpleSSLContext
  * @modules jdk.incubator.httpclient/jdk.incubator.http.internal.common
--- a/jdk/test/java/security/Provider/SecurityProviderModularTest.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/java/security/Provider/SecurityProviderModularTest.java	Mon Aug 28 21:46:13 2017 +0200
@@ -24,318 +24,362 @@
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
+import java.nio.file.StandardCopyOption;
+import java.security.Security;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Arrays;
+import java.util.stream.Stream;
+import java.io.File;
 import java.io.IOException;
+import java.io.OutputStream;
 import java.lang.module.ModuleDescriptor;
-import jdk.testlibrary.ProcessTools;
-import jdk.testlibrary.OutputAnalyzer;
-import jdk.test.lib.compiler.CompilerUtils;
-import org.testng.annotations.BeforeTest;
+import java.lang.module.ModuleDescriptor.Builder;
+import jdk.internal.module.ModuleInfoWriter;
+import jdk.test.lib.process.ProcessTools;
 
-/**
- * @test
- * @bug 8130360
- * @library /lib/testlibrary
- * @library /java/security/modules
- * @library /test/lib
- * @modules java.base/jdk.internal.module
- * @build jdk.test.lib.compiler.CompilerUtils JarUtils
- * @summary Test custom security provider module with all possible modular
- *          condition. The test includes different combination of security
- *          client/provider modules interaction with or without service
- *          description.
- * @run testng SecurityProviderModularTest
- */
-public class SecurityProviderModularTest extends ModularTest {
-
-    private static final Path S_SRC = SRC.resolve("TestSecurityProvider.java");
-    private static final String S_PKG = "provider";
-    private static final String S_JAR_NAME = S_PKG + JAR_EXTN;
-    private static final String S_WITH_DESCR_JAR_NAME = S_PKG + DESCRIPTOR
-            + JAR_EXTN;
-    private static final String MS_JAR_NAME = MODULAR + S_PKG + JAR_EXTN;
-    private static final String MS_WITH_DESCR_JAR_NAME = MODULAR + S_PKG
-            + DESCRIPTOR + JAR_EXTN;
-
-    private static final Path C_SRC = SRC.resolve(
-            "TestSecurityProviderClient.java");
-    private static final String C_PKG = "client";
-    private static final String C_JAR_NAME = C_PKG + JAR_EXTN;
-    private static final String MCN_JAR_NAME = MODULAR + C_PKG + "N" + JAR_EXTN;
-    private static final String MC_JAR_NAME = MODULAR + C_PKG + JAR_EXTN;
 
-    private static final Path BUILD_DIR = Paths.get(".").resolve("build");
-    private static final Path COMPILE_DIR = BUILD_DIR.resolve("bin");
-    private static final Path S_BUILD_DIR = COMPILE_DIR.resolve(S_PKG);
-    private static final Path S_WITH_META_DESCR_BUILD_DIR = COMPILE_DIR.resolve(
-            S_PKG + DESCRIPTOR);
-    private static final Path C_BLD_DIR = COMPILE_DIR.resolve(C_PKG);
-    private static final Path M_BASE_PATH = BUILD_DIR.resolve("mbase");
-    private static final Path ARTIFACTS_DIR = BUILD_DIR.resolve("artifacts");
-
-    private static final Path S_ARTIFACTS_DIR = ARTIFACTS_DIR.resolve(S_PKG);
-    private static final Path S_JAR = S_ARTIFACTS_DIR.resolve(S_JAR_NAME);
-    private static final Path S_WITH_DESCRIPTOR_JAR = S_ARTIFACTS_DIR.resolve(
-            S_WITH_DESCR_JAR_NAME);
-    private static final Path MS_JAR = S_ARTIFACTS_DIR.resolve(
-            MS_JAR_NAME);
-    private static final Path MS_WITH_DESCR_JAR = S_ARTIFACTS_DIR.resolve(
-            MS_WITH_DESCR_JAR_NAME);
+/*
+ * @test
+ * @bug 8130360 8183310
+ * @summary Test security provider in different combination of modular option
+ *          defined with(out) service description.
+ * @library /lib/testlibrary /test/lib
+ * @modules java.base/jdk.internal.module
+ * @build JarUtils TestProvider TestClient
+ * @run main SecurityProviderModularTest CL true
+ * @run main SecurityProviderModularTest CL false
+ * @run main SecurityProviderModularTest SL true
+ * @run main SecurityProviderModularTest SL false
+ * @run main SecurityProviderModularTest SPN true
+ * @run main SecurityProviderModularTest SPN false
+ * @run main SecurityProviderModularTest SPT true
+ * @run main SecurityProviderModularTest SPT false
+ */
+public class SecurityProviderModularTest {
 
-    private static final Path C_ARTIFACTS_DIR = ARTIFACTS_DIR.resolve(C_PKG);
-    private static final Path C_JAR = C_ARTIFACTS_DIR.resolve(C_JAR_NAME);
-    private static final Path MC_JAR = C_ARTIFACTS_DIR.resolve(MC_JAR_NAME);
-    private static final Path MCN_JAR = C_ARTIFACTS_DIR.resolve(MCN_JAR_NAME);
-
-    private static final String MAIN = C_PKG + ".TestSecurityProviderClient";
-    private static final String S_INTERFACE = "java.security.Provider";
-    private static final String S_IMPL = S_PKG + ".TestSecurityProvider";
-    private static final List<String> M_REQUIRED = Arrays.asList("java.base");
-    private static final Path META_DESCR_PATH = Paths.get("META-INF")
-            .resolve("services").resolve(S_INTERFACE);
-    private static final Path S_META_DESCR_FPATH = S_WITH_META_DESCR_BUILD_DIR
-            .resolve(META_DESCR_PATH);
-
-    private static final boolean WITH_S_DESCR = true;
-    private static final boolean WITHOUT_S_DESCR = false;
-    private static final String PROVIDER_NOT_FOUND_MSG = "Unable to find Test"
-            + " Security Provider";
-    private static final String CAN_NOT_ACCESS_MSG = "cannot access class";
-    private static final String NO_FAILURE = null;
-    private static final String SERVICE_LOADER = "SERVICE_LOADER";
-    private static final String CLASS_LOADER = "CLASS_LOADER";
-    private static final String SECURITY_PROP = "SECURITY_PROP";
-    private static final List<String> MECHANISMS = Arrays.asList(SERVICE_LOADER,
-            CLASS_LOADER, SECURITY_PROP);
-    private static final Path SECURE_PROP_EXTN = Paths.get("./java.secure.ext");
+    private static final Path TEST_CLASSES
+            = Paths.get(System.getProperty("test.classes"));
+    private static final Path ARTIFACT_DIR = Paths.get("jars");
+    private static final Path SEC_FILE = Paths.get("java.extn.security");
+    private static final String PS = File.pathSeparator;
+    private static final String P_TYPE = "p.TestProvider";
+    private static final String C_TYPE = "c.TestClient";
 
     /**
-     * Generates Test specific input parameters.
+     * Here is the naming convention followed.
+     * Test runtime arguments,
+     * CL       - Provider class loaded through ClassLoader
+     * SL       - Provider class to be discovered by ServiceLoader
+     * SPN      - Provider name defined through "java.extn.security" file which
+     *            referred through system property "java.security.properties".
+     * SPT      - Provider type defined through "java.extn.security" file which
+     *            referred through system property "java.security.properties".
+     *
+     * For each jar file name,
+     * p.jar    - Unnamed provider jar.
+     * pd.jar   - Unnamed provider jar with META-INF provider descriptor.
+     * mp.jar   - Modular provider jar.
+     * mpd.jar  - Modular provider jar with META-INF provider descriptor.
+     * msp.jar  - Modular provider jar provides service through module-info.java
+     * mspd.jar - Modular provider jar with META-INF provider descriptor and
+     *            provides service through module-info.java.
+     * c.jar    - Unnamed client jar.
+     * mc.jar   - Modular client jar.
+     * mcs.jar  - Modular client jar uses service through module-info.java.
+     * amc.jar  - Modular client used for automatic provider jar.
+     * amcs.jar - Modular client used for automatic provider jar uses service
+     *            through module-info.java.
      */
-    @Override
-    public Object[][] getTestInput() {
+    private static final Path P_JAR = artifact("p.jar");
+    private static final Path PD_JAR = artifact("pd.jar");
+    private static final Path MP_JAR = artifact("mp.jar");
+    private static final Path MPD_JAR = artifact("mpd.jar");
+    private static final Path MSP_JAR = artifact("msp.jar");
+    private static final Path MSPD_JAR = artifact("mspd.jar");
+    private static final Path C_JAR = artifact("c.jar");
+    private static final Path MC_JAR = artifact("mc.jar");
+    private static final Path MCS_JAR = artifact("mcs.jar");
+    private static final Path AMC_JAR = artifact("amc.jar");
+    private static final Path AMCS_JAR = artifact("amcs.jar");
+    private static final Map<String, String> MSG_MAP = new HashMap<>();
 
-        List<List<Object>> params = new ArrayList<>();
-        MECHANISMS.stream().forEach((mechanism) -> {
-            boolean useCLoader = CLASS_LOADER.equals(mechanism);
-            boolean useSLoader = SERVICE_LOADER.equals(mechanism);
-            String[] args = new String[]{mechanism};
-            // PARAMETER ORDERS -
-            // Client Module Type, Service Module Type,
-            // If Service META Descriptor Required,
-            // Expected Failure message, mechanism used to find the provider
-            params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.EXPLICIT,
-                    WITH_S_DESCR, NO_FAILURE, args));
-            params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.EXPLICIT,
-                    WITHOUT_S_DESCR, NO_FAILURE, args));
-            params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.AUTO,
-                    WITH_S_DESCR, ((useCLoader) ? CAN_NOT_ACCESS_MSG
-                            : NO_FAILURE), args));
-            params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.AUTO,
-                    WITHOUT_S_DESCR, ((useCLoader) ? CAN_NOT_ACCESS_MSG
-                            : PROVIDER_NOT_FOUND_MSG), args));
-            params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.UNNAMED,
-                    WITH_S_DESCR, ((useCLoader) ? CAN_NOT_ACCESS_MSG
-                            : NO_FAILURE), args));
-            params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.UNNAMED,
-                    WITHOUT_S_DESCR, ((useCLoader) ? CAN_NOT_ACCESS_MSG
-                            : ((useSLoader) ? PROVIDER_NOT_FOUND_MSG
-                                    : NO_FAILURE)), args));
+    static {
+        /*
+         * This mapping help process finding expected message based
+         * on the key passed as argument while executing java command.
+         */
+        MSG_MAP.put("NoAccess", "cannot access class p.TestProvider");
+        MSG_MAP.put("Success", "Client: found provider TestProvider");
+        MSG_MAP.put("NoProvider", "Provider TestProvider not found");
+    }
+
+    private final String addUNArg;
+    private final String addNMArg;
+    private final String cArg;
+    private final String unnP;
+    private final String modP;
+    private final String unnC;
+    private final String modC;
+    private final String autoMC;
+    private final String expModRes;
+    private final String expAModRes;
+    // Common set of VM arguments used in all test cases
+    private final List<String> commonArgs;
+
+    public SecurityProviderModularTest(String use, boolean metaDesc) {
+
+        List<String> argList = new LinkedList<>();
+        argList.add("-Duser.language=en");
+        argList.add("-Duser.region=US");
+        final boolean useSL = "SL".equals(use) || "SPN".equals(use);
+        final boolean useCL = "CL".equals(use);
+        final boolean useSPT = "SPT".equals(use);
+        final boolean useSP = use.startsWith("SP");
+        /* Use Security property file when the provider expected to
+         * loaded through Security property file. */
+        if (useSP) {
+            /* Create a java.security file to specify the new provider.
+             * java.security file extension can be provided using
+             * "-Djava.security.properties" VM argument at runtime.*/
+            createJavaSecurityFileExtn("SPN".equals(use));
+            argList.add("-Djava.security.properties=" + toAbsPath(SEC_FILE));
+        }
+        commonArgs = Collections.unmodifiableList(argList);
+        cArg = (useCL) ? P_TYPE : "TestProvider";
+        addUNArg = (useSL) ? "" : ("--add-modules="
+                + ((metaDesc) ? "pd" : "p"));
+        addNMArg = (useSL) ? "" : "--add-modules=mp";
 
-            params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.EXPLICIT,
-                    WITH_S_DESCR, NO_FAILURE, args));
-            params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.EXPLICIT,
-                    WITHOUT_S_DESCR, NO_FAILURE, args));
-            params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.AUTO,
-                    WITH_S_DESCR, NO_FAILURE, args));
-            params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.AUTO,
-                    WITHOUT_S_DESCR,
-                    (useCLoader) ? NO_FAILURE : PROVIDER_NOT_FOUND_MSG, args));
-            params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.UNNAMED,
-                    WITH_S_DESCR, NO_FAILURE, args));
-            params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.UNNAMED,
-                    WITHOUT_S_DESCR, ((useSLoader) ? PROVIDER_NOT_FOUND_MSG
-                            : NO_FAILURE), args));
+        // Based on Testcase, select unnamed/modular jar files to use.
+        unnP = toAbsPath((metaDesc) ? PD_JAR : P_JAR);
+        modP = toAbsPath(useSL ? (metaDesc ? MSPD_JAR : MSP_JAR)
+                : (metaDesc ? MPD_JAR : MP_JAR));
+        unnC = toAbsPath(C_JAR);
+        modC = toAbsPath(useSL ? MCS_JAR : MC_JAR);
+        autoMC = toAbsPath(useSL ? AMCS_JAR : AMC_JAR);
+
+        expModRes = "Success";
+        expAModRes = (useSPT | useCL) ? "Success"
+                : (metaDesc) ? "Success" : "NoProvider";
+        String loadByMsg = useSP ? "SecurityPropertyFile"
+                : ((useCL) ? "ClassLoader" : "ServiceLoader");
+        System.out.printf("%n*** Providers loaded through %s and includes"
+                + " META Descriptor: %s ***%n%n", loadByMsg, metaDesc);
+    }
+
+    /*
+     * Test cases are based on the following logic,
+     * for (ProviderLoadedThrough : {"ServiceLoader", "ClassLoader",
+     *             "SecurityPropertyFile"}) {
+     *     for (definedWith : {"METAINFService", "WithoutMETAINFService"}) {
+     *         for (clientType : {"NAMED", "AUTOMATIC", "UNNAMED"}) {
+     *             for (providerType : {"NAMED", "AUTOMATIC", "UNNAMED"}) {
+     *                 Create and run java command for each possible case
+     *             }
+     *         }
+     *     }
+     * }
+     */
+    public static void main(String[] args) throws Exception {
+
+        // Generates unnamed and modular jars.
+        setUp();
+        boolean metaDesc = Boolean.valueOf(args[1]);
+        SecurityProviderModularTest test
+                = new SecurityProviderModularTest(args[0], metaDesc);
+        test.process(args[0]);
+    }
+
+    private void process(String use) throws Exception {
 
-            params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.EXPLICIT,
-                    WITH_S_DESCR, NO_FAILURE, args));
-            params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.EXPLICIT,
-                    WITHOUT_S_DESCR, NO_FAILURE, args));
-            params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.AUTO,
-                    WITH_S_DESCR, NO_FAILURE, args));
-            params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.AUTO,
-                    WITHOUT_S_DESCR,
-                    (useCLoader) ? NO_FAILURE : PROVIDER_NOT_FOUND_MSG, args));
-            params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.UNNAMED,
-                    WITH_S_DESCR, NO_FAILURE, args));
-            params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.UNNAMED,
-                    WITHOUT_S_DESCR, ((useSLoader) ? PROVIDER_NOT_FOUND_MSG
-                            : NO_FAILURE), args));
-        });
-        return params.stream().map(p -> p.toArray()).toArray(Object[][]::new);
+        // Case: NAMED-NAMED, NAMED-AUTOMATIC, NAMED-UNNAMED
+        System.out.printf("Case: Modular Client and Modular Provider");
+        execute(String.format("--module-path %s%s%s -m mc/%s %s %s",
+                modC, PS, modP, C_TYPE, use, cArg), expModRes);
+        System.out.printf("Case: Modular Client and automatic Provider");
+        execute(String.format("--module-path %s%s%s %s -m mc/%s %s %s", autoMC,
+                PS, unnP, addUNArg, C_TYPE, use, cArg), expAModRes);
+        System.out.printf("Case: Modular Client and unnamed Provider");
+        execute(String.format("--module-path %s -cp %s -m mc/%s %s %s", autoMC,
+                unnP, C_TYPE, use, cArg), expAModRes);
+
+        // Case: AUTOMATIC-NAMED, AUTOMATIC-AUTOMATIC, AUTOMATIC-UNNAMED
+        System.out.printf("Case: Automatic Client and modular Provider");
+        execute(String.format("--module-path %s%s%s %s -m c/%s %s %s", unnC,
+                PS, modP, addNMArg, C_TYPE, use, cArg), expModRes);
+        System.out.printf("Case: Automatic Client and automatic Provider");
+        execute(String.format("--module-path %s%s%s %s -m c/%s %s %s", unnC,
+                PS, unnP, addUNArg, C_TYPE, use, cArg), expAModRes);
+        System.out.printf("Case: Automatic Client and unnamed Provider");
+        execute(String.format("--module-path %s -cp %s -m c/%s %s %s", unnC,
+                unnP, C_TYPE, use, cArg), expAModRes);
+
+        // Case: UNNAMED-NAMED, UNNAMED-AUTOMATIC, UNNAMED-UNNAMED
+        System.out.printf("Case: Unnamed Client and modular Provider");
+        execute(String.format("-cp %s --module-path %s %s %s %s %s", unnC,
+                modP, addNMArg, C_TYPE, use, cArg), expModRes);
+        System.out.printf("Case: Unnamed Client and automatic Provider");
+        execute(String.format("-cp %s --module-path %s %s %s %s %s", unnC,
+                unnP, addUNArg, C_TYPE, use, cArg), expAModRes);
+        System.out.printf("Case: Unnamed Client and unnamed Provider");
+        execute(String.format("-cp %s%s%s %s %s %s", unnC, PS, unnP, C_TYPE,
+                use, cArg), expAModRes);
+
+        // Case: unnamed jars in --module-path and modular jars in -cp.
+        System.out.printf(
+                "Case: Unnamed Client and Unnamed Provider in modulepath");
+        execute(String.format("--module-path %s%s%s %s -m c/%s %s %s", unnC,
+                PS, unnP, addUNArg, C_TYPE, use, cArg), expAModRes);
+        System.out.printf(
+                "Case: Modular Client and Modular Provider in classpath");
+        execute(String.format("-cp %s%s%s %s %s %s", modC, PS, modP, C_TYPE,
+                use, cArg), expAModRes);
     }
 
     /**
-     * Pre-compile and generate the artifacts required to run this test before
-     * running each test cases.
+     * Execute with command arguments and process the result.
      */
-    @BeforeTest
-    public void buildArtifacts() {
-
-        boolean done = true;
-        try {
+    private void execute(String args, String msgKey) throws Exception {
 
-            done &= CompilerUtils.compile(S_SRC, S_BUILD_DIR);
-            done &= CompilerUtils.compile(S_SRC, S_WITH_META_DESCR_BUILD_DIR);
-            done &= createMetaInfServiceDescriptor(S_META_DESCR_FPATH, S_IMPL);
-            // Generate modular/regular jars with(out) META-INF
-            // service descriptor
-            generateJar(true, MODULE_TYPE.EXPLICIT, MS_JAR, S_BUILD_DIR, false);
-            generateJar(true, MODULE_TYPE.EXPLICIT, MS_WITH_DESCR_JAR,
-                    S_WITH_META_DESCR_BUILD_DIR, false);
-            generateJar(true, MODULE_TYPE.UNNAMED, S_JAR, S_BUILD_DIR, false);
-            generateJar(true, MODULE_TYPE.UNNAMED, S_WITH_DESCRIPTOR_JAR,
-                    S_WITH_META_DESCR_BUILD_DIR, false);
-            // Compile client source codes.
-            done &= CompilerUtils.compile(C_SRC, C_BLD_DIR, "-cp",
-                    S_JAR.toFile().getCanonicalPath());
-            // Generate modular client jar with explicit dependency
-            generateJar(false, MODULE_TYPE.EXPLICIT, MC_JAR, C_BLD_DIR, true);
-            // Generate modular client jar without any dependency
-            generateJar(false, MODULE_TYPE.EXPLICIT, MCN_JAR, C_BLD_DIR, false);
-            // Generate regular client jar
-            generateJar(false, MODULE_TYPE.UNNAMED, C_JAR, C_BLD_DIR, false);
-            System.out.format("%nArtifacts generated successfully? %s", done);
-            if (!done) {
-                throw new RuntimeException("Artifacts generation failed");
+        String[] safeArgs = Stream.concat(commonArgs.stream(),
+                Stream.of(args.split("\\s+"))).filter(s -> {
+            if (s.contains(" ")) {
+                throw new RuntimeException("No spaces in args");
             }
-        } catch (IOException e) {
-            throw new RuntimeException(e);
+            return !s.isEmpty();
+        }).toArray(String[]::new);
+        String out = ProcessTools.executeTestJvm(safeArgs).getOutput();
+        // Handle response.
+        if ((msgKey != null && out.contains(MSG_MAP.get(msgKey)))) {
+            System.out.printf("PASS: Expected Result: %s.%n",
+                    MSG_MAP.get(msgKey));
+        } else if (out.contains("Exception") || out.contains("Error")) {
+            System.out.printf("OUTPUT: %s", out);
+            throw new RuntimeException("FAIL: Unknown Exception occured. "
+                    + "Expected: " + MSG_MAP.get(msgKey));
+        } else {
+            System.out.printf("OUTPUT: %s", out);
+            throw new RuntimeException("FAIL: Unknown Test case found");
         }
     }
 
     /**
-     * Generate modular/regular jar based on module type for this test.
+     * Creates Unnamed/modular jar files for TestClient and TestClassLoader.
      */
-    private void generateJar(boolean isService, MODULE_TYPE moduleType,
-            Path jar, Path compilePath, boolean depends) throws IOException {
+    private static void setUp() throws Exception {
 
-        ModuleDescriptor mDescriptor = null;
-        if (isService) {
-            mDescriptor = generateModuleDescriptor(isService, moduleType, S_PKG,
-                    S_PKG, S_INTERFACE, S_IMPL, null, M_REQUIRED, depends);
-        } else {
-            mDescriptor = generateModuleDescriptor(isService, moduleType, C_PKG,
-                    C_PKG, S_INTERFACE, null, S_PKG, M_REQUIRED, depends);
+        if (ARTIFACT_DIR.toFile().exists()) {
+            System.out.println("Skipping setup: Artifacts already exists.");
+            return;
         }
-        generateJar(mDescriptor, jar, compilePath);
-    }
+        // Generate unnamed provider jar file.
+        JarUtils.createJarFile(P_JAR, TEST_CLASSES, "p/TestProvider.class");
+        // Generate unnamed client jar file.
+        JarUtils.createJarFile(C_JAR, TEST_CLASSES, "c/TestClient.class");
+        // Generate unnamed provider jar files with META-INF descriptor.
+        generateJar(P_JAR, PD_JAR, null, true);
 
-    /**
-     * Holds Logic for the test. This method will get called with each test
-     * parameter.
-     */
-    @Override
-    public OutputAnalyzer executeTestClient(MODULE_TYPE cModuleType,
-            Path cJarPath, MODULE_TYPE sModuletype, Path sJarPath,
-            String... args) throws Exception {
+        Builder mBuilder = ModuleDescriptor.newModule("mp").exports("p");
+        // Modular provider defined as META-INF service.
+        generateJar(P_JAR, MPD_JAR, mBuilder.build(), true);
+        // Modular jar exports package to let the provider type accessible.
+        generateJar(P_JAR, MP_JAR, mBuilder.build(), false);
 
-        OutputAnalyzer output = null;
-        try {
-            // For automated/explicit module types, copy the corresponding
-            // jars to module base folder, which will be considered as
-            // module base path during execution.
-            if (!(cModuleType == MODULE_TYPE.UNNAMED
-                    && sModuletype == MODULE_TYPE.UNNAMED)) {
-                copyJarsToModuleBase(cModuleType, cJarPath, M_BASE_PATH);
-                copyJarsToModuleBase(sModuletype, sJarPath, M_BASE_PATH);
-            }
+        mBuilder = ModuleDescriptor.newModule("mp")
+                .provides("java.security.Provider", Arrays.asList(P_TYPE));
+        // Modular provider Service in module-info does not need to export
+        // its package.
+        generateJar(P_JAR, MSP_JAR, mBuilder.build(), false);
+        // Modular provider Service in module-info also have META-INF descriptor
+        generateJar(P_JAR, MSPD_JAR, mBuilder.build(), true);
 
-            System.out.format("%nExecuting java client with required"
-                    + " custom security provider in class/module path.");
-            String mName = getModuleName(cModuleType, cJarPath, C_PKG);
-            Path cmBasePath = (cModuleType != MODULE_TYPE.UNNAMED
-                    || sModuletype != MODULE_TYPE.UNNAMED) ? M_BASE_PATH : null;
-            String cPath = buildClassPath(cModuleType, cJarPath, sModuletype,
-                    sJarPath);
+        mBuilder = ModuleDescriptor.newModule("mc").exports("c");
+        // Generate modular client jar file to use automatic provider jar.
+        generateJar(C_JAR, AMC_JAR, mBuilder.build(), false);
+        // Generate modular client jar file to use modular provider jar.
+        generateJar(C_JAR, MC_JAR, mBuilder.requires("mp").build(), false);
 
-            Map<String, String> vmArgs = getVMArgs(sModuletype,
-                    getModuleName(sModuletype, sJarPath, S_PKG), args);
-            output = ProcessTools.executeTestJava(
-                    getJavaCommand(cmBasePath, cPath, mName, MAIN, vmArgs,
-                            args)).outputTo(System.out).errorTo(System.out);
-        } finally {
-            // Clean module path to hold required jars for next run.
-            cleanModuleBasePath(M_BASE_PATH);
-        }
-        return output;
+        mBuilder = ModuleDescriptor.newModule("mc").exports("c")
+                .uses("java.security.Provider");
+        // Generate modular client jar file to use automatic provider service.
+        generateJar(C_JAR, AMCS_JAR, mBuilder.build(), false);
+        // Generate modular client jar file using modular provider service.
+        generateJar(C_JAR, MCS_JAR, mBuilder.requires("mp").build(), false);
     }
 
     /**
-     * Decide the pre-generated client/service jar path for each test case
-     * based on client/service module type.
+     * Update Unnamed jars and include descriptor files.
      */
-    @Override
-    public Path findJarPath(boolean isService, MODULE_TYPE moduleType,
-            boolean addMetaDesc, boolean dependsOnServiceModule) {
-        if (isService) {
-            if (moduleType == MODULE_TYPE.EXPLICIT) {
-                if (addMetaDesc) {
-                    return MS_WITH_DESCR_JAR;
-                } else {
-                    return MS_JAR;
-                }
-            } else {
-                if (addMetaDesc) {
-                    return S_WITH_DESCRIPTOR_JAR;
-                } else {
-                    return S_JAR;
-                }
+    private static void generateJar(Path sjar, Path djar,
+            ModuleDescriptor mDesc, boolean metaDesc) throws Exception {
+
+        Files.copy(sjar, djar, StandardCopyOption.REPLACE_EXISTING);
+        Path dir = Files.createTempDirectory("tmp");
+        if (metaDesc) {
+            write(dir.resolve(Paths.get("META-INF", "services",
+                    "java.security.Provider")), P_TYPE);
+        }
+        if (mDesc != null) {
+            Path mi = dir.resolve("module-info.class");
+            try (OutputStream out = Files.newOutputStream(mi)) {
+                ModuleInfoWriter.write(mDesc, out);
             }
-        } else {
-            // Choose corresponding client jar to use dependent module
-            if (moduleType == MODULE_TYPE.EXPLICIT) {
-                if (dependsOnServiceModule) {
-                    return MC_JAR;
-                } else {
-                    return MCN_JAR;
-                }
-            } else {
-                return C_JAR;
-            }
+            System.out.format("Added 'module-info.class' in '%s'%n", djar);
         }
+        JarUtils.updateJarFile(djar, dir);
+    }
+
+    /**
+     * Look for file path in generated jars.
+     */
+    private static Path artifact(String file) {
+        return ARTIFACT_DIR.resolve(file);
+    }
+
+    /**
+     * Convert to absolute file path.
+     */
+    private static String toAbsPath(Path path) {
+        return path.toFile().getAbsolutePath();
     }
 
     /**
-     * VM argument required for the test.
+     * Create the parent directories if missing to ensure the path exist.
      */
-    private Map<String, String> getVMArgs(MODULE_TYPE sModuletype,
-            String addModName, String... args) throws IOException {
-        final Map<String, String> vmArgs = new LinkedHashMap<>();
-        vmArgs.put("-Duser.language=", "en");
-        vmArgs.put("-Duser.region=", "US");
-        if (addModName != null && sModuletype == MODULE_TYPE.AUTO) {
-            vmArgs.put("--add-modules=", addModName);
+    private static Path ensurePath(Path at) throws IOException {
+        Path parent = at.getParent();
+        if (parent != null && !parent.toFile().exists()) {
+            ensurePath(parent);
         }
-        // If mechanism selected to find the provider through
-        // Security.getProvider() then use providerName/ProviderClassName based
-        // on modular/regular provider jar in security configuration file.
-        if (args != null && args.length > 0 && SECURITY_PROP.equals(args[0])) {
-            if (sModuletype == MODULE_TYPE.UNNAMED) {
-                Files.write(SECURE_PROP_EXTN, ("security.provider.10=" + S_IMPL)
-                        .getBytes());
-            } else {
-                Files.write(SECURE_PROP_EXTN, "security.provider.10=TEST"
-                        .getBytes());
-            }
-            vmArgs.put("-Djava.security.properties=", SECURE_PROP_EXTN.toFile()
-                    .getCanonicalPath());
-        }
-        return vmArgs;
+        return Files.createDirectories(parent);
+    }
+
+    /**
+     * Generates service descriptor inside META-INF folder.
+     */
+    private static void write(Path at, String content) throws IOException {
+        ensurePath(at);
+        Files.write(at, content.getBytes("UTF-8"));
     }
 
+    /**
+     * Create new provider entry through java.security file extension.
+     * New provider entry will be the last entry inside the JRE.
+     */
+    private static void createJavaSecurityFileExtn(boolean useName) {
+        int insertAt = Security.getProviders().length + 1;
+        String provider = (useName ? "TestProvider" : P_TYPE);
+        try {
+            Files.write(SEC_FILE, String.format("security.provider.%s=%s",
+                    insertAt, provider).getBytes("UTF-8"));
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+        System.out.printf("Security property file created at: %s with value:"
+                + " %s%n", SEC_FILE, provider);
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/Provider/TestClient.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package c;
+
+import java.security.Provider;
+import java.security.Security;
+import java.util.Iterator;
+import java.util.ServiceLoader;
+
+/**
+ * A Test client using different mechanism to search the custom security
+ * provider. It uses ClassLoader, ServiceLoader and default mechanism to find
+ * a provider registered through "java.security" extension file.
+ */
+public class TestClient {
+
+    public static void main(String[] args) throws Exception {
+
+        Provider p = null;
+        if (args != null && args.length > 1) {
+            switch (args[0]) {
+                case "CL":
+                    p = (Provider) Class.forName(args[1]).newInstance();
+                    if (Security.addProvider(p) == -1) {
+                        throw new RuntimeException("Failed to add provider");
+                    }
+                    break;
+                case "SL":
+                    ServiceLoader<Provider> services
+                            = ServiceLoader.load(java.security.Provider.class);
+                    Iterator<Provider> iterator = services.iterator();
+                    while (iterator.hasNext()) {
+                        Provider spr = iterator.next();
+                        if (spr.getName().equals(args[1])) {
+                            p = spr;
+                            if (Security.addProvider(p) == -1) {
+                                throw new RuntimeException(
+                                        "Failed to add provider");
+                            }
+                            break;
+                        }
+                    }
+                    break;
+                case "SPN":
+                case "SPT":
+                    p = Security.getProvider(args[1]);
+                    break;
+                default:
+                    throw new RuntimeException("Invalid argument.");
+            }
+        }
+        if (p == null) {
+            throw new RuntimeException("Provider TestProvider not found");
+        }
+        System.out.printf("Client: found provider %s", p.getName());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/Provider/TestProvider.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2015, 2016, 2017 Oracle and/or its affiliates. All rights
+ * reserved. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 p;
+
+import java.security.Provider;
+
+/**
+ * Custom Security provider for modular test.
+ */
+public final class TestProvider extends Provider {
+
+    public TestProvider() {
+        super("TestProvider", "1.0", "Test Security provider");
+        System.out.println(String.format("TEST Security provider loaded"
+                + " successfully : %s", this.toString()));
+    }
+
+    @Override
+    public String toString() {
+        return "TestProvider [getName()=" + getName()
+                + ", getVersion()=" + getVersionStr() + ", getInfo()="
+                + getInfo() + ", toString()=" + super.toString() + "]";
+    }
+}
--- a/jdk/test/java/security/Provider/TestSecurityProvider.java	Mon Aug 28 16:40:01 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * 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 provider;
-
-import java.security.Provider;
-
-/**
- * Custom Security provider for modular test.
- */
-public final class TestSecurityProvider extends Provider {
-
-    public TestSecurityProvider() {
-        super("TEST", "1.0", "Test Security provider");
-        System.out.println(String.format("TEST Security provider loaded"
-                + " successfully : %s", this.toString()));
-    }
-
-    @Override
-    public String toString() {
-        return "TestSecurityProvider [getName()=" + getName()
-                + ", getVersion()=" + getVersionStr() + ", getInfo()="
-                + getInfo() + ", toString()=" + super.toString() + "]";
-    }
-
-}
--- a/jdk/test/java/security/Provider/TestSecurityProviderClient.java	Mon Aug 28 16:40:01 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * 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 client;
-
-import java.security.Provider;
-import java.security.Security;
-import java.util.Iterator;
-import java.util.ServiceLoader;
-
-/**
- * Modular test for client using different mechanism to find the custom security
- * provider. It uses ServiceLoader and ClassLoader to find the TEST provider
- * available in classPath/modulePath. It also tries to find, if the provider is
- * configured through "java.security" file.
- */
-public class TestSecurityProviderClient {
-
-    private static final String CUSTOM_PROVIDER_NAME = "TEST";
-    private static final String EXCEPTION_MESSAGE
-            = "Unable to find Test Security Provider";
-    private static final String SERVICE_LOADER = "SERVICE_LOADER";
-    private static final String CLASS_LOADER = "CLASS_LOADER";
-
-    public static void main(String[] args) {
-        Provider provider = null;
-        //Try to find the TEST provider loaded by ServiceLoader.
-        if (args != null && args.length > 0
-                && SERVICE_LOADER.equals(args[0])) {
-            System.out.println(
-                    "Using service loader to find Security provider.");
-            ServiceLoader<Provider> services
-                    = ServiceLoader.load(java.security.Provider.class);
-            Iterator<Provider> iterator = services.iterator();
-            while (iterator.hasNext()) {
-                Provider p = iterator.next();
-                if (p.getName().equals(CUSTOM_PROVIDER_NAME)) {
-                    provider = p;
-                    break;
-                }
-            }
-        } else if (args != null && args.length > 0
-                && CLASS_LOADER.equals(args[0])) {
-            System.out.println("Using class loader to find Security provider.");
-            //Find the TEST provider loaded by ClassLoader.
-            provider = new provider.TestSecurityProvider();
-        } else {
-            //Find the TEST provider configured through Security.getProvider().
-            System.out.println("Finding Security provider through"
-                    + " Security.getProvider().");
-            provider = Security.getProvider(CUSTOM_PROVIDER_NAME);
-        }
-
-        if (provider != null) {
-            System.out.format("%nTest Security provider named '%s' loaded "
-                    + "successfully", CUSTOM_PROVIDER_NAME);
-        } else {
-            throw new RuntimeException(EXCEPTION_MESSAGE);
-        }
-    }
-}
--- a/jdk/test/java/security/modules/ModularTest.java	Mon Aug 28 16:40:01 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,279 +0,0 @@
-/*
- * 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.IOException;
-import java.io.OutputStream;
-import java.io.File;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.List;
-import java.util.Map;
-import java.util.StringJoiner;
-import java.util.Arrays;
-import java.util.stream.Collectors;
-import java.lang.module.ModuleDescriptor;
-import jdk.testlibrary.OutputAnalyzer;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-import jdk.internal.module.ModuleInfoWriter;
-import static java.lang.module.ModuleDescriptor.Builder;
-
-/**
- * Base class need to be extended by modular test for security.
- */
-public abstract class ModularTest {
-
-    /**
-     * Enum represents all supported module types supported in JDK9. i.e.
-     * EXPLICIT - Modules have module descriptor(module-info.java)
-     * defining the module.
-     * AUTO - Are regular jar files but provided in MODULE_PATH instead
-     * of CLASS_PATH.
-     * UNNAMED - Are regular jar but provided through CLASS_PATH.
-     */
-    public enum MODULE_TYPE {
-
-        EXPLICIT, AUTO, UNNAMED;
-    }
-
-    public static final String SPACE = " ";
-    public static final Path SRC = Paths.get(System.getProperty("test.src"));
-    public static final String DESCRIPTOR = "MetaService";
-    public static final String MODULAR = "Modular";
-    public static final String AUTO = "AutoServiceType";
-    public static final String JAR_EXTN = ".jar";
-
-    /**
-     * Setup test data for the test.
-     */
-    @DataProvider(name = "TestParams")
-    public Object[][] setUpTestData() {
-        return getTestInput();
-    }
-
-    /**
-     * Test method for TestNG.
-     */
-    @Test(dataProvider = "TestParams")
-    public void runTest(MODULE_TYPE cModuleType, MODULE_TYPE sModuletype,
-            boolean addMetaDesc, String failureMsgExpected, String[] args)
-            throws Exception {
-
-        String testName = new StringJoiner("_").add(cModuleType.toString())
-                .add(sModuletype.toString()).add(
-                        (addMetaDesc) ? "WITH_SERVICE" : "NO_SERVICE")
-                .toString();
-
-        System.out.format("%nStarting Test case: '%s'", testName);
-        Path cJarPath = findJarPath(false, cModuleType, false,
-                (sModuletype == MODULE_TYPE.EXPLICIT));
-        Path sJarPath = findJarPath(true, sModuletype, addMetaDesc, false);
-        System.out.format("%nClient jar path : %s ", cJarPath);
-        System.out.format("%nService jar path : %s ", sJarPath);
-        OutputAnalyzer output = executeTestClient(cModuleType, cJarPath,
-                sModuletype, sJarPath, args);
-
-        if (output.getExitValue() != 0) {
-            if (failureMsgExpected != null
-                    && output.getOutput().contains(failureMsgExpected)) {
-                System.out.println("PASS: Test is expected to fail here.");
-            } else {
-                System.out.format("%nUnexpected failure occured with exit code"
-                        + " '%s'.", output.getExitValue());
-                throw new RuntimeException("Unexpected failure occured.");
-            }
-        }
-    }
-
-    /**
-     * Abstract method need to be implemented by each Test type to provide
-     * test parameters.
-     */
-    public abstract Object[][] getTestInput();
-
-    /**
-     * Execute the test client to access required service.
-     */
-    public abstract OutputAnalyzer executeTestClient(MODULE_TYPE cModuleType,
-            Path cJarPath, MODULE_TYPE sModuletype, Path sJarPath,
-            String... args) throws Exception;
-
-    /**
-     * Find the Jar for service/client based on module type and if service
-     * descriptor required.
-     */
-    public abstract Path findJarPath(boolean service, MODULE_TYPE moduleType,
-            boolean addMetaDesc, boolean dependsOnServiceModule);
-
-    /**
-     * Constructs a Java Command line string based on modular structure followed
-     * by modular client and service.
-     */
-    public String[] getJavaCommand(Path modulePath, String classPath,
-            String clientModuleName, String mainClass,
-            Map<String, String> vmArgs, String... options) throws IOException {
-
-        final StringJoiner command = new StringJoiner(SPACE, SPACE, SPACE);
-        vmArgs.forEach((key, value) -> command.add(key + value));
-        if (modulePath != null) {
-            command.add("--module-path").add(modulePath.toFile().getCanonicalPath());
-        }
-        if (classPath != null && classPath.length() > 0) {
-            command.add("-cp").add(classPath);
-        }
-        if (clientModuleName != null && clientModuleName.length() > 0) {
-            command.add("-m").add(clientModuleName + "/" + mainClass);
-        } else {
-            command.add(mainClass);
-        }
-        command.add(Arrays.stream(options).collect(Collectors.joining(SPACE)));
-        return command.toString().trim().split("[\\s]+");
-    }
-
-    /**
-     * Generate ModuleDescriptor object for explicit/auto based client/Service
-     * modules type.
-     */
-    public ModuleDescriptor generateModuleDescriptor(boolean isService,
-            MODULE_TYPE moduleType, String moduleName, String pkg,
-            String serviceInterface, String serviceImpl,
-            String serviceModuleName, List<String> requiredModules,
-            boolean depends) {
-
-        final Builder builder;
-        if (moduleType == MODULE_TYPE.EXPLICIT) {
-            System.out.format(" %nGenerating ModuleDescriptor object");
-            builder = ModuleDescriptor.newModule(moduleName).exports(pkg);
-            if (isService && serviceInterface != null && serviceImpl != null) {
-                builder.provides(serviceInterface, List.of(serviceImpl));
-            } else {
-                if (serviceInterface != null) {
-                    builder.uses(serviceInterface);
-                }
-                if (depends) {
-                    builder.requires(serviceModuleName);
-                }
-            }
-        } else {
-            System.out.format(" %nModuleDescriptor object not required.");
-            return null;
-        }
-        requiredModules.stream().forEach(reqMod -> builder.requires(reqMod));
-        return builder.build();
-    }
-
-    /**
-     * Generates service descriptor inside META-INF folder.
-     */
-    public boolean createMetaInfServiceDescriptor(
-            Path serviceDescriptorFile, String serviceImpl) {
-        boolean created = true;
-        System.out.format("%nCreating META-INF service descriptor for '%s' "
-                + "at path '%s'", serviceImpl, serviceDescriptorFile);
-        try {
-            Path parent = serviceDescriptorFile.getParent();
-            if (parent != null) {
-                Files.createDirectories(parent);
-            }
-            Files.write(serviceDescriptorFile, serviceImpl.getBytes("UTF-8"));
-            System.out.println(
-                    "META-INF service descriptor generated successfully");
-        } catch (IOException e) {
-            e.printStackTrace(System.out);
-            created = false;
-        }
-        return created;
-    }
-
-    /**
-     * Generate modular/regular jar file.
-     */
-    public void generateJar(ModuleDescriptor mDescriptor, Path jar,
-            Path compilePath) throws IOException {
-        System.out.format("%nCreating jar file '%s'", jar);
-        JarUtils.createJarFile(jar, compilePath);
-        if (mDescriptor != null) {
-            Path dir = Files.createTempDirectory("tmp");
-            Path mi = dir.resolve("module-info.class");
-            try (OutputStream out = Files.newOutputStream(mi)) {
-                ModuleInfoWriter.write(mDescriptor, out);
-            }
-            System.out.format("%nAdding 'module-info.class' to jar '%s'", jar);
-            JarUtils.updateJarFile(jar, dir);
-        }
-    }
-
-    /**
-     * Copy pre-generated jar files to the module base path.
-     */
-    public void copyJarsToModuleBase(MODULE_TYPE moduleType, Path jar,
-            Path mBasePath) throws IOException {
-        if (mBasePath != null) {
-            Files.createDirectories(mBasePath);
-        }
-        if (moduleType != MODULE_TYPE.UNNAMED) {
-            Path artifactName = mBasePath.resolve(jar.getFileName());
-            System.out.format("%nCopy jar path: '%s' to module base path: %s",
-                    jar, artifactName);
-            Files.copy(jar, artifactName);
-        }
-    }
-
-    /**
-     * Construct class path string.
-     */
-    public String buildClassPath(MODULE_TYPE cModuleType,
-            Path cJarPath, MODULE_TYPE sModuletype,
-            Path sJarPath) throws IOException {
-        StringJoiner classPath = new StringJoiner(File.pathSeparator);
-        classPath.add((cModuleType == MODULE_TYPE.UNNAMED)
-                ? cJarPath.toFile().getCanonicalPath() : "");
-        classPath.add((sModuletype == MODULE_TYPE.UNNAMED)
-                ? sJarPath.toFile().getCanonicalPath() : "");
-        return classPath.toString();
-    }
-
-    /**
-     * Construct executable module name for java. It is fixed for explicit
-     * module type while it is same as jar file name for automated module type.
-     */
-    public String getModuleName(MODULE_TYPE moduleType,
-            Path jarPath, String mName) {
-        String jarName = jarPath.toFile().getName();
-        return (moduleType == MODULE_TYPE.EXPLICIT) ? mName
-                : ((moduleType == MODULE_TYPE.AUTO) ? jarName.substring(0,
-                                jarName.indexOf(JAR_EXTN)) : null);
-    }
-
-    /**
-     * Delete all the files inside the base module path.
-     */
-    public void cleanModuleBasePath(Path mBasePath) {
-        Arrays.asList(mBasePath.toFile().listFiles()).forEach(f -> {
-            System.out.println("delete: " + f);
-            f.delete();
-        });
-    }
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/jar/JarFile/JarBacktickManifest.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8186334
+ * @library /lib/testlibrary/java/util/jar
+ * @build JarBuilder
+ * @run testng JarBacktickManifest
+ * @summary Make sure scanning manifest doesn't throw AIOOBE on certain strings
+ *          containing backticks.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.jar.JarFile;
+
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+public class JarBacktickManifest {
+
+    public static final String VERIFY_MANIFEST_JAR = "verifyManifest.jar";
+
+    @BeforeClass
+    public void initialize() throws Exception {
+        JarBuilder jb = new JarBuilder(VERIFY_MANIFEST_JAR);
+        jb.addAttribute("Test", " Class-`Path` ");
+        jb.addAttribute("Test2", " Multi-`Release ");
+        jb.build();
+    }
+
+    @Test
+    public void test() throws Exception {
+        try (JarFile jf = new JarFile(VERIFY_MANIFEST_JAR)) {  // do not set runtime versioning
+            Assert.assertFalse(jf.isMultiRelease(), "Shouldn't be multi-release");
+        }
+    }
+
+    @AfterClass
+    public void close() throws IOException {
+        Files.delete(new File(VERIFY_MANIFEST_JAR).toPath());
+    }
+}
--- a/jdk/test/javax/security/auth/PrivateCredentialPermission/Subset.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/javax/security/auth/PrivateCredentialPermission/Subset.java	Mon Aug 28 21:46:13 2017 +0200
@@ -34,7 +34,7 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
-import com.sun.security.auth.SolarisPrincipal;
+import com.sun.security.auth.UnixPrincipal;
 import javax.security.auth.Subject;
 
 /*
@@ -46,7 +46,7 @@
  *    permission javax.security.auth.AuthPermission \
  *              "modifyPrivateCredentials";
  *    permission javax.security.auth.PrivateCredentialPermission \
- * "java.lang.String com.sun.security.auth.SolarisPrincipal \"user"", "read";
+ * "java.lang.String com.sun.security.auth.UnixPrincipal \"user"", "read";
  * };
 
  * The test verifies the following:
@@ -71,7 +71,7 @@
         HashSet creds = new HashSet();
         Subject emptys =
             new Subject(false,  //readOnly
-                        Collections.singleton(new SolarisPrincipal("user")),
+                        Collections.singleton(new UnixPrincipal("user")),
                         Collections.EMPTY_SET,
                         creds);
         /* Test principals */
@@ -104,7 +104,7 @@
         creds.add(Boolean.TRUE);
         Subject sremove =
             new Subject(false,  //readOnly
-                        Collections.singleton(new SolarisPrincipal("user")),
+                        Collections.singleton(new UnixPrincipal("user")),
                         Collections.EMPTY_SET,
                         creds);
         Set p2 = sremove.getPrivateCredentials();
@@ -184,7 +184,7 @@
         creds1.add(new String("Exists"));
         Subject scontain =
             new Subject(false,  //readOnly
-                        Collections.singleton(new SolarisPrincipal("user")),
+                        Collections.singleton(new UnixPrincipal("user")),
                         Collections.EMPTY_SET,
                         creds1);
         p2 = scontain.getPrivateCredentials();
@@ -237,7 +237,7 @@
         creds2.add("ghi");
         Subject sstring =
             new Subject(false,  //readOnly
-                        Collections.singleton(new SolarisPrincipal("user")),
+                        Collections.singleton(new UnixPrincipal("user")),
                         Collections.EMPTY_SET,
                         creds2);
         p2 = sstring.getPrivateCredentials();
@@ -262,7 +262,7 @@
         creds4.add("Exists");
         Subject scontain1 =
             new Subject(false,  //readOnly
-                        Collections.singleton(new SolarisPrincipal("user")),
+                        Collections.singleton(new UnixPrincipal("user")),
                         Collections.EMPTY_SET,
                         creds4);
         Set p3 = scontain1.getPrivateCredentials();
@@ -462,7 +462,7 @@
         creds.add(new Integer(1));
         Subject s =
             new Subject(false,  //readOnly
-                        Collections.singleton(new SolarisPrincipal("user")),
+                        Collections.singleton(new UnixPrincipal("user")),
                         Collections.EMPTY_SET,
                         creds);
         try {
--- a/jdk/test/javax/security/auth/PrivateCredentialPermission/Subset.policy	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/javax/security/auth/PrivateCredentialPermission/Subset.policy	Mon Aug 28 21:46:13 2017 +0200
@@ -6,5 +6,5 @@
 grant {
      permission javax.security.auth.AuthPermission "modifyPrivateCredentials";
      permission javax.security.auth.AuthPermission "modifyPublicCredentials";
-     permission	javax.security.auth.PrivateCredentialPermission "java.lang.String com.sun.security.auth.SolarisPrincipal \"user\"", "read";
+     permission	javax.security.auth.PrivateCredentialPermission "java.lang.String com.sun.security.auth.UnixPrincipal \"user\"", "read";
 };
--- a/jdk/test/javax/security/auth/login/modules/JaasClient.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/javax/security/auth/login/modules/JaasClient.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
 import javax.security.auth.callback.UnsupportedCallbackException;
 import javax.security.auth.login.LoginException;
 import javax.security.auth.login.LoginContext;
-import com.sun.security.auth.UnixPrincipal;
+import com.sun.security.auth.UserPrincipal;
 
 /**
  * JAAS client which will try to authenticate a user through a custom JAAS LOGIN
@@ -71,13 +71,13 @@
             return;
         }
         for (Principal p : loginContext.getSubject().getPrincipals()) {
-            if (p instanceof UnixPrincipal
+            if (p instanceof UserPrincipal
                     && USER_NAME.equals(p.getName())) {
                 //Proper principal was found, return.
                 return;
             }
         }
-        throw new RuntimeException("Test failed. UnixPrincipal "
+        throw new RuntimeException("Test failed. UserPrincipal "
                 + USER_NAME + " expected.");
 
     }
--- a/jdk/test/javax/security/auth/login/modules/JaasClientWithDefaultHandler.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/javax/security/auth/login/modules/JaasClientWithDefaultHandler.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 import java.security.Principal;
 import javax.security.auth.login.LoginContext;
 import javax.security.auth.login.LoginException;
-import com.sun.security.auth.UnixPrincipal;
+import com.sun.security.auth.UserPrincipal;
 
 public class JaasClientWithDefaultHandler {
 
@@ -61,13 +61,13 @@
             return;
         }
         for (Principal p : loginContext.getSubject().getPrincipals()) {
-            if (p instanceof UnixPrincipal
+            if (p instanceof UserPrincipal
                     && USER_NAME.equals(p.getName())) {
                 //Proper principal was found, return.
                 return;
             }
         }
-        throw new RuntimeException("Test failed. UnixPrincipal "
+        throw new RuntimeException("Test failed. UserPrincipal "
                 + USER_NAME + " expected.");
     }
 
--- a/jdk/test/javax/security/auth/login/modules/JaasModularClientTest.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/javax/security/auth/login/modules/JaasModularClientTest.java	Mon Aug 28 21:46:13 2017 +0200
@@ -21,280 +21,252 @@
  * questions.
  */
 
+import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.LinkedHashMap;
+import java.nio.file.StandardCopyOption;
+import java.util.Collections;
+import java.util.LinkedList;
 import java.util.List;
-import java.util.Map;
 import java.util.Arrays;
-import java.io.IOException;
+import java.io.File;
+import java.io.OutputStream;
 import java.lang.module.ModuleDescriptor;
-import java.util.ArrayList;
-import jdk.testlibrary.ProcessTools;
-import jdk.testlibrary.OutputAnalyzer;
-import jdk.test.lib.compiler.CompilerUtils;
-import org.testng.annotations.BeforeTest;
+import java.lang.module.ModuleDescriptor.Builder;
+import jdk.internal.module.ModuleInfoWriter;
+import java.util.stream.Stream;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
-/**
- * @test
- * @bug 8078813
- * @library /lib/testlibrary /test/lib
- * @library /java/security/modules
- * @build jdk.test.lib.compiler.CompilerUtils JarUtils
- * @summary Test custom JAAS module with all possible modular option. The test
- *          includes different combination of JAAS client/login modules
- *          interaction with or without service description.
- * @run testng JaasModularClientTest
- */
-public class JaasModularClientTest extends ModularTest {
-
-    private static final Path S_SRC = SRC.resolve("TestLoginModule.java");
-    private static final String S_PKG = "login";
-    private static final String S_JAR_NAME = S_PKG + JAR_EXTN;
-    private static final String S_DESCR_JAR_NAME = S_PKG + DESCRIPTOR
-            + JAR_EXTN;
-    private static final String MS_JAR_NAME = MODULAR + S_PKG + JAR_EXTN;
-    private static final String MS_DESCR_JAR_NAME = MODULAR + S_PKG + DESCRIPTOR
-            + JAR_EXTN;
 
-    private static final Path C_SRC = SRC.resolve("JaasClient.java");
-    private static final String C_PKG = "client";
-    private static final String C_JAR_NAME = C_PKG + JAR_EXTN;
-    private static final String MCN_JAR_NAME = MODULAR + C_PKG + "N" + JAR_EXTN;
-    private static final String MC_JAR_NAME = MODULAR + C_PKG + JAR_EXTN;
-
-    private static final Path BUILD_DIR = Paths.get(".").resolve("build");
-    private static final Path COMPILE_DIR = BUILD_DIR.resolve("bin");
-    private static final Path S_BUILD_DIR = COMPILE_DIR.resolve(S_PKG);
-    private static final Path S_WITH_META_DESCR_BUILD_DIR = COMPILE_DIR.resolve(
-            S_PKG + DESCRIPTOR);
-    private static final Path C_BLD_DIR = COMPILE_DIR.resolve(C_PKG);
-    private static final Path M_BASE_PATH = BUILD_DIR.resolve("mbase");
-    private static final Path ARTIFACTS_DIR = BUILD_DIR.resolve("artifacts");
+/*
+ * @test
+ * @bug 8078813 8183310
+ * @summary Test custom JAAS login module with all possible modular option.
+ * @library /lib/testlibrary /test/lib
+ * @modules java.base/jdk.internal.module
+ * @build JarUtils
+ * @build TestLoginModule JaasClient
+ * @run main JaasModularClientTest false
+ * @run main JaasModularClientTest true
+ */
+public class JaasModularClientTest {
 
-    private static final Path S_ARTIFACTS_DIR = ARTIFACTS_DIR.resolve(S_PKG);
-    private static final Path S_JAR = S_ARTIFACTS_DIR.resolve(S_JAR_NAME);
-    private static final Path S_WITH_DESCRIPTOR_JAR = S_ARTIFACTS_DIR.resolve(
-            S_DESCR_JAR_NAME);
-    private static final Path MS_JAR = S_ARTIFACTS_DIR.resolve(MS_JAR_NAME);
-    private static final Path MS_WITH_DESCR_JAR = S_ARTIFACTS_DIR.resolve(
-            MS_DESCR_JAR_NAME);
-
-    private static final Path C_ARTIFACTS_DIR = ARTIFACTS_DIR.resolve(C_PKG);
-    private static final Path C_JAR = C_ARTIFACTS_DIR.resolve(C_JAR_NAME);
-    private static final Path MC_JAR = C_ARTIFACTS_DIR.resolve(MC_JAR_NAME);
-    private static final Path MCN_JAR = C_ARTIFACTS_DIR.resolve(MCN_JAR_NAME);
-
-    private static final String MAIN = C_PKG + ".JaasClient";
-    private static final String S_INTERFACE
-            = "javax.security.auth.spi.LoginModule";
-    private static final String S_IMPL = S_PKG + ".TestLoginModule";
-    private static final List<String> M_REQUIRED = Arrays.asList("java.base",
-            "jdk.security.auth");
-    private static final Path META_DESCR_PATH = Paths.get("META-INF")
-            .resolve("services").resolve(S_INTERFACE);
-    private static final Path S_META_DESCR_FPATH = S_WITH_META_DESCR_BUILD_DIR
-            .resolve(META_DESCR_PATH);
-
-    private static final boolean WITH_S_DESCR = true;
-    private static final boolean WITHOUT_S_DESCR = false;
-    private static final String NO_FAILURE = null;
+    private static final Path SRC = Paths.get(System.getProperty("test.src"));
+    private static final Path TEST_CLASSES
+            = Paths.get(System.getProperty("test.classes"));
+    private static final Path ARTIFACT_DIR = Paths.get("jars");
+    private static final String PS = File.pathSeparator;
+    private static final String L_TYPE = "login.TestLoginModule";
+    private static final String C_TYPE = "client.JaasClient";
 
     /**
-     * Generates Test specific input parameters.
+     * Here is the naming convention followed.
+     * l.jar    - Unnamed login module jar.
+     * ml.jar   - Modular login module jar.
+     * msl.jar  - Modular login module jar provides login module service
+     *            through module-info
+     * c.jar    - Unnamed client jar.
+     * mc.jar   - Modular client jar.
+     * mcs.jar  - Modular client jar uses login module service through
+     *            module-info.
+     * amc.jar  - Modular client used for automatic login module jar.
+     * amcs.jar - Modular client used for automatic login module jar and uses
+     *            login module service through module-info.
      */
-    @Override
-    public Object[][] getTestInput() {
+    private static final Path L_JAR = artifact("l.jar");
+    private static final Path ML_JAR = artifact("ml.jar");
+    private static final Path MSL_JAR = artifact("msl.jar");
+    private static final Path C_JAR = artifact("c.jar");
+    private static final Path MC_JAR = artifact("mc.jar");
+    private static final Path MCS_JAR = artifact("mcs.jar");
+    private static final Path AMC_JAR = artifact("amc.jar");
+    private static final Path AMCS_JAR = artifact("amcs.jar");
 
-        List<List<Object>> params = new ArrayList<>();
-        String[] args = new String[]{};
-        // PARAMETER ORDERS -
-        // Client Module Type, Service Module Type,
-        // If Service META descriptor Required,
-        // Expected Failure message, Client arguments
-        params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.EXPLICIT,
-                WITH_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.EXPLICIT,
-                WITHOUT_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.AUTO,
-                WITH_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.AUTO,
-                WITHOUT_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.UNNAMED,
-                WITH_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.UNNAMED,
-                WITHOUT_S_DESCR, NO_FAILURE, args));
+    private final String unnL;
+    private final String modL;
+    private final String unnC;
+    private final String modC;
+    private final String autoMC;
+    // Common set of VM arguments used in all test cases
+    private final List<String> commonArgs;
+
+    public JaasModularClientTest(boolean service) {
+
+        System.out.printf("%n*** Login Module defined as service in "
+                + "module-info: %s ***%n%n", service);
+        List<String> argList = new LinkedList<>();
+        argList.add("-Djava.security.auth.login.config="
+                + toAbsPath(SRC.resolve("jaas.conf")));
+        commonArgs = Collections.unmodifiableList(argList);
+
+        // Based on Testcase, select unnamed/modular jar files to use.
+        unnL = toAbsPath(L_JAR);
+        modL = toAbsPath(service ? MSL_JAR : ML_JAR);
+        unnC = toAbsPath(C_JAR);
+        modC = toAbsPath(service ? MCS_JAR : MC_JAR);
+        autoMC = toAbsPath(service ? AMCS_JAR : AMC_JAR);
+    }
 
-        params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.EXPLICIT,
-                WITH_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.EXPLICIT,
-                WITHOUT_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.AUTO,
-                WITH_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.AUTO,
-                WITHOUT_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.UNNAMED,
-                WITH_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.UNNAMED,
-                WITHOUT_S_DESCR, NO_FAILURE, args));
+    /*
+     * Test cases are based on the following logic,
+     * for (definedAs : {"Service in module-info", "Class Type"}) {
+     *     for (clientType : {"NAMED", "AUTOMATIC", "UNNAMED"}) {
+     *         for (loginModuleType : {"NAMED", "AUTOMATIC", "UNNAMED"}) {
+     *             Create and run java command for each possible case
+     *         }
+     *     }
+     * }
+     */
+    public static void main(String[] args) throws Exception {
+
+        // Generates unnamed and modular jars.
+        setUp();
+        boolean service = Boolean.valueOf(args[0]);
+        JaasModularClientTest test = new JaasModularClientTest(service);
+        test.process();
+    }
+
+    private void process() throws Exception {
 
-        params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.EXPLICIT,
-                WITH_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.EXPLICIT,
-                WITHOUT_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.AUTO,
-                WITH_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.AUTO,
-                WITHOUT_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.UNNAMED,
-                WITH_S_DESCR, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.UNNAMED,
-                WITHOUT_S_DESCR, NO_FAILURE, args));
-        return params.stream().map(p -> p.toArray()).toArray(Object[][]::new);
+        // Case: NAMED-NAMED, NAMED-AUTOMATIC, NAMED-UNNAMED
+        System.out.println("Case: Modular Client and Modular Login module.");
+        execute(String.format("--module-path %s%s%s -m mc/%s",
+                modC, PS, modL, C_TYPE));
+        System.out.println("Case: Modular Client and automatic Login module.");
+        execute(String.format("--module-path %s%s%s --add-modules=l -m mc/%s",
+                autoMC, PS, unnL, C_TYPE));
+        System.out.println("Case: Modular Client and unnamed Login module.");
+        execute(String.format("--module-path %s -cp %s -m mc/%s", autoMC,
+                unnL, C_TYPE));
+
+        // Case: AUTOMATIC-NAMED, AUTOMATIC-AUTOMATIC, AUTOMATIC-UNNAMED
+        System.out.println("Case: Automatic Client and modular Login module.");
+        execute(String.format("--module-path %s%s%s --add-modules=ml -m c/%s",
+                unnC, PS, modL, C_TYPE));
+        System.out.println("Case: Automatic Client and automatic Login module");
+        execute(String.format("--module-path %s%s%s --add-modules=l -m c/%s",
+                unnC, PS, unnL, C_TYPE));
+        System.out.println("Case: Automatic Client and unnamed Login module.");
+        execute(String.format("--module-path %s -cp %s -m c/%s", unnC,
+                unnL, C_TYPE));
+
+        // Case: UNNAMED-NAMED, UNNAMED-AUTOMATIC, UNNAMED-UNNAMED
+        System.out.println("Case: Unnamed Client and modular Login module.");
+        execute(String.format("-cp %s --module-path %s --add-modules=ml %s",
+                unnC, modL, C_TYPE));
+        System.out.println("Case: Unnamed Client and automatic Login module.");
+        execute(String.format("-cp %s --module-path %s --add-modules=l %s",
+                unnC, unnL, C_TYPE));
+        System.out.println("Case: Unnamed Client and unnamed Login module.");
+        execute(String.format("-cp %s%s%s %s", unnC, PS, unnL, C_TYPE));
+
+        // Case: unnamed jars in --module-path and modular jars in -cp.
+        System.out.println(
+                "Case: Unnamed Client and Login module from modulepath.");
+        execute(String.format("--module-path %s%s%s --add-modules=l -m c/%s",
+                unnC, PS, unnL, C_TYPE));
+        System.out.println(
+                "Case: Modular Client and Login module in classpath.");
+        execute(String.format("-cp %s%s%s %s", modC, PS, modL, C_TYPE));
     }
 
     /**
-     * Pre-compile and generate the artifacts required to run this test before
-     * running each test cases.
+     * Execute with command arguments and process the result.
      */
-    @BeforeTest
-    public void buildArtifacts() {
+    private void execute(String args) throws Exception {
 
-        boolean done = true;
-        try {
-            done = CompilerUtils.compile(S_SRC, S_BUILD_DIR);
-            done &= CompilerUtils.compile(S_SRC, S_WITH_META_DESCR_BUILD_DIR);
-            done &= createMetaInfServiceDescriptor(S_META_DESCR_FPATH, S_IMPL);
-            // Generate modular/regular jars with(out) META-INF
-            // service descriptor
-            generateJar(true, MODULE_TYPE.EXPLICIT, MS_JAR, S_BUILD_DIR, false);
-            generateJar(true, MODULE_TYPE.EXPLICIT, MS_WITH_DESCR_JAR,
-                    S_WITH_META_DESCR_BUILD_DIR, false);
-            generateJar(true, MODULE_TYPE.UNNAMED, S_JAR, S_BUILD_DIR, false);
-            generateJar(true, MODULE_TYPE.UNNAMED, S_WITH_DESCRIPTOR_JAR,
-                    S_WITH_META_DESCR_BUILD_DIR, false);
-            // Compile client source codes.
-            done &= CompilerUtils.compile(C_SRC, C_BLD_DIR);
-            // Generate modular client jar with explicit dependency
-            generateJar(false, MODULE_TYPE.EXPLICIT, MC_JAR, C_BLD_DIR, true);
-            // Generate modular client jar without any dependency
-            generateJar(false, MODULE_TYPE.EXPLICIT, MCN_JAR, C_BLD_DIR, false);
-            // Generate regular client jar
-            generateJar(false, MODULE_TYPE.UNNAMED, C_JAR, C_BLD_DIR, false);
-            System.out.format("%nArtifacts generated successfully? %s", done);
-            if (!done) {
-                throw new RuntimeException("Artifact generation failed");
+        String[] safeArgs = Stream.concat(commonArgs.stream(),
+                Stream.of(args.split("\\s+"))).filter(s -> {
+            if (s.contains(" ")) {
+                throw new RuntimeException("No spaces in args");
             }
-        } catch (IOException e) {
-            throw new RuntimeException(e);
+            return !s.isEmpty();
+        }).toArray(String[]::new);
+        OutputAnalyzer out = ProcessTools.executeTestJvm(safeArgs);
+        // Handle response.
+        if (out.getExitValue() != 0) {
+            System.out.printf("OUTPUT: %s", out.getOutput());
+            throw new RuntimeException("FAIL: Unknown failure occured.");
+        } else {
+            System.out.println("Passed.");
         }
     }
 
     /**
-     * Generate modular/regular jar based on module type for this test.
+     * Creates Unnamed/modular jar files for TestClient and TestClassLoader.
      */
-    private void generateJar(boolean isService, MODULE_TYPE moduleType,
-            Path jar, Path compilePath, boolean depends) throws IOException {
+    private static void setUp() throws Exception {
+
+        if (ARTIFACT_DIR.toFile().exists()) {
+            System.out.println("Skipping setup: Artifacts already exists.");
+            return;
+        }
+        // Generate unnamed login module jar file.
+        JarUtils.createJarFile(L_JAR, TEST_CLASSES,
+                "login/TestLoginModule.class");
+        // Generate unnamed client jar.
+        JarUtils.createJarFile(C_JAR, TEST_CLASSES, "client/JaasClient.class",
+                "client/JaasClient$MyCallbackHandler.class");
+
+        Builder mBuilder = ModuleDescriptor.newModule("ml")
+                .requires("jdk.security.auth");
+        // Modular jar exports package to let the login module type accessible.
+        generateJar(L_JAR, ML_JAR, mBuilder.exports("login").build());
 
-        ModuleDescriptor mDescriptor = null;
-        if (isService) {
-            mDescriptor = generateModuleDescriptor(isService, moduleType, S_PKG,
-                    S_PKG, S_INTERFACE, S_IMPL, null, M_REQUIRED, depends);
-        } else {
-            mDescriptor = generateModuleDescriptor(isService, moduleType, C_PKG,
-                    C_PKG, S_INTERFACE, null, S_PKG, M_REQUIRED, depends);
-        }
-        generateJar(mDescriptor, jar, compilePath);
+        mBuilder = ModuleDescriptor.newModule("ml")
+                .requires("jdk.security.auth")
+                .provides("javax.security.auth.spi.LoginModule",
+                        Arrays.asList(L_TYPE));
+        // Modular login module as Service in module-info does not need to
+        // export service package.
+        generateJar(L_JAR, MSL_JAR, mBuilder.build());
+
+        mBuilder = ModuleDescriptor.newModule("mc").exports("client")
+                .requires("jdk.security.auth");
+        // Generate modular client jar to use automatic login module jar.
+        generateJar(C_JAR, AMC_JAR, mBuilder.build());
+        // Generate modular client jar to use modular login module jar.
+        generateJar(C_JAR, MC_JAR, mBuilder.requires("ml").build());
+
+        mBuilder = ModuleDescriptor.newModule("mc").exports("client")
+                .requires("jdk.security.auth")
+                .uses("javax.security.auth.spi.LoginModule");
+        // Generate modular client jar to use automatic login module service.
+        generateJar(C_JAR, AMCS_JAR, mBuilder.build());
+        // Generate modular client jar using modular login module service.
+        generateJar(C_JAR, MCS_JAR, mBuilder.requires("ml").build());
     }
 
     /**
-     * Holds Logic for the test client. This method will get called with each
-     * test parameter.
+     * Update Unnamed jars and include module descriptor files.
      */
-    @Override
-    public OutputAnalyzer executeTestClient(MODULE_TYPE cModuleType,
-            Path cJarPath, MODULE_TYPE sModuletype, Path sJarPath,
-            String... args) throws Exception {
+    private static void generateJar(Path sjar, Path djar,
+            ModuleDescriptor mDesc) throws Exception {
 
-        OutputAnalyzer output = null;
-        try {
-            // For automated/explicit module types, copy the corresponding
-            // jars to module base folder, which will be considered as
-            // module base path during execution.
-            if (!(cModuleType == MODULE_TYPE.UNNAMED
-                    && sModuletype == MODULE_TYPE.UNNAMED)) {
-                copyJarsToModuleBase(cModuleType, cJarPath, M_BASE_PATH);
-                copyJarsToModuleBase(sModuletype, sJarPath, M_BASE_PATH);
+        Files.copy(sjar, djar, StandardCopyOption.REPLACE_EXISTING);
+        Path dir = Files.createTempDirectory("tmp");
+        if (mDesc != null) {
+            Path mi = dir.resolve("module-info.class");
+            try (OutputStream out = Files.newOutputStream(mi)) {
+                ModuleInfoWriter.write(mDesc, out);
             }
-
-            System.out.format("%nExecuting java client with required"
-                    + " custom service in class/module path.");
-            String mName = getModuleName(cModuleType, cJarPath, C_PKG);
-            Path cmBasePath = (cModuleType != MODULE_TYPE.UNNAMED
-                    || sModuletype != MODULE_TYPE.UNNAMED) ? M_BASE_PATH : null;
-            String cPath = buildClassPath(cModuleType, cJarPath, sModuletype,
-                    sJarPath);
-            Map<String, String> vmArgs = getVMArgs(sModuletype,
-                    getModuleName(sModuletype, sJarPath, S_PKG));
-            output = ProcessTools.executeTestJava(
-                    getJavaCommand(cmBasePath, cPath, mName, MAIN, vmArgs,
-                            args)).outputTo(System.out).errorTo(System.out);
-        } finally {
-            // Clean module path to hold required jars for next run.
-            cleanModuleBasePath(M_BASE_PATH);
+            System.out.format("Added 'module-info.class' in '%s'%n", djar);
         }
-        return output;
+        JarUtils.updateJarFile(djar, dir);
     }
 
     /**
-     * Decide the pre-generated client/service jar path for each test case
-     * based on client/service module type.
+     * Look for file path in generated jars.
      */
-    @Override
-    public Path findJarPath(boolean isService, MODULE_TYPE moduleType,
-            boolean addMetaDesc, boolean dependsOnServiceModule) {
-        if (isService) {
-            if (moduleType == MODULE_TYPE.EXPLICIT) {
-                if (addMetaDesc) {
-                    return MS_WITH_DESCR_JAR;
-                } else {
-                    return MS_JAR;
-                }
-            } else {
-                if (addMetaDesc) {
-                    return S_WITH_DESCRIPTOR_JAR;
-                } else {
-                    return S_JAR;
-                }
-            }
-        } else {
-            // Choose corresponding client jar using dependent module
-            if (moduleType == MODULE_TYPE.EXPLICIT) {
-                if (dependsOnServiceModule) {
-                    return MC_JAR;
-                } else {
-                    return MCN_JAR;
-                }
-            } else {
-                return C_JAR;
-            }
-        }
+    private static Path artifact(String file) {
+        return ARTIFACT_DIR.resolve(file);
     }
 
     /**
-     * VM argument required for the test.
+     * Convert to absolute file path.
      */
-    private Map<String, String> getVMArgs(MODULE_TYPE sModuletype,
-            String addModName) throws IOException {
-        final Map<String, String> vmArgs = new LinkedHashMap<>();
-        vmArgs.put("-Duser.language=", "en");
-        vmArgs.put("-Duser.region=", "US");
-        vmArgs.put("-Djava.security.auth.login.config=", SRC.resolve(
-                "jaas.conf").toFile().getCanonicalPath());
-        if (addModName != null && sModuletype == MODULE_TYPE.AUTO) {
-            vmArgs.put("--add-modules ", addModName);
-        }
-        return vmArgs;
+    private static String toAbsPath(Path path) {
+        return path.toFile().getAbsolutePath();
     }
-
 }
--- a/jdk/test/javax/security/auth/login/modules/JaasModularDefaultHandlerTest.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/javax/security/auth/login/modules/JaasModularDefaultHandlerTest.java	Mon Aug 28 21:46:13 2017 +0200
@@ -21,236 +21,219 @@
  * questions.
  */
 
+import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.LinkedHashMap;
+import java.nio.file.StandardCopyOption;
+import java.util.Collections;
+import java.util.LinkedList;
 import java.util.List;
-import java.util.Map;
-import java.util.Arrays;
-import java.io.IOException;
+import java.io.File;
+import java.io.OutputStream;
 import java.lang.module.ModuleDescriptor;
-import java.util.ArrayList;
-import jdk.test.lib.compiler.CompilerUtils;
-import jdk.testlibrary.ProcessTools;
-import jdk.testlibrary.OutputAnalyzer;
-import org.testng.annotations.BeforeTest;
-
-/**
- * @test
- * @bug 8151654
- * @library /lib/testlibrary /test/lib
- * @library /java/security/modules
- * @build jdk.test.lib.compiler.CompilerUtils JarUtils
- * @summary Test custom JAAS callback handler with all possible modular option.
- * @run testng JaasModularDefaultHandlerTest
- */
-public class JaasModularDefaultHandlerTest extends ModularTest {
-
-    private static final Path S_SRC = SRC.resolve("TestCallbackHandler.java");
-    private static final String MODULAR = "M";
-    private static final String S_PKG = "handler";
-    private static final String S_JAR_NAME = S_PKG + JAR_EXTN;
-    private static final String MS_JAR_NAME = MODULAR + S_PKG + JAR_EXTN;
-    private static final String HANDLER = S_PKG + ".TestCallbackHandler";
+import java.lang.module.ModuleDescriptor.Builder;
+import jdk.internal.module.ModuleInfoWriter;
+import java.util.stream.Stream;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
-    private static final Path C_SRC
-            = SRC.resolve("JaasClientWithDefaultHandler.java");
-    private static final Path CL_SRC = SRC.resolve("TestLoginModule.java");
-    private static final String C_PKG = "login";
-    private static final String C_JAR_NAME = C_PKG + JAR_EXTN;
-    private static final String MCN_JAR_NAME
-            = MODULAR + C_PKG + "NoMUse" + JAR_EXTN;
-    private static final String MC_JAR_NAME = MODULAR + C_PKG + JAR_EXTN;
-
-    private static final Path BUILD_DIR = Paths.get(".").resolve("build");
-    private static final Path COMPILE_DIR = BUILD_DIR.resolve("bin");
-    private static final Path S_BUILD_DIR = COMPILE_DIR.resolve(S_PKG);
-    private static final Path C_BLD_DIR = COMPILE_DIR.resolve(C_PKG);
-    private static final Path M_BASE_PATH = BUILD_DIR.resolve("mbase");
-    private static final Path ARTIFACTS_DIR = BUILD_DIR.resolve("artifacts");
+/*
+ * @test
+ * @bug 8151654 8183310
+ * @summary Test default callback handler with all possible modular option.
+ * @library /lib/testlibrary /test/lib
+ * @modules java.base/jdk.internal.module
+ * @build JarUtils
+ * @build TestCallbackHandler TestLoginModule JaasClientWithDefaultHandler
+ * @run main JaasModularDefaultHandlerTest
+ */
+public class JaasModularDefaultHandlerTest {
 
-    private static final Path S_ARTIFACTS_DIR = ARTIFACTS_DIR.resolve(S_PKG);
-    private static final Path S_JAR = S_ARTIFACTS_DIR.resolve(S_JAR_NAME);
-    private static final Path MS_JAR = S_ARTIFACTS_DIR.resolve(MS_JAR_NAME);
-
-    private static final Path C_ARTIFACTS_DIR = ARTIFACTS_DIR.resolve(C_PKG);
-    private static final Path C_JAR = C_ARTIFACTS_DIR.resolve(C_JAR_NAME);
-    private static final Path MC_JAR = C_ARTIFACTS_DIR.resolve(MC_JAR_NAME);
-    private static final Path MCN_JAR = C_ARTIFACTS_DIR.resolve(MCN_JAR_NAME);
-
-    private static final String MAIN = C_PKG + ".JaasClientWithDefaultHandler";
-    private static final List<String> M_REQUIRED = Arrays.asList("java.base",
-            "jdk.security.auth");
-
-    private static final String CLASS_NOT_FOUND_MSG
-            = "java.lang.ClassNotFoundException: handler.TestCallbackHandler";
-    private static final String NO_FAILURE = null;
+    private static final Path SRC = Paths.get(System.getProperty("test.src"));
+    private static final Path TEST_CLASSES
+            = Paths.get(System.getProperty("test.classes"));
+    private static final Path ARTIFACT_DIR = Paths.get("jars");
+    private static final String PS = File.pathSeparator;
+    private static final String H_TYPE = "handler.TestCallbackHandler";
+    private static final String C_TYPE = "login.JaasClientWithDefaultHandler";
 
     /**
-     * Generates Test specific input parameters.
+     * Here is the naming convention followed for each jar.
+     * h.jar   - Unnamed handler jar.
+     * mh.jar  - Modular handler jar.
+     * c.jar   - Unnamed client jar.
+     * mc.jar  - Modular client jar.
+     * amc.jar - Modular client used for automatic handler jar.
      */
-    @Override
-    public Object[][] getTestInput() {
+    private static final Path H_JAR = artifact("h.jar");
+    private static final Path MH_JAR = artifact("mh.jar");
+    private static final Path C_JAR = artifact("c.jar");
+    private static final Path MC_JAR = artifact("mc.jar");
+    private static final Path AMC_JAR = artifact("amc.jar");
+
+    private final String unnH;
+    private final String modH;
+    private final String unnC;
+    private final String modC;
+    private final String autoMC;
+    // Common set of VM arguments used in all test cases
+    private final List<String> commonArgs;
+
+    public JaasModularDefaultHandlerTest() {
+
+        List<String> argList = new LinkedList<>();
+        argList.add("-Djava.security.auth.login.config="
+                + toAbsPath(SRC.resolve("jaas.conf")));
+        commonArgs = Collections.unmodifiableList(argList);
+
+        // Based on Testcase, select unnamed/modular jar files to use.
+        unnH = toAbsPath(H_JAR);
+        modH = toAbsPath(MH_JAR);
+        unnC = toAbsPath(C_JAR);
+        modC = toAbsPath(MC_JAR);
+        autoMC = toAbsPath(AMC_JAR);
+    }
+
+    /*
+     * Test cases are based on the following logic,
+     * for (clientType : {"NAMED", "AUTOMATIC", "UNNAMED"}) {
+     *     for (handlerType : {"NAMED", "AUTOMATIC", "UNNAMED"}) {
+     *         Create and run java command for each possible case
+     *     }
+     * }
+     */
+    public static void main(String[] args) throws Exception {
 
-        List<List<Object>> params = new ArrayList<>();
-        String[] args = new String[]{HANDLER};
-        // PARAMETER ORDERS -
-        // Client Module Type, Service Module Type,
-        // Service META Descriptor Required,
-        // Expected Failure message, Client arguments
-        params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.EXPLICIT,
-                false, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.AUTO,
-                false, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.EXPLICIT, MODULE_TYPE.UNNAMED,
-                false, NO_FAILURE, args));
+        // Generates unnamed and modular jars.
+        setUp();
+        JaasModularDefaultHandlerTest jt = new JaasModularDefaultHandlerTest();
+        jt.process();
+    }
+
+    private void process() throws Exception {
+
+        // Case: NAMED-NAMED, NAMED-AUTOMATIC, NAMED-UNNAMED
+        System.out.println("Case: Modular Client and Modular Handler");
+        execute(String.format("--module-path %s%s%s -m mc/%s %s",
+                modC, PS, modH, C_TYPE, H_TYPE));
+        System.out.println("Case: Modular Client and automatic Handler");
+        execute(String.format("--module-path %s%s%s --add-modules=h -m mc/%s %s",
+                autoMC, PS, unnH, C_TYPE, H_TYPE));
+        System.out.println("Case: Modular Client and unnamed Handler");
+        execute(String.format("--module-path %s -cp %s -m mc/%s %s", autoMC,
+                unnH, C_TYPE, H_TYPE));
 
-        params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.EXPLICIT,
-                false, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.AUTO,
-                false, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.AUTO, MODULE_TYPE.UNNAMED,
-                false, NO_FAILURE, args));
+        // Case: AUTOMATIC-NAMED, AUTOMATIC-AUTOMATIC, AUTOMATIC-UNNAMED
+        System.out.println("Case: Automatic Client and modular Handler");
+        execute(String.format("--module-path %s%s%s --add-modules=mh -m c/%s %s",
+                unnC, PS, modH, C_TYPE, H_TYPE));
+        System.out.println("Case: Automatic Client and automatic Handler");
+        execute(String.format("--module-path %s%s%s --add-modules=h -m c/%s %s",
+                unnC, PS, unnH, C_TYPE, H_TYPE));
+        System.out.println("Case: Automatic Client and unnamed Handler");
+        execute(String.format("--module-path %s -cp %s -m c/%s %s", unnC,
+                unnH, C_TYPE, H_TYPE));
 
-        params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.EXPLICIT,
-                false, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.AUTO,
-                false, NO_FAILURE, args));
-        params.add(Arrays.asList(MODULE_TYPE.UNNAMED, MODULE_TYPE.UNNAMED,
-                false, NO_FAILURE, args));
-        return params.stream().map(p -> p.toArray()).toArray(Object[][]::new);
+        // Case: UNNAMED-NAMED, UNNAMED-AUTOMATIC, UNNAMED-UNNAMED
+        System.out.println("Case: Unnamed Client and modular Handler");
+        execute(String.format("-cp %s --module-path %s --add-modules=mh %s %s",
+                unnC, modH, C_TYPE, H_TYPE));
+        System.out.println("Case: Unnamed Client and automatic Handler");
+        execute(String.format("-cp %s --module-path %s --add-modules=h %s %s",
+                unnC, unnH, C_TYPE, H_TYPE));
+        System.out.println("Case: Unnamed Client and unnamed Handler");
+        execute(String.format("-cp %s%s%s %s %s", unnC, PS, unnH, C_TYPE,
+                H_TYPE));
+
+        // Case: unnamed jars in --module-path and modular jars in -cp.
+        System.out.println("Case: Unnamed Client and Handler in modulepath");
+        execute(String.format("--module-path %s%s%s --add-modules=h -m c/%s %s",
+                unnC, PS, unnH, C_TYPE, H_TYPE));
+        System.out.println("Case: Modular Client and Provider in classpath");
+        execute(String.format("-cp %s%s%s %s %s",
+                modC, PS, modH, C_TYPE, H_TYPE));
     }
 
     /**
-     * Pre-compile and generate the artifacts required to run this test before
-     * running each test cases.
+     * Execute with command arguments and process the result.
      */
-    @BeforeTest
-    public void buildArtifacts() {
+    private void execute(String args) throws Exception {
 
-        boolean done = true;
-        try {
-            done = CompilerUtils.compile(S_SRC, S_BUILD_DIR);
-            // Generate modular/regular handler jars.
-            generateJar(true, MODULE_TYPE.EXPLICIT, MS_JAR, S_BUILD_DIR, false);
-            generateJar(true, MODULE_TYPE.UNNAMED, S_JAR, S_BUILD_DIR, false);
-            // Compile client source codes.
-            done &= CompilerUtils.compile(C_SRC, C_BLD_DIR);
-            done &= CompilerUtils.compile(CL_SRC, C_BLD_DIR);
-            // Generate modular client jar with explicit dependency
-            generateJar(false, MODULE_TYPE.EXPLICIT, MC_JAR, C_BLD_DIR, true);
-            // Generate modular client jar without any dependency
-            generateJar(false, MODULE_TYPE.EXPLICIT, MCN_JAR, C_BLD_DIR, false);
-            // Generate regular client jar
-            generateJar(false, MODULE_TYPE.UNNAMED, C_JAR, C_BLD_DIR, false);
-            System.out.format("%nArtifacts generated successfully? %s", done);
-            if (!done) {
-                throw new RuntimeException("Artifact generation failed");
+        String[] safeArgs = Stream.concat(commonArgs.stream(),
+                Stream.of(args.split("\\s+"))).filter(s -> {
+            if (s.contains(" ")) {
+                throw new RuntimeException("No spaces in args");
             }
-        } catch (IOException e) {
-            throw new RuntimeException(e);
+            return !s.isEmpty();
+        }).toArray(String[]::new);
+        OutputAnalyzer out = ProcessTools.executeTestJvm(safeArgs);
+        // Handle response.
+        if (out.getExitValue() != 0) {
+            System.out.printf("OUTPUT: %s", out.getOutput());
+            throw new RuntimeException("FAIL: Unknown failure occured.");
+        } else {
+            System.out.println("Passed.");
         }
     }
 
     /**
-     * Generate modular/regular jar based on module type for this test.
+     * Creates Unnamed/modular jar files for TestClient and TestClassLoader.
      */
-    private void generateJar(boolean isService, MODULE_TYPE moduleType,
-            Path jar, Path compilePath, boolean depends) throws IOException {
+    private static void setUp() throws Exception {
 
-        ModuleDescriptor mDescriptor = null;
-        if (isService) {
-            mDescriptor = generateModuleDescriptor(isService, moduleType, S_PKG,
-                    S_PKG, null, null, null, M_REQUIRED, depends);
-        } else {
-            mDescriptor = generateModuleDescriptor(isService, moduleType, C_PKG,
-                    C_PKG, null, null, S_PKG, M_REQUIRED, depends);
+        if (ARTIFACT_DIR.toFile().exists()) {
+            System.out.println("Skipping setup: Artifacts already exists.");
+            return;
         }
-        generateJar(mDescriptor, jar, compilePath);
+        // Generate unnamed handler jar file.
+        JarUtils.createJarFile(H_JAR, TEST_CLASSES,
+                "handler/TestCallbackHandler.class");
+        // Generate unnamed client jar file.
+        JarUtils.createJarFile(C_JAR, TEST_CLASSES,
+                "login/TestLoginModule.class",
+                "login/JaasClientWithDefaultHandler.class");
+
+        Builder mBuilder = ModuleDescriptor.newModule("mh");
+        // Modular jar exports package to let the handler type accessible.
+        generateJar(H_JAR, MH_JAR, mBuilder.exports("handler").build());
+
+        mBuilder = ModuleDescriptor.newModule("mc").exports("login")
+                .requires("jdk.security.auth");
+        // Generate modular client jar file to use automatic handler jar.
+        generateJar(C_JAR, AMC_JAR, mBuilder.build());
+        // Generate modular client jar file to use modular handler jar.
+        generateJar(C_JAR, MC_JAR, mBuilder.requires("mh").build());
     }
 
     /**
-     * Holds Logic for the test client. This method will get called with each
-     * test parameter.
+     * Update Unnamed jars and include module descriptor files.
      */
-    @Override
-    public OutputAnalyzer executeTestClient(MODULE_TYPE cModuleType,
-            Path cJarPath, MODULE_TYPE sModuletype, Path sJarPath,
-            String... args) throws Exception {
+    private static void generateJar(Path sjar, Path djar,
+            ModuleDescriptor mDesc) throws Exception {
 
-        OutputAnalyzer output = null;
-        try {
-            // For automated/explicit module types, copy the corresponding
-            // jars to module base folder, which will be considered as
-            // module base path during execution.
-            if (!(cModuleType == MODULE_TYPE.UNNAMED
-                    && sModuletype == MODULE_TYPE.UNNAMED)) {
-                copyJarsToModuleBase(cModuleType, cJarPath, M_BASE_PATH);
-                copyJarsToModuleBase(sModuletype, sJarPath, M_BASE_PATH);
+        Files.copy(sjar, djar, StandardCopyOption.REPLACE_EXISTING);
+        Path dir = Files.createTempDirectory("tmp");
+        if (mDesc != null) {
+            Path mi = dir.resolve("module-info.class");
+            try (OutputStream out = Files.newOutputStream(mi)) {
+                ModuleInfoWriter.write(mDesc, out);
             }
-
-            System.out.format("%nExecuting java client with required"
-                    + " custom service in class/module path.");
-            String mName = getModuleName(cModuleType, cJarPath, C_PKG);
-            Path cmBasePath = (cModuleType != MODULE_TYPE.UNNAMED
-                    || sModuletype != MODULE_TYPE.UNNAMED) ? M_BASE_PATH : null;
-            String cPath = buildClassPath(cModuleType, cJarPath, sModuletype,
-                    sJarPath);
-            Map<String, String> vmArgs = getVMArgs(sModuletype, cModuleType,
-                    getModuleName(sModuletype, sJarPath, S_PKG));
-            output = ProcessTools.executeTestJava(
-                    getJavaCommand(cmBasePath, cPath, mName, MAIN, vmArgs,
-                            args)).outputTo(System.out).errorTo(System.out);
-        } finally {
-            // Clean module path to hold required jars for next run.
-            cleanModuleBasePath(M_BASE_PATH);
+            System.out.format("Added 'module-info.class' in '%s'%n", djar);
         }
-        return output;
+        JarUtils.updateJarFile(djar, dir);
     }
 
     /**
-     * Decide the pre-generated client/service jar path for each test case
-     * based on client/service module type.
+     * Look for file path in generated jars.
      */
-    @Override
-    public Path findJarPath(boolean depends, MODULE_TYPE moduleType,
-            boolean addMetaDesc, boolean dependsOnServiceModule) {
-        if (depends) {
-            if (moduleType == MODULE_TYPE.EXPLICIT) {
-                return MS_JAR;
-            } else {
-                return S_JAR;
-            }
-        } else {
-            // Choose corresponding client jar using dependent module
-            if (moduleType == MODULE_TYPE.EXPLICIT) {
-                if (dependsOnServiceModule) {
-                    return MC_JAR;
-                } else {
-                    return MCN_JAR;
-                }
-            } else {
-                return C_JAR;
-            }
-        }
+    private static Path artifact(String file) {
+        return ARTIFACT_DIR.resolve(file);
     }
 
     /**
-     * VM argument required for the test.
+     * Convert to absolute file path.
      */
-    private Map<String, String> getVMArgs(MODULE_TYPE sModuletype,
-            MODULE_TYPE cModuleType, String addModName) throws IOException {
-        final Map<String, String> vmArgs = new LinkedHashMap<>();
-        vmArgs.put("-Duser.language=", "en");
-        vmArgs.put("-Duser.region=", "US");
-        vmArgs.put("-Djava.security.auth.login.config=", SRC.resolve(
-                "jaas.conf").toFile().getCanonicalPath());
-        if (addModName != null
-                && !(cModuleType == MODULE_TYPE.EXPLICIT
-                && sModuletype == MODULE_TYPE.EXPLICIT)) {
-            vmArgs.put("--add-modules=", addModName);
-        }
-        return vmArgs;
+    private static String toAbsPath(Path path) {
+        return path.toFile().getAbsolutePath();
     }
-
 }
--- a/jdk/test/javax/security/auth/login/modules/TEST.properties	Mon Aug 28 16:40:01 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-modules java.base/jdk.internal.module
--- a/jdk/test/javax/security/auth/login/modules/TestLoginModule.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/javax/security/auth/login/modules/TestLoginModule.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,7 @@
 import javax.security.auth.callback.UnsupportedCallbackException;
 import javax.security.auth.login.LoginException;
 import javax.security.auth.spi.LoginModule;
-import com.sun.security.auth.UnixPrincipal;
+import com.sun.security.auth.UserPrincipal;
 
 /**
  * Custom JAAS login module which will be loaded through Java LoginContext when
@@ -44,7 +44,7 @@
     private static final String PASSWORD = "testPassword";
     private Subject subject;
     private CallbackHandler callbackHandler;
-    private UnixPrincipal userPrincipal;
+    private UserPrincipal userPrincipal;
     private String username;
     private String password;
     private boolean succeeded = false;
@@ -99,7 +99,7 @@
         if (succeeded == false) {
             return false;
         }
-        userPrincipal = new UnixPrincipal(username);
+        userPrincipal = new UserPrincipal(username);
         if (!subject.getPrincipals().contains(userPrincipal)) {
             subject.getPrincipals().add(userPrincipal);
         }
--- a/jdk/test/jdk/nio/zipfs/PathOps.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/jdk/nio/zipfs/PathOps.java	Mon Aug 28 21:46:13 2017 +0200
@@ -27,11 +27,13 @@
 import java.nio.file.Files;
 import java.nio.file.InvalidPathException;
 import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.ProviderMismatchException;
 
 /**
  *
  * @test
- * @bug 8038500 8040059 8139956 8146754 8172921
+ * @bug 8038500 8040059 8139956 8146754 8172921 8186142
  * @summary Tests path operations for zip provider.
  *
  * @run main PathOps
@@ -571,16 +573,46 @@
 
     }
 
+    static void mismatchedProviders() {
+        header("ProviderMismatchException");
+        Path path = fs.getPath("foo");
+        Path other = Paths.get("foo");
+        try {
+            path.compareTo(other);
+            throw new RuntimeException("ProviderMismatchException not thrown");
+        } catch (ProviderMismatchException pme) {}
+
+        try {
+            path.resolve(other);
+            throw new RuntimeException("ProviderMismatchException not thrown");
+        } catch (ProviderMismatchException pme) {}
+
+        try {
+            path.relativize(other);
+            throw new RuntimeException("ProviderMismatchException not thrown");
+        } catch (ProviderMismatchException pme) {}
+
+        try {
+            if (path.startsWith(other))
+                throw new RuntimeException("providerMismatched startsWith() returns true ");
+            if (path.endsWith(other))
+                throw new RuntimeException("providerMismatched endsWith() returns true ");
+        } catch (ProviderMismatchException pme) {
+            throw new RuntimeException("ProviderMismatchException is thrown for starts/endsWith()");
+        }
+    }
+
     public static void main(String[] args) throws IOException {
         // create empty JAR file, test doesn't require any contents
         Path emptyJar = Utils.createJarFile("empty.jar");
 
         fs = FileSystems.newFileSystem(emptyJar, null);
         try {
-        npes();
-        doPathOpTests();
+            npes();
+            mismatchedProviders();
+            doPathOpTests();
         } finally {
-        fs.close();
+            fs.close();
+        }
     }
 }
-}
--- a/jdk/test/sun/security/provider/PolicyFile/Comparator.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/sun/security/provider/PolicyFile/Comparator.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,6 @@
 import sun.security.provider.PolicyFile;
 import com.sun.security.auth.UnixPrincipal;
 import com.sun.security.auth.NTUserPrincipal;
-import com.sun.security.auth.SolarisPrincipal;
 
 public class Comparator {
 
@@ -88,7 +87,7 @@
                                 new X500Principal("cn=x500") };
 
     private static final Principal[] badP = new Principal[] {
-                                new SolarisPrincipal("bad") };
+                                new UnixPrincipal("bad") };
 
     public static class PCompare1 implements Principal {
 
--- a/jdk/test/sun/tools/jcmd/TestJcmdDefaults.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/sun/tools/jcmd/TestJcmdDefaults.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@
 
     private static final String TEST_SRC = System.getProperty("test.src").trim();
     private static final String[] VM_ARGS = new String[] { "-XX:+UsePerfData" };
-    private static final String JCMD_LIST_REGEX = "^\\d+\\s*.*";
+    private static final String JCMD_LIST_REGEX = "(?s)^\\d+\\s*.*";
 
     public static void main(String[] args) throws Exception {
         testJcmdUsage("-h");
--- a/jdk/test/tools/launcher/Settings.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/tools/launcher/Settings.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -75,9 +75,9 @@
     }
 
     static void runTestOptionDefault() throws IOException {
-        String stackSize = "256"; // in kb
+        int stackSize = 256; // in kb
         if (getArch().equals("ppc64") || getArch().equals("ppc64le")) {
-            stackSize = "800";
+            stackSize = 800;
         }
         TestResult tr;
         tr = doExec(javaCmd, "-Xms64m", "-Xmx512m",
@@ -88,7 +88,7 @@
             throw new RuntimeException("test fails");
         }
         tr = doExec(javaCmd, "-Xms65536k", "-Xmx712m",
-                "-Xss" + stackSize + "000", "-XshowSettings", "-jar", testJar.getAbsolutePath());
+                "-Xss" + (stackSize * 1024), "-XshowSettings", "-jar", testJar.getAbsolutePath());
         containsAllOptions(tr);
         if (!tr.isOK()) {
             System.out.println(tr);
--- a/jdk/test/tools/launcher/TooSmallStackSize.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/jdk/test/tools/launcher/TooSmallStackSize.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -155,15 +155,21 @@
         checkStack("16k");
 
         /*
-         * Try with a 32k stack size, which is the size that the launcher will
+         * Try with a 64k stack size, which is the size that the launcher will
          * set to if you try setting to anything smaller. This should produce the same
          * result as setting to 16k if the fix for 6762191 is in place.
          */
-        String min_stack_allowed = checkStack("32k");
+        String min_stack_allowed = checkStack("64k");
 
         /*
          * Try again with a the minimum stack size that was given in the error message
          */
         checkMinStackAllowed(min_stack_allowed);
+
+        /*
+         * Try again with a size that is not OS page aligned. This is to help test that
+         * asserts added for 8176768 are not triggered.
+         */
+        checkMinStackAllowed("513k");
     }
 }
--- a/langtools/.hgtags	Mon Aug 28 16:40:01 2017 +0000
+++ b/langtools/.hgtags	Mon Aug 28 21:46:13 2017 +0200
@@ -444,3 +444,4 @@
 acda582f271a2c776b0391fc93dd669b1d44d461 jdk-10+19
 e2096f634fb46d469c9f8cada7dc5e27d1409b1f jdk-9+180
 5ecbed31312536cc2f3c454425c7607385ff8834 jdk-9+181
+d78323fc3fd5fc443e3be8f88bf874ca3744c2a1 jdk-10+20
--- a/langtools/make/data/symbols/include.list	Mon Aug 28 16:40:01 2017 +0000
+++ b/langtools/make/data/symbols/include.list	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -277,6 +277,8 @@
 #===
 #
 #Exported(false):
+#Some of the APIs below have been removed (see JDK-8159544). However, these
+#need to be retained until --release no longer supports 9.
 #---
 -com/sun/security/auth/PolicyFile
 -com/sun/security/auth/SolarisNumericGroupPrincipal
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Mon Aug 28 16:40:01 2017 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Mon Aug 28 21:46:13 2017 +0200
@@ -854,6 +854,8 @@
 }
 table.striped > thead {
     background-color: #DDD;
+}
+table.striped > thead > tr > th, table.striped > thead > tr > td {
     border: 1px solid black;
 }
 table.striped > tbody > tr:nth-child(even) {
@@ -862,8 +864,7 @@
 table.striped > tbody > tr:nth-child(odd) {
     background-color: #FFF
 }
-table.striped > thead > tr > th, table.striped > tbody > tr > th,
-table.striped > tbody > tr > td, table.striped > tbody > tr > td {
+table.striped > tbody > tr > th, table.striped > tbody > tr > td {
     border-left: 1px solid black;
     border-right: 1px solid black;
 }
--- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1167,7 +1167,7 @@
 
         public TestTerminal(StopDetectingInputStream input) throws Exception {
             super(true);
-            setAnsiSupported(false);
+            setAnsiSupported(Boolean.getBoolean("test.terminal.ansi.supported"));
             setEchoEnabled(false);
             this.input = input;
             int h = DEFAULT_HEIGHT;
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Mon Aug 28 21:46:13 2017 +0200
@@ -574,7 +574,7 @@
                     DeclarationSnippet sn = (DeclarationSnippet) state.maps.getSnippetDeadOrAlive(ex.id());
                     exception = new UnresolvedReferenceException(sn, translateExceptionStack(ex));
                 } catch (UserException ex) {
-                    exception = new EvalException(translateExceptionMessage(ex),
+                    exception = new EvalException(ex.getMessage(),
                             ex.causeExceptionClass(),
                             translateExceptionStack(ex));
                 } catch (RunException ex) {
@@ -782,13 +782,6 @@
         return elems;
     }
 
-    private String translateExceptionMessage(Exception ex) {
-        String msg = ex.getMessage();
-        return msg.equals("<none>")
-                ? null
-                : msg;
-    }
-
     private boolean isWrap(StackTraceElement ste) {
         return PREFIX_PATTERN.matcher(ste.getClassName()).find();
     }
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java	Mon Aug 28 21:46:13 2017 +0200
@@ -153,7 +153,7 @@
      * Only preliminary compilation is performed, sufficient to build the
      * {@code Snippet}.  Snippets known to be erroneous, are returned as
      * {@link ErroneousSnippet}, other snippets may or may not be in error.
-     * <p>
+     *
      * @param input The input String to convert
      * @return usually a singleton list of Snippet, but may be empty or multiple
      * @throws IllegalStateException if the {@code JShell} instance is closed.
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java	Mon Aug 28 21:46:13 2017 +0200
@@ -45,6 +45,12 @@
 class ExecutionControlForwarder {
 
     /**
+     * Represent null in a streamed UTF string. Vanishingly improbable string to
+     * occur in a user string.
+     */
+    static final String NULL_MARKER = "\u0002*\u03C0*NULL*\u03C0*\u0003";
+
+    /**
      * Maximum number of characters for writeUTF().  Byte maximum is 65535, at
      * maximum three bytes per character that is 65535 / 3 == 21845.  Minus one
      * for safety.
@@ -93,6 +99,10 @@
         out.writeInt(i);
     }
 
+    private void writeNullOrUTF(String s) throws IOException {
+        writeUTF(s == null ? NULL_MARKER : s);
+    }
+
     private void writeUTF(String s) throws IOException {
         if (s == null) {
             s = "";
@@ -197,7 +207,7 @@
             return true;
         } catch (UserException ex) {
             writeStatus(RESULT_USER_EXCEPTION);
-            writeUTF(ex.getMessage());
+            writeNullOrUTF(ex.getMessage());
             writeUTF(ex.causeExceptionClass());
             writeObject(ex.getStackTrace());
             flush();
@@ -213,8 +223,10 @@
             flush();
             return true;
         } catch (Throwable ex) {
+            // Unexpected exception, have something in the message
             writeStatus(RESULT_TERMINATED);
-            writeUTF(ex.getMessage());
+            String msg = ex.getMessage();
+            writeUTF(msg == null? ex.toString() : msg);
             flush();
             return false;
         }
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java	Mon Aug 28 21:46:13 2017 +0200
@@ -29,6 +29,7 @@
 import java.io.ObjectOutput;
 import jdk.jshell.JShellException;
 import jdk.jshell.spi.ExecutionControl;
+import static jdk.jshell.execution.ExecutionControlForwarder.NULL_MARKER;
 import static jdk.jshell.execution.RemoteCodes.*;
 
 /**
@@ -185,6 +186,16 @@
     }
 
     /**
+     * Read a UTF or a null encoded as a null marker.
+     * @return a string or null
+     * @throws IOException passed through from readUTF()
+     */
+    private String readNullOrUTF() throws IOException {
+        String s = in.readUTF();
+        return s.equals(NULL_MARKER) ? null : s;
+    }
+
+    /**
      * Reports results from a remote agent command that does not expect
      * exceptions.
      */
@@ -273,7 +284,7 @@
                 }
                 case RESULT_USER_EXCEPTION: {
                     // A user exception was encountered.
-                    String message = in.readUTF();
+                    String message = readNullOrUTF();
                     String exceptionClassName = in.readUTF();
                     StackTraceElement[] elems = (StackTraceElement[]) in.readObject();
                     throw new UserException(message, exceptionClassName, elems);
--- a/langtools/test/ProblemList.txt	Mon Aug 28 16:40:01 2017 +0000
+++ b/langtools/test/ProblemList.txt	Mon Aug 28 21:46:13 2017 +0200
@@ -54,7 +54,6 @@
 tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java         8057687    generic-all    emit correct byte code an attributes for type annotations
 tools/javac/warnings/suppress/TypeAnnotations.java                              8057683    generic-all    improve ordering of errors with type annotations
 tools/javac/modules/SourceInSymlinkTest.java                                    8180263    windows-all    fails when run on a subst drive
-tools/javac/modules/T8159439/NPEForModuleInfoWithNonZeroSuperClassTest.java     8160396    generic-all    current version of jtreg needs a new promotion to include lastes version of ASM
 
 ###########################################################################
 #
--- a/langtools/test/TEST.ROOT	Mon Aug 28 16:40:01 2017 +0000
+++ b/langtools/test/TEST.ROOT	Mon Aug 28 21:46:13 2017 +0200
@@ -14,8 +14,8 @@
 # Group definitions
 groups=TEST.groups
 
-# Tests using jtreg 4.2 b07 features
-requiredVersion=4.2 b07
+# Minimum jtreg version
+requiredVersion=4.2 b08
 
 # Use new module options
 useNewOptions=true
--- a/langtools/test/jdk/javadoc/tool/exceptionHandling/TestExceptionHandling.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/langtools/test/jdk/javadoc/tool/exceptionHandling/TestExceptionHandling.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,27 +31,30 @@
  *      jdk.javadoc/jdk.javadoc.internal.tool
  *      jdk.compiler/com.sun.tools.javac.api
  *      jdk.compiler/com.sun.tools.javac.main
- * @build toolbox.ToolBox toolbox.TestRunner
+ * @build toolbox.ToolBox toolbox.TestRunner toolbox.JavadocTask toolbox.Task
  * @run main TestExceptionHandling
  */
 
-import java.io.File;
+import java.io.IOException;
 import java.io.PrintStream;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.List;
 
-import toolbox.*;
+import toolbox.JavadocTask;
+import toolbox.Task;
+import toolbox.TestRunner;
+import toolbox.ToolBox;
 
 /**
  * This class tests if stack traces printed when
  * --dump-on-error. The standard doclet is used,
  * to test the doclet as well as the tool.
  */
-public class TestExceptionHandling  extends TestRunner {
+public class TestExceptionHandling extends TestRunner {
 
     final ToolBox tb;
-    final File testSrcFile;
+    final Path testSrcFile;
     final PrintStream ostream;
     final JavadocTask cmdTask;
     final JavadocTask apiTask;
@@ -61,11 +64,12 @@
         tester.runTests();
     }
 
-    TestExceptionHandling() {
+    TestExceptionHandling() throws IOException {
         super(System.err);
         tb = new ToolBox();
         ostream = System.err;
-        testSrcFile = new File(System.getProperty("test.src"), "TestExceptionHandling.java");
+        testSrcFile = Paths.get("A.java").toAbsolutePath();
+        tb.writeFile(testSrcFile, "public class A { }");
         cmdTask = new JavadocTask(tb, Task.Mode.CMDLINE);
         apiTask = new JavadocTask(tb, Task.Mode.API);
     }
@@ -77,7 +81,7 @@
         out.toFile().createNewFile();
         cmdTask.outdir(out);
         cmdTask.options("--dump-on-error");
-        cmdTask.files(testSrcFile.getAbsolutePath());
+        cmdTask.files(testSrcFile);
         Task.Result tr = cmdTask.run(Task.Expect.FAIL);
 
         String errString = "Destination directory is not a directory: " + out.toString();
@@ -94,7 +98,7 @@
         Path out = Paths.get("out.dir");
         cmdTask.options("--dump-on-error", "-doclet", "NonExistentDoclet");
         cmdTask.outdir(out);
-        cmdTask.files(testSrcFile.getAbsolutePath());
+        cmdTask.files(testSrcFile);
         Task.Result tr = cmdTask.run(Task.Expect.FAIL);
 
         // check the regular message
--- a/langtools/test/jdk/jshell/ComputeFQNsTest.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/langtools/test/jdk/jshell/ComputeFQNsTest.java	Mon Aug 28 21:46:13 2017 +0200
@@ -51,14 +51,14 @@
     private final Path outDir = Paths.get("ComputeFQNsTest");
 
     public void testAddImport() throws Exception {
-        compiler.compile(outDir, "package test1; public class TestClass { }", "package test2; public class TestClass { }");
+        compiler.compile(outDir, "package test1; public class FQNTestClass { }", "package test2; public class FQNTestClass { }");
         String jarName = "test.jar";
-        compiler.jar(outDir, jarName, "test1/TestClass.class", "test2/TestClass.class");
+        compiler.jar(outDir, jarName, "test1/FQNTestClass.class", "test2/FQNTestClass.class");
         addToClasspath(compiler.getPath(outDir).resolve(jarName));
 
         assertInferredFQNs("LinkedList", "java.util.LinkedList");
         assertInferredFQNs("ArrayList", "java.util.ArrayList");
-        assertInferredFQNs("TestClass", "test1.TestClass", "test2.TestClass");
+        assertInferredFQNs("FQNTestClass", "test1.FQNTestClass", "test2.FQNTestClass");
         assertInferredFQNs("CharSequence", "CharSequence".length(), true, "java.lang.CharSequence");
         assertInferredFQNs("unresolvable");
         assertInferredFQNs("void test(ArrayList", "ArrayList".length(), false, "java.util.ArrayList");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/jshell/ExceptionMessageTest.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8185108
+ * @summary Test exception().getMessage() in events returned by eval()
+ * @run testng ExceptionMessageTest
+ */
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.List;
+
+import jdk.jshell.JShell;
+import jdk.jshell.SnippetEvent;
+import jdk.jshell.execution.DirectExecutionControl;
+import jdk.jshell.execution.JdiExecutionControlProvider;
+import jdk.jshell.execution.LocalExecutionControlProvider;
+import jdk.jshell.spi.ExecutionControl;
+import jdk.jshell.spi.ExecutionControlProvider;
+import jdk.jshell.spi.ExecutionEnv;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+@Test
+public class ExceptionMessageTest {
+
+    public void testDefaultEC() {
+        doTestCases(new JdiExecutionControlProvider(), "default");
+    }
+
+    public void testLocalEC() {
+        doTestCases(new LocalExecutionControlProvider(), "local");
+    }
+
+    public void testDirectEC() {
+        doTestCases(new ExecutionControlProvider() {
+            public ExecutionControl generate(ExecutionEnv env, Map<String, String> param) throws Throwable {
+                return new DirectExecutionControl();
+            }
+
+            public String name() {
+                return "direct";
+            }
+
+        }, "direct");
+    }
+
+    private JShell shell(ExecutionControlProvider ec) {
+        return JShell.builder().executionEngine(ec, new HashMap<>()).build();
+    }
+
+    private void doTestCases(ExecutionControlProvider ec, String label) {
+        JShell jshell = shell(ec);
+        doTest(jshell, label, "throw new java.io.IOException();", null);
+        doTest(jshell, label, "throw new java.io.IOException((String)null);", null);
+        doTest(jshell, label, "throw new java.io.IOException(\"\");", "");
+        doTest(jshell, label, "throw new java.io.IOException(\"test\");", "test");
+    }
+
+    private void doTest(JShell jshell, String label, String code, String expected) {
+        List<SnippetEvent> result = jshell.eval(code);
+        assertEquals(result.size(), 1, "Expected only one event");
+        SnippetEvent evt = result.get(0);
+        Exception exc = evt.exception();
+        String out = exc.getMessage();
+        assertEquals(out, expected, "Exception message not as expected: " +
+                label + " -- " + code);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/jshell/PasteAndMeasurementsUITest.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8182297
+ * @summary Verify that pasting multi-line snippets works properly.
+ * @library /tools/lib
+ * @modules
+ *     java.base/java.lang:open
+ *     java.base/java.io:open
+ *     jdk.compiler/com.sun.tools.javac.api
+ *     jdk.compiler/com.sun.tools.javac.main
+ *     jdk.jshell/jdk.internal.jshell.tool.resources:open
+ *     jdk.jshell/jdk.jshell:open
+ * @build toolbox.ToolBox toolbox.JarTask toolbox.JavacTask
+ * @build Compiler UITesting
+ * @build PasteAndMeasurementsUITest
+ * @run testng/othervm PasteAndMeasurementsUITest
+ */
+
+import java.io.Console;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+
+import org.testng.annotations.Test;
+
+@Test
+public class PasteAndMeasurementsUITest extends UITesting {
+
+    public void testPrevNextSnippet() throws Exception {
+        System.setProperty(ANSI_SUPPORTED_PROPERTY, "true");
+        Field cons = System.class.getDeclaredField("cons");
+        cons.setAccessible(true);
+        Constructor console = Console.class.getDeclaredConstructor();
+        console.setAccessible(true);
+        cons.set(null, console.newInstance());
+        doRunTest((inputSink, out) -> {
+            inputSink.write("void test1() {\nSystem.err.println(1);\n}\n" + LOC +
+                            "void test2() {\nSystem.err.println(1);\n}\n" + LOC + LOC + LOC + LOC + LOC);
+            waitOutput(out,       "\u001b\\[6nvoid test1\\(\\) \\{\n" +
+                            "\u0006\u001b\\[6nSystem.err.println\\(1\\);\n" +
+                            "\u0006\u001b\\[6n\\}\n" +
+                            "\\|  created method test1\\(\\)\n" +
+                            "\u0005\u001b\\[6nvoid test2\\(\\) \\{\n" +
+                            "\u0006\u001b\\[6nSystem.err.println\\(1\\);\n" +
+                            "\u0006\u001b\\[6n\\}\n" +
+                            "\\|  created method test2\\(\\)\n" +
+                            "\u0005\u001b\\[6n");
+        });
+    }
+        private static final String ANSI_SUPPORTED_PROPERTY = "test.terminal.ansi.supported";
+        private static final String LOC = "\033[12;1R";
+}
--- a/langtools/test/jdk/jshell/UITesting.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/langtools/test/jdk/jshell/UITesting.java	Mon Aug 28 21:46:13 2017 +0200
@@ -138,7 +138,7 @@
             while (true) {
                 Matcher m = expectedPattern.matcher(out);
                 if (m.find()) {
-                    out.delete(0, m.end() + 1);
+                    out.delete(0, m.end());
                     return ;
                 }
                 long e =  System.currentTimeMillis();
--- a/make/CompileJavaModules.gmk	Mon Aug 28 16:40:01 2017 +0000
+++ b/make/CompileJavaModules.gmk	Mon Aug 28 21:46:13 2017 +0200
@@ -508,6 +508,7 @@
     org.graalvm.compiler.jtt \
     org.graalvm.compiler.lir.jtt \
     org.graalvm.compiler.lir.test \
+    org.graalvm.compiler.loop.test \
     org.graalvm.compiler.microbenchmarks \
     org.graalvm.compiler.nodes.test \
     org.graalvm.compiler.options.test \
@@ -515,6 +516,8 @@
     org.graalvm.compiler.replacements.test \
     org.graalvm.compiler.test \
     org.graalvm.compiler.virtual.bench \
+    org.graalvm.micro.benchmarks \
+    org.graalvm.util.test \
     #
 
 ################################################################################
--- a/make/MainSupport.gmk	Mon Aug 28 16:40:01 2017 +0000
+++ b/make/MainSupport.gmk	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
 	    JT_HOME=$(JT_HOME) PRODUCT_HOME=$(strip $2) \
 	    TEST_IMAGE_DIR=$(TEST_IMAGE_DIR) \
 	    ALT_OUTPUTDIR=$(OUTPUT_ROOT) TEST_JOBS=$(TEST_JOBS) \
-	    JT_JAVA=$(BOOT_JDK) \
+	    JT_JAVA=$(BOOT_JDK) JIB_JAR=$(JIB_JAR) \
 	    JOBS=$(JOBS) $1) || true
 endef
 
--- a/make/RunTests.gmk	Mon Aug 28 16:40:01 2017 +0000
+++ b/make/RunTests.gmk	Mon Aug 28 21:46:13 2017 +0200
@@ -364,6 +364,10 @@
     $1_JTREG_BASIC_OPTIONS += -nativepath:$$($1_JTREG_NATIVEPATH)
   endif
 
+  ifneq ($$(JIB_JAR), )
+    $1_JTREG_BASIC_OPTIONS += -cpa:$$(JIB_JAR)
+  endif
+
   run-test-$1:
 	$$(call LogWarn)
 	$$(call LogWarn, Running test '$$($1_TEST)')
--- a/make/common/NativeCompilation.gmk	Mon Aug 28 16:40:01 2017 +0000
+++ b/make/common/NativeCompilation.gmk	Mon Aug 28 21:46:13 2017 +0200
@@ -932,10 +932,35 @@
       endif
     endif
 
+    # Unfortunately the @-file trick does not work reliably when using clang.
+    # Clang does not propagate the @-file parameter to the ld sub process, but
+    # instead puts the full content on the command line. At least the llvm ld
+    # does not even support an @-file.
+    #
+    # When linking a large amount of object files, we risk hitting the limit
+    # of the command line length even on posix systems if the path length of
+    # the output dir is very long due to our use of absolute paths. To
+    # mitigate this, use paths relative to the output dir when linking over
+    # 500 files with clang and the output dir path is deep.
+    ifneq ($$(word 500, $$($1_ALL_OBJS)), )
+      ifeq ($$(TOOLCHAIN_TYPE), clang)
+        # There is no strlen function in make, but checking path depth is a
+        # reasonable approximation.
+        ifneq ($$(word 10, $$(subst /, ,$$(OUTPUT_ROOT))), )
+          $1_LINK_OBJS_RELATIVE := true
+          $1_ALL_OBJS_RELATIVE := $$(patsubst $$(OUTPUT_ROOT)/%, %, $$($1_ALL_OBJS))
+        endif
+      endif
+    endif
+
     $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \
         $$($1_VARDEPS_FILE)
                 ifneq ($$($1_OBJ_FILE_LIST), )
-		  $$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
+                  ifeq ($$($1_LINK_OBJS_RELATIVE), true)
+		    $$(eval $$(call ListPathsSafely, $1_ALL_OBJS_RELATIVE, $$($1_OBJ_FILE_LIST)))
+                  else
+		    $$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
+                  endif
                 endif
                 # Keep as much as possible on one execution line for best performance
                 # on Windows
@@ -951,6 +976,7 @@
 		  $$($1_STRIP_CMD)
                 else
 		  $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
+		      $$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUT_ROOT) ; ) \
 		      $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
 		      $(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$($1_LIBS) \
 		      $$($1_EXTRA_LIBS)) ; \
--- a/make/devkit/Tools.gmk	Mon Aug 28 16:40:01 2017 +0000
+++ b/make/devkit/Tools.gmk	Mon Aug 28 21:46:13 2017 +0200
@@ -83,8 +83,6 @@
     libXdmcp libXdmcp-devel \
     libXau libXau-devel \
     libgcc \
-    elfutils elfutils-libs elfutils-devel \
-    elfutils-libelf elfutils-libelf-devel \
     zlib zlib-devel \
     libffi libffi-devel
 
--- a/make/jprt.properties	Mon Aug 28 16:40:01 2017 +0000
+++ b/make/jprt.properties	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -417,15 +417,6 @@
 
 # Make file based test targets
 
-my.make.rule.test.targets.hotspot.basicvmtests=                         \
-  linux_i586_3.8-*-default-hotspot_basicvmtest,                         \
-  linux_x64_3.8-*-default-hotspot_basicvmtest,                          \
-  macosx_x64_10.9-*-default-hotspot_basicvmtest,                        \
-  solaris_sparcv9_5.11-*-default-hotspot_basicvmtest,                   \
-  solaris_x64_5.11-*-default-hotspot_basicvmtest,                       \
-  windows_i586_6.3-*-default-hotspot_basicvmtest,                       \
-  windows_x64_6.3-*-default-hotspot_basicvmtest
-
 my.make.rule.test.targets.hotspot.gtest= \
   linux_i586_3.8-*-default-hotspot_gtest, \
   linux_x64_3.8-*-default-hotspot_gtest, \
@@ -447,30 +438,29 @@
 
 # Hotspot jtreg tests
 my.make.rule.test.targets.hotspot.reg=							\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_compiler_1},		\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_compiler_2},		\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_compiler_3},		\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_compiler_closed},	\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_1},		\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_2},		\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_closed},		\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_gcold},		\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_gcbasher},	\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_runtime},		\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_serviceability},	\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_compiler_1},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_compiler_2},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_compiler_3},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_compiler_closed},	\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_gc_1},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_gc_2},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_gc_closed},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_gc_gcold},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_gc_gcbasher},	\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_runtime},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_serviceability},	\
   ${my.make.rule.test.targets.hotspot.reg.group:GROUP=jdk_svc_sanity},			\
-  solaris_sparcv9_5.11-product-c2-hotspot_fast_gc_gcbasher,				\
-  solaris_x64_5.11-product-c2-hotspot_fast_gc_gcbasher,					\
-  linux_i586_3.8-product-c2-hotspot_fast_gc_gcbasher,					\
-  linux_x64_3.8-product-c2-hotspot_fast_gc_gcbasher,					\
-  macosx_x64_10.9-product-c2-hotspot_fast_gc_gcbasher,					\
-  windows_i586_6.3-product-c2-hotspot_fast_gc_gcbasher,					\
-  windows_x64_6.3-product-c2-hotspot_fast_gc_gcbasher,                                  \
+  solaris_sparcv9_5.11-product-c2-hotspot_tier1_gc_gcbasher,				\
+  solaris_x64_5.11-product-c2-hotspot_tier1_gc_gcbasher,					\
+  linux_i586_3.8-product-c2-hotspot_tier1_gc_gcbasher,					\
+  linux_x64_3.8-product-c2-hotspot_tier1_gc_gcbasher,					\
+  macosx_x64_10.9-product-c2-hotspot_tier1_gc_gcbasher,					\
+  windows_i586_6.3-product-c2-hotspot_tier1_gc_gcbasher,					\
+  windows_x64_6.3-product-c2-hotspot_tier1_gc_gcbasher,                                  \
   ${my.additional.make.rule.test.targets.hotspot.reg}
 
 # Other Makefile based Hotspot tests
 my.make.rule.test.targets.hotspot.other=                                \
-  ${my.make.rule.test.targets.hotspot.basicvmtests},                    \
   ${my.make.rule.test.targets.hotspot.gtest},                           \
   ${my.additional.make.rule.test.targets.hotspot.other}
 
--- a/nashorn/.hgtags	Mon Aug 28 16:40:01 2017 +0000
+++ b/nashorn/.hgtags	Mon Aug 28 21:46:13 2017 +0200
@@ -435,3 +435,4 @@
 32228b3fd77a8c65ba5d4d9e30de0f7eb56fca94 jdk-10+19
 bece58f762168a6615bd036626a572a647f6b507 jdk-9+180
 47f8d75b8765ff8410ebc89619e537321cc10c32 jdk-9+181
+9133969febb50ec683bfd79fc506771fb4f7de6c jdk-10+20
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/regexp/joni/Analyser.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/regexp/joni/Analyser.java	Mon Aug 28 21:46:13 2017 +0200
@@ -102,6 +102,8 @@
 
         env.memNodes = null;
 
+        new ArrayCompiler(this).compile();
+
         if (regex.numRepeat != 0 || regex.btMemEnd != 0) {
             regex.stackPopLevel = StackPopLevel.ALL;
         } else {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/regexp/joni/Regex.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/regexp/joni/Regex.java	Mon Aug 28 21:46:13 2017 +0200
@@ -127,31 +127,17 @@
         this.caseFoldFlag = caseFoldFlag;
         this.warnings = warnings;
 
-        this.analyser = new Analyser(new ScanEnvironment(this, syntax), chars, p, end);
-        this.analyser.compile();
+        new Analyser(new ScanEnvironment(this, syntax), chars, p, end).compile();
 
         this.warnings = null;
     }
 
-    public synchronized MatcherFactory compile() {
-        if (factory == null && analyser != null) {
-            new ArrayCompiler(analyser).compile();
-            analyser = null; // only do this once
-        }
-        assert factory != null;
-        return factory;
-    }
-
     public Matcher matcher(final char[] chars) {
         return matcher(chars, 0, chars.length);
     }
 
     public Matcher matcher(final char[] chars, final int p, final int end) {
-        MatcherFactory matcherFactory = factory;
-        if (matcherFactory == null) {
-            matcherFactory = compile();
-        }
-        return matcherFactory.create(this, chars, p, end);
+        return factory.create(this, chars, p, end);
     }
 
     public WarnCallback getWarnings() {
@@ -309,7 +295,6 @@
     }
 
     public String dumpByteCode() {
-        compile();
         return new ByteCodePrinter(this).byteCodeListToString();
     }
 
--- a/nashorn/test/TEST.ROOT	Mon Aug 28 16:40:01 2017 +0000
+++ b/nashorn/test/TEST.ROOT	Mon Aug 28 21:46:13 2017 +0200
@@ -8,7 +8,7 @@
 groups=TEST.groups
 
 # Minimum jtreg version
-requiredVersion=4.2 b07
+requiredVersion=4.2 b08
 
 # Use new module options
 useNewOptions=true
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8175362.js	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8175362 : StringIndexOutOfBoundsException from /.*((a[^a]+){2})c$/.exec('ababc')
+ *
+ * @test
+ * @run
+ */
+
+var regexp;
+
+regexp = new RegExp(".*((a[^a]+){2})c$");
+print(regexp.exec("ababc"));
+regexp = new RegExp("(a[^a]+){3}");
+print(regexp.exec("ababc"));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8175362.js.EXPECTED	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,2 @@
+ababc,abab,ab
+null
--- a/test/TestCommon.gmk	Mon Aug 28 16:40:01 2017 +0000
+++ b/test/TestCommon.gmk	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -124,13 +124,6 @@
   PRODUCT_HOME := $(PRODUCT_HOME)
 endif
 
-# Expect JPRT to set JAVA_ARGS (e.g. -server etc.)
-ifdef JAVA_ARGS
-  JAVA_OPTIONS := $(JAVA_ARGS)
-else
-  JAVA_OPTIONS :=
-endif
-
 # Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.)
 #   Should be passed into 'java' only.
 #   Could include: -d64 -server -client OR any java option
@@ -369,9 +362,15 @@
 endif
 # Give tests access to JT_JAVA, see JDK-8141609
 JTREG_BASIC_OPTIONS += -e:JDK8_HOME=${JT_JAVA}
+# Give aot tests access to Visual Studio installation
+ifneq ($(VS120COMNTOOLS), )
+  JTREG_BASIC_OPTIONS += -e:VS120COMNTOOLS=$(shell $(GETMIXEDPATH) "$(VS120COMNTOOLS)")
+endif
 # Set other vm and test options
-JTREG_TEST_OPTIONS += $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_OPTIONS:%=-vmoption:%) $(JAVA_VM_ARGS:%=-vmoption:%)
-
+JTREG_TEST_OPTIONS += $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
+ifneq ($(JIB_JAR), )
+  JTREG_BASIC_OPTIONS += -cpa:$(shell $(GETMIXEDPATH) "$(JIB_JAR)")
+endif
 ifeq ($(IGNORE_MARKED_TESTS), true)
   # Option to tell jtreg to not run tests marked with "ignore"
   ifeq ($(PLATFORM), windows)
--- a/test/jtreg-ext/requires/VMProps.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/test/jtreg-ext/requires/VMProps.java	Mon Aug 28 21:46:13 2017 +0200
@@ -24,6 +24,7 @@
 
 import java.io.IOException;
 import java.nio.file.Files;
+import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.nio.file.StandardOpenOption;
 import java.util.ArrayList;
@@ -37,6 +38,7 @@
 import sun.hotspot.cpuinfo.CPUInfo;
 import sun.hotspot.gc.GC;
 import sun.hotspot.WhiteBox;
+import jdk.test.lib.Platform;
 
 /**
  * The Class to be invoked by jtreg prior Test Suite execution to
@@ -66,6 +68,11 @@
         map.put("vm.jvmci", vmJvmci());
         map.put("vm.emulatedClient", vmEmulatedClient());
         map.put("vm.cpu.features", cpuFeatures());
+        map.put("vm.rtm.cpu", vmRTMCPU());
+        map.put("vm.rtm.os", vmRTMOS());
+        map.put("vm.aot", vmAOT());
+        // vm.cds is true if the VM is compiled with cds support.
+        map.put("vm.cds", vmCDS());
         vmGC(map); // vm.gc.X = true/false
 
         VMProps.dump(map);
@@ -227,6 +234,65 @@
     }
 
     /**
+     * @return true if VM runs RTM supported OS and false otherwise.
+     */
+    protected String vmRTMOS() {
+        boolean isRTMOS = true;
+
+        if (Platform.isAix()) {
+            // Actually, this works since AIX 7.1.3.30, but os.version property
+            // is set to 7.1.
+            isRTMOS = (Platform.getOsVersionMajor()  > 7) ||
+                      (Platform.getOsVersionMajor() == 7 && Platform.getOsVersionMinor() > 1);
+
+        } else if (Platform.isLinux()) {
+            if (Platform.isPPC()) {
+                isRTMOS = (Platform.getOsVersionMajor()  > 4) ||
+                          (Platform.getOsVersionMajor() == 4 && Platform.getOsVersionMinor() > 1);
+            }
+        }
+        return "" + isRTMOS;
+    }
+
+    /**
+     * @return true if VM runs RTM supported CPU and false otherwise.
+     */
+    protected String vmRTMCPU() {
+        boolean vmRTMCPU = (Platform.isPPC() ? CPUInfo.hasFeature("tcheck") : CPUInfo.hasFeature("rtm"));
+
+        return "" + vmRTMCPU;
+    }
+
+    /**
+     * @return true if VM supports AOT and false otherwise
+     */
+    protected String vmAOT() {
+        // builds with aot have jaotc in <JDK>/bin
+        Path bin = Paths.get(System.getProperty("java.home"))
+                        .resolve("bin");
+        Path jaotc;
+        if (Platform.isWindows()) {
+            jaotc = bin.resolve("jaotc.exe");
+        } else {
+            jaotc = bin.resolve("jaotc");
+        }
+        return "" + Files.exists(jaotc);
+    }
+
+    /**
+     * Check for CDS support.
+     *
+     * @return true if CDS is supported by the VM to be tested.
+     */
+    protected String vmCDS() {
+        if (WB.isCDSIncludedInVmBuild()) {
+            return "true";
+        } else {
+            return "false";
+        }
+    }
+
+    /**
      * Dumps the map to the file if the file name is given as the property.
      * This functionality could be helpful to know context in the real
      * execution.
--- a/test/lib/jdk/test/lib/Platform.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/test/lib/jdk/test/lib/Platform.java	Mon Aug 28 21:46:13 2017 +0200
@@ -274,4 +274,18 @@
                       .matcher(osArch)
                       .matches();
     }
+
+    /**
+     * Returns file extension of shared library, e.g. "so" on linux, "dll" on windows.
+     * @return file extension
+     */
+    public static String sharedLibraryExt() {
+        if (isWindows()) {
+            return "dll";
+        } else if (isOSX()) {
+            return "dylib";
+        } else {
+            return "so";
+        }
+    }
 }
--- a/test/lib/jdk/test/lib/Utils.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/test/lib/jdk/test/lib/Utils.java	Mon Aug 28 21:46:13 2017 +0200
@@ -90,6 +90,11 @@
      */
     public static final String TEST_JDK = System.getProperty("test.jdk");
 
+    /*
+     * Returns the value of 'compile.jdk' system property
+     */
+    public static final String COMPILE_JDK= System.getProperty("compile.jdk", TEST_JDK);
+
     /**
      * Returns the value of 'test.classes' system property
      */
@@ -701,5 +706,58 @@
             throw new RuntimeException("Failed to determine distro.", t);
         }
     }
+
+    // This method is intended to be called from a jtreg test.
+    // It will identify the name of the test by means of stack walking.
+    // It can handle both jtreg tests and a testng tests wrapped inside jtreg tests.
+    // For jtreg tests the name of the test will be searched by stack-walking
+    // until the method main() is found; the class containing that method is the
+    // main test class and will be returned as the name of the test.
+    // Special handling is used for testng tests.
+    public static String getTestName() {
+        String result = null;
+        // If we are using testng, then we should be able to load the "Test" annotation.
+        Class testClassAnnotation;
+
+        try {
+            testClassAnnotation = Class.forName("org.testng.annotations.Test");
+        } catch (ClassNotFoundException e) {
+            testClassAnnotation = null;
+        }
+
+        StackTraceElement[] elms = (new Throwable()).getStackTrace();
+        for (StackTraceElement n: elms) {
+            String className = n.getClassName();
+
+            // If this is a "main" method, then use its class name, but only
+            // if we are not using testng.
+            if (testClassAnnotation == null && "main".equals(n.getMethodName())) {
+                result = className;
+                break;
+            }
+
+            // If this is a testng test, the test will have no "main" method. We can
+            // detect a testng test class by looking for the org.testng.annotations.Test
+            // annotation. If present, then use the name of this class.
+            if (testClassAnnotation != null) {
+                try {
+                    Class c = Class.forName(className);
+                    if (c.isAnnotationPresent(testClassAnnotation)) {
+                        result = className;
+                        break;
+                    }
+                } catch (ClassNotFoundException e) {
+                    throw new RuntimeException("Unexpected exception: " + e, e);
+                }
+            }
+        }
+
+        if (result == null) {
+            throw new RuntimeException("Couldn't find main test class in stack trace");
+        }
+
+        return result;
+    }
+
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/jdk/test/lib/artifacts/Artifact.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.lib.artifacts;
+
+import java.lang.annotation.*;
+
+@Target(ElementType.TYPE)
+@Repeatable(ArtifactContainer.class)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Artifact {
+    String organization();
+    String name();
+    String revision();
+    String extension();
+    String classifier() default "";
+    boolean unpack() default true;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/jdk/test/lib/artifacts/ArtifactContainer.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.lib.artifacts;
+
+import java.lang.annotation.*;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ArtifactContainer {
+    Artifact[] value();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/jdk/test/lib/artifacts/ArtifactManager.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.lib.artifacts;
+
+import java.io.FileNotFoundException;
+import java.nio.file.Path;
+
+public interface ArtifactManager {
+    public Path resolve(Artifact artifact) throws FileNotFoundException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/jdk/test/lib/artifacts/ArtifactResolver.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.lib.artifacts;
+
+import java.io.FileNotFoundException;
+import java.nio.file.Path;
+import java.util.HashMap;
+import java.util.Map;
+
+public class ArtifactResolver {
+    public static Map<String, Path> resolve(Class<?> klass) throws FileNotFoundException {
+        ArtifactManager manager = new DefaultArtifactManager();
+        try {
+            String managerName = System.getProperty("jdk.test.lib.artifacts.artifactmanager");
+            if (managerName != null) {
+                manager = (ArtifactManager) Class.forName(managerName).newInstance();
+            } else {
+                manager = JibArtifactManager.newInstance();
+            }
+        } catch (Exception e) {
+            // If we end up here, we'll use the DefaultArtifactManager
+        }
+
+        ArtifactContainer artifactContainer = klass.getAnnotation(ArtifactContainer.class);
+        HashMap<String, Path> locations = new HashMap<>();
+        Artifact[] artifacts;
+
+        if (artifactContainer == null) {
+            artifacts = new Artifact[]{klass.getAnnotation(Artifact.class)};
+        } else {
+            artifacts = artifactContainer.value();
+        }
+        for (Artifact artifact : artifacts) {
+            locations.put(artifactName(artifact), manager.resolve(artifact));
+        }
+
+        return locations;
+    }
+
+    private static String artifactName(Artifact artifact) {
+        // Format of the artifact name is <organization>.<name>-<revision>(-<classifier>)
+        String name = String.format("%s.%s-%s", artifact.organization(), artifact.name(), artifact.revision());
+        if (artifact.classifier().length() != 0) {
+            name = name +"-" + artifact.classifier();
+        }
+        return name;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/jdk/test/lib/artifacts/DefaultArtifactManager.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.lib.artifacts;
+
+import java.io.FileNotFoundException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+public class DefaultArtifactManager implements ArtifactManager {
+    @Override
+    public Path resolve(Artifact artifact) throws FileNotFoundException {
+        String name = artifact.name();
+        String location = System.getProperty(artifactProperty(name));
+        if (location == null) {
+            throw new FileNotFoundException("Couldn't automatically resolve dependency for " + name + " , revision " + artifact.revision() + "\n" +
+                                            "Please specify the location using " + artifactProperty(name));
+        }
+        return Paths.get(location);
+    }
+
+    private static String artifactProperty(String name) {
+        return "jdk.test.lib.artifacts." + name;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/jdk/test/lib/artifacts/JibArtifactManager.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.lib.artifacts;
+
+import java.io.FileNotFoundException;
+import java.lang.reflect.Method;
+import java.nio.file.Path;
+import java.util.HashMap;
+import java.util.Map;
+
+public class JibArtifactManager implements ArtifactManager {
+    private static String jibVersion = "1.0";
+    private Object installerObject;
+
+    private JibArtifactManager(Object o) {
+        installerObject = o;
+    }
+
+    public static JibArtifactManager newInstance() throws ClassNotFoundException {
+        try {
+            Class jibServiceFactory = Class.forName("com.oracle.jib.api.JibServiceFactory");
+            Object jibArtifactInstaller = jibServiceFactory.getMethod("createJibArtifactInstaller").invoke(null);
+            return new JibArtifactManager(jibArtifactInstaller);
+        } catch (Exception e) {
+            throw new ClassNotFoundException();
+        }
+    }
+
+    private Path download(String jibVersion, HashMap<String, Object> artifactDescription) throws Exception {
+        return invokeInstallerMethod("download", jibVersion, artifactDescription);
+    }
+
+    private Path install(String jibVersion, HashMap<String, Object> artifactDescription) throws Exception {
+        return invokeInstallerMethod("install", jibVersion, artifactDescription);
+    }
+
+    private Path invokeInstallerMethod(String methodName, String jibVersion, HashMap<String, Object> artifactDescription) throws Exception {
+        Method m = Class.forName("com.oracle.jib.api.JibArtifactInstaller").getMethod(methodName, String.class, Map.class);
+        return (Path)m.invoke(installerObject, jibVersion, artifactDescription);
+    }
+
+    @Override
+    public Path resolve(Artifact artifact) throws FileNotFoundException {
+        Path path;
+        // Use the DefaultArtifactManager to enable users to override locations
+        try {
+            ArtifactManager manager = new DefaultArtifactManager();
+            path = manager.resolve(artifact);
+        } catch (FileNotFoundException e) {
+            // Location hasn't been overridden, continue to automatically try to resolve the dependency
+            try {
+                HashMap<String, Object> artifactDescription = new HashMap<>();
+                artifactDescription.put("module", artifact.name());
+                artifactDescription.put("organization", artifact.organization());
+                artifactDescription.put("ext", artifact.extension());
+                artifactDescription.put("revision", artifact.revision());
+                if (artifact.classifier().length() > 0) {
+                    artifactDescription.put("classifier", artifact.classifier());
+                }
+
+                path = download(jibVersion, artifactDescription);
+                if (artifact.unpack()) {
+                    path = install(jibVersion, artifactDescription);
+                }
+            } catch (Exception exception) {
+                throw new FileNotFoundException("Failed to resolve the artifact " + artifact);
+            }
+        }
+        return path;
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/jdk/test/lib/cds/CDSOptions.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.test.lib.cds;
+
+import java.util.ArrayList;
+
+// This class represents options used
+// during creation of CDS archive and/or running JVM with a CDS archive
+public class CDSOptions {
+    public String xShareMode = "on";
+    public String archiveName;
+    public ArrayList<String> prefix = new ArrayList<String>();
+    public ArrayList<String> suffix = new ArrayList<String>();
+
+    // Indicate whether to append "-version" when using CDS Archive.
+    // Most of tests will use '-version'
+    public boolean useVersion = true;
+
+
+    public CDSOptions() {
+    }
+
+
+    public CDSOptions addPrefix(String... prefix) {
+        for (String s : prefix) this.prefix.add(s);
+        return this;
+    }
+
+
+    public CDSOptions addSuffix(String... suffix) {
+        for (String s : suffix) this.suffix.add(s);
+        return this;
+    }
+
+    public CDSOptions setXShareMode(String mode) {
+        this.xShareMode = mode;
+        return this;
+    }
+
+
+    public CDSOptions setArchiveName(String name) {
+        this.archiveName = name;
+        return this;
+    }
+
+
+    public CDSOptions setUseVersion(boolean use) {
+        this.useVersion = use;
+        return this;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/jdk/test/lib/cds/CDSTestUtils.java	Mon Aug 28 21:46:13 2017 +0200
@@ -0,0 +1,380 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.test.lib.cds;
+
+import java.io.IOException;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+import java.util.ArrayList;
+import jdk.test.lib.Utils;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
+
+// This class contains common test utilities for testing CDS
+public class CDSTestUtils {
+    // Specify this property to copy sdandard output of the child test process to
+    // the parent/main stdout of the test.
+    // By default such output is logged into a file, and is copied into the main stdout.
+    public static final boolean CopyChildStdoutToMainStdout =
+        Boolean.valueOf(System.getProperty("test.cds.copy.child.stdout", "true"));
+
+    // This property is passed to child test processes
+    public static final String TestTimeoutFactor = System.getProperty("test.timeout.factor", "1.0");
+
+    public static final String UnableToMapMsg =
+        "Unable to map shared archive: test did not complete; assumed PASS";
+
+    // Create bootstrap CDS archive,
+    // use extra JVM command line args as a prefix.
+    // For CDS tests specifying prefix makes more sense than specifying suffix, since
+    // normally there are no classes or arguments to classes, just "-version"
+    // To specify suffix explicitly use CDSOptions.addSuffix()
+    public static OutputAnalyzer createArchive(String... cliPrefix)
+        throws Exception {
+        return createArchive((new CDSOptions()).addPrefix(cliPrefix));
+    }
+
+    // Create bootstrap CDS archive
+    public static OutputAnalyzer createArchive(CDSOptions opts)
+        throws Exception {
+
+        ArrayList<String> cmd = new ArrayList<String>();
+
+        for (String p : opts.prefix) cmd.add(p);
+
+        cmd.add("-Xshare:dump");
+        cmd.add("-Xlog:cds,cds+hashtables");
+        cmd.add("-XX:+UnlockDiagnosticVMOptions");
+        if (opts.archiveName == null)
+            opts.archiveName = getDefaultArchiveName();
+        cmd.add("-XX:SharedArchiveFile=./" + opts.archiveName);
+
+        for (String s : opts.suffix) cmd.add(s);
+
+        String[] cmdLine = cmd.toArray(new String[cmd.size()]);
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, cmdLine);
+        return executeAndLog(pb, "dump");
+    }
+
+
+    // check result of 'dump-the-archive' operation, that is "-Xshare:dump"
+    public static OutputAnalyzer checkDump(OutputAnalyzer output, String... extraMatches)
+        throws Exception {
+
+        output.shouldContain("Loading classes to share");
+        output.shouldHaveExitValue(0);
+
+        for (String match : extraMatches) {
+            output.shouldContain(match);
+        }
+
+        return output;
+    }
+
+
+    // A commonly used convenience methods to create an archive and check the results
+    // Creates an archive and checks for errors
+    public static OutputAnalyzer createArchiveAndCheck(CDSOptions opts)
+        throws Exception {
+        return checkDump(createArchive(opts));
+    }
+
+
+    public static OutputAnalyzer createArchiveAndCheck(String... cliPrefix)
+        throws Exception {
+        return checkDump(createArchive(cliPrefix));
+    }
+
+
+    // This method should be used to check the output of child VM for common exceptions.
+    // Most of CDS tests deal with child VM processes for creating and using the archive.
+    // However exceptions that occur in the child process do not automatically propagate
+    // to the parent process. This mechanism aims to improve the propagation
+    // of exceptions and common errors.
+    // Exception e argument - an exception to be re-thrown if none of the common
+    // exceptions match. Pass null if you wish not to re-throw any exception.
+    public static void checkCommonExecExceptions(OutputAnalyzer output, Exception e)
+        throws Exception {
+        if (output.getStdout().contains("http://bugreport.java.com/bugreport/crash.jsp")) {
+            throw new RuntimeException("Hotspot crashed");
+        }
+        if (output.getStdout().contains("TEST FAILED")) {
+            throw new RuntimeException("Test Failed");
+        }
+        if (output.getOutput().contains("shared class paths mismatch")) {
+            throw new RuntimeException("shared class paths mismatch");
+        }
+        if (output.getOutput().contains("Unable to unmap shared space")) {
+            throw new RuntimeException("Unable to unmap shared space");
+        }
+
+        // Special case -- sometimes Xshare:on fails because it failed to map
+        // at given address. This behavior is platform-specific, machine config-specific
+        // and can be random (see ASLR).
+        if (isUnableToMap(output)) {
+            System.out.println(UnableToMapMsg);
+            return;
+        }
+
+        if (e != null)
+            throw e;
+    }
+
+
+    // Check the output for indication that mapping of the archive failed.
+    // Performance note: this check seems to be rather costly - searching the entire
+    // output stream of a child process for multiple strings. However, it is necessary
+    // to detect this condition, a failure to map an archive, since this is not a real
+    // failure of the test or VM operation, and results in a test being "skipped".
+    // Suggestions to improve:
+    // 1. VM can designate a special exit code for such condition.
+    // 2. VM can print a single distinct string indicating failure to map an archive,
+    //    instead of utilizing multiple messages.
+    // These are suggestions to improve testibility of the VM. However, implementing them
+    // could also improve usability in the field.
+    public static boolean isUnableToMap(OutputAnalyzer output) {
+        String outStr = output.getOutput();
+        if ((output.getExitValue() == 1) && (
+            outStr.contains("Unable to reserve shared space at required address") ||
+            outStr.contains("Unable to map ReadOnly shared space at required address") ||
+            outStr.contains("Unable to map ReadWrite shared space at required address") ||
+            outStr.contains("Unable to map MiscData shared space at required address") ||
+            outStr.contains("Unable to map MiscCode shared space at required address") ||
+            outStr.contains("Unable to map shared string space at required address") ||
+            outStr.contains("Could not allocate metaspace at a compatible address") ||
+            outStr.contains("Unable to allocate shared string space: range is not within java heap") ))
+        {
+            return true;
+        }
+
+        return false;
+    }
+
+
+    // Execute JVM with CDS archive, specify command line args suffix
+    public static OutputAnalyzer runWithArchive(String... cliPrefix)
+        throws Exception {
+
+        return runWithArchive( (new CDSOptions())
+                               .setArchiveName(getDefaultArchiveName())
+                               .addPrefix(cliPrefix) );
+    }
+
+
+    // Execute JVM with CDS archive, specify CDSOptions
+    public static OutputAnalyzer runWithArchive(CDSOptions opts)
+        throws Exception {
+
+        ArrayList<String> cmd = new ArrayList<String>();
+
+        for (String p : opts.prefix) cmd.add(p);
+
+        cmd.add("-Xshare:" + opts.xShareMode);
+        cmd.add("-XX:+UnlockDiagnosticVMOptions");
+        cmd.add("-Dtest.timeout.factor=" + TestTimeoutFactor);
+
+        if (opts.archiveName == null)
+            opts.archiveName = getDefaultArchiveName();
+        cmd.add("-XX:SharedArchiveFile=" + opts.archiveName);
+
+        if (opts.useVersion)
+            cmd.add("-version");
+
+        for (String s : opts.suffix) cmd.add(s);
+
+        String[] cmdLine = cmd.toArray(new String[cmd.size()]);
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, cmdLine);
+        return executeAndLog(pb, "exec");
+    }
+
+
+    // A commonly used convenience methods to create an archive and check the results
+    // Creates an archive and checks for errors
+    public static OutputAnalyzer runWithArchiveAndCheck(CDSOptions opts) throws Exception {
+        return checkExec(runWithArchive(opts));
+    }
+
+
+    public static OutputAnalyzer runWithArchiveAndCheck(String... cliPrefix) throws Exception {
+        return checkExec(runWithArchive(cliPrefix));
+    }
+
+
+    public static OutputAnalyzer checkExec(OutputAnalyzer output,
+                                     String... extraMatches) throws Exception {
+        CDSOptions opts = new CDSOptions();
+        return checkExec(output, opts, extraMatches);
+    }
+
+
+    // check result of 'exec' operation, that is when JVM is run using the archive
+    public static OutputAnalyzer checkExec(OutputAnalyzer output, CDSOptions opts,
+                                     String... extraMatches) throws Exception {
+        try {
+            if ("on".equals(opts.xShareMode)) {
+                output.shouldContain("sharing");
+            }
+            output.shouldHaveExitValue(0);
+        } catch (RuntimeException e) {
+            checkCommonExecExceptions(output, e);
+            return output;
+        }
+
+        checkExtraMatches(output, extraMatches);
+        return output;
+    }
+
+
+    public static OutputAnalyzer checkExecExpectError(OutputAnalyzer output,
+                                             int expectedExitValue,
+                                             String... extraMatches) throws Exception {
+        if (isUnableToMap(output)) {
+            System.out.println(UnableToMapMsg);
+            return output;
+        }
+
+        output.shouldHaveExitValue(expectedExitValue);
+        checkExtraMatches(output, extraMatches);
+        return output;
+    }
+
+    public static OutputAnalyzer checkExtraMatches(OutputAnalyzer output,
+                                                    String... extraMatches) throws Exception {
+        for (String match : extraMatches) {
+            output.shouldContain(match);
+        }
+        return output;
+    }
+
+
+    // get the file object for the test artifact
+    public static File getTestArtifact(String name, boolean checkExistence) {
+        File dir = new File(System.getProperty("test.classes", "."));
+        File file = new File(dir, name);
+
+        if (checkExistence && !file.exists()) {
+            throw new RuntimeException("Cannot find " + file.getPath());
+        }
+
+        return file;
+    }
+
+
+    // create file containing the specified class list
+    public static File makeClassList(String classes[])
+        throws Exception {
+        return makeClassList(getTestName() + "-", classes);
+    }
+
+    // create file containing the specified class list
+    public static File makeClassList(String testCaseName, String classes[])
+        throws Exception {
+
+        File classList = getTestArtifact(testCaseName + "test.classlist", false);
+        FileOutputStream fos = new FileOutputStream(classList);
+        PrintStream ps = new PrintStream(fos);
+
+        addToClassList(ps, classes);
+
+        ps.close();
+        fos.close();
+
+        return classList;
+    }
+
+
+    public static void addToClassList(PrintStream ps, String classes[])
+        throws IOException
+    {
+        if (classes != null) {
+            for (String s : classes) {
+                ps.println(s);
+            }
+        }
+    }
+
+
+    // Optimization for getting a test name.
+    // Test name does not change during execution of the test,
+    // but getTestName() uses stack walking hence it is expensive.
+    // Therefore cache it and reuse it.
+    private static String testName;
+    public static String getTestName() {
+        if (testName == null) {
+            testName = Utils.getTestName();
+        }
+        return testName;
+    }
+
+
+    public static String getDefaultArchiveName() {
+        return getTestName() + ".jsa";
+    }
+
+
+    // ===================== FILE ACCESS convenience methods
+    public static File getOutputFile(String name) {
+        File dir = new File(System.getProperty("test.classes", "."));
+        return new File(dir, getTestName() + "-" + name);
+    }
+
+
+    public static File getOutputSourceFile(String name) {
+        File dir = new File(System.getProperty("test.classes", "."));
+        return new File(dir, name);
+    }
+
+
+    public static File getSourceFile(String name) {
+        File dir = new File(System.getProperty("test.src", "."));
+        return new File(dir, name);
+    }
+
+
+    // ============================= Logging
+    public static OutputAnalyzer executeAndLog(ProcessBuilder pb, String logName) throws Exception {
+        long started = System.currentTimeMillis();
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+
+        writeFile(getOutputFile(logName + ".stdout"), output.getStdout());
+        writeFile(getOutputFile(logName + ".stderr"), output.getStderr());
+        System.out.println("[ELAPSED: " + (System.currentTimeMillis() - started) + " ms]");
+        System.out.println("[STDERR]\n" + output.getStderr());
+
+        if (CopyChildStdoutToMainStdout)
+            System.out.println("[STDOUT]\n" + output.getStdout());
+
+        return output;
+    }
+
+
+    private static void writeFile(File file, String content) throws Exception {
+        FileOutputStream fos = new FileOutputStream(file);
+        PrintStream ps = new PrintStream(fos);
+        ps.print(content);
+        ps.close();
+        fos.close();
+    }
+}
--- a/test/lib/jdk/test/lib/compiler/InMemoryJavaCompiler.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/test/lib/jdk/test/lib/compiler/InMemoryJavaCompiler.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -189,8 +189,8 @@
         List<String> opts = new ArrayList<>();
         String moduleOverride = null;
         for (String opt : options) {
-            if (opt.startsWith("-Xmodule:")) {
-                moduleOverride = opt.substring("-Xmodule:".length());
+            if (opt.startsWith("--patch-module=")) {
+                moduleOverride = opt.substring("--patch-module=".length());
             } else {
                 opts.add(opt);
             }
--- a/test/lib/jdk/test/lib/process/ProcessTools.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/test/lib/jdk/test/lib/process/ProcessTools.java	Mon Aug 28 21:46:13 2017 +0200
@@ -64,7 +64,7 @@
     /**
      * Pumps stdout and stderr from running the process into a String.
      *
-     * @param processHandler ProcessHandler to run.
+     * @param processBuilder ProcessBuilder to run.
      * @return Output from process.
      * @throws IOException If an I/O error occurs.
      */
--- a/test/lib/sun/hotspot/WhiteBox.java	Mon Aug 28 16:40:01 2017 +0000
+++ b/test/lib/sun/hotspot/WhiteBox.java	Mon Aug 28 21:46:13 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -377,6 +377,7 @@
   public native long incMetaspaceCapacityUntilGC(long increment);
   public native long metaspaceCapacityUntilGC();
   public native boolean metaspaceShouldConcurrentCollect();
+  public native long metaspaceReserveAlignment();
 
   // Don't use these methods directly
   // Use sun.hotspot.gc.GC class instead.
@@ -390,6 +391,39 @@
   // Force Full GC
   public native void fullGC();
 
+  // Returns true if the current GC supports control of its concurrent
+  // phase via requestConcurrentGCPhase().  If false, a request will
+  // always fail.
+  public native boolean supportsConcurrentGCPhaseControl();
+
+  // Returns an array of concurrent phase names provided by this
+  // collector.  These are the names recognized by
+  // requestConcurrentGCPhase().
+  public native String[] getConcurrentGCPhases();
+
+  // Attempt to put the collector into the indicated concurrent phase,
+  // and attempt to remain in that state until a new request is made.
+  //
+  // Returns immediately if already in the requested phase.
+  // Otherwise, waits until the phase is reached.
+  //
+  // Throws IllegalStateException if unsupported by the current collector.
+  // Throws NullPointerException if phase is null.
+  // Throws IllegalArgumentException if phase is not valid for the current collector.
+  public void requestConcurrentGCPhase(String phase) {
+    if (!supportsConcurrentGCPhaseControl()) {
+      throw new IllegalStateException("Concurrent GC phase control not supported");
+    } else if (phase == null) {
+      throw new NullPointerException("null phase");
+    } else if (!requestConcurrentGCPhase0(phase)) {
+      throw new IllegalArgumentException("Unknown concurrent GC phase: " + phase);
+    }
+  }
+
+  // Helper for requestConcurrentGCPhase().  Returns true if request
+  // succeeded, false if the phase is invalid.
+  private native boolean requestConcurrentGCPhase0(String phase);
+
   // Method tries to start concurrent mark cycle.
   // It returns false if CM Thread is always in concurrent cycle.
   public native boolean g1StartConcMarkCycle();
@@ -449,13 +483,12 @@
   }
 
   // Jigsaw
-  public native void DefineModule(Object module, String version, String location,
-                                  Object[] packages);
+  public native void DefineModule(Object module, boolean is_open, String version,
+                                  String location, Object[] packages);
   public native void AddModuleExports(Object from_module, String pkg, Object to_module);
   public native void AddReadsModule(Object from_module, Object source_module);
   public native void AddModuleExportsToAllUnnamed(Object module, String pkg);
   public native void AddModuleExportsToAll(Object module, String pkg);
-  public native Object GetModuleByPackageName(Object ldr, String pkg);
 
   public native int getOffsetForName0(String name);
   public int getOffsetForName(String name) throws Exception {
@@ -486,10 +519,12 @@
   // Safepoint Checking
   public native void assertMatchingSafepointCalls(boolean mutexSafepointValue, boolean attemptedNoSafepointValue);
 
-  // Sharing
+  // Sharing & archiving
   public native boolean isShared(Object o);
   public native boolean isSharedClass(Class<?> c);
   public native boolean areSharedStringsIgnored();
+  public native boolean isCDSIncludedInVmBuild();
+  public native Object  getResolvedReferences(Class<?> c);
 
   // Compiler Directive
   public native int addCompilerDirective(String compDirect);