changeset 47158:8e481491fba8

Merge
author prr
date Thu, 20 Jul 2017 09:38:27 -0700
parents 17c74e7bd6aa 31e9b8581d65
children 8261a0f79e90
files
diffstat 85 files changed, 1246 insertions(+), 263 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Jul 17 09:14:23 2017 -0700
+++ b/.hgtags	Thu Jul 20 09:38:27 2017 -0700
@@ -436,3 +436,4 @@
 e6d70017f5b9adbb2ec82d826973d0251800a3c3 jdk-10+12
 9927a9f16738e240ab7014f0118f41e314ef8f99 jdk-10+13
 9ef5029b247b4d940080417a287440bbdbab995b jdk-10+14
+878e216039322cb3f0ecbd0944642a2b4e2593f3 jdk-10+15
--- a/.hgtags-top-repo	Mon Jul 17 09:14:23 2017 -0700
+++ b/.hgtags-top-repo	Thu Jul 20 09:38:27 2017 -0700
@@ -435,3 +435,4 @@
 1fd5901544acc50bb30fde9388c8e53cb7c449e4 jdk-10+14
 84777531d994ef70163d35078ec9c4127f2eadb5 jdk-9+176
 a4371edb589c60db01142e45c317adb9ccbcb083 jdk-9+177
+a6c830ee8a6798b186730475e700027cdf4598aa jdk-10+15
--- a/common/autoconf/flags.m4	Mon Jul 17 09:14:23 2017 -0700
+++ b/common/autoconf/flags.m4	Thu Jul 20 09:38:27 2017 -0700
@@ -996,14 +996,18 @@
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
-        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
         -fno-omit-frame-pointer"
   elif test "x$OPENJDK_$1_OS" = xaix; then
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DAIX"
-    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qtune=balanced \
         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
+    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
+    # so for slowdebug we build with '-qpic=large -bbigtoc'.
+    if test "x$DEBUG_LEVEL" = xslowdebug; then
+      $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qpic=large"
+    fi
   elif test "x$OPENJDK_$1_OS" = xbsd; then
     $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
   elif test "x$OPENJDK_$1_OS" = xwindows; then
@@ -1081,18 +1085,50 @@
 
   # Additional macosx handling
   if test "x$OPENJDK_$1_OS" = xmacosx; then
-    # Setting these parameters makes it an error to link to macosx APIs that are
-    # newer than the given OS version and makes the linked binaries compatible
-    # even if built on a newer version of the OS.
-    # The expected format is X.Y.Z
+    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
+    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
+    # JDK can be built and makes the linked binaries compatible even if built on
+    # a newer version of the OS.
     MACOSX_VERSION_MIN=10.7.0
     AC_SUBST(MACOSX_VERSION_MIN)
 
-    # The macro takes the version with no dots, ex: 1070
+    # Setting --with-macosx-version-max=<version> makes it an error to build or
+    # link to macosx APIs that are newer than the given OS version. The expected
+    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
+    AC_ARG_WITH([macosx-version-max], [AS_HELP_STRING([--with-macosx-version-max],
+        [error on use of newer functionality. @<:@macosx@:>@])],
+        [
+          if echo "$with_macosx_version_max" | $GREP -q "^[[0-9]][[0-9]]\.[[0-9]]\.[[0-9]]\$"; then
+              MACOSX_VERSION_MAX=$with_macosx_version_max
+          elif echo "$with_macosx_version_max" | $GREP -q "^[[0-9]][[0-9]]\.[[0-9]][[0-9]]\.[[0-9]][[0-9]]\$"; then
+              MACOSX_VERSION_MAX=$with_macosx_version_max
+          elif test "x$with_macosx_version_max" = "xno"; then
+              # Use build system default
+              MACOSX_VERSION_MAX=
+          else
+              AC_MSG_ERROR([osx version format must be nn.n.n or nn.nn.nn])
+          fi
+        ],
+        [MACOSX_VERSION_MAX=]
+    )
+    AC_SUBST(MACOSX_VERSION_MAX)
+
     # Let the flags variables get resolved in make for easier override on make
-    # command line.
-    $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
+    $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
+        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
+        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
     $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+    $2JVM_CFLAGS="[$]$2JVM_CFLAGS \
+        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
+        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+
+    if test -n "$MACOSX_VERSION_MAX"; then
+        $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
+            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
+        $2JVM_CFLAGS="[$]$2JVM_CFLAGS \
+            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
+    fi
   fi
 
   # Setup some hard coded includes
@@ -1218,6 +1254,12 @@
     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
     $2LDFLAGS_JDK="${$2LDFLAGS_JDK} $LDFLAGS_XLC"
     $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_XLC"
+    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
+    # so for slowdebug we build with '-qpic=large -bbigtoc'.
+    if test "x$DEBUG_LEVEL" = xslowdebug; then
+      $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -bbigtoc"
+    fi
   fi
 
   # Customize LDFLAGS for executables
--- a/common/autoconf/generated-configure.sh	Mon Jul 17 09:14:23 2017 -0700
+++ b/common/autoconf/generated-configure.sh	Thu Jul 20 09:38:27 2017 -0700
@@ -749,6 +749,7 @@
 CXXFLAGS_JDKLIB
 CFLAGS_JDKEXE
 CFLAGS_JDKLIB
+MACOSX_VERSION_MAX
 MACOSX_VERSION_MIN
 CXXSTD_CXXFLAG
 JDK_ARCH_ABI_PROP_NAME
@@ -1182,6 +1183,7 @@
 with_build_devkit
 with_jtreg
 with_abi_profile
+with_macosx_version_max
 enable_warnings_as_errors
 with_native_debug_symbols
 enable_debug_symbols
@@ -2132,6 +2134,8 @@
                           (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
                           armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
                           [toolchain dependent]
+  --with-macosx-version-max
+                          error on use of newer functionality. [macosx]
   --with-native-debug-symbols
                           set the native debug symbol configuration (none,
                           internal, external, zipped) [varying]
@@ -5010,7 +5014,7 @@
 
 # Minimum supported versions, empty means unspecified
 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
-TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
+TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
 TOOLCHAIN_MINIMUM_VERSION_xlc=""
@@ -5189,7 +5193,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1496926402
+DATE_WHEN_GENERATED=1500423205
 
 ###############################################################################
 #
@@ -51461,14 +51465,18 @@
     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
-        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
         -fno-omit-frame-pointer"
   elif test "x$OPENJDK_TARGET_OS" = xaix; then
     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
-    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
+    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
+    # so for slowdebug we build with '-qpic=large -bbigtoc'.
+    if test "x$DEBUG_LEVEL" = xslowdebug; then
+      JVM_CFLAGS="$JVM_CFLAGS -qpic=large"
+    fi
   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
@@ -51635,18 +51643,54 @@
 
   # Additional macosx handling
   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    # Setting these parameters makes it an error to link to macosx APIs that are
-    # newer than the given OS version and makes the linked binaries compatible
-    # even if built on a newer version of the OS.
-    # The expected format is X.Y.Z
+    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
+    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
+    # JDK can be built and makes the linked binaries compatible even if built on
+    # a newer version of the OS.
     MACOSX_VERSION_MIN=10.7.0
 
 
-    # The macro takes the version with no dots, ex: 1070
+    # Setting --with-macosx-version-max=<version> makes it an error to build or
+    # link to macosx APIs that are newer than the given OS version. The expected
+    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
+
+# Check whether --with-macosx-version-max was given.
+if test "${with_macosx_version_max+set}" = set; then :
+  withval=$with_macosx_version_max;
+          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
+              MACOSX_VERSION_MAX=$with_macosx_version_max
+          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
+              MACOSX_VERSION_MAX=$with_macosx_version_max
+          elif test "x$with_macosx_version_max" = "xno"; then
+              # Use build system default
+              MACOSX_VERSION_MAX=
+          else
+              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
+          fi
+
+else
+  MACOSX_VERSION_MAX=
+
+fi
+
+
+
     # Let the flags variables get resolved in make for easier override on make
-    # command line.
-    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
+    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
+        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
+        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+    JVM_CFLAGS="$JVM_CFLAGS \
+        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
+        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+
+    if test -n "$MACOSX_VERSION_MAX"; then
+        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
+            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
+        JVM_CFLAGS="$JVM_CFLAGS \
+            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
+    fi
   fi
 
   # Setup some hard coded includes
@@ -51772,6 +51816,12 @@
     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
+    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
+    # so for slowdebug we build with '-qpic=large -bbigtoc'.
+    if test "x$DEBUG_LEVEL" = xslowdebug; then
+      JVM_LDFLAGS="$JVM_LDFLAGS -bbigtoc"
+    fi
   fi
 
   # Customize LDFLAGS for executables
@@ -52279,14 +52329,18 @@
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
-        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
         -fno-omit-frame-pointer"
   elif test "x$OPENJDK_BUILD_OS" = xaix; then
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
-    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
+    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
+    # so for slowdebug we build with '-qpic=large -bbigtoc'.
+    if test "x$DEBUG_LEVEL" = xslowdebug; then
+      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qpic=large"
+    fi
   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
@@ -52453,18 +52507,54 @@
 
   # Additional macosx handling
   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
-    # Setting these parameters makes it an error to link to macosx APIs that are
-    # newer than the given OS version and makes the linked binaries compatible
-    # even if built on a newer version of the OS.
-    # The expected format is X.Y.Z
+    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
+    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
+    # JDK can be built and makes the linked binaries compatible even if built on
+    # a newer version of the OS.
     MACOSX_VERSION_MIN=10.7.0
 
 
-    # The macro takes the version with no dots, ex: 1070
+    # Setting --with-macosx-version-max=<version> makes it an error to build or
+    # link to macosx APIs that are newer than the given OS version. The expected
+    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
+
+# Check whether --with-macosx-version-max was given.
+if test "${with_macosx_version_max+set}" = set; then :
+  withval=$with_macosx_version_max;
+          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
+              MACOSX_VERSION_MAX=$with_macosx_version_max
+          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
+              MACOSX_VERSION_MAX=$with_macosx_version_max
+          elif test "x$with_macosx_version_max" = "xno"; then
+              # Use build system default
+              MACOSX_VERSION_MAX=
+          else
+              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
+          fi
+
+else
+  MACOSX_VERSION_MAX=
+
+fi
+
+
+
     # Let the flags variables get resolved in make for easier override on make
-    # command line.
-    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
+    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
+        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
+        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
+        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
+        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+
+    if test -n "$MACOSX_VERSION_MAX"; then
+        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
+            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
+        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
+            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
+    fi
   fi
 
   # Setup some hard coded includes
@@ -52590,6 +52680,12 @@
     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
+    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
+    # so for slowdebug we build with '-qpic=large -bbigtoc'.
+    if test "x$DEBUG_LEVEL" = xslowdebug; then
+      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -bbigtoc"
+    fi
   fi
 
   # Customize LDFLAGS for executables
--- a/common/autoconf/spec.gmk.in	Mon Jul 17 09:14:23 2017 -0700
+++ b/common/autoconf/spec.gmk.in	Thu Jul 20 09:38:27 2017 -0700
@@ -335,8 +335,10 @@
 X_CFLAGS:=@X_CFLAGS@
 X_LIBS:=@X_LIBS@
 
-# The lowest required version of macosx to enforce compatiblity for
+# The lowest required version of macosx
 MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
+# The highest allowed version of macosx
+MACOSX_VERSION_MAX=@MACOSX_VERSION_MAX@
 
 # Toolchain type: gcc, clang, solstudio, lxc, microsoft...
 TOOLCHAIN_TYPE:=@TOOLCHAIN_TYPE@
--- a/common/autoconf/toolchain.m4	Mon Jul 17 09:14:23 2017 -0700
+++ b/common/autoconf/toolchain.m4	Thu Jul 20 09:38:27 2017 -0700
@@ -52,7 +52,7 @@
 
 # Minimum supported versions, empty means unspecified
 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
-TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
+TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
 TOOLCHAIN_MINIMUM_VERSION_xlc=""
--- a/common/conf/jib-profiles.js	Mon Jul 17 09:14:23 2017 -0700
+++ b/common/conf/jib-profiles.js	Thu Jul 20 09:38:27 2017 -0700
@@ -436,7 +436,8 @@
             target_os: "macosx",
             target_cpu: "x64",
             dependencies: ["devkit"],
-            configure_args: concat(common.configure_args_64bit, "--with-zlib=system"),
+            configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
+                "--with-macosx-version-max=10.7.0"),
         },
 
         "solaris-x64": {
--- a/common/doc/building.md	Mon Jul 17 09:14:23 2017 -0700
+++ b/common/doc/building.md	Thu Jul 20 09:38:27 2017 -0700
@@ -392,11 +392,8 @@
 
 ### gcc
 
-The minimum accepted version of gcc is 4.3. Older versions will not be accepted
-by `configure`.
-
-However, gcc 4.3 is quite old and OpenJDK is not regularly tested on this
-version, so it is recommended to use a more modern gcc.
+The minimum accepted version of gcc is 4.7. Older versions will generate a warning 
+by `configure` and are unlikely to work.
 
 OpenJDK 9 includes patches that should allow gcc 6 to compile, but this should
 be considered experimental.
--- a/common/nb_native/nbproject/configurations.xml	Mon Jul 17 09:14:23 2017 -0700
+++ b/common/nb_native/nbproject/configurations.xml	Thu Jul 20 09:38:27 2017 -0700
@@ -3517,7 +3517,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -10570,7 +10569,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -18227,7 +18225,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -20787,7 +20784,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -21531,7 +21527,6 @@
             <Elem>ARCHPROPNAME="x86_64"</Elem>
             <Elem>DEBUG</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>THIS_FILE="java_props_macosx.c"</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
@@ -23025,7 +23020,6 @@
             <Elem>ARCHPROPNAME="x86_64"</Elem>
             <Elem>DEBUG</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>THIS_FILE="java_props_md.c"</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
@@ -23104,7 +23098,6 @@
             <Elem>ARCH="x86_64"</Elem>
             <Elem>DEBUG</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>THIS_FILE="ExtendedOptionsImpl.c"</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
@@ -23481,7 +23474,6 @@
             <Elem>ARCH="x86_64"</Elem>
             <Elem>DEBUG</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>THIS_FILE="SocketDispatcher.c"</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
@@ -29987,7 +29979,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -30069,7 +30060,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -30104,7 +30094,6 @@
             <Elem>ARCH="x86_64"</Elem>
             <Elem>DEBUG</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
             <Elem>_GNU_SOURCE</Elem>
@@ -30147,7 +30136,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -30211,7 +30199,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -30274,7 +30261,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -30341,7 +30327,6 @@
           <preprocessorList>
             <Elem>ARCH="x86_64"</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>THIS_FILE="agent_util.c"</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
@@ -30354,7 +30339,6 @@
           <preprocessorList>
             <Elem>ARCH="x86_64"</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>THIS_FILE="Agent.cpp"</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
--- a/corba/.hgtags	Mon Jul 17 09:14:23 2017 -0700
+++ b/corba/.hgtags	Thu Jul 20 09:38:27 2017 -0700
@@ -435,3 +435,4 @@
 25d991a67cba240eeaf15c19c5857b40fdd71561 jdk-10+14
 40fb9f229471ef357d493813d34b15afcce9f32b jdk-9+176
 c72e9d3823f04cb3ef3166646dfea9e4c2769133 jdk-9+177
+15f59cfc6fbe9387423fb173e962265c7b5d357e jdk-10+15
--- a/hotspot/.hgtags	Mon Jul 17 09:14:23 2017 -0700
+++ b/hotspot/.hgtags	Thu Jul 20 09:38:27 2017 -0700
@@ -595,3 +595,4 @@
 e920b4d008d914f3414bd4630b58837cf0b7f08d jdk-10+14
 2ab74e5dbdc2b6a962c865500cafd23cf387dc60 jdk-9+176
 1ca8f038fceb88c640badf9bd18905205bc63b43 jdk-9+177
+c1f3649a3a42f124b418a5a916dbad13d059b757 jdk-10+15
--- a/jaxp/.hgtags	Mon Jul 17 09:14:23 2017 -0700
+++ b/jaxp/.hgtags	Thu Jul 20 09:38:27 2017 -0700
@@ -435,3 +435,4 @@
 4d05f673cf773f1c20e8f5a879d64115d2f741d9 jdk-10+14
 38cf34e2328070cc691c4f136e6dde1a44c04171 jdk-9+176
 332ad9f92632f56f337b8c40edef9a95a42b26bc jdk-9+177
+02a876781a3a6193140591d92db7b95ca743eac2 jdk-10+15
--- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java	Thu Jul 20 09:38:27 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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,10 +125,6 @@
    * <p>
    *   Once an application has obtained a reference to a XMLEventFactory it
    *   can use the factory to configure and obtain stream instances.
-   * <p>
-   *   Note that this is a new method that replaces the deprecated newInstance() method.
-   *     No changes in behavior are defined by this replacement method relative to
-   *     the deprecated method.
    *
    * @throws FactoryConfigurationError in case of {@linkplain
    *   java.util.ServiceConfigurationError service configuration error} or if
--- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLInputFactory.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLInputFactory.java	Thu Jul 20 09:38:27 2017 -0700
@@ -209,16 +209,11 @@
    * <p>
    *   Once an application has obtained a reference to a XMLInputFactory it
    *   can use the factory to configure and obtain stream instances.
-   * <p>
-   *   Note that this is a new method that replaces the deprecated newInstance() method.
-   *     No changes in behavior are defined by this replacement method relative to
-   *     the deprecated method.
    *
    * @throws FactoryConfigurationError in case of {@linkplain
    *   java.util.ServiceConfigurationError service configuration error} or if
    *   the implementation is not available or cannot be instantiated.
    */
-  @Deprecated(since="1.7")
   public static XMLInputFactory newFactory()
     throws FactoryConfigurationError
   {
--- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLOutputFactory.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLOutputFactory.java	Thu Jul 20 09:38:27 2017 -0700
@@ -189,10 +189,6 @@
    * <p>
    * Once an application has obtained a reference to a XMLOutputFactory it
    * can use the factory to configure and obtain stream instances.
-   * <p>
-   * Note that this is a new method that replaces the deprecated newInstance() method.
-   *   No changes in behavior are defined by this replacement method relative to the
-   *   deprecated method.
    *
    * @throws FactoryConfigurationError in case of {@linkplain
    *   java.util.ServiceConfigurationError service configuration error} or if
--- a/jaxp/src/java.xml/share/classes/javax/xml/validation/Validator.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/validation/Validator.java	Thu Jul 20 09:38:27 2017 -0700
@@ -135,7 +135,7 @@
      * <caption>{@code Source} / {@code Result} Accepted</caption>
      * <thead>
      *  <tr>
-     *   <td></td>>
+     *   <td></td>
      *   <th scope="col">{@link javax.xml.transform.stream.StreamSource}</th>
      *   <th scope="col">{@link javax.xml.transform.sax.SAXSource}</th>
      *   <th scope="col">{@link javax.xml.transform.dom.DOMSource}</th>
--- a/jaxws/.hgtags	Mon Jul 17 09:14:23 2017 -0700
+++ b/jaxws/.hgtags	Thu Jul 20 09:38:27 2017 -0700
@@ -438,3 +438,4 @@
 bddeaa49ffd55567ad232548c38aa270e1a1420a jdk-10+14
 ea819b6009d33a72e6672bab6c101d51db0cfb4c jdk-9+176
 b44a721aee3d3b2537754e559fe9ecccadea548b jdk-9+177
+6d17fd0a5133a0dd916c77a9a24ae7f0ca402876 jdk-10+15
--- a/jdk/src/java.base/share/classes/java/io/ObjectStreamField.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/io/ObjectStreamField.java	Thu Jul 20 09:38:27 2017 -0700
@@ -45,16 +45,18 @@
 
     /** field name */
     private final String name;
-    /** canonical JVM signature of field type */
+    /** canonical JVM signature of field type, if given */
     private final String signature;
     /** field type (Object.class if unknown non-primitive type) */
     private final Class<?> type;
+    /** lazily constructed signature for the type, if no explicit signature */
+    private String typeSignature;
     /** whether or not to (de)serialize field values as unshared */
     private final boolean unshared;
     /** corresponding reflective field object, if any */
     private final Field field;
     /** offset of field value in enclosing field group */
-    private int offset = 0;
+    private int offset;
 
     /**
      * Create a Serializable field with the specified type.  This field should
@@ -91,8 +93,8 @@
         this.name = name;
         this.type = type;
         this.unshared = unshared;
-        signature = getClassSignature(type).intern();
-        field = null;
+        this.field = null;
+        this.signature = null;
     }
 
     /**
@@ -106,7 +108,7 @@
         this.name = name;
         this.signature = signature.intern();
         this.unshared = unshared;
-        field = null;
+        this.field = null;
 
         switch (signature.charAt(0)) {
             case 'Z': type = Boolean.TYPE; break;
@@ -242,7 +244,7 @@
      */
     // REMIND: deprecate?
     public char getTypeCode() {
-        return signature.charAt(0);
+        return getSignature().charAt(0);
     }
 
     /**
@@ -252,7 +254,7 @@
      */
     // REMIND: deprecate?
     public String getTypeString() {
-        return isPrimitive() ? null : signature;
+        return isPrimitive() ? null : getSignature();
     }
 
     /**
@@ -284,7 +286,7 @@
      */
     // REMIND: deprecate?
     public boolean isPrimitive() {
-        char tcode = signature.charAt(0);
+        char tcode = getTypeCode();
         return ((tcode != 'L') && (tcode != '['));
     }
 
@@ -320,7 +322,7 @@
      * Return a string that describes this field.
      */
     public String toString() {
-        return signature + ' ' + name;
+        return getSignature() + ' ' + name;
     }
 
     /**
@@ -336,6 +338,17 @@
      * that signature strings are returned for primitive fields as well).
      */
     String getSignature() {
-        return signature;
+        if (signature != null) {
+            return signature;
+        }
+
+        String sig = typeSignature;
+        // This lazy calculation is safe since signature can be null iff one
+        // of the public constructors are used, in which case type is always
+        // initialized to the exact type we want the signature to represent.
+        if (sig == null) {
+            typeSignature = sig = getClassSignature(type).intern();
+        }
+        return sig;
     }
 }
--- a/jdk/src/java.base/share/classes/java/lang/System.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/System.java	Thu Jul 20 09:38:27 2017 -0700
@@ -1960,10 +1960,6 @@
         setOut0(newPrintStream(fdOut, props.getProperty("sun.stdout.encoding")));
         setErr0(newPrintStream(fdErr, props.getProperty("sun.stderr.encoding")));
 
-        // Load the zip library now in order to keep java.util.zip.ZipFile
-        // from trying to use itself to load this library later.
-        loadLibrary("zip");
-
         // Setup Java signal handlers for HUP, TERM, and INT (where available).
         Terminator.setup();
 
--- a/jdk/src/java.base/share/classes/java/nio/charset/Charset.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/charset/Charset.java	Thu Jul 20 09:38:27 2017 -0700
@@ -25,6 +25,11 @@
 
 package java.nio.charset;
 
+import jdk.internal.misc.VM;
+import sun.nio.cs.StandardCharsets;
+import sun.nio.cs.ThreadLocalCoders;
+import sun.security.action.GetPropertyAction;
+
 import java.nio.ByteBuffer;
 import java.nio.CharBuffer;
 import java.nio.charset.spi.CharsetProvider;
@@ -38,15 +43,11 @@
 import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Objects;
+import java.util.ServiceConfigurationError;
+import java.util.ServiceLoader;
 import java.util.Set;
-import java.util.ServiceLoader;
-import java.util.ServiceConfigurationError;
 import java.util.SortedMap;
 import java.util.TreeMap;
-import jdk.internal.misc.VM;
-import sun.nio.cs.StandardCharsets;
-import sun.nio.cs.ThreadLocalCoders;
-import sun.security.action.GetPropertyAction;
 
 
 /**
@@ -635,10 +636,19 @@
      *         If the canonical name or any of the aliases are illegal
      */
     protected Charset(String canonicalName, String[] aliases) {
-        checkName(canonicalName);
         String[] as = Objects.requireNonNullElse(aliases, zeroAliases);
-        for (int i = 0; i < as.length; i++)
-            checkName(as[i]);
+
+        // Skip checks for the standard, built-in Charsets we always load
+        // during initialization.  Use of identity is intentional to be
+        // consistent with sun.nio.cs.StandardCharsets
+        if (canonicalName != StandardCharsets.ISO_8859_1
+                && canonicalName != StandardCharsets.US_ASCII
+                && canonicalName != StandardCharsets.UTF_8) {
+            checkName(canonicalName);
+            for (int i = 0; i < as.length; i++) {
+                checkName(as[i]);
+            }
+        }
         this.name = canonicalName;
         this.aliases = as;
     }
--- a/jdk/src/java.base/share/classes/java/util/zip/Adler32.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/util/zip/Adler32.java	Thu Jul 20 09:38:27 2017 -0700
@@ -136,4 +136,8 @@
     @HotSpotIntrinsicCandidate
     private static native int updateByteBuffer(int adler, long addr,
                                                int off, int len);
+
+    static {
+        ZipUtils.loadLibrary();
+    }
 }
--- a/jdk/src/java.base/share/classes/java/util/zip/CRC32.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/util/zip/CRC32.java	Thu Jul 20 09:38:27 2017 -0700
@@ -172,4 +172,8 @@
             throw new NullPointerException();
         }
     }
+
+    static {
+        ZipUtils.loadLibrary();
+    }
 }
--- a/jdk/src/java.base/share/classes/java/util/zip/Deflater.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/util/zip/Deflater.java	Thu Jul 20 09:38:27 2017 -0700
@@ -154,7 +154,7 @@
     public static final int FULL_FLUSH = 3;
 
     static {
-        /* Zip library is loaded from System.initializeSystemClass */
+        ZipUtils.loadLibrary();
         initIDs();
     }
 
--- a/jdk/src/java.base/share/classes/java/util/zip/Inflater.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/util/zip/Inflater.java	Thu Jul 20 09:38:27 2017 -0700
@@ -85,7 +85,7 @@
     private static final byte[] defaultBuf = new byte[0];
 
     static {
-        /* Zip library is loaded from System.initializeSystemClass */
+        ZipUtils.loadLibrary();
         initIDs();
     }
 
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipUtils.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipUtils.java	Thu Jul 20 09:38:27 2017 -0700
@@ -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
@@ -26,6 +26,8 @@
 package java.util.zip;
 
 import java.nio.file.attribute.FileTime;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.time.Instant;
 import java.time.LocalDateTime;
 import java.time.ZoneId;
@@ -245,4 +247,17 @@
     // The END header is followed by a variable length comment of size < 64k.
     static final long END_MAXLEN = 0xFFFF + ENDHDR;
     static final int READBLOCKSZ = 128;
+
+    /**
+     * Loads zip native library, if not already laoded
+     */
+    static void loadLibrary() {
+        SecurityManager sm = System.getSecurityManager();
+        if (sm == null) {
+            System.loadLibrary("zip");
+        } else {
+            PrivilegedAction<Void> pa = () -> { System.loadLibrary("zip"); return null; };
+            AccessController.doPrivileged(pa);
+        }
+    }
 }
--- a/jdk/src/java.base/share/classes/sun/nio/cs/ISO_8859_1.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/cs/ISO_8859_1.java	Thu Jul 20 09:38:27 2017 -0700
@@ -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
@@ -42,7 +42,7 @@
 {
 
     public ISO_8859_1() {
-        super("ISO-8859-1", StandardCharsets.aliases_ISO_8859_1);
+        super(StandardCharsets.ISO_8859_1, StandardCharsets.aliases_ISO_8859_1);
     }
 
     public String historicalName() {
--- a/jdk/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template	Thu Jul 20 09:38:27 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, 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.
  *
@@ -51,6 +51,12 @@
 
     private static final String packagePrefix = "sun.nio.cs";
 
+    public static final String US_ASCII = "US-ASCII";
+
+    public static final String ISO_8859_1 = "ISO-8859-1";
+
+    public static final String UTF_8 = "UTF-8";
+
     public StandardCharsets() {
         this.aliasMap = new Aliases();
         this.classMap = new Classes();
@@ -103,13 +109,13 @@
 
         // As all charset class names added to classMap are string literals we
         // can check identity here as an optimization
-        if (cln == "US_ASCII") {
+        if (cln == US_ASCII) {
             return cache(csn, new US_ASCII());
         }
-        if (cln == "ISO_8859_1") {
+        if (cln == ISO_8859_1) {
             return cache(csn, new ISO_8859_1());
         }
-        if (cln == "UTF_8") {
+        if (cln == UTF_8) {
             return cache(csn, new UTF_8());
         }
 
--- a/jdk/src/java.base/share/classes/sun/nio/cs/US_ASCII.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/cs/US_ASCII.java	Thu Jul 20 09:38:27 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, 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
@@ -38,7 +38,7 @@
 {
 
     public US_ASCII() {
-        super("US-ASCII", StandardCharsets.aliases_US_ASCII);
+        super(StandardCharsets.US_ASCII, StandardCharsets.aliases_US_ASCII);
     }
 
     public String historicalName() {
--- a/jdk/src/java.base/share/classes/sun/nio/cs/UTF_8.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/cs/UTF_8.java	Thu Jul 20 09:38:27 2017 -0700
@@ -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
@@ -57,7 +57,7 @@
 class UTF_8 extends Unicode
 {
     public UTF_8() {
-        super("UTF-8", StandardCharsets.aliases_UTF_8);
+        super(StandardCharsets.UTF_8, StandardCharsets.aliases_UTF_8);
     }
 
     public String historicalName() {
--- a/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java	Thu Jul 20 09:38:27 2017 -0700
@@ -59,9 +59,15 @@
     /* Are we debugging ? */
     private static final Debug debug = Debug.getInstance("jar");
 
-    private static final DisabledAlgorithmConstraints JAR_DISABLED_CHECK =
+    /**
+     * Holder class to delay initialization of DisabledAlgorithmConstraints
+     * until needed.
+     */
+    private static class ConfigurationHolder {
+        static final DisabledAlgorithmConstraints JAR_DISABLED_CHECK =
             new DisabledAlgorithmConstraints(
                     DisabledAlgorithmConstraints.PROPERTY_JAR_DISABLED_ALGS);
+    }
 
     private ArrayList<CodeSigner[]> signerCache;
 
@@ -371,7 +377,7 @@
         Boolean permitted = permittedAlgs.get(algorithm);
         if (permitted == null) {
             try {
-                JAR_DISABLED_CHECK.permits(algorithm,
+                ConfigurationHolder.JAR_DISABLED_CHECK.permits(algorithm,
                         new ConstraintsParameters(timestamp));
             } catch(GeneralSecurityException e) {
                 permittedAlgs.put(algorithm, Boolean.FALSE);
--- a/jdk/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c	Thu Jul 20 09:38:27 2017 -0700
@@ -662,6 +662,11 @@
         return -1;
     }
 
+    // Validate the pid before returning the info in case /proc/pid is racy
+    if (kill(pid, 0) < 0) {
+        return -1;
+    }
+
     *totalTime = psinfo.pr_time.tv_sec * 1000000000L + psinfo.pr_time.tv_nsec;
 
     *startTime = psinfo.pr_start.tv_sec * (jlong)1000 +
--- a/jdk/src/java.base/unix/native/libjava/locale_str.h	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/unix/native/libjava/locale_str.h	Thu Jul 20 09:38:27 2017 -0700
@@ -135,16 +135,6 @@
     "sr_SP", "sr_YU",
     "tchinese", "zh_TW",
 #endif
-#ifdef MACOSX
-    "sr-Latn", "sr_CS",   // Mappings as done by old Apple JRS code
-    "tk", "tk-Cyrl",
-    "tt-Latn", "tt-Cyrl",
-    "uz", "uz_UZ",
-    "uz-Arab", "uz_UZ",
-    "uz-Latn", "uz_UZ",
-    "zh-Hans", "zh_CN",
-    "zh-Hant", "zh_TW",
-#endif
     "", "",
  };
 
--- a/jdk/src/java.base/windows/native/libnio/ch/FileChannelImpl.c	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/windows/native/libnio/ch/FileChannelImpl.c	Thu Jul 20 09:38:27 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2009, 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
@@ -170,8 +170,8 @@
 {
     HANDLE h = (HANDLE)(handleval(env, fdo));
     if (h != INVALID_HANDLE_VALUE) {
-        jint result = CloseHandle(h);
-        if (result < 0) {
+        BOOL result = CloseHandle(h);
+        if (result == 0) {
             JNU_ThrowIOExceptionWithLastError(env, "Close failed");
         }
     }
--- a/jdk/src/java.base/windows/native/libnio/ch/FileDispatcherImpl.c	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/windows/native/libnio/ch/FileDispatcherImpl.c	Thu Jul 20 09:38:27 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, 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
@@ -334,7 +334,7 @@
                                         FileEndOfFileInfo,
                                         &eofInfo,
                                         sizeof(eofInfo));
-    if (result == FALSE) {
+    if (result == 0) {
         JNU_ThrowIOExceptionWithLastError(env, "Truncation failed");
         return IOS_THROWN;
     }
@@ -411,7 +411,7 @@
     long highPos = (long)(pos >> 32);
     DWORD lowNumBytes = (DWORD)size;
     DWORD highNumBytes = (DWORD)(size >> 32);
-    jint result = 0;
+    BOOL result = 0;
     OVERLAPPED o;
     o.hEvent = 0;
     o.Offset = lowPos;
@@ -422,7 +422,7 @@
         if (error == ERROR_IO_PENDING) {
             DWORD dwBytes;
             result = GetOverlappedResult(h, &o, &dwBytes, TRUE);
-            if (result == 0) {
+            if (result != 0) {
                 return;
             }
             error = GetLastError();
@@ -437,7 +437,7 @@
     HANDLE h = (HANDLE)fd;
     if (h != INVALID_HANDLE_VALUE) {
         int result = CloseHandle(h);
-        if (result < 0)
+        if (result == 0)
             JNU_ThrowIOExceptionWithLastError(env, "Close failed");
     }
 }
--- a/jdk/src/java.base/windows/native/libnio/ch/WindowsAsynchronousFileChannelImpl.c	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/src/java.base/windows/native/libnio/ch/WindowsAsynchronousFileChannelImpl.c	Thu Jul 20 09:38:27 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2010, 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
@@ -126,5 +126,8 @@
     jlong handle)
 {
     HANDLE h = (HANDLE)jlong_to_ptr(handle);
-    CloseHandle(h);
+    BOOL result = CloseHandle(h);
+    if (result == 0) {
+        JNU_ThrowIOExceptionWithLastError(env, "Close failed");
+    }
 }
--- a/jdk/test/com/oracle/security/ucrypto/TestAES.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/test/com/oracle/security/ucrypto/TestAES.java	Thu Jul 20 09:38:27 2017 -0700
@@ -26,17 +26,22 @@
  * @bug 7088989 8014374 8167512 8173708
  * @summary Ensure the AES ciphers of OracleUcrypto provider works correctly
  * @key randomness
+ * @library /test/lib
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.Utils
  * @run main TestAES
- * @run main/othervm/java.security.policy==empty.policy TestAES
+ * @run main/othervm -Dpolicy=empty.policy TestAES
  */
 
-import java.io.*;
 import java.security.*;
 import java.security.spec.*;
 import java.util.*;
 import javax.crypto.*;
 import javax.crypto.spec.*;
 
+import jdk.test.lib.Platform;
+import jdk.test.lib.Utils;
+
 public class TestAES extends UcryptoTest {
 
     private static final String[] PADDEDCIPHER_ALGOS = {
@@ -55,10 +60,29 @@
     private static final SecretKey CIPHER_KEY =
         new SecretKeySpec(new byte[16], "AES");
 
+    private static final boolean IS_BAD_SOLARIS = isBadSolaris();
+
     public static void main(String[] args) throws Exception {
+        // It has to determine Solaris version before enabling security manager.
+        // Because that needs some permissions, like java.io.FilePermission.
+        String policy = System.getProperty("policy");
+        if (policy != null) {
+            enableSecurityManager(policy);
+        }
+
         main(new TestAES(), null);
     }
 
+    // Enables security manager and uses the specified policy file to override
+    // the default one.
+    private static void enableSecurityManager(String policy) {
+        String policyURL = "file://" + System.getProperty("test.src", ".") + "/"
+                + policy;
+        System.out.println("policyURL: " + policyURL);
+        Security.setProperty("policy.url.1", policyURL);
+        System.setSecurityManager(new SecurityManager());
+    }
+
     public void doTest(Provider prov) throws Exception {
         // Provider for testing Interoperability
         Provider sunJCEProv = Security.getProvider("SunJCE");
@@ -136,11 +160,18 @@
         boolean testPassed = true;
         byte[] in = new byte[16];
         (new SecureRandom()).nextBytes(in);
-        int blockSize = 16;
 
-        for (int j = 1; j < (in.length - 1); j++) {
-            System.out.println("Input offset size: " + j);
-            for (int i = 0; i < algos.length; i++) {
+        for (int i = 0; i < algos.length; i++) {
+            if (IS_BAD_SOLARIS
+                    && algos[i].indexOf("CFB128") != -1
+                    && p.getName().equals("OracleUcrypto")) {
+                System.out.println("Ignore cases on CFB128 due to a pre-S11.3 bug");
+                continue;
+            }
+
+            for (int j = 1; j < (in.length - 1); j++) {
+                System.out.println("Input offset size: " + j);
+
                 try {
                     // check ENC
                     Cipher c;
@@ -177,12 +208,6 @@
                     k += c.doFinal(eout, firstPartLen+1, eout.length - firstPartLen - 1, dout, k);
                     if (!checkArrays(in, in.length, dout, k)) testPassed = false;
                 } catch(Exception ex) {
-                    if (ex instanceof BadPaddingException &&
-                            algos[i].indexOf("CFB128") != -1 &&
-                            p.getName().equals("OracleUcrypto")) {
-                        System.out.println("Ignore due to a pre-S11.3 bug: " + ex);
-                        continue;
-                    }
                     System.out.println("Unexpected Exception: " + algos[i]);
                     ex.printStackTrace();
                     testPassed = false;
@@ -261,7 +286,6 @@
         }
     }
 
-
     private static void testCipherGCM(SecretKey key,
                                       Provider p) {
         boolean testPassed = true;
@@ -349,4 +373,12 @@
         }
         return equal;
     }
+
+    // The cases on CFB128 mode have to be skipped on pre-S11.3.
+    private static boolean isBadSolaris() {
+        return Platform.isSolaris()
+                && Platform.getOsVersionMajor() <= 5
+                && Platform.getOsVersionMinor() <= 11
+                && Utils.distro().compareTo("11.3") < 0;
+    }
 }
--- a/jdk/test/com/sun/jdi/LineNumberInfo.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/test/com/sun/jdi/LineNumberInfo.java	Thu Jul 20 09:38:27 2017 -0700
@@ -23,7 +23,7 @@
 
 /**
  *  @test
- *  @bug 4238644 4238643 4238641 4944198
+ *  @bug 4238644 4238643 4238641 4944198 8181500
  *  @summary Test javac regressions in the generation of line number info
  *  @author Gordon Hirsch
  *
@@ -72,6 +72,7 @@
         36,
         37,
         36,
+        37,
         40,
         41,
         42,
@@ -110,6 +111,7 @@
         85 ,
         93 ,
         96 ,
+        105,
         107,
         111,
         119,
--- a/jdk/test/java/io/File/createTempFile/NameTooLong.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/test/java/io/File/createTempFile/NameTooLong.java	Thu Jul 20 09:38:27 2017 -0700
@@ -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
@@ -43,7 +43,8 @@
         for (String[] ps : prefixSuffix) {
             File f;
             try {
-                f = File.createTempFile(ps[0], ps[1]);
+                f = File.createTempFile(ps[0], ps[1],
+                        new File(System.getProperty("test.dir", ".")));
                 String s = f.toPath().getFileName().toString();
                 if (!s.startsWith(ps[0].substring(0, 3))) {
                     System.err.printf("%s did not start with %s%n", s,
--- a/jdk/test/java/io/File/createTempFile/SpecialTempFile.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/test/java/io/File/createTempFile/SpecialTempFile.java	Thu Jul 20 09:38:27 2017 -0700
@@ -30,6 +30,9 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 
 public class SpecialTempFile {
 
@@ -45,21 +48,21 @@
         final String exceptionMsg = "Unable to create temporary file";
         String[] dirs = { null, "." };
 
+        Path testPath = Paths.get(System.getProperty("test.dir", "."));
         for (int i = 0; i < prefix.length; i++) {
             boolean exceptionThrown = false;
             File f = null;
 
             for (String dir: dirs) {
+                Path tempDir = Files.createTempDirectory(testPath, dir);
                 System.out.println("In test " + name +
                                    ", creating temp file with prefix, " +
                                    prefix[i] + ", suffix, " + suffix[i] +
-                                   ", in dir, " + dir);
+                                   ", in dir, " + tempDir);
 
                 try {
-                    if (dir == null || dir.isEmpty())
-                        f = File.createTempFile(prefix[i], suffix[i]);
-                    else
-                        f = File.createTempFile(prefix[i], suffix[i], new File(dir));
+                    f = File.createTempFile(prefix[i], suffix[i],
+                        tempDir.toFile());
                 } catch (IOException e) {
                     if (exceptionExpected) {
                         if (e.getMessage().startsWith(exceptionMsg))
@@ -81,10 +84,6 @@
     public static void main(String[] args) throws Exception {
         // Common test
         final String name = "SpecialTempFile";
-        File f = new File(System.getProperty("java.io.tmpdir"), name);
-        if (!f.exists()) {
-            f.createNewFile();
-        }
         String[] nulPre = { name + "\u0000" };
         String[] nulSuf = { ".test" };
         test("NulName", nulPre, nulSuf, true);
--- a/jdk/test/java/nio/charset/Charset/IllegalCharsetName.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/test/java/nio/charset/Charset/IllegalCharsetName.java	Thu Jul 20 09:38:27 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 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
@@ -22,15 +22,12 @@
  */
 
 /* @test
- * @bug 6330020
+ * @bug 6330020 8184665
  * @summary Ensure Charset.forName/isSupport throws the correct exception
  *          if the charset names passed in are illegal.
  */
 
-import java.io.*;
-import java.nio.*;
 import java.nio.charset.*;
-import java.util.*;
 
 public class IllegalCharsetName {
     public static void main(String[] args) throws Exception {
@@ -59,5 +56,18 @@
             } catch (IllegalCharsetNameException x) { //expected
             }
         }
+
+        // Standard charsets may bypass alias checking during startup, test that
+        // they're all well-behaved as a sanity test
+        checkAliases(StandardCharsets.ISO_8859_1);
+        checkAliases(StandardCharsets.US_ASCII);
+        checkAliases(StandardCharsets.UTF_8);
+    }
+
+    private static void checkAliases(Charset cs) {
+        for (String alias : cs.aliases()) {
+            Charset.forName(alias);
+            Charset.isSupported(alias);
+        }
     }
 }
--- a/jdk/test/java/nio/file/Files/probeContentType/ParallelProbes.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/test/java/nio/file/Files/probeContentType/ParallelProbes.java	Thu Jul 20 09:38:27 2017 -0700
@@ -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,6 +31,7 @@
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.ArrayList;
 
 public class ParallelProbes {
@@ -47,7 +48,8 @@
     }
 
     private Path createTmpFile() throws IOException {
-        final Path p = Files.createTempFile("prefix", ".json");
+        Path dir = Paths.get(System.getProperty("test.dir", "."));
+        final Path p = Files.createTempFile(dir, "prefix", ".json");
         Files.write(p, "{\"test\"}".getBytes());
         System.out.println("Write test file <" + p + ">");
         return p;
--- a/jdk/test/java/nio/file/spi/SetDefaultProvider.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/test/java/nio/file/spi/SetDefaultProvider.java	Thu Jul 20 09:38:27 2017 -0700
@@ -32,6 +32,7 @@
  */
 
 import java.io.File;
+import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
@@ -54,6 +55,11 @@
             new RuntimeException("jar tool not found")
         );
 
+    private static Path createTempDirectory(String prefix) throws IOException {
+        Path testDir = Paths.get(System.getProperty("test.dir", "."));
+        return Files.createTempDirectory(testDir, prefix);
+    }
+
     /**
      * Test override of default FileSystemProvider with the main application
      * on the class path.
@@ -91,7 +97,7 @@
      * is a module that is patched by an exploded patch.
      */
     public void testExplodedModuleWithExplodedPatch() throws Exception {
-        Path patchdir = Files.createTempDirectory("patch");
+        Path patchdir = createTempDirectory("patch");
         String modulePath = System.getProperty("jdk.module.path");
         int exitValue = exec(SET_DEFAULT_FSP,
                              "--patch-module", "m=" + patchdir,
@@ -105,7 +111,7 @@
      * is a module that is patched by an exploded patch.
      */
     public void testExplodedModuleWithJarPatch() throws Exception {
-        Path patchdir = Files.createTempDirectory("patch");
+        Path patchdir = createTempDirectory("patch");
         Files.createDirectory(patchdir.resolve("m.properties"));
         Path patch = createJarFile(patchdir);
         String modulePath = System.getProperty("jdk.module.path");
@@ -142,7 +148,7 @@
      * Creates a JAR file containing the entries in the given file tree.
      */
     private Path createJarFile(Path dir) throws Exception {
-        Path jar = Files.createTempDirectory("tmp").resolve("m.jar");
+        Path jar = createTempDirectory("tmp").resolve("m.jar");
         String[] args = { "--create", "--file=" + jar, "-C", dir.toString(), "." };
         int ret = JAR_TOOL.run(System.out, System.out, args);
         assertTrue(ret == 0);
--- a/jdk/test/jdk/internal/jrtfs/Basic.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/test/jdk/internal/jrtfs/Basic.java	Thu Jul 20 09:38:27 2017 -0700
@@ -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
@@ -70,15 +70,11 @@
     @BeforeClass
     public void setup() {
         theFileSystem = FileSystems.getFileSystem(URI.create("jrt:/"));
-        Path javaHomeDir = Paths.get(System.getProperty("java.home"));
-        Path jrtJarPath = javaHomeDir.resolve("jrt-fs.jar");
-        Path modulesPath = javaHomeDir.resolve("lib/modules");
-        isExplodedBuild = !Files.exists(jrtJarPath)
-                && !Files.exists(modulesPath);
-        if (Files.notExists(jrtJarPath)
-                && Files.notExists(modulesPath)) {
-            System.out.printf("Following files not exist: %s, %s",
-                    jrtJarPath.toString(), modulesPath.toString());
+        Path modulesPath = Paths.get(System.getProperty("java.home"),
+                "lib", "modules");
+        isExplodedBuild = Files.notExists(modulesPath);
+        if (isExplodedBuild) {
+            System.out.printf("%s doesn't exist.", modulesPath.toString());
             System.out.println();
             System.out.println("It is most probably an exploded build."
                     + " Skip non-default FileSystem testing.");
--- a/jdk/test/jdk/internal/jrtfs/WithSecurityManager.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/test/jdk/internal/jrtfs/WithSecurityManager.java	Thu Jul 20 09:38:27 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 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
@@ -29,16 +29,28 @@
 
 import java.net.URI;
 import java.nio.file.FileSystems;
+import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Collections;
 
 public class WithSecurityManager {
     public static void main(String[] args) throws Exception {
+        Path modulesPath = Paths.get(System.getProperty("java.home"),
+                "lib", "modules");
+        if (Files.notExists(modulesPath)) {
+            System.out.printf("%s doesn't exist.", modulesPath.toString());
+            System.out.println();
+            System.out.println("It is most probably an exploded build."
+                    + " Skip the test.");
+            return;
+        }
+
         boolean allow = args[0].equals("allow");
 
         // set security policy to allow access
         if (allow) {
+
             String testSrc = System.getProperty("test.src");
             if (testSrc == null)
                 testSrc = ".";
--- a/jdk/test/tools/jar/multiRelease/ApiValidatorTest.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/jdk/test/tools/jar/multiRelease/ApiValidatorTest.java	Thu Jul 20 09:38:27 2017 -0700
@@ -28,8 +28,7 @@
  * @modules java.base/jdk.internal.misc
  *          jdk.compiler
  *          jdk.jartool
- * @build jdk.test.lib.util.FileUtils
- *        jdk.test.lib.Utils
+ * @build jdk.test.lib.Utils
  *        jdk.test.lib.Asserts
  *        jdk.test.lib.JDKToolFinder
  *        jdk.test.lib.JDKToolLauncher
@@ -40,13 +39,10 @@
  */
 
 import jdk.test.lib.process.OutputAnalyzer;
-import jdk.test.lib.util.FileUtils;
-import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-import java.io.IOException;
 import java.lang.reflect.Method;
 import java.nio.file.Files;
 import java.nio.file.Path;
@@ -68,12 +64,6 @@
         classes = root.resolve("classes");
     }
 
-    @AfterMethod
-    void testCleanup() throws IOException {
-        FileUtils.deleteFileTreeWithRetry(root);
-    }
-
-
     @Test(dataProvider = "signatureChange")
     public void changeMethodSignature(String sigBase, String sigV10,
                                       boolean isAcceptable) throws Throwable {
--- a/langtools/.hgtags	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/.hgtags	Thu Jul 20 09:38:27 2017 -0700
@@ -435,3 +435,4 @@
 add6717b655efa3aa9350e917175f3965cfc0729 jdk-10+14
 0d0ac75b0f6cbe218362e3fac4bb443496e7258f jdk-9+176
 2f01728210c1405ef459e69d9c7247b5df6abb78 jdk-9+177
+2b9273266ea629ca686239c416a7ff8a592d822a jdk-10+15
--- a/langtools/make/gendata/Gendata-jdk.compiler.gmk	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/make/gendata/Gendata-jdk.compiler.gmk	Thu Jul 20 09:38:27 2017 -0700
@@ -60,7 +60,8 @@
 
 $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols: \
     $(COMPILE_CREATE_SYMBOLS) \
-    $(wildcard $(LANGTOOLS_TOPDIR)/make/data/symbols/*)
+    $(wildcard $(LANGTOOLS_TOPDIR)/make/data/symbols/*) \
+    $(MODULE_INFOS)
 	$(RM) -r $(@D)
 	$(MKDIR) -p $(@D)
 	$(ECHO) Creating ct.sym classes
--- a/langtools/make/src/classes/build/tools/symbolgenerator/TransitiveDependencies.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/make/src/classes/build/tools/symbolgenerator/TransitiveDependencies.java	Thu Jul 20 09:38:27 2017 -0700
@@ -59,13 +59,14 @@
         JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
         List<String> options = Arrays.asList("-source", "9",
                                              "-target", "9",
+                                             "-proc:only",
                                              "--system", "none",
                                              "--module-source-path", args[0],
                                              "--add-modules", Arrays.stream(args)
                                                                     .skip(1)
                                                                     .collect(Collectors.joining(",")));
         List<String> jlObjectList = Arrays.asList("java.lang.Object");
-        JavacTaskImpl task = (JavacTaskImpl) compiler.getTask(null, null, d -> {}, options, jlObjectList, null);
+        JavacTaskImpl task = (JavacTaskImpl) compiler.getTask(null, null, null, options, jlObjectList, null);
         task.enter();
         Elements elements = task.getElements();
         List<String> todo = new LinkedList<>();
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java	Thu Jul 20 09:38:27 2017 -0700
@@ -340,6 +340,8 @@
         JavaFileObject classfile = c.classfile;
         if (classfile != null) {
             JavaFileObject previousClassFile = currentClassFile;
+            Symbol prevOwner = c.owner;
+            Name prevName = c.fullname;
             try {
                 if (reader.filling) {
                     Assert.error("Filling " + classfile.toUri() + " during " + previousClassFile);
@@ -360,6 +362,21 @@
                                                         + classfile.toUri());
                     }
                 }
+            } catch (BadClassFile cf) {
+                //the symbol may be partially initialized, purge it:
+                c.owner = prevOwner;
+                c.members_field.getSymbols(sym -> sym.kind == TYP).forEach(sym -> {
+                    ClassSymbol csym = (ClassSymbol) sym;
+                    csym.owner = sym.packge();
+                    csym.owner.members().enter(sym);
+                    csym.fullname = sym.flatName();
+                    csym.name = Convert.shortName(sym.flatName());
+                    csym.reset();
+                });
+                c.fullname = prevName;
+                c.name = Convert.shortName(prevName);
+                c.reset();
+                throw cf;
             } finally {
                 currentClassFile = previousClassFile;
             }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Thu Jul 20 09:38:27 2017 -0700
@@ -290,8 +290,7 @@
      */
     public Type completionError(DiagnosticPosition pos, CompletionFailure ex) {
         log.error(JCDiagnostic.DiagnosticFlag.NON_DEFERRABLE, pos, Errors.CantAccess(ex.sym, ex.getDetailValue()));
-        if (ex instanceof ClassFinder.BadClassFile) throw new Abort();
-        else return syms.errType;
+        return syms.errType;
     }
 
     /** Report an error that wrong type tag was found.
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java	Thu Jul 20 09:38:27 2017 -0700
@@ -94,10 +94,8 @@
 import com.sun.tools.javac.tree.JCTree.JCUses;
 import com.sun.tools.javac.tree.JCTree.Tag;
 import com.sun.tools.javac.tree.TreeInfo;
-import com.sun.tools.javac.util.Abort;
 import com.sun.tools.javac.util.Assert;
 import com.sun.tools.javac.util.Context;
-import com.sun.tools.javac.util.JCDiagnostic;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.util.ListBuffer;
@@ -105,7 +103,6 @@
 import com.sun.tools.javac.util.Name;
 import com.sun.tools.javac.util.Names;
 import com.sun.tools.javac.util.Options;
-import com.sun.tools.javac.util.Position;
 
 import static com.sun.tools.javac.code.Flags.ABSTRACT;
 import static com.sun.tools.javac.code.Flags.ENUM;
@@ -266,8 +263,7 @@
                 msym.complete();
             }
         } catch (CompletionFailure ex) {
-            log.error(JCDiagnostic.DiagnosticFlag.NON_DEFERRABLE, Position.NOPOS, Errors.CantAccess(ex.sym, ex.getDetailValue()));
-            if (ex instanceof ClassFinder.BadClassFile) throw new Abort();
+            chk.completionError(null, ex);
         } finally {
             depth--;
         }
@@ -1220,10 +1216,6 @@
         Predicate<ModuleSymbol> observablePred = sym ->
              (observable == null) ? (moduleFinder.findModule(sym).kind != ERR) : observable.contains(sym);
         Predicate<ModuleSymbol> systemModulePred = sym -> (sym.flags() & Flags.SYSTEM_MODULE) != 0;
-        Predicate<ModuleSymbol> noIncubatorPred = sym -> {
-            sym.complete();
-            return !sym.resolutionFlags.contains(ModuleResolutionFlags.DO_NOT_RESOLVE_BY_DEFAULT);
-        };
         Set<ModuleSymbol> enabledRoot = new LinkedHashSet<>();
 
         if (rootModules.contains(syms.unnamedModule)) {
@@ -1241,9 +1233,18 @@
                 jdkModulePred = sym -> true;
             }
 
+            Predicate<ModuleSymbol> noIncubatorPred = sym -> {
+                sym.complete();
+                return !sym.resolutionFlags.contains(ModuleResolutionFlags.DO_NOT_RESOLVE_BY_DEFAULT);
+            };
+
             for (ModuleSymbol sym : new HashSet<>(syms.getAllModules())) {
-                if (systemModulePred.test(sym) && observablePred.test(sym) && jdkModulePred.test(sym) && noIncubatorPred.test(sym)) {
-                    enabledRoot.add(sym);
+                try {
+                    if (systemModulePred.test(sym) && observablePred.test(sym) && jdkModulePred.test(sym) && noIncubatorPred.test(sym)) {
+                        enabledRoot.add(sym);
+                    }
+                } catch (CompletionFailure ex) {
+                    chk.completionError(null, ex);
                 }
             }
         }
@@ -1341,32 +1342,36 @@
         result.add(syms.java_base);
 
         while (primaryTodo.nonEmpty() || secondaryTodo.nonEmpty()) {
-            ModuleSymbol current;
-            boolean isPrimaryTodo;
-            if (primaryTodo.nonEmpty()) {
-                current = primaryTodo.head;
-                primaryTodo = primaryTodo.tail;
-                isPrimaryTodo = true;
-            } else {
-                current = secondaryTodo.head;
-                secondaryTodo = secondaryTodo.tail;
-                isPrimaryTodo = false;
-            }
-            if (observable != null && !observable.contains(current))
-                continue;
-            if (!result.add(current) || current == syms.unnamedModule || ((current.flags_field & Flags.AUTOMATIC_MODULE) != 0))
-                continue;
-            current.complete();
-            if (current.kind == ERR && (isPrimaryTodo || base.contains(current)) && warnedMissing.add(current)) {
-                log.error(Errors.ModuleNotFound(current));
-            }
-            for (RequiresDirective rd : current.requires) {
-                if (rd.module == syms.java_base) continue;
-                if ((rd.isTransitive() && isPrimaryTodo) || rootModules.contains(current)) {
-                    primaryTodo = primaryTodo.prepend(rd.module);
+            try {
+                ModuleSymbol current;
+                boolean isPrimaryTodo;
+                if (primaryTodo.nonEmpty()) {
+                    current = primaryTodo.head;
+                    primaryTodo = primaryTodo.tail;
+                    isPrimaryTodo = true;
                 } else {
-                    secondaryTodo = secondaryTodo.prepend(rd.module);
+                    current = secondaryTodo.head;
+                    secondaryTodo = secondaryTodo.tail;
+                    isPrimaryTodo = false;
                 }
+                if (observable != null && !observable.contains(current))
+                    continue;
+                if (!result.add(current) || current == syms.unnamedModule || ((current.flags_field & Flags.AUTOMATIC_MODULE) != 0))
+                    continue;
+                current.complete();
+                if (current.kind == ERR && (isPrimaryTodo || base.contains(current)) && warnedMissing.add(current)) {
+                    log.error(Errors.ModuleNotFound(current));
+                }
+                for (RequiresDirective rd : current.requires) {
+                    if (rd.module == syms.java_base) continue;
+                    if ((rd.isTransitive() && isPrimaryTodo) || rootModules.contains(current)) {
+                        primaryTodo = primaryTodo.prepend(rd.module);
+                    } else {
+                        secondaryTodo = secondaryTodo.prepend(rd.module);
+                    }
+                }
+            } catch (CompletionFailure ex) {
+                chk.completionError(null, ex);
             }
         }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Thu Jul 20 09:38:27 2017 -0700
@@ -1425,7 +1425,7 @@
         ClassSymbol c = readClassSymbol(nextChar());
         NameAndType nt = readNameAndType(nextChar());
 
-        if (c.members_field == null)
+        if (c.members_field == null || c.kind != TYP)
             throw badClassFile("bad.enclosing.class", self, c);
 
         MethodSymbol m = findMethod(nt, c.members_field, self.flags());
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Thu Jul 20 09:38:27 2017 -0700
@@ -400,8 +400,6 @@
         } catch (CompletionFailure ex) {
             // inlined Check.completionError as it is not initialized yet
             log.error(Errors.CantAccess(ex.sym, ex.getDetailValue()));
-            if (ex instanceof ClassFinder.BadClassFile)
-                throw new Abort();
         }
         source = Source.instance(context);
         attr = Attr.instance(context);
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Thu Jul 20 09:38:27 2017 -0700
@@ -2243,8 +2243,20 @@
                 }
             }
 
-            JCNewArray na = toP(F.at(newpos).NewArray(elemtype, dims.toList(), null));
+            List<JCExpression> elems = null;
+            int errpos = token.pos;
+
+            if (token.kind == LBRACE) {
+                elems = arrayInitializerElements(newpos, elemtype);
+            }
+
+            JCNewArray na = toP(F.at(newpos).NewArray(elemtype, dims.toList(), elems));
             na.dimAnnotations = dimAnnotations.toList();
+
+            if (elems != null) {
+                return syntaxError(errpos, List.of(na), "illegal.array.creation.both.dimension.and.initialization");
+            }
+
             return na;
         }
     }
@@ -2270,6 +2282,11 @@
     /** ArrayInitializer = "{" [VariableInitializer {"," VariableInitializer}] [","] "}"
      */
     JCExpression arrayInitializer(int newpos, JCExpression t) {
+        List<JCExpression> elems = arrayInitializerElements(newpos, t);
+        return toP(F.at(newpos).NewArray(t, List.nil(), elems));
+    }
+
+    List<JCExpression> arrayInitializerElements(int newpos, JCExpression t) {
         accept(LBRACE);
         ListBuffer<JCExpression> elems = new ListBuffer<>();
         if (token.kind == COMMA) {
@@ -2283,7 +2300,7 @@
             }
         }
         accept(RBRACE);
-        return toP(F.at(newpos).NewArray(t, List.nil(), elems.toList()));
+        return elems.toList();
     }
 
     /** VariableInitializer = ArrayInitializer | Expression
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Thu Jul 20 09:38:27 2017 -0700
@@ -165,6 +165,9 @@
 compiler.err.array.dimension.missing=\
     array dimension missing
 
+compiler.err.illegal.array.creation.both.dimension.and.initialization=\
+    array creation with both dimension expression and initialization is illegal
+
 # 0: type
 compiler.err.array.req.but.found=\
     array required, but {0} found
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java	Thu Jul 20 09:38:27 2017 -0700
@@ -455,7 +455,7 @@
      * @throws DocFileIOException if there is a problem creating the search index file
      */
     protected void createSearchIndexFile(DocPath searchIndexFile, DocPath searchIndexZip,
-            DocPath searchIndexJS, List<SearchIndexItem> searchIndex, String varName) throws DocFileIOException {
+            DocPath searchIndexJS, Collection<SearchIndexItem> searchIndex, String varName) throws DocFileIOException {
         if (!searchIndex.isEmpty()) {
             StringBuilder searchVar = new StringBuilder("[");
             boolean first = true;
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java	Thu Jul 20 09:38:27 2017 -0700
@@ -532,7 +532,7 @@
         tdDesc.addStyle(HtmlStyle.colLast);
         writer.addSummaryLinkComment(this, member, firstSentenceTags, tdDesc);
         tr.addContent(tdDesc);
-        if (utils.isMethod(member) && !utils.isAnnotationType(member)) {
+        if (utils.isMethod(member) && !utils.isAnnotationType(member) && !utils.isProperty(name(member))) {
             int methodType = utils.isStatic(member) ? MethodTypes.STATIC.tableTabs().value() :
                     MethodTypes.INSTANCE.tableTabs().value();
             if (utils.isInterface(member.getEnclosingElement())) {
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java	Thu Jul 20 09:38:27 2017 -0700
@@ -224,7 +224,7 @@
 
     protected List<SearchIndexItem> packageSearchIndex = new ArrayList<>();
 
-    protected List<SearchIndexItem> tagSearchIndex = new ArrayList<>();
+    protected SortedSet<SearchIndexItem> tagSearchIndex = new TreeSet<>(makeSearchTagComparator());
 
     protected List<SearchIndexItem> typeSearchIndex = new ArrayList<>();
 
@@ -348,6 +348,16 @@
         return htmlTag.allowTag(this.htmlVersion);
     }
 
+    public Comparator<SearchIndexItem> makeSearchTagComparator() {
+        return (SearchIndexItem sii1, SearchIndexItem sii2) -> {
+            int result = (sii1.getLabel()).compareTo(sii2.getLabel());
+            if (result == 0) {
+                result = (sii1.getHolder()).compareTo(sii2.getHolder());
+            }
+            return result;
+        };
+    }
+
     /**
      * Decide the page which will appear first in the right-hand frame. It will
      * be "overview-summary.html" if "-overview" option is used or no
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SplitIndexWriter.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SplitIndexWriter.java	Thu Jul 20 09:38:27 2017 -0700
@@ -107,12 +107,16 @@
         Set<Character> keys = new TreeSet<>(indexbuilder.getIndexMap().keySet());
         keys.addAll(configuration.tagSearchIndexKeys);
         ListIterator<Character> li = new ArrayList<>(keys).listIterator();
+        int prev;
+        int next;
         while (li.hasNext()) {
+            prev = (li.hasPrevious()) ? li.previousIndex() + 1 : -1;
             Object ch = li.next();
+            next = (li.hasNext()) ? li.nextIndex() + 1 : -1;
             DocPath filename = DocPaths.indexN(li.nextIndex());
             SplitIndexWriter indexgen = new SplitIndexWriter(configuration,
                     path.resolve(filename),
-                    indexbuilder, keys, li.previousIndex(), li.nextIndex());
+                    indexbuilder, keys, prev, next);
             indexgen.generateIndexFile((Character) ch);
             if (!li.hasNext()) {
                 indexgen.createSearchIndexFiles();
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Thu Jul 20 09:38:27 2017 -0700
@@ -434,21 +434,21 @@
 }
 .overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
 .useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
-.requiresSummary caption a:link, .packagesSummary caption a:link, providesSummary caption a:link,
+.requiresSummary caption a:link, .packagesSummary caption a:link, .providesSummary caption a:link,
 .usesSummary caption a:link,
 .overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
 .useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
-.requiresSummary caption a:hover, .packagesSummary caption a:hover, providesSummary caption a:hover,
+.requiresSummary caption a:hover, .packagesSummary caption a:hover, .providesSummary caption a:hover,
 .usesSummary caption a:hover,
 .overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
 .useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
-.requiresSummary caption a:active, .packagesSummary caption a:active, providesSummary caption a:active,
+.requiresSummary caption a:active, .packagesSummary caption a:active, .providesSummary caption a:active,
 .usesSummary caption a:active,
 .overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
-.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited
-.requiresSummary caption a:visited, .packagesSummary caption a:visited, providesSummary caption a:visited,
+.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited,
+.requiresSummary caption a:visited, .packagesSummary caption a:visited, .providesSummary caption a:visited,
 .usesSummary caption a:visited {
-    color:#FFFFFF;
+    color:#1f389c;
 }
 .overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
 .useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span,
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java	Thu Jul 20 09:38:27 2017 -0700
@@ -38,7 +38,9 @@
 import java.util.Comparator;
 import java.util.List;
 import java.util.Locale;
+import java.util.MissingResourceException;
 import java.util.Objects;
+import java.util.ResourceBundle;
 import java.util.Set;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
@@ -177,6 +179,16 @@
         usage("main.Xusage", OptionKind.EXTENDED, "main.Xusage.foot");
     }
 
+    @Override
+    void version() {
+        messager.notice("javadoc.version", messager.programName, version("release"));
+    }
+
+    @Override
+    void fullVersion() {
+        messager.notice("javadoc.fullversion", messager.programName, version("full"));
+    }
+
     private void usage(String headerKey, OptionKind kind, String footerKey) {
         messager.notice(headerKey);
         showToolOptions(kind);
@@ -193,6 +205,24 @@
             messager.notice(footerKey);
     }
 
+    private static final String versionRBName = "jdk.javadoc.internal.tool.resources.version";
+    private static ResourceBundle versionRB;
+
+    private static String version(String key) {
+        if (versionRB == null) {
+            try {
+                versionRB = ResourceBundle.getBundle(versionRBName);
+            } catch (MissingResourceException e) {
+                return Log.getLocalizedString("version.not.available");
+            }
+        }
+        try {
+            return versionRB.getString(key);
+        } catch (MissingResourceException e) {
+            return Log.getLocalizedString("version.not.available");
+        }
+    }
+
     void showToolOptions(OptionKind kind) {
         Comparator<ToolOption> comp = new Comparator<ToolOption>() {
             final Collator collator = Collator.getInstance(Locale.US);
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java	Thu Jul 20 09:38:27 2017 -0700
@@ -359,6 +359,20 @@
         public void process(Helper helper) {
             throw new AssertionError("the -J flag should be caught by the launcher.");
         }
+    },
+
+    VERSION("--version", STANDARD) {
+        @Override
+        public void process(Helper helper) throws OptionException {
+            throw new OptionException(OK, helper::version);
+        }
+    },
+
+    FULLVERSION("--full-version", HIDDEN) {
+        @Override
+        public void process(Helper helper) throws OptionException {
+            throw new OptionException(OK, helper::fullVersion);
+        }
     };
 
     public final String primaryName;
@@ -456,6 +470,9 @@
         abstract void usage();
         abstract void Xusage();
 
+        abstract void version();
+        abstract void fullVersion();
+
         abstract String getLocalizedMessage(String msg, Object... args);
 
         abstract OptionHelper getOptionHelper();
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties	Thu Jul 20 09:38:27 2017 -0700
@@ -200,6 +200,9 @@
 main.opt.quiet.desc=\
     Do not display status messages
 
+main.opt.version.desc=\
+    Print version information
+
 main.opt.J.arg=\
     <flag>
 main.opt.J.desc=\
@@ -306,3 +309,5 @@
 javadoc.warning.msg={0}: warning - {1}
 javadoc.note.msg = {1}
 javadoc.note.pos.msg= {0}: {1}
+javadoc.version={0} {1}
+javadoc.fullversion={0} full version "{1}"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/javadoc/doclet/testIndexFiles/TestIndexFiles.java	Thu Jul 20 09:38:27 2017 -0700
@@ -0,0 +1,64 @@
+/*
+ * 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      8170825
+ * @summary  Perform tests on index files generated by javadoc.
+ * @author   bpatel
+ * @library  ../lib
+ * @modules jdk.javadoc/jdk.javadoc.internal.tool
+ * @build    JavadocTester
+ * @run main TestIndexFiles
+ */
+
+public class TestIndexFiles extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestIndexFiles tester = new TestIndexFiles();
+        tester.runTests();
+    }
+
+    @Test
+    void testIndexFiles() {
+        javadoc("-d", "out", "-splitindex", "-Xdoclint:none", "-sourcepath", testSrc,
+                "-use", "pkg");
+        checkExit(Exit.OK);
+        checkIndexFiles(true);
+    }
+
+    void checkIndexFiles(boolean found) {
+        checkOutput("index-files/index-1.html", found,
+                "<li>Prev Letter</li>\n"
+                + "<li><a href=\"index-2.html\">Next Letter</a></li>");
+        checkOutput("index-files/index-5.html", found,
+                "<li><a href=\"index-4.html\">Prev Letter</a></li>\n"
+                + "<li>Next Letter</li>");
+        checkOutput("index-files/index-1.html", !found,
+                "<li><a href=\"index-0.html\">Prev Letter</a></li>\n"
+                + "<li><a href=\"index-1.html\">Next Letter</a></li>");
+        checkOutput("index-files/index-5.html", !found,
+                "<li><a href=\"index-4.html\">Prev Letter</a></li>\n"
+                + "<li><a href=\"index-5.html\">Next Letter</a></li>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/javadoc/doclet/testIndexFiles/pkg/ClassForIndexFilesTest.java	Thu Jul 20 09:38:27 2017 -0700
@@ -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 pkg;
+
+public class ClassForIndexFilesTest {
+
+    /**
+     * Test field.
+     */
+    public int field1;
+
+    /**
+     * Test method.
+     */
+    public void testMethod() {
+    }
+
+    /**
+     * Another test method.
+     */
+    public void anotherTestMethod() {
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/javadoc/doclet/testIndexFiles/pkg/package-info.java	Thu Jul 20 09:38:27 2017 -0700
@@ -0,0 +1,27 @@
+/*
+ * 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 pkg used for testing index files.
+ */
+package pkg;
--- a/langtools/test/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/test/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java	Thu Jul 20 09:38:27 2017 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 7112427 8012295 8025633 8026567 8061305 8081854 8150130 8162363
- *      8167967 8172528 8175200 8178830
+ *      8167967 8172528 8175200 8178830 8182257
  * @summary Test of the JavaFX doclet features.
  * @author jvalenta
  * @library ../lib
@@ -137,7 +137,10 @@
                 "<h3>Property Summary</h3>\n"
                 + "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
                 + "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>",
-                "");
+                "<tr class=\"altColor\">\n"
+                + "<td class=\"colFirst\"><code><a href=\"../pkg1/C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
+                "<tr class=\"rowColor\">\n"
+                + "<td class=\"colFirst\"><code><a href=\"../pkg1/C.DoubleProperty.html\" title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n");
 
         checkOutput("pkg1/C.html", false,
                 "A()",
@@ -147,7 +150,11 @@
                 + "</span><span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">Instance Methods</a>"
                 + "</span><span class=\"tabEnd\">&nbsp;</span></span><span id=\"t4\" class=\"tableTab\"><span>"
                 + "<a href=\"javascript:show(8);\">Concrete Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
-                + "</caption>");
+                + "</caption>",
+                "<tr id=\"i0\" class=\"altColor\">\n"
+                + "<td class=\"colFirst\"><code><a href=\"../pkg1/C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
+                "<tr id=\"i1\" class=\"rowColor\">\n"
+                + "<td class=\"colFirst\"><code><a href=\"../pkg1/C.DoubleProperty.html\" title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n");
 
         checkOutput("index-all.html", true,
                 "<div class=\"block\">Gets the value of the property paused.</div>",
--- a/langtools/test/jdk/javadoc/doclet/testModules/TestModules.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/test/jdk/javadoc/doclet/testModules/TestModules.java	Thu Jul 20 09:38:27 2017 -0700
@@ -25,7 +25,7 @@
  * @test
  * @bug 8154119 8154262 8156077 8157987 8154261 8154817 8135291 8155995 8162363
  *      8168766 8168688 8162674 8160196 8175799 8174974 8176778 8177562 8175218 8175823 8166306
- *      8178043
+ *      8178043 8181622
  * @summary Test modules support in javadoc.
  * @author bpatel
  * @library ../lib
@@ -394,7 +394,7 @@
                 + "<a name=\"module.description\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<div class=\"block\">This is a test description for the moduleA module. Search "
+                + "<div class=\"block\">This is a test description for the moduleA module with a Search "
                 + "phrase <a id=\"searchphrase\" class=\"searchTagResult\">search phrase</a>.</div>");
         checkOutput("moduleB-summary.html", found,
                 "<!-- ============ MODULE DESCRIPTION =========== -->\n"
@@ -454,7 +454,7 @@
                 + "<a id=\"module.description\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<div class=\"block\">This is a test description for the moduleA module. Search "
+                + "<div class=\"block\">This is a test description for the moduleA module with a Search "
                 + "phrase <a id=\"searchphrase\" class=\"searchTagResult\">search phrase</a>.</div>");
         checkOutput("moduleB-summary.html", found,
                 "<section role=\"region\">\n"
@@ -755,7 +755,8 @@
                 + "<td class=\"colFirst\">transitive</td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><a href=\"moduleA-summary.html\">moduleA</a></th>\n"
                 + "<td class=\"colLast\">\n"
-                + "<div class=\"block\">This is a test description for the moduleA module.</div>\n"
+                + "<div class=\"block\">This is a test description for the moduleA module with a Search "
+                + "phrase <a id=\"searchphrase\" class=\"searchTagResult\">search phrase</a>.</div>\n"
                 + "</td>\n"
                 + "</tr>\n"
                 + "<tr class=\"rowColor\">\n"
@@ -839,7 +840,8 @@
                 "<dl>\n"
                 + "<dt><a href=\"moduleA-summary.html\">moduleA</a> - module moduleA</dt>\n"
                 + "<dd>\n"
-                + "<div class=\"block\">This is a test description for the moduleA module.</div>\n"
+                + "<div class=\"block\">This is a test description for the moduleA module with a Search "
+                + "phrase <a id=\"searchphrase\" class=\"searchTagResult\">search phrase</a>.</div>\n"
                 + "</dd>\n"
                 + "<dt><a href=\"moduleB-summary.html\">moduleB</a> - module moduleB</dt>\n"
                 + "<dd>\n"
@@ -854,13 +856,21 @@
                 + "search_word</a></span> - Search tag in moduleB</dt>\n"
                 + "<dd>&nbsp;</dd>\n"
                 + "</dl>");
+        checkOutput("index-all.html", false,
+                "<dt><span class=\"searchTagLink\"><a href=\"moduleA-summary.html#searchphrase\">"
+                + "search phrase</a></span> - Search tag in moduleA</dt>\n"
+                + "<dd>with description</dd>\n"
+                + "<dt><span class=\"searchTagLink\"><a href=\"moduleA-summary.html#searchphrase\">"
+                + "search phrase</a></span> - Search tag in moduleA</dt>\n"
+                + "<dd>with description</dd>");
     }
 
     void checkModuleModeCommon() {
         checkOutput("overview-summary.html", true,
                 "<th class=\"colFirst\" scope=\"row\"><a href=\"moduleA-summary.html\">moduleA</a></th>\n"
                 + "<td class=\"colLast\">\n"
-                + "<div class=\"block\">This is a test description for the moduleA module.</div>\n"
+                + "<div class=\"block\">This is a test description for the moduleA module with a Search "
+                + "phrase <a id=\"searchphrase\" class=\"searchTagResult\">search phrase</a>.</div>\n"
                 + "</td>",
                 "<th class=\"colFirst\" scope=\"row\"><a href=\"moduleB-summary.html\">moduleB</a></th>\n"
                 + "<td class=\"colLast\">\n"
@@ -868,7 +878,7 @@
                 + "</td>",
                 "<th class=\"colFirst\" scope=\"row\"><a href=\"moduletags-summary.html\">moduletags</a></th>\n"
                 + "<td class=\"colLast\">\n"
-                + "<div class=\"block\">This is a test description for the moduleA module.<br>\n"
+                + "<div class=\"block\">This is a test description for the moduletags module.<br>\n"
                 + " Type Link: <a href=\"testpkgmdltags/TestClassInModuleTags.html\" title=\"class in testpkgmdltags\"><code>TestClassInModuleTags</code></a>.<br>\n"
                 + " Member Link: <a href=\"testpkgmdltags/TestClassInModuleTags.html#testMethod-java.lang.String-\"><code>testMethod(String)</code></a>.<br>\n"
                 + " Package Link: <a href=\"testpkgmdltags/package-summary.html\"><code>testpkgmdltags</code></a>.<br></div>\n"
@@ -896,7 +906,8 @@
                 "<td class=\"colFirst\">transitive static</td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><a href=\"moduleA-summary.html\">moduleA</a></th>\n"
                 + "<td class=\"colLast\">\n"
-                + "<div class=\"block\">This is a test description for the moduleA module.</div>\n"
+                + "<div class=\"block\">This is a test description for the moduleA module with a Search "
+                + "phrase <a id=\"searchphrase\" class=\"searchTagResult\">search phrase</a>.</div>\n"
                 + "</td>",
                 "<table class=\"requiresSummary\" summary=\"Requires table, listing modules, and an explanation\">\n"
                 + "<caption><span>Requires</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
--- a/langtools/test/jdk/javadoc/doclet/testModules/moduleA/module-info.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/test/jdk/javadoc/doclet/testModules/moduleA/module-info.java	Thu Jul 20 09:38:27 2017 -0700
@@ -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
@@ -24,7 +24,7 @@
  */
 
 /**
-  * This is a test description for the moduleA module. Search phrase {@index "search phrase" with description}.
+  * This is a test description for the moduleA module with a Search phrase {@index "search phrase" with description}.
   *
   * @deprecated This module is deprecated.
   */
--- a/langtools/test/jdk/javadoc/doclet/testModules/moduletags/module-info.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/test/jdk/javadoc/doclet/testModules/moduletags/module-info.java	Thu Jul 20 09:38:27 2017 -0700
@@ -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
@@ -24,7 +24,7 @@
  */
 
 /**
-  * This is a test description for the moduleA module.<br>
+  * This is a test description for the moduletags module.<br>
   * Type Link: {@link testpkgmdltags.TestClassInModuleTags}.<br>
   * Member Link: {@link testpkgmdltags.TestClassInModuleTags#testMethod(String)}.<br>
   * Package Link: {@link testpkgmdltags}.<br>
--- a/langtools/test/jdk/javadoc/doclet/testSearch/TestSearch.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/test/jdk/javadoc/doclet/testSearch/TestSearch.java	Thu Jul 20 09:38:27 2017 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218 8147881
+ * @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218 8147881 8181622
  * @summary Test the search feature of javadoc.
  * @author bpatel
  * @library ../lib
@@ -65,6 +65,7 @@
         checkInvalidUsageIndexTag();
         checkSearchOutput(true);
         checkSingleIndex(true);
+        checkSingleIndexSearchTagDuplication();
         checkJqueryAndImageFiles(true);
         checkSearchJS();
         checkFiles(true,
@@ -86,6 +87,7 @@
         checkDocLintErrors();
         checkSearchOutput(true);
         checkSingleIndex(true);
+        checkSingleIndexSearchTagDuplication();
         checkJqueryAndImageFiles(true);
         checkSearchJS();
         checkFiles(true,
@@ -127,6 +129,7 @@
         checkExit(Exit.OK);
         checkSearchOutput(true);
         checkSingleIndex(true);
+        checkSingleIndexSearchTagDuplication();
         checkJqueryAndImageFiles(true);
         checkSearchJS();
         checkFiles(true,
@@ -210,6 +213,7 @@
         checkInvalidUsageIndexTag();
         checkSearchOutput(true);
         checkSplitIndex();
+        checkSplitIndexSearchTagDuplication();
         checkJqueryAndImageFiles(true);
         checkSearchJS();
         checkFiles(true,
@@ -498,4 +502,34 @@
                 + "        }\n"
                 + "    });");
     }
+
+    void checkSingleIndexSearchTagDuplication() {
+        // Test for search tags duplication in index file.
+        checkOutput("index-all.html", true,
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n"
+                + "<dd>with description</dd>");
+        checkOutput("index-all.html", false,
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n"
+                + "<dd>with description</dd>\n"
+                + "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n"
+                + "<dd>with description</dd>");
+    }
+
+    void checkSplitIndexSearchTagDuplication() {
+        // Test for search tags duplication in index file.
+        checkOutput("index-files/index-13.html", true,
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n"
+                + "<dd>with description</dd>");
+        checkOutput("index-files/index-13.html", false,
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n"
+                + "<dd>with description</dd>\n"
+                + "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n"
+                + "<dd>with description</dd>");
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/javadoc/doclet/testVersionOption/TestVersionOption.java	Thu Jul 20 09:38:27 2017 -0700
@@ -0,0 +1,58 @@
+/*
+ * 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      8177048
+ * @summary  javadoc should support --version and --full-version flags
+ * @library ../lib
+ * @modules jdk.javadoc/jdk.javadoc.internal.tool
+ * @build    JavadocTester TestVersionOption
+ * @run main TestVersionOption
+ */
+
+public class TestVersionOption extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestVersionOption tester = new TestVersionOption();
+        tester.runTests();
+    }
+
+    @Test
+    void testFullVersionOption() {
+        javadoc("--full-version");
+        checkExit(Exit.OK);
+
+        checkOutput(Output.OUT, true, "javadoc full version \"" + System.getProperty("java.runtime.version") + "\"");
+    }
+
+
+    @Test
+    void testVersionOption() {
+        javadoc("--version");
+        checkExit(Exit.OK);
+
+        checkOutput(Output.OUT, true, "javadoc " + System.getProperty("java.version"));
+    }
+
+}
--- a/langtools/test/tools/javac/ExtraneousEquals.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/test/tools/javac/ExtraneousEquals.java	Thu Jul 20 09:38:27 2017 -0700
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 5019614
+ * @bug 5019614 8057647
  * @summary variance prototype syntax leftover
  *
  * @compile/fail/ref=ExtraneousEquals.out -XDrawDiagnostics ExtraneousEquals.java
--- a/langtools/test/tools/javac/ExtraneousEquals.out	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/test/tools/javac/ExtraneousEquals.out	Thu Jul 20 09:38:27 2017 -0700
@@ -1,6 +1,4 @@
 ExtraneousEquals.java:10:23: compiler.err.illegal.start.of.expr
 ExtraneousEquals.java:10:24: compiler.err.illegal.start.of.expr
-ExtraneousEquals.java:10:25: compiler.err.expected: ';'
-ExtraneousEquals.java:10:28: compiler.err.not.stmt
-ExtraneousEquals.java:10:29: compiler.err.expected: ';'
-5 errors
+ExtraneousEquals.java:10:26: compiler.err.illegal.array.creation.both.dimension.and.initialization
+3 errors
--- a/langtools/test/tools/javac/T8003967/DetectMutableStaticFields.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/test/tools/javac/T8003967/DetectMutableStaticFields.java	Thu Jul 20 09:38:27 2017 -0700
@@ -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
@@ -91,6 +91,7 @@
 
     static {
         ignore("javax/tools/ToolProvider", "instance");
+        ignore("jdk/javadoc/internal/tool/Start", "versionRB");
         ignore("com/sun/tools/javah/JavahTask", "versionRB");
         ignore("com/sun/tools/classfile/Dependencies$DefaultFilter", "instance");
         ignore("com/sun/tools/javap/JavapTask", "versionRB");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/IllegalArrayCreation.java	Thu Jul 20 09:38:27 2017 -0700
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+// key: compiler.err.illegal.array.creation.both.dimension.and.initialization
+
+class IllegalArrayCreation {
+    int[] foo = new int[10] { 1, 2, 3 };
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/modules/BrokenModulesTest.java	Thu Jul 20 09:38:27 2017 -0700
@@ -0,0 +1,110 @@
+/*
+ * 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 8182450
+ * @summary Test model behavior when a completing a broken module-info.
+ * @library /tools/lib
+ * @modules
+ *      jdk.compiler/com.sun.tools.javac.api
+ *      jdk.compiler/com.sun.tools.javac.code
+ *      jdk.compiler/com.sun.tools.javac.main
+ *      jdk.compiler/com.sun.tools.javac.processing
+ * @build toolbox.ToolBox toolbox.JavacTask toolbox.ModuleBuilder ModuleTestBase
+ * @run main BrokenModulesTest
+ */
+
+import java.nio.file.Path;
+import java.util.List;
+
+import javax.tools.JavaCompiler;
+import javax.tools.ToolProvider;
+
+import com.sun.tools.javac.api.JavacTaskImpl;
+
+public class BrokenModulesTest extends ModuleTestBase {
+
+    public static void main(String... args) throws Exception {
+        new BrokenModulesTest().runTests();
+    }
+
+    List<String> jlObjectList = List.of("java.lang.Object");
+    JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+
+    @Test
+    public void testBrokenModuleInfoModuleSourcePath(Path base) throws Exception {
+        Path msp = base.resolve("msp");
+        Path ma = msp.resolve("ma");
+        tb.writeJavaFiles(ma,
+                          "module ma { requires not.available; exports api1; }",
+                          "package api1; public interface Api { }");
+        Path out = base.resolve("out");
+        tb.createDirectories(out);
+
+        List<String> opts = List.of("--module-source-path", msp.toString(),
+                                    "--add-modules", "ma");
+        JavacTaskImpl task = (JavacTaskImpl) compiler.getTask(null, null, null, opts, jlObjectList, null);
+
+        task.enter();
+
+        task.getElements().getModuleElement("java.base");
+    }
+
+    @Test
+    public void testSystem(Path base) throws Exception {
+        Path jdkCompiler = base.resolve("jdk.compiler");
+        tb.writeJavaFiles(jdkCompiler,
+                          "module jdk.compiler { requires not.available; }");
+        Path out = base.resolve("out");
+        tb.createDirectories(out);
+
+        List<String> opts = List.of("--patch-module", "jdk.compiler=" + jdkCompiler.toString(),
+                                    "--add-modules", "jdk.compiler");
+        JavacTaskImpl task = (JavacTaskImpl) compiler.getTask(null, null, null, opts, jlObjectList, null);
+
+        task.enter();
+
+        task.getElements().getModuleElement("java.base");
+    }
+
+    @Test
+    public void testParseError(Path base) throws Exception {
+        Path msp = base.resolve("msp");
+        Path ma = msp.resolve("ma");
+        tb.writeJavaFiles(ma,
+                          "broken module ma { }",
+                          "package api1; public interface Api { }");
+        Path out = base.resolve("out");
+        tb.createDirectories(out);
+
+        List<String> opts = List.of("--module-source-path", msp.toString(),
+                                    "--add-modules", "ma");
+        JavacTaskImpl task = (JavacTaskImpl) compiler.getTask(null, null, null, opts, jlObjectList, null);
+
+        task.analyze();
+
+        task.getElements().getModuleElement("java.base");
+    }
+
+}
--- a/langtools/test/tools/javac/modules/EdgeCases.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/langtools/test/tools/javac/modules/EdgeCases.java	Thu Jul 20 09:38:27 2017 -0700
@@ -467,7 +467,8 @@
 
         List<String> expected = Arrays.asList(
                 "- compiler.err.cant.access: m1x.module-info, (compiler.misc.bad.class.file.header: module-info.class, (compiler.misc.module.name.mismatch: other, m1x))",
-                "1 error");
+                "module-info.java:1:1: compiler.err.module.not.found: m1x",
+                "2 errors");
 
         if (!expected.equals(log)) {
             throw new AssertionError("Unexpected output: " + log);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java	Thu Jul 20 09:38:27 2017 -0700
@@ -0,0 +1,248 @@
+/*
+ * 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 8182450
+ * @summary Bad classfiles should not abort compilations
+ * @library /tools/lib
+ * @modules
+ *      jdk.compiler/com.sun.tools.javac.api
+ *      jdk.compiler/com.sun.tools.javac.code
+ *      jdk.compiler/com.sun.tools.javac.comp
+ *      jdk.compiler/com.sun.tools.javac.jvm
+ *      jdk.compiler/com.sun.tools.javac.main
+ *      jdk.compiler/com.sun.tools.javac.processing
+ *      jdk.compiler/com.sun.tools.javac.util
+ * @build toolbox.ToolBox toolbox.JavacTask
+ * @run main NoAbortForBadClassFile
+ */
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import com.sun.tools.javac.api.JavacTaskImpl;
+import com.sun.tools.javac.api.JavacTool;
+import com.sun.tools.javac.code.Flags;
+import com.sun.tools.javac.code.Symbol.ClassSymbol;
+import com.sun.tools.javac.code.Symbol.CompletionFailure;
+import com.sun.tools.javac.code.Symtab;
+import com.sun.tools.javac.jvm.ClassReader;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.Context.Factory;
+import com.sun.tools.javac.util.Names;
+import com.sun.tools.javac.util.Options;
+import toolbox.Task;
+import toolbox.Task.Expect;
+
+import toolbox.TestRunner;
+import toolbox.ToolBox;
+
+public class NoAbortForBadClassFile extends TestRunner {
+
+    private ToolBox tb = new ToolBox();
+
+    public NoAbortForBadClassFile() {
+        super(System.out);
+    }
+
+    public static void main(String... args) throws Exception {
+        new NoAbortForBadClassFile().runTests(m -> new Object[] { Paths.get(m.getName()) });
+    }
+
+    @Test
+    public void testBrokenClassFile(Path base) throws Exception {
+        Path classes = base.resolve("classes");
+        Path brokenClassFile = classes.resolve("test").resolve("Broken.class");
+
+        Files.createDirectories(brokenClassFile.getParent());
+        Files.newOutputStream(brokenClassFile).close();
+
+        Path src = base.resolve("src");
+        tb.writeJavaFiles(src,
+                          "package test; public class Test { private void test() { Broken b; String.unknown(); } }");
+        Path out = base.resolve("out");
+        tb.createDirectories(out);
+
+        List<String> log = new toolbox.JavacTask(tb)
+                .options("-classpath", classes.toString(),
+                         "-XDrawDiagnostics")
+                .outdir(out)
+                .files(tb.findJavaFiles(src))
+                .run(Expect.FAIL)
+                .writeAll()
+                .getOutputLines(Task.OutputKind.DIRECT);
+
+        List<String> expectedOut = Arrays.asList(
+                "Test.java:1:57: compiler.err.cant.access: test.Broken, (compiler.misc.bad.class.file.header: Broken.class, (compiler.misc.class.file.wrong.class: java.lang.AutoCloseable))",
+                 "Test.java:1:73: compiler.err.cant.resolve.location.args: kindname.method, unknown, , , (compiler.misc.location: kindname.class, java.lang.String, null)",
+                 "2 errors"
+        );
+
+        if (!expectedOut.equals(log))
+            throw new Exception("expected output not found: " + log);
+    }
+
+    @Test
+    public void testLoading(Path base) throws Exception {
+        Path src = base.resolve("src");
+        tb.writeJavaFiles(src,
+                          "public class Test { static { new Object() {}; } public static class I { public static class II { } } }");
+        Path out = base.resolve("out");
+        tb.createDirectories(out);
+
+        new toolbox.JavacTask(tb)
+                .outdir(out)
+                .files(tb.findJavaFiles(src))
+                .run(Expect.SUCCESS)
+                .writeAll()
+                .getOutputLines(Task.OutputKind.DIRECT);
+
+        List<Path> files;
+        try (Stream<Path> dir = Files.list(out)) {
+            files = dir.collect(Collectors.toList());
+        }
+
+        List<List<Path>> result = new ArrayList<>();
+
+        permutations(files, Collections.emptyList(), result);
+
+        for (List<Path> order : result) {
+            for (Path missing : order) {
+                Path test = base.resolve("test");
+
+                if (Files.exists(test)) {
+                    tb.cleanDirectory(test);
+                } else {
+                    tb.createDirectories(test);
+                }
+
+                for (Path p : order) {
+                    Files.copy(p, test.resolve(p.getFileName()));
+                }
+
+                List<String> actual = complete(test, order, missing, true);
+
+                Files.delete(test.resolve(missing.getFileName()));
+
+                List<String> expected = complete(test, order, missing, false);
+
+                if (!actual.equals(expected)) {
+                    throw new AssertionError("Unexpected state, actual=\n" + actual + "\nexpected=\n" + expected + "\norder=" + order + "\nmissing=" + missing);
+                }
+            }
+        }
+    }
+
+    private static void permutations(List<Path> todo, List<Path> currentList, List<List<Path>> result) {
+        if (todo.isEmpty()) {
+            result.add(currentList);
+            return ;
+        }
+
+        for (Path p : todo) {
+            List<Path> nextTODO = new ArrayList<>(todo);
+
+            nextTODO.remove(p);
+
+            List<Path> nextList = new ArrayList<>(currentList);
+
+            nextList.add(p);
+
+            permutations(nextTODO, nextList, result);
+        }
+    }
+
+    private List<String> complete(Path test, List<Path> order, Path missing, boolean badClassFile) {
+        Context context = new Context();
+        if (badClassFile) {
+            TestClassReader.preRegister(context);
+        }
+        JavacTool tool = JavacTool.create();
+        JavacTaskImpl task = (JavacTaskImpl) tool.getTask(null, null, null, List.of("-classpath", test.toString(), "-XDblockClass=" + flatName(missing)), null, null, context);
+        Symtab syms = Symtab.instance(context);
+        Names names = Names.instance(context);
+
+        task.getElements().getTypeElement("java.lang.Object");
+
+        if (!badClassFile) {
+            //to ensure the same paths taken in ClassFinder.completeEnclosing in case the file is missing:
+            syms.enterClass(syms.unnamedModule, names.fromString(flatName(missing)));
+        }
+
+        List<String> result = new ArrayList<>();
+
+        for (Path toCheck : order) {
+            ClassSymbol sym = syms.enterClass(syms.unnamedModule, names.fromString(flatName(toCheck)));
+
+            try {
+                sym.complete();
+            } catch (CompletionFailure ignore) {
+            }
+
+            long flags = sym.flags_field;
+
+            flags &= ~(Flags.CLASS_SEEN | Flags.SOURCE_SEEN);
+
+            result.add("sym: " + sym.flatname + ", " + sym.owner.flatName() +
+                       ", " + sym.type + ", " + sym.members_field + ", " + flags);
+        }
+
+        return result;
+    }
+
+    private String flatName(Path p) {
+        return p.getFileName().toString().replace(".class", "");
+    }
+
+    private static class TestClassReader extends ClassReader {
+        public static void preRegister(Context ctx) {
+            ctx.put(classReaderKey, (Factory<ClassReader>) c -> new TestClassReader(ctx));
+        }
+
+        private final String block;
+
+        public TestClassReader(Context context) {
+            super(context);
+            block = Options.instance(context).get("blockClass");
+        }
+
+        @Override
+        public void readClassFile(ClassSymbol c) {
+            super.readClassFile(c);
+
+            if (c.flatname.contentEquals(block)) {
+                throw badClassFile("blocked");
+            }
+        }
+
+    }
+
+}
--- a/make/Main.gmk	Mon Jul 17 09:14:23 2017 -0700
+++ b/make/Main.gmk	Thu Jul 20 09:38:27 2017 -0700
@@ -699,6 +699,9 @@
 
   jdk.jdeps-gendata: java rmic
 
+  # The ct.sym generation uses all the moduleinfos as input
+  jdk.compiler-gendata: $(GENSRC_MODULEINFO_TARGETS)
+
   # Declare dependencies between jmod targets.
   # java.base jmod needs jrt-fs.jar and access to the other jmods to be built.
   # When creating a BUILDJDK, we don't need to add hashes to java.base, thus
--- a/nashorn/.hgtags	Mon Jul 17 09:14:23 2017 -0700
+++ b/nashorn/.hgtags	Thu Jul 20 09:38:27 2017 -0700
@@ -426,3 +426,4 @@
 fed3f329875710c74f3ec1a0c4714046a79af100 jdk-10+14
 3c6fbdf6e785aaf18d35ce9c6684369952fd22ec jdk-9+176
 aa7404e062b95f679018f25eaaf933dcf0cf3f2b jdk-9+177
+f8a0c4895b2abe64a8c55af6117ffda192e34d30 jdk-10+15
--- a/nashorn/samples/barchart_weather.js	Mon Jul 17 09:14:23 2017 -0700
+++ b/nashorn/samples/barchart_weather.js	Thu Jul 20 09:38:27 2017 -0700
@@ -60,7 +60,7 @@
 }
 
 // change URL for your city here!
-var url = "http://api.openweathermap.org/data/2.5/forecast?q=chennai,india&units=metric&mode=json";
+var url = "http://api.openweathermap.org/data/2.5/forecast?q=chennai,india&units=metric&mode=json&appid=9b2982987c080ae88d81f081dcb129e8";
 
 // download JSON document and parse
 var json = readTextFromURL(url);
--- a/nashorn/samples/datepick.js	Mon Jul 17 09:14:23 2017 -0700
+++ b/nashorn/samples/datepick.js	Thu Jul 20 09:38:27 2017 -0700
@@ -37,6 +37,7 @@
 }
 
 load("fx:controls.js");
+var Scene = Java.type("javafx.scene.Scene");
 
 function start(stage) {
     var picker = new DatePicker();
--- a/nashorn/samples/jsonviewer.js	Mon Jul 17 09:14:23 2017 -0700
+++ b/nashorn/samples/jsonviewer.js	Thu Jul 20 09:38:27 2017 -0700
@@ -103,7 +103,7 @@
     return item;
 }
 
-var DEFAULT_URL = "http://api.openweathermap.org/data/2.5/forecast/daily?q=Chennai&amp;mode=json&amp;units=metric&amp;cnt=7`";
+var DEFAULT_URL = "http://api.openweathermap.org/data/2.5/forecast?q=chennai,india&units=metric&mode=json&appid=9b2982987c080ae88d81f081dcb129e8";
 
 var url = arguments.length == 0? DEFAULT_URL : arguments[0];
 var obj = JSON.parse(readTextFromURL(url));
--- a/test/lib/jdk/test/lib/Utils.java	Mon Jul 17 09:14:23 2017 -0700
+++ b/test/lib/jdk/test/lib/Utils.java	Thu Jul 20 09:38:27 2017 -0700
@@ -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
@@ -680,5 +680,26 @@
                 String.format("A mandatory property '%s' isn't set", propName));
         return prop;
     }
+
+    /*
+     * Run uname with specified arguments.
+     */
+    public static OutputAnalyzer uname(String... args) throws Throwable {
+        String[] cmds = new String[args.length + 1];
+        cmds[0] = "uname";
+        System.arraycopy(args, 0, cmds, 1, args.length);
+        return ProcessTools.executeCommand(cmds);
+    }
+
+    /*
+     * Returns the system distro.
+     */
+    public static String distro() {
+        try {
+            return uname("-v").asLines().get(0);
+        } catch (Throwable t) {
+            throw new RuntimeException("Failed to determine distro.", t);
+        }
+    }
 }