Merge JDK-8188051-branch
authorlancea
Fri, 06 Apr 2018 17:06:58 -0400
branchJDK-8188051-branch
changeset 56398 9d3b0eb749a9
parent 56397 729f80d0cf31 (current diff)
parent 49544 d958597c7908 (diff)
child 56413 f33dd5d6b480
Merge
make/mapfiles/launchers/mapfile-ppc64
make/mapfiles/launchers/mapfile-ppc64.anonymous
make/mapfiles/launchers/mapfile-sparc
make/mapfiles/launchers/mapfile-sparcv9
make/mapfiles/launchers/mapfile-x86
make/mapfiles/launchers/mapfile-x86.anonymous
make/mapfiles/launchers/mapfile-x86_64
make/mapfiles/launchers/mapfile-x86_64.anonymous
make/mapfiles/libunpack/mapfile-vers-unpack200
make/mapfiles/libunpack/mapfile-vers-unpack200-solaris-sparc
make/mapfiles/libunpack/mapfile-vers-unpack200-solaris-x86
make/mapfiles/libunpack/mapfile-vers-unpack200.anonymous
test/jdk/java/lang/SecurityManager/DepMethodsRequireAllPerm.java
test/jdk/java/nio/channels/SocketChannel/IsConnectable.java
--- a/.hgtags	Fri Apr 06 17:01:04 2018 -0400
+++ b/.hgtags	Fri Apr 06 17:06:58 2018 -0400
@@ -478,3 +478,4 @@
 d5c43e9f08fb9a7c74aae0d48daf17f2ad2afaef jdk-11+5
 3acb379b86725c47e7f33358cb22efa8752ae532 jdk-11+6
 f7363de371c9a1f668bd0a01b7df3d1ddb9cc58b jdk-11+7
+755e1b55a4dff510f9639cdb5c5e82549a7e09b3 jdk-11+8
--- a/make/CreateJmods.gmk	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/CreateJmods.gmk	Fri Apr 06 17:06:58 2018 -0400
@@ -80,10 +80,15 @@
   DEPS += $(call CacheFind, $(MAN_DIR))
 endif
 
+# If a specific modules_legal dir exists for this module, only pick up files
+# from there. These files were explicitly filtered or modified in <module>-copy
+# targets. For the rest, just pick up everything from the source legal dirs.
 LEGAL_NOTICES := \
-    $(call uniq, $(SUPPORT_OUTPUTDIR)/modules_legal/java.base \
-    $(call FindModuleLegalDirs, $(MODULE))) \
-    #
+    $(SUPPORT_OUTPUTDIR)/modules_legal/common \
+    $(if $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)), \
+      $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)), \
+      $(call FindModuleLegalSrcDirs, $(MODULE)) \
+    )
 
 LEGAL_NOTICES_PATH := $(call PathList, $(LEGAL_NOTICES))
 DEPS += $(call CacheFind, $(LEGAL_NOTICES))
--- a/make/autoconf/flags-ldflags.m4	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/autoconf/flags-ldflags.m4	Fri Apr 06 17:06:58 2018 -0400
@@ -81,7 +81,7 @@
 
   elif test "x$TOOLCHAIN_TYPE" = xclang; then
     BASIC_LDFLAGS_JVM_ONLY="-mno-omit-leaf-frame-pointer -mstack-alignment=16 \
-        -stdlib=libstdc++ -fPIC"
+        -stdlib=libc++ -fPIC"
 
   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
     BASIC_LDFLAGS="-Wl,-z,defs"
--- a/make/autoconf/flags.m4	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/autoconf/flags.m4	Fri Apr 06 17:06:58 2018 -0400
@@ -116,7 +116,7 @@
     # of the OS. It currently has a hard coded value. Setting this also limits
     # exposure to API changes in header files. Bumping this is likely to
     # require code changes to build.
-    MACOSX_VERSION_MIN=10.7.0
+    MACOSX_VERSION_MIN=10.9.0
     MACOSX_VERSION_MIN_NODOTS=${MACOSX_VERSION_MIN//\./}
 
     AC_SUBST(MACOSX_VERSION_MIN)
@@ -241,7 +241,7 @@
        test "x$OPENJDK_TARGET_CPU" != xmips &&
        test "x$OPENJDK_TARGET_CPU" != xmipsel &&
        test "x$OPENJDK_TARGET_CPU" != xmips64 &&
-       test "x$OPENJDK_TARGET_CPU" != xmips64el; then 
+       test "x$OPENJDK_TARGET_CPU" != xmips64el; then
       MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
     fi
   fi
@@ -325,22 +325,18 @@
 
   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
     CC_OUT_OPTION=-Fo
-    EXE_OUT_OPTION=-out:
     LD_OUT_OPTION=-out:
     AR_OUT_OPTION=-out:
   else
     # The option used to specify the target .o,.a or .so file.
     # When compiling, how to specify the to be created object file.
     CC_OUT_OPTION='-o$(SPACE)'
-    # When linking, how to specify the to be created executable.
-    EXE_OUT_OPTION='-o$(SPACE)'
-    # When linking, how to specify the to be created dynamically linkable library.
+    # When linking, how to specify the output
     LD_OUT_OPTION='-o$(SPACE)'
     # When archiving, how to specify the to be create static archive for object files.
     AR_OUT_OPTION='rcs$(SPACE)'
   fi
   AC_SUBST(CC_OUT_OPTION)
-  AC_SUBST(EXE_OUT_OPTION)
   AC_SUBST(LD_OUT_OPTION)
   AC_SUBST(AR_OUT_OPTION)
 
--- a/make/autoconf/spec.gmk.in	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/autoconf/spec.gmk.in	Fri Apr 06 17:06:58 2018 -0400
@@ -395,7 +395,6 @@
 COMPILER_BINDCMD_FILE_FLAG:=@COMPILER_BINDCMD_FILE_FLAG@
 
 CC_OUT_OPTION:=@CC_OUT_OPTION@
-EXE_OUT_OPTION:=@EXE_OUT_OPTION@
 LD_OUT_OPTION:=@LD_OUT_OPTION@
 AR_OUT_OPTION:=@AR_OUT_OPTION@
 
@@ -460,11 +459,6 @@
 # Xcode SDK path
 SDKROOT:=@SDKROOT@
 
-# The linker on older SuSE distros (e.g. on SLES 10) complains with:
-# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
-# if feeded with a version script which contains named tags.
-USING_BROKEN_SUSE_LD:=@USING_BROKEN_SUSE_LD@
-
 # LDFLAGS used to link the jdk native libraries (C-code)
 LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
 JDKLIB_LIBS:=@JDKLIB_LIBS@
--- a/make/autoconf/toolchain.m4	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/autoconf/toolchain.m4	Fri Apr 06 17:06:58 2018 -0400
@@ -597,8 +597,9 @@
 
     # solstudio cc requires us to have an existing file to pass as argument,
     # but it need not be a syntactically correct C file, so just use
-    # ourself. :)
-    LINKER_VERSION_STRING=`$LD -Wl,-V $TOPDIR/configure 2>&1 | $HEAD -n 1 | $SED -e 's/ld: //'`
+    # ourself. :) The intermediate 'cat' is needed to stop ld from leaving
+    # a lingering a.out (!).
+    LINKER_VERSION_STRING=`$LD -Wl,-V $TOPDIR/configure 2>&1 | $CAT | $HEAD -n 1 | $SED -e 's/ld: //'`
     # Extract version number
     [ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
         $SED -e 's/.* \([0-9][0-9]*\.[0-9][0-9]*\)-\([0-9][0-9]*\.[0-9][0-9]*\)/\1.\2/'` ]
@@ -1021,24 +1022,6 @@
     # This is later checked when setting flags.
   fi
 
-  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
-  # in executable.'
-  USING_BROKEN_SUSE_LD=no
-  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
-    AC_MSG_CHECKING([for broken SuSE 'ld' which only understands anonymous version tags in executables])
-    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
-    $ECHO "int main() { }" > main.c
-    if $CXX -Wl,-version-script=version-script.map main.c 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD; then
-      AC_MSG_RESULT(no)
-      USING_BROKEN_SUSE_LD=no
-    else
-      AC_MSG_RESULT(yes)
-      USING_BROKEN_SUSE_LD=yes
-    fi
-    $RM version-script.map main.c a.out
-  fi
-  AC_SUBST(USING_BROKEN_SUSE_LD)
-
   # Setup hotspot lecagy names for toolchains
   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
   if test "x$TOOLCHAIN_TYPE" = xclang; then
--- a/make/autoconf/version-numbers	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/autoconf/version-numbers	Fri Apr 06 17:06:58 2018 -0400
@@ -29,7 +29,7 @@
 DEFAULT_VERSION_INTERIM=0
 DEFAULT_VERSION_UPDATE=0
 DEFAULT_VERSION_PATCH=0
-DEFAULT_VERSION_DATE=2018-09-18
+DEFAULT_VERSION_DATE=2018-09-25
 DEFAULT_VERSION_CLASSFILE_MAJOR=55  # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
 DEFAULT_VERSION_CLASSFILE_MINOR=0
 DEFAULT_ACCEPTABLE_BOOT_VERSIONS="9 10 11"
--- a/make/common/Modules.gmk	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/common/Modules.gmk	Fri Apr 06 17:06:58 2018 -0400
@@ -394,12 +394,11 @@
 endif
 LEGAL_SUBDIRS += share/legal
 
-# Find all legal dirs for a particular module
+# Find all legal src dirs for a particular module
 # $1 - Module to find legal dirs for
-FindModuleLegalDirs = \
+FindModuleLegalSrcDirs = \
     $(strip $(wildcard \
-        $(addsuffix /$(strip $1), $(SUPPORT_OUTPUTDIR)/modules_legal \
-            $(IMPORT_MODULES_LEGAL)) \
+        $(addsuffix /$(strip $1), $(IMPORT_MODULES_LEGAL)) \
         $(foreach sub, $(LEGAL_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS))) \
     ))
 
--- a/make/common/NativeCompilation.gmk	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/common/NativeCompilation.gmk	Fri Apr 06 17:06:58 2018 -0400
@@ -292,8 +292,7 @@
     endif
 
     ifneq ($$(strip $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)), )
-      $1_VARDEPS := $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPT_CFLAGS) \
-          $$($1_OPT_CXXFLAGS)
+      $1_VARDEPS := $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)
       $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_OBJ).vardeps)
     endif
 
@@ -861,10 +860,48 @@
     endif
   endif
 
-  ifeq ($$($1_TYPE), LIBRARY)
-    # Generating a dynamic library.
-    $1_EXTRA_LDFLAGS += $$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
+  ifeq ($$($1_TYPE), STATIC_LIBRARY)
+    $1_VARDEPS := $$($1_AR) $$($1_ARFLAGS) $$($1_LIBS) \
+        $$($1_EXTRA_LIBS)
+    $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
+        $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
+
+    # Generating a static library, ie object file archive.
+    ifeq ($(STATIC_BUILD), true)
+      ifeq ($$($1_USE_MAPFILE_FOR_SYMBOLS), true)
+        STATIC_MAPFILE_DEP := $$($1_MAPFILE)
+      endif
+    endif
+
+    $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_VARDEPS_FILE) $$(STATIC_MAPFILE_DEP)
+	$$(call LogInfo, Building static library $$($1_BASENAME))
+	$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
+	    $$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_ALL_OBJS) \
+	        $$($1_RES))
+        ifeq ($(STATIC_BUILD), true)
+          ifeq ($$($1_USE_MAPFILE_FOR_SYMBOLS), true)
+	    $(CP) $$($1_MAPFILE) $$(@D)/$$(basename $$(@F)).symbols
+          else
+	    $(GetSymbols)
+          endif
+        endif
+  else
+    # A shared dynamic library or an executable binary has been specified
+    ifeq ($$($1_TYPE), LIBRARY)
+      # Generating a dynamic library.
+      $1_EXTRA_LDFLAGS += $$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
+
+      # Create loadmap on AIX. Helps in diagnosing some problems.
+      ifneq ($(COMPILER_BINDCMD_FILE_FLAG), )
+        $1_EXTRA_LDFLAGS += $(COMPILER_BINDCMD_FILE_FLAG)$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).loadmap
+      endif
+    endif
+
     ifeq ($(OPENJDK_TARGET_OS), windows)
+      ifeq ($$($1_EMBED_MANIFEST), true)
+        $1_EXTRA_LDFLAGS += -manifest:embed
+      endif
+
       $1_IMPORT_LIBRARY := $$($1_OBJECT_DIR)/$$($1_NAME).lib
       $1_EXTRA_LDFLAGS += "-implib:$$($1_IMPORT_LIBRARY)"
       # To properly trigger downstream dependants of the import library, just as
@@ -883,13 +920,9 @@
 		$(TOUCH) $$@
     endif
 
-    # Create loadmap on AIX. Helps in diagnosing some problems.
-    ifneq ($(COMPILER_BINDCMD_FILE_FLAG), )
-      $1_EXTRA_LDFLAGS += $(COMPILER_BINDCMD_FILE_FLAG)$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).loadmap
-    endif
-
     $1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
-        $$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_CREATE_DEBUGINFO_CMDS) \
+        $$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
+        $$($1_CODESIGN) $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \
         $$($1_STRIP_CMD)
     $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
         $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
@@ -928,8 +961,8 @@
       endif
     endif
 
-    $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \
-        $$($1_VARDEPS_FILE)
+    $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_MANIFEST) \
+        $$($1_REAL_MAPFILE) $$($1_VARDEPS_FILE)
                 ifneq ($$($1_OBJ_FILE_LIST), )
                   ifeq ($$($1_LINK_OBJS_RELATIVE), true)
 		    $$(eval $$(call ListPathsSafely, $1_ALL_OBJS_RELATIVE, $$($1_OBJ_FILE_LIST)))
@@ -943,74 +976,21 @@
                 ifeq ($(OPENJDK_TARGET_OS), windows)
 		  $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
 		      $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
-		      $(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
-		      $$($1_LIBS) $$($1_EXTRA_LIBS)) \
+		          $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
+		          $$($1_LIBS) $$($1_EXTRA_LIBS)) \
 		      | $(GREP) -v "^   Creating library .*\.lib and object .*\.exp" || \
-		      test "$$$$?" = "1" ; \
+		          test "$$$$?" = "1" ; \
 		  $$($1_CREATE_DEBUGINFO_CMDS)
 		  $$($1_STRIP_CMD)
                 else
 		  $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
 		      $$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
 		      $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
-		      $(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
-		      $$($1_LIBS) $$($1_EXTRA_LIBS)) ; \
+		          $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
+		          $$($1_LIBS) $$($1_EXTRA_LIBS)) ; \
 		  $$($1_CREATE_DEBUGINFO_CMDS)
 		  $$($1_STRIP_CMD)
                 endif
-
-  endif
-
-  ifeq ($$($1_TYPE), STATIC_LIBRARY)
-    $1_VARDEPS := $$($1_AR) $$($1_ARFLAGS) $$($1_LIBS) \
-        $$($1_EXTRA_LIBS)
-    $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
-        $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
-
-    # Generating a static library, ie object file archive.
-    ifeq ($(STATIC_BUILD), true)
-      ifeq ($$($1_USE_MAPFILE_FOR_SYMBOLS), true)
-        STATIC_MAPFILE_DEP := $$($1_MAPFILE)
-      endif
-    endif
-
-    $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_VARDEPS_FILE) $$(STATIC_MAPFILE_DEP)
-	$$(call LogInfo, Building static library $$($1_BASENAME))
-	$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
-	    $$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_ALL_OBJS) \
-	        $$($1_RES))
-        ifeq ($(STATIC_BUILD), true)
-          ifeq ($$($1_USE_MAPFILE_FOR_SYMBOLS), true)
-	    $(CP) $$($1_MAPFILE) $$(@D)/$$(basename $$(@F)).symbols
-          else
-	    $(GetSymbols)
-          endif
-        endif
-  endif
-
-  ifeq ($$($1_TYPE), EXECUTABLE)
-    # A executable binary has been specified, setup the target for it.
-    $1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
-        $$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
-        $$($1_CODESIGN) $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \
-        $$($1_STRIP_CMD)
-    $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
-        $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
-
-    ifeq ($(OPENJDK_TARGET_OS), windows)
-      ifeq ($$($1_EMBED_MANIFEST), true)
-        $1_EXTRA_LDFLAGS += -manifest:embed
-      endif
-    endif
-
-    $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_MANIFEST) \
-        $$($1_VARDEPS_FILE)
-		$$(call LogInfo, Linking executable $$($1_BASENAME))
-		$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
-		    $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
-		        $(EXE_OUT_OPTION)$$($1_TARGET) \
-		        $$($1_ALL_OBJS) $$($1_RES) \
-		        $$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS))
                 ifeq ($(OPENJDK_TARGET_OS), windows)
                   ifneq ($$($1_MANIFEST), )
 		    $$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
@@ -1023,9 +1003,6 @@
 		    $(CODESIGN) -s openjdk_codesign $$@
                   endif
                 endif
-		$$($1_CREATE_DEBUGINFO_CMDS)
-		$$($1_STRIP_CMD)
-
   endif
 endef
 
--- a/make/conf/jib-profiles.js	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/conf/jib-profiles.js	Fri Apr 06 17:06:58 2018 -0400
@@ -432,7 +432,7 @@
             target_cpu: "x64",
             dependencies: ["devkit", "autoconf"],
             configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
-                "--with-macosx-version-max=10.7.0"),
+                "--with-macosx-version-max=10.9.0"),
         },
 
         "solaris-x64": {
@@ -472,7 +472,7 @@
             build_cpu: "x64",
             dependencies: ["devkit", "autoconf", "build_devkit", "cups"],
             configure_args: [
-                "--openjdk-target=aarch64-linux-gnu"
+                "--openjdk-target=aarch64-linux-gnu", "--with-freetype=bundled",
             ],
         },
 
@@ -816,7 +816,7 @@
 var getJibProfilesDependencies = function (input, common) {
 
     var devkit_platform_revisions = {
-        linux_x64: "gcc4.9.2-OEL6.4+1.3",
+        linux_x64: "gcc7.3.0-OEL6.4+1.0",
         macosx_x64: "Xcode6.3-MacOSX10.9+1.0",
         solaris_x64: "SS12u4-Solaris11u1+1.0",
         solaris_sparcv9: "SS12u4-Solaris11u1+1.1",
--- a/make/copy/Copy-java.base.gmk	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/copy/Copy-java.base.gmk	Fri Apr 06 17:06:58 2018 -0400
@@ -24,6 +24,7 @@
 #
 
 include CopyCommon.gmk
+include Modules.gmk
 include TextFileProcessing.gmk
 
 $(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
@@ -224,13 +225,28 @@
 
 $(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \
     FILES := $(JDK_LICENSE) $(JDK_NOTICE) $(JDK_ADDITIONAL_LICENSE_INFO), \
-    DEST := $(LEGAL_DST_DIR), \
+    DEST := $(COMMON_LEGAL_DST_DIR), \
     FLATTEN := true, \
 ))
 
 TARGETS += $(COPY_JDK_NOTICES)
 
 ################################################################################
+#
+# Copy and filter the legal files depending on what 3rd party components are
+# bundled or linked from the OS.
+#
+ifeq ($(USE_EXTERNAL_LIBZ), true)
+  LEGAL_EXCLUDES += zlib.md
+endif
+
+$(eval $(call SetupCopyLegalFiles, COPY_LEGAL, \
+    EXCLUDES := $(LEGAL_EXCLUDES), \
+))
+
+TARGETS += $(COPY_LEGAL)
+
+################################################################################
 # Optionally copy libffi.so.? into the the image
 
 ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
--- a/make/copy/Copy-java.desktop.gmk	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/copy/Copy-java.desktop.gmk	Fri Apr 06 17:06:58 2018 -0400
@@ -24,6 +24,7 @@
 #
 
 include CopyCommon.gmk
+include Modules.gmk
 
 $(eval $(call IncludeCustomExtension, copy/Copy-java.desktop.gmk))
 
@@ -48,3 +49,34 @@
 TARGETS += $(PSFONTPROPFILE_TARGET_FILES)
 
 ################################################################################
+#
+# Copy and filter the legal files depending on what 3rd party components are
+# bundled or linked from the OS.
+#
+ifeq ($(USE_EXTERNAL_LIBJPEG), true)
+  LEGAL_EXCLUDES += jpeg.md
+endif
+
+ifeq ($(USE_EXTERNAL_LIBGIF), true)
+  LEGAL_EXCLUDES += giflib.md
+endif
+
+ifeq ($(USE_EXTERNAL_LIBPNG), true)
+  LEGAL_EXCLUDES += libpng.md
+endif
+
+ifeq ($(USE_EXTERNAL_LCMS), true)
+  LEGAL_EXCLUDES += lcms.md
+endif
+
+ifeq ($(FREETYPE_TO_USE), system)
+  LEGAL_EXCLUDES += freetype.md
+endif
+
+$(eval $(call SetupCopyLegalFiles, COPY_LEGAL, \
+    EXCLUDES := $(LEGAL_EXCLUDES), \
+))
+
+TARGETS += $(COPY_LEGAL)
+
+################################################################################
--- a/make/copy/CopyCommon.gmk	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/copy/CopyCommon.gmk	Fri Apr 06 17:06:58 2018 -0400
@@ -26,6 +26,7 @@
 LIB_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)
 CONF_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE)
 LEGAL_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)
+COMMON_LEGAL_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_legal/common
 
 ################################################################################
 #
@@ -60,3 +61,24 @@
 
   TARGETS += $(COPY_EXPORTED_INCLUDE_OS)
 endif
+
+################################################################################
+# Setup make rules for copying legal files. This is only needed if the files
+# need to be filtered due to optional components being enabled/disabled.
+# Otherwise CreateJmods.gmk will find the legal files in the original src dirs.
+#
+# Parameter 1 is the name of the rule.
+#
+# Remaining parameters are named arguments. These include:
+#   EXCLUDES : List of filenames to exclude from copy
+SetupCopyLegalFiles = $(NamedParamsMacroTemplate)
+define SetupCopyLegalFilesBody
+  $$(foreach f, $$(filter-out $$(addprefix %/, $$($1_EXCLUDES)), \
+      $$(wildcard $$(addsuffix /*, $$(call FindModuleLegalSrcDirs, $$(MODULE))))), \
+    $$(eval $$(call SetupCopyFiles, $1_$$(notdir $$f), \
+        DEST := $$(LEGAL_DST_DIR), \
+        FILES := $$f, \
+    )) \
+    $$(eval $1 += $$($1_$$(notdir $$f))) \
+  )
+endef
--- a/make/jdk/netbeans/jmx/build.properties	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/jdk/netbeans/jmx/build.properties	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -34,8 +34,7 @@
     javax/management/ \
     org/omg/stub/javax/management/
 
-excludes=\
-    com/sun/jmx/snmp/
+excludes=
 
 jtreg.tests=\
     com/sun/jmx/ \
--- a/make/launcher/Launcher-jdk.pack.gmk	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/launcher/Launcher-jdk.pack.gmk	Fri Apr 06 17:06:58 2018 -0400
@@ -34,6 +34,25 @@
 # The order of the object files on the link command line affects the size of the resulting
 # binary (at least on linux) which causes the size to differ between old and new build.
 
+# Tell the compiler not to export any functions unless declared so in
+# the source code. On Windows, this is the default and cannot be changed.
+# On Mac, we have always exported all symbols, probably due to oversight
+# and/or misunderstanding. To emulate this, don't hide any symbols
+# by default.
+# Also provide an override for non-conformant libraries.
+ifeq ($(TOOLCHAIN_TYPE), gcc)
+  CXXFLAGS_JDKEXE += -fvisibility=hidden
+  LDFLAGS_JDKEXE += -Wl,--exclude-libs,ALL
+else ifeq ($(TOOLCHAIN_TYPE), clang)
+  ifneq ($(OPENJDK_TARGET_OS), macosx)
+    CXXFLAGS_JDKEXE += -fvisibility=hidden
+  endif
+else ifeq ($(TOOLCHAIN_TYPE), solstudio)
+  CXXFLAGS_JDKEXE += -xldscope=hidden
+else ifeq ($(TOOLCHAIN_TYPE), xlc)
+  CXXFLAGS_JDKEXE += -qvisibility=hidden
+endif
+
 UNPACKEXE_SRC := $(TOPDIR)/src/jdk.pack/share/native/common-unpack \
     $(TOPDIR)/src/jdk.pack/share/native/unpack200
 UNPACKEXE_CFLAGS := -I$(TOPDIR)/src/jdk.pack/share/native/common-unpack \
@@ -58,21 +77,6 @@
 
 endif
 
-UNPACK_MAPFILE_DIR := $(TOPDIR)/make/mapfiles/libunpack
-UNPACK_MAPFILE_PLATFORM_FILE := \
-    $(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH)
-
-# The linker on older SuSE distros (e.g. on SLES 10) complains with:
-# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
-# if feeded with a version script which contains named tags.
-ifeq ($(USING_BROKEN_SUSE_LD), yes)
-  UNPACK_MAPFILE := $(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200.anonymous
-else ifneq ($(wildcard $(UNPACK_MAPFILE_PLATFORM_FILE)), )
-  UNPACK_MAPFILE := $(UNPACK_MAPFILE_PLATFORM_FILE)
-else
-  UNPACK_MAPFILE := $(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200
-endif
-
 $(eval $(call SetupJdkExecutable, BUILD_UNPACKEXE, \
     NAME := unpack200, \
     SRC := $(UNPACKEXE_SRC), \
@@ -84,7 +88,6 @@
     CFLAGS_solaris := -KPIC, \
     CFLAGS_macosx := -fPIC, \
     DISABLED_WARNINGS_gcc := unused-result implicit-fallthrough, \
-    MAPFILE := $(UNPACK_MAPFILE),\
     LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
         $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/make/launcher/LauncherCommon.gmk	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/launcher/LauncherCommon.gmk	Fri Apr 06 17:06:58 2018 -0400
@@ -26,11 +26,9 @@
 include JdkNativeCompilation.gmk
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
-  DISABLE_MAPFILES := true
   ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN)
 else
   ifeq ($(OPENJDK_TARGET_OS), windows)
-    DISABLE_MAPFILES := true
   endif
   ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN,/../lib/jli)
 
@@ -42,8 +40,27 @@
   endif
 endif
 
+# Tell the compiler not to export any functions unless declared so in
+# the source code. On Windows, this is the default and cannot be changed.
+# On Mac, we have always exported all symbols, probably due to oversight
+# and/or misunderstanding. To emulate this, don't hide any symbols
+# by default.
+# Also provide an override for non-conformant libraries.
+ifeq ($(TOOLCHAIN_TYPE), gcc)
+  LAUNCHER_CFLAGS += -fvisibility=hidden
+  LDFLAGS_JDKEXE += -Wl,--exclude-libs,ALL
+else ifeq ($(TOOLCHAIN_TYPE), clang)
+  ifneq ($(OPENJDK_TARGET_OS), macosx)
+    LAUNCHER_CFLAGS += -fvisibility=hidden
+  endif
+else ifeq ($(TOOLCHAIN_TYPE), solstudio)
+  LAUNCHER_CFLAGS += -xldscope=hidden
+else ifeq ($(TOOLCHAIN_TYPE), xlc)
+  LAUNCHER_CFLAGS += -qvisibility=hidden
+endif
+
 LAUNCHER_SRC := $(TOPDIR)/src/java.base/share/native/launcher
-LAUNCHER_CFLAGS := -I$(TOPDIR)/src/java.base/share/native/launcher \
+LAUNCHER_CFLAGS += -I$(TOPDIR)/src/java.base/share/native/launcher \
     -I$(TOPDIR)/src/java.base/share/native/libjli \
     -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \
     -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli \
@@ -157,23 +174,6 @@
     $1_WINDOWS_JLI_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjli/jli.lib
   endif
 
-  # The linker on older SuSE distros (e.g. on SLES 10) complains with:
-  # "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
-  # if feeded with a version script which contains named tags.
-  ifeq ($(USING_BROKEN_SUSE_LD),yes)
-    ifneq ($(wildcard $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU).anonymous), )
-      $1_MAPFILE := $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU).anonymous
-    else
-      $1_MAPFILE :=
-    endif
-  else
-    ifneq ($(wildcard $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)), )
-      $1_MAPFILE := $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)
-    else
-      $1_MAPFILE :=
-    endif
-  endif
-
   $$(eval $$(call SetupJdkExecutable, BUILD_LAUNCHER_$1, \
       NAME := $1, \
       EXTRA_FILES := $(LAUNCHER_SRC)/main.c, \
@@ -194,7 +194,6 @@
           -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jli, \
       LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \
           -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jli, \
-      MAPFILE := $$($1_MAPFILE), \
       LIBS := $(JDKEXE_LIBS) $$($1_LIBS), \
       LIBS_unix := $$($1_LIBS_unix), \
       LIBS_linux := -lpthread -ljli $(LIBDL), \
--- a/make/lib/Awt2dLibraries.gmk	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/lib/Awt2dLibraries.gmk	Fri Apr 06 17:06:58 2018 -0400
@@ -543,7 +543,7 @@
       DISABLED_WARNINGS_solstudio := \
          E_STATEMENT_NOT_REACHED \
          E_END_OF_LOOP_CODE_NOT_REACHED, \
-      DISABLED_WARNINGS_microsoft := 4267 2220 4244, \
+      DISABLED_WARNINGS_microsoft := 4267 4244, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
   ))
@@ -651,10 +651,11 @@
     LDFLAGS := $(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
-    LDFLAGS_macosx := -undefined dynamic_lookup, \
     LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
     LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
-    LIBS_aix := -lawt_headless,\
+    LIBS_aix := -lawt_headless, \
+    LIBS_macosx := -lawt_lwawt -framework CoreText -framework CoreFoundation \
+        -framework CoreGraphics, \
     LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
         $(WIN_AWT_LIB), \
 ))
@@ -665,6 +666,10 @@
   $(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_HEADLESS)
 endif
 
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  $(BUILD_LIBFONTMANAGER): $(call FindLib, java.desktop, awt_lwawt)
+endif
+
 ifeq ($(FREETYPE_TO_USE), bundled)
   $(BUILD_LIBFONTMANAGER): $(BUILD_LIBFREETYPE)
 endif
@@ -993,6 +998,7 @@
           -I$(TOPDIR)/src/java.base/share/native/libjava \
           -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
           -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop,  \
+      DISABLED_WARNINGS_clang := deprecated-declarations, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN) \
           -Wl$(COMMA)-rpath$(COMMA)@loader_path \
--- a/make/lib/Lib-java.desktop.gmk	Fri Apr 06 17:01:04 2018 -0400
+++ b/make/lib/Lib-java.desktop.gmk	Fri Apr 06 17:06:58 2018 -0400
@@ -105,7 +105,8 @@
       CFLAGS := $(CFLAGS_JDKLIB) \
           $(addprefix -I, $(LIBOSXAPP_SRC)) \
           -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
-      DISABLED_WARNINGS_clang := objc-method-access objc-root-class, \
+      DISABLED_WARNINGS_clang := objc-method-access objc-root-class \
+          deprecated-declarations, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
       LIBS := \
--- a/make/mapfiles/launchers/mapfile-ppc64	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-#
-# Specify what global symbols we export.  Note that we're not really
-# interested in declaring a version, simply scoping the file is sufficient.
-#
-
-SUNWprivate_1.1 {
-	global:
-		main;		# Provides basic adb symbol offsets
-		environ;	# Public symbols and required by Java run time
-		_environ;
-		__environ_lock;
-
-	local:
-		*;
-};
--- a/make/mapfiles/launchers/mapfile-ppc64.anonymous	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-#
-# Define anonymous library interface (i.e. without a version tag) for broken SuSE ld because
-# the linker on older SuSE distros (e.g. on SLES 10) complains with:
-# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
-# if feeded with a version script which contains named tags.
-
-{
-	global:
-		main;		# Provides basic adb symbol offsets
-		environ;	# Public symbols and required by Java run time
-		_environ;
-		__environ_lock;
-
-	local:
-		*;
-};
--- a/make/mapfiles/launchers/mapfile-sparc	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-#
-# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# Specify what global symbols we export.  Note that we're not really
-# interested in declaring a version, simply scoping the file is sufficient.
-#
-
-SUNWprivate_1.1 {
-	global:
-		main;		# Provides basic adb symbol offsets
-		environ;	# Public symbols and required by Java run time
-		_environ;
-		__environ_lock;
-		___Argv;	# The following are private, but as they are
-		_start;		# exported from ctr1/crtn, the clever hacker
-		_init;		# might know about them.  However note, that
-		_fini;		# their use is strictly not supported.
-		_lib_version;
-		__cg92_used;
-		__xargc;
-		__xargv;
-		__fsr_init_value;
-
-	local:
-		*;
-};
--- a/make/mapfiles/launchers/mapfile-sparcv9	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-#
-# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Specify what global symbols we export.  Note that we're not really
-# interested in declaring a version, simply scoping the file is sufficient.
-#
-
-SUNWprivate_1.1 {
-	global:
-		main;		# Provides basic adb symbol offsets
-		environ;	# Public symbols and required by Java run time
-		_environ;
-		__environ_lock;
-		___Argv;	# The following are private, but as they are
-		_start;		# exported from ctr1/crtn, the clever hacker
-		_init;		# might know about them.  However note, that
-		_fini;		# their use is strictly not supported.
-		_lib_version;
-		__xargc;
-		__xargv;
-		__fsr_init_value;
-
-	local:
-		*;
-};
--- a/make/mapfiles/launchers/mapfile-x86	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-#
-# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-#
-# Specify what global symbols we export.  Note that we're not really
-# interested in declaring a version, simply scoping the file is sufficient.
-#
-
-SUNWprivate_1.1 {
-	global:
-		main;		# Provides basic adb symbol offsets
-		environ;	# Public symbols and required by Java run time
-		_environ;
-		__environ_lock;
-		___Argv;	# The following are private, but as they are
-		_start;		# exported from ctr1/crtn, the clever hacker
-		_init;		# might know about them.  However note, that
-		_fini;		# their use is strictly not supported.
-		_lib_version;
-#		_mcount;
-		__fsr;
-		__fsr_init_value;
-		__longdouble_used;
-
-	local:
-		*;
-};
--- a/make/mapfiles/launchers/mapfile-x86.anonymous	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-#
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-#
-# Define anonymous library interface (i.e. without a version tag) for broken SuSE ld because
-# the linker on older SuSE distros (e.g. on SLES 10) complains with:
-# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
-# if feeded with a version script which contains named tags.
-
-{
-	global:
-		main;		# Provides basic adb symbol offsets
-		environ;	# Public symbols and required by Java run time
-		_environ;
-		__environ_lock;
-		___Argv;	# The following are private, but as they are
-		_start;		# exported from ctr1/crtn, the clever hacker
-		_init;		# might know about them.  However note, that
-		_fini;		# their use is strictly not supported.
-		_lib_version;
-#		_mcount;
-		__fsr;
-		__fsr_init_value;
-		__longdouble_used;
-
-	local:
-		*;
-};
--- a/make/mapfiles/launchers/mapfile-x86_64	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-#
-# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-#
-# Specify what global symbols we export.  Note that we're not really
-# interested in declaring a version, simply scoping the file is sufficient.
-#
-
-SUNWprivate_1.1 {
-	global:
-		main;		# Provides basic adb symbol offsets
-		environ;	# Public symbols and required by Java run time
-		_environ;
-		__environ_lock;
-
-		# These are needed by the c runtime in SS12u4
-		___Argv;
-		__xargv;
-		__xargc;
-		_start;
-		__longdouble_used;
-		_lib_version;
-
-	local:
-		*;
-};
--- a/make/mapfiles/launchers/mapfile-x86_64.anonymous	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-#
-# Define anonymous library interface (i.e. without a version tag) for broken SuSE ld because
-# the linker on older SuSE distros (e.g. on SLES 10) complains with:
-# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
-# if feeded with a version script which contains named tags.
-
-{
-	global:
-		main;		# Provides basic adb symbol offsets
-		environ;	# Public symbols and required by Java run time
-		_environ;
-		__environ_lock;
-
-	local:
-		*;
-};
--- a/make/mapfiles/libunpack/mapfile-vers-unpack200	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define library interface.
-
-SUNWprivate_1.1 {
-	local:
-	    *;
-};
--- a/make/mapfiles/libunpack/mapfile-vers-unpack200-solaris-sparc	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define library interface.
-
-SUNWprivate_1.1 {
-	global:
-		# These are needed by the c runtime in SS12u4
-		environ;
-		_environ;
-		__environ_lock;
-		___Argv;
-		__xargv;
-		__xargc;
-		_start;
-		_lib_version;
-
-	local:
-	    *;
-};
--- a/make/mapfiles/libunpack/mapfile-vers-unpack200-solaris-x86	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define library interface.
-
-SUNWprivate_1.1 {
-	global:
-		# These are needed by the c runtime in SS12u4
-		environ;
-		_environ;
-		__environ_lock;
-		___Argv;
-		__xargv;
-		__xargc;
-		_start;
-		__longdouble_used;
-		_lib_version;
-
-	local:
-	    *;
-};
--- a/make/mapfiles/libunpack/mapfile-vers-unpack200.anonymous	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define anonymous library interface (i.e. without a version tag) for broken SuSE ld because
-# the linker on older SuSE distros (e.g. on SLES 10) complains with:
-# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
-# if feeded with a version script which contains named tags.
-
-{
-	local:
-	    *;
-};
--- a/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java	Fri Apr 06 17:06:58 2018 -0400
@@ -63,20 +63,14 @@
     // maps file descriptor to selection key, synchronize on selector
     private final Map<Integer, SelectionKeyImpl> fdToKey = new HashMap<>();
 
-    // pending new registrations/updates, queued by implRegister and putEventOpos
+    // pending new registrations/updates, queued by setEventOps
     private final Object updateLock = new Object();
-    private final Deque<SelectionKeyImpl> newKeys = new ArrayDeque<>();
     private final Deque<SelectionKeyImpl> updateKeys = new ArrayDeque<>();
-    private final Deque<Integer> updateEvents = new ArrayDeque<>();
 
     // interrupt triggering and clearing
     private final Object interruptLock = new Object();
     private boolean interruptTriggered;
 
-    /**
-     * Package private constructor called by factory method in
-     * the abstract superclass Selector.
-     */
     EPollSelectorImpl(SelectorProvider sp) throws IOException {
         super(sp);
 
@@ -140,30 +134,21 @@
     }
 
     /**
-     * Process new registrations and changes to the interest ops.
+     * Process changes to the interest ops.
      */
     private void processUpdateQueue() {
         assert Thread.holdsLock(this);
 
         synchronized (updateLock) {
             SelectionKeyImpl ski;
-
-            // new registrations
-            while ((ski = newKeys.pollFirst()) != null) {
+            while ((ski = updateKeys.pollFirst()) != null) {
                 if (ski.isValid()) {
-                    int fd = ski.channel.getFDVal();
-                    SelectionKeyImpl previous = fdToKey.put(fd, ski);
-                    assert previous == null;
-                    assert ski.registeredEvents() == 0;
-                }
-            }
+                    int fd = ski.getFDVal();
+                    // add to fdToKey if needed
+                    SelectionKeyImpl previous = fdToKey.putIfAbsent(fd, ski);
+                    assert (previous == null) || (previous == ski);
 
-            // changes to interest ops
-            assert updateKeys.size() == updateEvents.size();
-            while ((ski = updateKeys.pollFirst()) != null) {
-                int newEvents = updateEvents.pollFirst();
-                int fd = ski.channel.getFDVal();
-                if (ski.isValid() && fdToKey.containsKey(fd)) {
+                    int newEvents = ski.translateInterestOps();
                     int registeredEvents = ski.registeredEvents();
                     if (newEvents != registeredEvents) {
                         if (newEvents == 0) {
@@ -206,11 +191,11 @@
                 if (ski != null) {
                     int rOps = EPoll.getEvents(event);
                     if (selectedKeys.contains(ski)) {
-                        if (ski.channel.translateAndSetReadyOps(rOps, ski)) {
+                        if (ski.translateAndUpdateReadyOps(rOps)) {
                             numKeysUpdated++;
                         }
                     } else {
-                        ski.channel.translateAndSetReadyOps(rOps, ski);
+                        ski.translateAndSetReadyOps(rOps);
                         if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) {
                             selectedKeys.add(ski);
                             numKeysUpdated++;
@@ -244,19 +229,11 @@
     }
 
     @Override
-    protected void implRegister(SelectionKeyImpl ski) {
-        ensureOpen();
-        synchronized (updateLock) {
-            newKeys.addLast(ski);
-        }
-    }
-
-    @Override
     protected void implDereg(SelectionKeyImpl ski) throws IOException {
         assert !ski.isValid();
         assert Thread.holdsLock(this);
 
-        int fd = ski.channel.getFDVal();
+        int fd = ski.getFDVal();
         if (fdToKey.remove(fd) != null) {
             if (ski.registeredEvents() != 0) {
                 EPoll.ctl(epfd, EPOLL_CTL_DEL, fd, 0);
@@ -268,10 +245,9 @@
     }
 
     @Override
-    public void putEventOps(SelectionKeyImpl ski, int events) {
+    public void setEventOps(SelectionKeyImpl ski) {
         ensureOpen();
         synchronized (updateLock) {
-            updateEvents.addLast(events);  // events first in case adding key fails
             updateKeys.addLast(ski);
         }
     }
--- a/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java	Fri Apr 06 17:06:58 2018 -0400
@@ -62,11 +62,9 @@
     // maps file descriptor to selection key, synchronize on selector
     private final Map<Integer, SelectionKeyImpl> fdToKey = new HashMap<>();
 
-    // pending new registrations/updates, queued by implRegister and putEventOps
+    // pending new registrations/updates, queued by setEventOps
     private final Object updateLock = new Object();
-    private final Deque<SelectionKeyImpl> newKeys = new ArrayDeque<>();
     private final Deque<SelectionKeyImpl> updateKeys = new ArrayDeque<>();
-    private final Deque<Integer> updateEvents = new ArrayDeque<>();
 
     // interrupt triggering and clearing
     private final Object interruptLock = new Object();
@@ -138,30 +136,21 @@
     }
 
     /**
-     * Process new registrations and changes to the interest ops.
+     * Process changes to the interest ops.
      */
     private void processUpdateQueue() {
         assert Thread.holdsLock(this);
 
         synchronized (updateLock) {
             SelectionKeyImpl ski;
-
-            // new registrations
-            while ((ski = newKeys.pollFirst()) != null) {
+            while ((ski = updateKeys.pollFirst()) != null) {
                 if (ski.isValid()) {
-                    int fd = ski.channel.getFDVal();
-                    SelectionKeyImpl previous = fdToKey.put(fd, ski);
-                    assert previous == null;
-                    assert ski.registeredEvents() == 0;
-                }
-            }
+                    int fd = ski.getFDVal();
+                    // add to fdToKey if needed
+                    SelectionKeyImpl previous = fdToKey.putIfAbsent(fd, ski);
+                    assert (previous == null) || (previous == ski);
 
-            // changes to interest ops
-            assert updateKeys.size() == updateKeys.size();
-            while ((ski = updateKeys.pollFirst()) != null) {
-                int newEvents = updateEvents.pollFirst();
-                int fd = ski.channel.getFDVal();
-                if (ski.isValid() && fdToKey.containsKey(fd)) {
+                    int newEvents = ski.translateInterestOps();
                     int registeredEvents = ski.registeredEvents();
                     if (newEvents != registeredEvents) {
 
@@ -227,18 +216,15 @@
                     }
 
                     if (selectedKeys.contains(ski)) {
-                        // file descriptor may be polled more than once per poll
-                        if (ski.lastPolled != pollCount) {
-                            if (ski.channel.translateAndSetReadyOps(rOps, ski)) {
+                        if (ski.translateAndUpdateReadyOps(rOps)) {
+                            // file descriptor may be polled more than once per poll
+                            if (ski.lastPolled != pollCount) {
                                 numKeysUpdated++;
                                 ski.lastPolled = pollCount;
                             }
-                        } else {
-                            // ready ops have already been set on this update
-                            ski.channel.translateAndUpdateReadyOps(rOps, ski);
                         }
                     } else {
-                        ski.channel.translateAndSetReadyOps(rOps, ski);
+                        ski.translateAndSetReadyOps(rOps);
                         if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) {
                             selectedKeys.add(ski);
                             numKeysUpdated++;
@@ -273,19 +259,11 @@
     }
 
     @Override
-    protected void implRegister(SelectionKeyImpl ski) {
-        ensureOpen();
-        synchronized (updateLock) {
-            newKeys.addLast(ski);
-        }
-    }
-
-    @Override
     protected void implDereg(SelectionKeyImpl ski) throws IOException {
         assert !ski.isValid();
         assert Thread.holdsLock(this);
 
-        int fd = ski.channel.getFDVal();
+        int fd = ski.getFDVal();
         int registeredEvents = ski.registeredEvents();
         if (fdToKey.remove(fd) != null) {
             if (registeredEvents != 0) {
@@ -301,10 +279,9 @@
     }
 
     @Override
-    public void putEventOps(SelectionKeyImpl ski, int events) {
+    public void setEventOps(SelectionKeyImpl ski) {
         ensureOpen();
         synchronized (updateLock) {
-            updateEvents.addLast(events);  // events first in case adding key fails
             updateKeys.addLast(ski);
         }
     }
--- a/src/java.base/share/classes/java/lang/Boolean.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/lang/Boolean.java	Fri Apr 06 17:06:58 2018 -0400
@@ -129,7 +129,7 @@
      * @since 1.5
      */
     public static boolean parseBoolean(String s) {
-        return ((s != null) && s.equalsIgnoreCase("true"));
+        return "true".equalsIgnoreCase(s);
     }
 
     /**
--- a/src/java.base/share/classes/java/lang/Class.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/lang/Class.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -3529,7 +3529,7 @@
             if (universe == null)
                 throw new IllegalArgumentException(
                     getName() + " is not an enum type");
-            directory = new HashMap<>(2 * universe.length);
+            directory = new HashMap<>((int)(universe.length / 0.75f) + 1);
             for (T constant : universe) {
                 directory.put(((Enum<?>)constant).name(), constant);
             }
--- a/src/java.base/share/classes/java/lang/ClassLoader.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/lang/ClassLoader.java	Fri Apr 06 17:06:58 2018 -0400
@@ -73,7 +73,7 @@
 /**
  * A class loader is an object that is responsible for loading classes. The
  * class {@code ClassLoader} is an abstract class.  Given the <a
- * href="#name">binary name</a> of a class, a class loader should attempt to
+ * href="#binary-name">binary name</a> of a class, a class loader should attempt to
  * locate or generate data that constitutes a definition for the class.  A
  * typical strategy is to transform the name into a file name and then read a
  * "class file" of that name from a file system.
@@ -202,7 +202,7 @@
  *     }
  * </pre></blockquote>
  *
- * <h3> <a id="name">Binary names</a> </h3>
+ * <h3> <a id="binary-name">Binary names</a> </h3>
  *
  * <p> Any class name provided as a {@code String} parameter to methods in
  * {@code ClassLoader} must be a binary name as defined by
@@ -480,7 +480,7 @@
     // -- Class --
 
     /**
-     * Loads the class with the specified <a href="#name">binary name</a>.
+     * Loads the class with the specified <a href="#binary-name">binary name</a>.
      * This method searches for classes in the same manner as the {@link
      * #loadClass(String, boolean)} method.  It is invoked by the Java virtual
      * machine to resolve class references.  Invoking this method is equivalent
@@ -488,7 +488,7 @@
      * false)}.
      *
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @return  The resulting {@code Class} object
      *
@@ -500,7 +500,7 @@
     }
 
     /**
-     * Loads the class with the specified <a href="#name">binary name</a>.  The
+     * Loads the class with the specified <a href="#binary-name">binary name</a>.  The
      * default implementation of this method searches for classes in the
      * following order:
      *
@@ -530,7 +530,7 @@
      * during the entire class loading process.
      *
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @param  resolve
      *         If {@code true} then resolve the class
@@ -579,7 +579,7 @@
     }
 
     /**
-     * Loads the class with the specified <a href="#name">binary name</a>
+     * Loads the class with the specified <a href="#binary-name">binary name</a>
      * in a module defined to this class loader.  This method returns {@code null}
      * if the class could not be found.
      *
@@ -598,7 +598,7 @@
      * @param  module
      *         The module
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @return The resulting {@code Class} object in a module defined by
      *         this class loader, or {@code null} if the class could not be found.
@@ -674,7 +674,7 @@
     }
 
     /**
-     * Finds the class with the specified <a href="#name">binary name</a>.
+     * Finds the class with the specified <a href="#binary-name">binary name</a>.
      * This method should be overridden by class loader implementations that
      * follow the delegation model for loading classes, and will be invoked by
      * the {@link #loadClass loadClass} method after checking the
@@ -683,7 +683,7 @@
      * @implSpec The default implementation throws {@code ClassNotFoundException}.
      *
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @return  The resulting {@code Class} object
      *
@@ -697,9 +697,9 @@
     }
 
     /**
-     * Finds the class with the given <a href="#name">binary name</a>
+     * Finds the class with the given <a href="#binary-name">binary name</a>
      * in a module defined to this class loader.
-     * Class loader implementations that support the loading from modules
+     * Class loader implementations that support loading from modules
      * should override this method.
      *
      * @apiNote This method returns {@code null} rather than throwing
@@ -715,7 +715,7 @@
      *         class loader
 
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @return The resulting {@code Class} object, or {@code null}
      *         if the class could not be found.
@@ -737,7 +737,7 @@
      * Converts an array of bytes into an instance of class {@code Class}.
      * Before the {@code Class} can be used it must be resolved.  This method
      * is deprecated in favor of the version that takes a <a
-     * href="#name">binary name</a> as its first argument, and is more secure.
+     * href="#binary-name">binary name</a> as its first argument, and is more secure.
      *
      * @param  b
      *         The bytes that make up the class data.  The bytes in positions
@@ -804,12 +804,12 @@
      * This method defines a package in this class loader corresponding to the
      * package of the {@code Class} (if such a package has not already been defined
      * in this class loader). The name of the defined package is derived from
-     * the <a href="#name">binary name</a> of the class specified by
+     * the <a href="#binary-name">binary name</a> of the class specified by
      * the byte array {@code b}.
      * Other properties of the defined package are as specified by {@link Package}.
      *
      * @param  name
-     *         The expected <a href="#name">binary name</a> of the class, or
+     *         The expected <a href="#binary-name">binary name</a> of the class, or
      *         {@code null} if not known
      *
      * @param  b
@@ -923,7 +923,7 @@
      * package must contain the same set of certificates or a
      * {@code SecurityException} will be thrown.  Note that if
      * {@code name} is {@code null}, this check is not performed.
-     * You should always pass in the <a href="#name">binary name</a> of the
+     * You should always pass in the <a href="#binary-name">binary name</a> of the
      * class you are defining as well as the bytes.  This ensures that the
      * class you are defining is indeed the class you think it is.
      *
@@ -931,19 +931,19 @@
      * only be defined by the {@linkplain #getPlatformClassLoader()
      * platform class loader} or its ancestors; otherwise {@code SecurityException}
      * will be thrown.  If {@code name} is not {@code null}, it must be equal to
-     * the <a href="#name">binary name</a> of the class
+     * the <a href="#binary-name">binary name</a> of the class
      * specified by the byte array {@code b}, otherwise a {@link
      * NoClassDefFoundError NoClassDefFoundError} will be thrown.
      *
      * <p> This method defines a package in this class loader corresponding to the
      * package of the {@code Class} (if such a package has not already been defined
      * in this class loader). The name of the defined package is derived from
-     * the <a href="#name">binary name</a> of the class specified by
+     * the <a href="#binary-name">binary name</a> of the class specified by
      * the byte array {@code b}.
      * Other properties of the defined package are as specified by {@link Package}.
      *
      * @param  name
-     *         The expected <a href="#name">binary name</a> of the class, or
+     *         The expected <a href="#binary-name">binary name</a> of the class, or
      *         {@code null} if not known
      *
      * @param  b
@@ -969,7 +969,7 @@
      *
      * @throws  NoClassDefFoundError
      *          If {@code name} is not {@code null} and not equal to the
-     *          <a href="#name">binary name</a> of the class specified by {@code b}
+     *          <a href="#binary-name">binary name</a> of the class specified by {@code b}
      *
      * @throws  IndexOutOfBoundsException
      *          If either {@code off} or {@code len} is negative, or if
@@ -1027,7 +1027,7 @@
      * </code></p>
      *
      * @param  name
-     *         The expected <a href="#name">binary name</a>. of the class, or
+     *         The expected <a href="#binary-name">binary name</a>. of the class, or
      *         {@code null} if not known
      *
      * @param  b
@@ -1047,7 +1047,7 @@
      *
      * @throws  NoClassDefFoundError
      *          If {@code name} is not {@code null} and not equal to the
-     *          <a href="#name">binary name</a> of the class specified by {@code b}
+     *          <a href="#binary-name">binary name</a> of the class specified by {@code b}
      *
      * @throws  SecurityException
      *          If an attempt is made to add this class to a package that
@@ -1198,7 +1198,7 @@
     }
 
     /**
-     * Finds a class with the specified <a href="#name">binary name</a>,
+     * Finds a class with the specified <a href="#binary-name">binary name</a>,
      * loading it if necessary.
      *
      * <p> This method loads the class through the system class loader (see
@@ -1209,7 +1209,7 @@
      * #findClass(String)}.  </p>
      *
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @return  The {@code Class} object for the specified {@code name}
      *
@@ -1239,13 +1239,13 @@
     private native Class<?> findBootstrapClass(String name);
 
     /**
-     * Returns the class with the given <a href="#name">binary name</a> if this
+     * Returns the class with the given <a href="#binary-name">binary name</a> if this
      * loader has been recorded by the Java virtual machine as an initiating
-     * loader of a class with that <a href="#name">binary name</a>.  Otherwise
+     * loader of a class with that <a href="#binary-name">binary name</a>.  Otherwise
      * {@code null} is returned.
      *
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @return  The {@code Class} object, or {@code null} if the class has
      *          not been loaded
@@ -1281,7 +1281,7 @@
 
     /**
      * Returns a URL to a resource in a module defined to this class loader.
-     * Class loader implementations that support the loading from modules
+     * Class loader implementations that support loading from modules
      * should override this method.
      *
      * @apiNote This method is the basis for the {@link
@@ -1417,12 +1417,12 @@
      * @param  name
      *         The resource name
      *
-     * @return  An enumeration of {@link java.net.URL URL} objects for
-     *          the resource. If no resources could  be found, the enumeration
-     *          will be empty. Resources for which a {@code URL} cannot be
-     *          constructed, are in package that is not opened unconditionally,
-     *          or access to the resource is denied by the security manager,
-     *          are not returned in the enumeration.
+     * @return  An enumeration of {@link java.net.URL URL} objects for the
+     *          resource. If no resources could be found, the enumeration will
+     *          be empty. Resources for which a {@code URL} cannot be
+     *          constructed, are in a package that is not opened
+     *          unconditionally, or access to the resource is denied by the
+     *          security manager, are not returned in the enumeration.
      *
      * @throws  IOException
      *          If I/O errors occur
@@ -2087,9 +2087,9 @@
     }
 
     /**
-     * Defines a package by <a href="#name">name</a> in this {@code ClassLoader}.
+     * Defines a package by <a href="#binary-name">name</a> in this {@code ClassLoader}.
      * <p>
-     * <a href="#name">Package names</a> must be unique within a class loader and
+     * <a href="#binary-name">Package names</a> must be unique within a class loader and
      * cannot be redefined or changed once created.
      * <p>
      * If a class loader wishes to define a package with specific properties,
@@ -2123,7 +2123,7 @@
      * in a named module may be for example sealed with different seal base.
      *
      * @param  name
-     *         The <a href="#name">package name</a>
+     *         The <a href="#binary-name">package name</a>
      *
      * @param  specTitle
      *         The specification title
@@ -2185,10 +2185,10 @@
     }
 
     /**
-     * Returns a {@code Package} of the given <a href="#name">name</a> that
+     * Returns a {@code Package} of the given <a href="#binary-name">name</a> that
      * has been defined by this class loader.
      *
-     * @param  name The <a href="#name">package name</a>
+     * @param  name The <a href="#binary-name">package name</a>
      *
      * @return The {@code Package} of the given name that has been defined
      *         by this class loader, or {@code null} if not found
@@ -2233,7 +2233,7 @@
     }
 
     /**
-     * Finds a package by <a href="#name">name</a> in this class loader and its ancestors.
+     * Finds a package by <a href="#binary-name">name</a> in this class loader and its ancestors.
      * <p>
      * If this class loader defines a {@code Package} of the given name,
      * the {@code Package} is returned. Otherwise, the ancestors of
@@ -2247,7 +2247,7 @@
      * class loader.
      *
      * @param  name
-     *         The <a href="#name">package name</a>
+     *         The <a href="#binary-name">package name</a>
      *
      * @return The {@code Package} of the given name that has been defined by
      *         this class loader or its ancestors, or {@code null} if not found.
--- a/src/java.base/share/classes/java/lang/ModuleLayer.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/lang/ModuleLayer.java	Fri Apr 06 17:06:58 2018 -0400
@@ -152,7 +152,7 @@
     private static final ModuleLayer EMPTY_LAYER
         = new ModuleLayer(Configuration.empty(), List.of(), null);
 
-    // the configuration from which this ;ayer was created
+    // the configuration from which this layer was created
     private final Configuration cf;
 
     // parent layers, empty in the case of the empty layer
@@ -498,7 +498,7 @@
         try {
             Loader loader = new Loader(cf.modules(), parentLoader);
             loader.initRemotePackageMap(cf, parents);
-            ModuleLayer layer =  new ModuleLayer(cf, parents, mn -> loader);
+            ModuleLayer layer = new ModuleLayer(cf, parents, mn -> loader);
             return new Controller(layer);
         } catch (IllegalArgumentException | IllegalStateException e) {
             throw new LayerInstantiationException(e.getMessage());
--- a/src/java.base/share/classes/java/lang/Runtime.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/lang/Runtime.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1140,7 +1140,7 @@
          * number is not the major-release number but the feature-release
          * counter, incremented for every time-based release.  Use the {@link
          * #feature()} method in preference to this method.  For compatibility,
-         * this method returns the value of the <a href="FEATURE">feature</a>
+         * this method returns the value of the <a href="#FEATURE">feature</a>
          * element.
          *
          * @return The value of the feature element
@@ -1158,7 +1158,7 @@
          * number is not the minor-release number but the interim-release
          * counter, incremented for every interim release.  Use the {@link
          * #interim()} method in preference to this method.  For compatibility,
-         * this method returns the value of the <a href="INTERIM">interim</a>
+         * this method returns the value of the <a href="#INTERIM">interim</a>
          * element, or zero if it is absent.
          *
          * @return The value of the interim element, or zero
@@ -1176,7 +1176,7 @@
          * number is not the security level but the update-release counter,
          * incremented for every update release.  Use the {@link #update()}
          * method in preference to this method.  For compatibility, this method
-         * returns the value of the <a href="UPDATE">update</a> element, or
+         * returns the value of the <a href="#UPDATE">update</a> element, or
          * zero if it is absent.
          *
          * @return  The value of the update element, or zero
@@ -1188,9 +1188,9 @@
 
         /**
          * Returns an unmodifiable {@link java.util.List List} of the integers
-         * represented in the <a href="#verNum">version number</a>.  The {@code
-         * List} always contains at least one element corresponding to the <a
-         * href="#feature">feature version number</a>.
+         * represented in the <a href="#verNum">version number</a>.
+         * The {@code List} always contains at least one element corresponding to
+         * the <a href="#FEATURE">feature version number</a>.
          *
          * @return  An unmodifiable list of the integers
          *          represented in the version number
--- a/src/java.base/share/classes/java/lang/SecurityManager.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/lang/SecurityManager.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -235,19 +235,6 @@
      */
     private boolean initialized = false;
 
-
-    /**
-     * returns true if the current context has been granted AllPermission
-     */
-    private boolean hasAllPermission() {
-        try {
-            checkPermission(SecurityConstants.ALL_PERMISSION);
-            return true;
-        } catch (SecurityException se) {
-            return false;
-        }
-    }
-
     /**
      * Constructs a new <code>SecurityManager</code>.
      *
@@ -1081,28 +1068,6 @@
     }
 
     /**
-     * Returns {@code true} if the calling thread has {@code AllPermission}.
-     *
-     * @param      window   not used except to check if it is {@code null}.
-     * @return     {@code true} if the calling thread has {@code AllPermission}.
-     * @exception  NullPointerException if the {@code window} argument is
-     *             {@code null}.
-     * @deprecated This method was originally used to check if the calling thread
-     *             was trusted to bring up a top-level window. The method has been
-     *             obsoleted and code should instead use {@link #checkPermission}
-     *             to check {@code AWTPermission("showWindowWithoutWarningBanner")}.
-     *             This method is subject to removal in a future version of Java SE.
-     * @see        #checkPermission(java.security.Permission) checkPermission
-     */
-    @Deprecated(since="1.8", forRemoval=true)
-    public boolean checkTopLevelWindow(Object window) {
-        if (window == null) {
-            throw new NullPointerException("window can't be null");
-        }
-        return hasAllPermission();
-    }
-
-    /**
      * Throws a <code>SecurityException</code> if the
      * calling thread is not allowed to initiate a print job request.
      * <p>
@@ -1124,44 +1089,6 @@
         checkPermission(new RuntimePermission("queuePrintJob"));
     }
 
-    /**
-     * Throws {@code SecurityException} if the calling thread does
-     * not have {@code AllPermission}.
-     *
-     * @since   1.1
-     * @exception  SecurityException  if the calling thread does not have
-     *             {@code AllPermission}
-     * @deprecated This method was originally used to check if the calling
-     *             thread could access the system clipboard. The method has been
-     *             obsoleted and code should instead use {@link #checkPermission}
-     *             to check {@code AWTPermission("accessClipboard")}.
-     *             This method is subject to removal in a future version of Java SE.
-     * @see        #checkPermission(java.security.Permission) checkPermission
-     */
-    @Deprecated(since="1.8", forRemoval=true)
-    public void checkSystemClipboardAccess() {
-        checkPermission(SecurityConstants.ALL_PERMISSION);
-    }
-
-    /**
-     * Throws {@code SecurityException} if the calling thread does
-     * not have {@code AllPermission}.
-     *
-     * @since   1.1
-     * @exception  SecurityException  if the calling thread does not have
-     *             {@code AllPermission}
-     * @deprecated This method was originally used to check if the calling
-     *             thread could access the AWT event queue. The method has been
-     *             obsoleted and code should instead use {@link #checkPermission}
-     *             to check {@code AWTPermission("accessEventQueue")}.
-     *             This method is subject to removal in a future version of Java SE.
-     * @see        #checkPermission(java.security.Permission) checkPermission
-     */
-    @Deprecated(since="1.8", forRemoval=true)
-    public void checkAwtEventQueueAccess() {
-        checkPermission(SecurityConstants.ALL_PERMISSION);
-    }
-
     /*
      * We have an initial invalid bit (initially false) for the class
      * variables which tell if the cache is valid.  If the underlying
@@ -1475,35 +1402,6 @@
     }
 
     /**
-     * Throws a {@code SecurityException} if the calling thread does
-     * not have {@code AllPermission}.
-     *
-     * @param clazz the class that reflection is to be performed on.
-     * @param which type of access, PUBLIC or DECLARED.
-     * @throws  SecurityException if the caller does not have
-     *          {@code AllPermission}
-     * @throws  NullPointerException if the {@code clazz} argument is
-     *          {@code null}
-     * @deprecated This method was originally used to check if the calling
-     *             thread was allowed to access members. It relied on the
-     *             caller being at a stack depth of 4 which is error-prone and
-     *             cannot be enforced by the runtime. The method has been
-     *             obsoleted and code should instead use
-     *             {@link #checkPermission} to check
-     *             {@code RuntimePermission("accessDeclaredMembers")}. This
-     *             method is subject to removal in a future version of Java SE.
-     * @since 1.1
-     * @see        #checkPermission(java.security.Permission) checkPermission
-     */
-    @Deprecated(since="1.8", forRemoval=true)
-    public void checkMemberAccess(Class<?> clazz, int which) {
-        if (clazz == null) {
-            throw new NullPointerException("class can't be null");
-        }
-        checkPermission(SecurityConstants.ALL_PERMISSION);
-    }
-
-    /**
      * Determines whether the permission with the specified permission target
      * name should be granted or denied.
      *
--- a/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1742,7 +1742,7 @@
                 throw new IllegalArgumentException("Empty target set");
             if (strict) {
                 requirePackageName(e.source());
-                targets.stream().forEach(Checks::requireModuleName);
+                targets.forEach(Checks::requireModuleName);
             }
             return exports(e);
         }
@@ -1878,7 +1878,7 @@
                 throw new IllegalArgumentException("Empty target set");
             if (strict) {
                 requirePackageName(opens.source());
-                targets.stream().forEach(Checks::requireModuleName);
+                targets.forEach(Checks::requireModuleName);
             }
             return opens(opens);
         }
--- a/src/java.base/share/classes/java/lang/package-info.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/lang/package-info.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@
  * represent errors and exceptions.
  *
  * <a id="charenc"></a>
- * <h3>Character Encodings</h3>
+ * <h2>Character Encodings</h2>
  *
  * The specification of the {@link java.nio.charset.Charset
  * java.nio.charset.Charset} class describes the naming conventions
--- a/src/java.base/share/classes/java/lang/reflect/Proxy.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/lang/reflect/Proxy.java	Fri Apr 06 17:06:58 2018 -0400
@@ -593,8 +593,7 @@
                                   module.getName(), cn, loader);
             }
             if (isDebug("debug")) {
-                interfaces.stream()
-                          .forEach(c -> System.out.println(toDetails(c)));
+                interfaces.forEach(c -> System.out.println(toDetails(c)));
             }
         }
 
--- a/src/java.base/share/classes/java/net/InetAddress.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/net/InetAddress.java	Fri Apr 06 17:06:58 2018 -0400
@@ -290,7 +290,10 @@
     /* Used to store the name service provider */
     private static transient NameService nameService = null;
 
-    /* Used to store the best available hostname */
+    /**
+     * Used to store the best available hostname.
+     * Lazily initialized via a data race; safe because Strings are immutable.
+     */
     private transient String canonicalHostName = null;
 
     /** use serialVersionUID from JDK 1.0.2 for interoperability */
@@ -622,11 +625,11 @@
      * @since 1.4
      */
     public String getCanonicalHostName() {
-        if (canonicalHostName == null) {
-            canonicalHostName =
+        String value = canonicalHostName;
+        if (value == null)
+            canonicalHostName = value =
                 InetAddress.getHostFromNameService(this, true);
-        }
-        return canonicalHostName;
+        return value;
     }
 
     /**
--- a/src/java.base/share/classes/java/net/URL.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/net/URL.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1411,7 +1411,7 @@
                 // Check with factory if another thread set a
                 // factory since our last check
                 if (!checkedWithFactory && (fac = factory) != null) {
-                    handler2 =  fac.createURLStreamHandler(protocol);
+                    handler2 = fac.createURLStreamHandler(protocol);
                 }
 
                 if (handler2 != null) {
--- a/src/java.base/share/classes/java/net/URLClassLoader.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/net/URLClassLoader.java	Fri Apr 06 17:06:58 2018 -0400
@@ -764,7 +764,7 @@
             path = ParseUtil.decode(path);
             if (path.endsWith(File.separator))
                 path += "-";
-            p =  new FilePermission(path, SecurityConstants.FILE_READ_ACTION);
+            p = new FilePermission(path, SecurityConstants.FILE_READ_ACTION);
         } else {
             /**
              * Not loading from a 'file:' URL so we want to give the class
--- a/src/java.base/share/classes/java/net/doc-files/net-properties.html	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/net/doc-files/net-properties.html	Fri Apr 06 17:06:58 2018 -0400
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML>
 <!--
- Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
  This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@
 java.net package. Some are checked only once at startup of the VM,
 and therefore are best set using the -D option of the java command,
 while others have a more dynamic nature and can also be changed using
-the <a href="../../lang/System.html#setProperty-java.lang.String-java.lang.String-">System.setProperty()</a> API.
+the <a href="../../lang/System.html#setProperty(java.lang.String,java.lang.String)">System.setProperty()</a> API.
 The purpose of this document is to list
 and detail all of these properties.</P>
 <P>If there is no special note, a property value is checked every time it is used.</P>
--- a/src/java.base/share/classes/java/nio/file/package-info.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/nio/file/package-info.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,7 @@
  * package is used by service provider implementors wishing to extend the
  * platform default provider, or to construct other provider implementations. </p>
  *
- * <h3><a id="links">Symbolic Links</a></h3>
+ * <h2><a id="links">Symbolic Links</a></h2>
  * <p> Many operating systems and file systems support for <em>symbolic links</em>.
  * A symbolic link is a special file that serves as a reference to another file.
  * For the most part, symbolic links are transparent to applications and
@@ -45,7 +45,7 @@
  * that are semantically close but support for these other types of links is
  * not included in this package. </p>
  *
- * <h3><a id="interop">Interoperability</a></h3>
+ * <h2><a id="interop">Interoperability</a></h2>
  * <p> The {@link java.io.File} class defines the {@link java.io.File#toPath
  * toPath} method to construct a {@link java.nio.file.Path} by converting
  * the abstract path represented by the {@code java.io.File} object. The resulting
@@ -54,7 +54,7 @@
  * on the <a href="Path.html#interop">interoperability</a> between {@code Path}
  * and {@code java.io.File} objects. </p>
  *
- * <h3>Visibility</h3>
+ * <h2>Visibility</h2>
  * <p> The view of the files and file system provided by classes in this package are
  * guaranteed to be consistent with other views provided by other instances in the
  * same Java virtual machine.  The view may or may not, however, be consistent with
@@ -65,7 +65,7 @@
  * or on some other machine.  The exact nature of any such inconsistencies are
  * system-dependent and are therefore unspecified. </p>
  *
- * <h3><a id="integrity">Synchronized I/O File Integrity</a></h3>
+ * <h2><a id="integrity">Synchronized I/O File Integrity</a></h2>
  * <p> The {@link java.nio.file.StandardOpenOption#SYNC SYNC} and {@link
  * java.nio.file.StandardOpenOption#DSYNC DSYNC} options are used when opening a file
  * to require that updates to the file are written synchronously to the underlying
@@ -82,7 +82,7 @@
  * java.nio.file.spi.FileSystemProvider provider} implementations is provider
  * specific. </p>
  *
- * <h3>General Exceptions</h3>
+ * <h2>General Exceptions</h2>
  * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
  * or method of any class or interface in this package will cause a {@link
  * java.lang.NullPointerException NullPointerException} to be thrown. Additionally,
@@ -103,7 +103,7 @@
  * provider} with a parameter that is an object created by another provider,
  * will throw {@link java.nio.file.ProviderMismatchException}. </p>
  *
- * <h3>Optional Specific Exceptions</h3>
+ * <h2>Optional Specific Exceptions</h2>
  * Most of the methods defined by classes in this package that access the
  * file system specify that {@link java.io.IOException} be thrown when an I/O
  * error occurs. In some cases, these methods define specific I/O exceptions
--- a/src/java.base/share/classes/java/text/ChoiceFormat.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/text/ChoiceFormat.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -212,7 +212,7 @@
                 } else if (tempBuffer.equals("-\u221E")) {
                     startValue = Double.NEGATIVE_INFINITY;
                 } else {
-                    startValue = Double.valueOf(tempBuffer);
+                    startValue = Double.parseDouble(tempBuffer);
                 }
 
                 if (ch == '<' && startValue != Double.POSITIVE_INFINITY &&
@@ -312,7 +312,7 @@
      * Constructs with limits and corresponding formats based on the pattern.
      *
      * @param newPattern the new pattern string
-     * @exception NullPointerExcpetion if {@code newPattern} is
+     * @exception NullPointerException if {@code newPattern} is
      *            {@code null}
      * @see #applyPattern
      */
--- a/src/java.base/share/classes/java/time/chrono/package-info.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/time/chrono/package-info.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,7 +95,7 @@
  * <li>{@link java.time.chrono.ThaiBuddhistChronology Thai Buddhist calendar}</li>
  * </ul>
  *
- * <h3>Example</h3>
+ * <h2>Example</h2>
  * <p>
  * This example lists todays date for all of the available calendars.
  * </p>
@@ -155,7 +155,7 @@
  *                 first, last);
  *  </pre>
  *
- * <h3>Package specification</h3>
+ * <h2>Package specification</h2>
  * <p>
  * Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
  * in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
--- a/src/java.base/share/classes/java/time/format/package-info.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/time/format/package-info.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -79,7 +79,7 @@
  * {@link java.time.format.DecimalStyle DecimalStyle}.
  * </p>
  *
- * <h3>Package specification</h3>
+ * <h2>Package specification</h2>
  * <p>
  * Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
  * in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
--- a/src/java.base/share/classes/java/time/package-info.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/time/package-info.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -90,7 +90,7 @@
  * The calendar neutral API should be reserved for interactions with users.
  * </p>
  *
- * <h3>Dates and Times</h3>
+ * <h2>Dates and Times</h2>
  * <p>
  * {@link java.time.Instant} is essentially a numeric timestamp.
  * The current Instant can be retrieved from a {@link java.time.Clock}.
@@ -118,7 +118,7 @@
  * The widespread use of time-zones tends to add considerable complexity to an application.
  * </p>
  *
- * <h3>Duration and Period</h3>
+ * <h2>Duration and Period</h2>
  * <p>
  * Beyond dates and times, the API also allows the storage of periods and durations of time.
  * A {@link java.time.Duration} is a simple measure of time along the time-line in nanoseconds.
@@ -126,7 +126,7 @@
  * to humans, such as years or days.
  * </p>
  *
- * <h3>Additional value types</h3>
+ * <h2>Additional value types</h2>
  * <p>
  * {@link java.time.Month} stores a month on its own.
  * This stores a single month-of-year in isolation, such as 'DECEMBER'.
@@ -160,7 +160,7 @@
  * but contains less information than a full time-zone.
  * </p>
  *
- * <h3>Package specification</h3>
+ * <h2>Package specification</h2>
  * <p>
  * Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
  * in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
@@ -172,7 +172,7 @@
  * or a {@link java.time.DateTimeException}.
  * </p>
  *
- * <h3>Design notes (non normative)</h3>
+ * <h2>Design notes (non normative)</h2>
  * <p>
  * The API has been designed to reject null early and to be clear about this behavior.
  * A key exception is any method that takes an object and returns a boolean, for the purpose
--- a/src/java.base/share/classes/java/time/temporal/package-info.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/time/temporal/package-info.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -75,7 +75,7 @@
  * <li>Different definitions of weeks</li>
  * </ul>
  *
- * <h3>Fields and Units</h3>
+ * <h2>Fields and Units</h2>
  * <p>
  * Dates and times are expressed in terms of fields and units.
  * A unit is used to measure an amount of time, such as years, days or minutes.
@@ -106,7 +106,7 @@
  * The fields also provide access to the range of valid values.
  * </p>
  *
- * <h3>Adjustment and Query</h3>
+ * <h2>Adjustment and Query</h2>
  * <p>
  * A key part of the date-time problem space is adjusting a date to a new, related value,
  * such as the "last day of the month", or "next Wednesday".
@@ -131,7 +131,7 @@
  * Applications can also define queries by implementing {@link java.time.temporal.TemporalQuery}.
  * </p>
  *
- * <h3>Weeks</h3>
+ * <h2>Weeks</h2>
  * <p>
  * Different locales have different definitions of the week.
  * For example, in Europe the week typically starts on a Monday, while in the US it starts on a Sunday.
@@ -143,7 +143,7 @@
  * This is modeled in {@link java.time.temporal.IsoFields}.
  * </p>
  *
- * <h3>Package specification</h3>
+ * <h2>Package specification</h2>
  * <p>
  * Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
  * in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
--- a/src/java.base/share/classes/java/time/zone/package-info.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/time/zone/package-info.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * 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,7 +70,7 @@
  * gaps and overlaps in the local time-line typically caused by Daylight Saving Time.
  * </p>
  *
- * <h3>Package specification</h3>
+ * <h2>Package specification</h2>
  * <p>
  * Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
  * in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
--- a/src/java.base/share/classes/java/util/doc-files/coll-designfaq.html	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/util/doc-files/coll-designfaq.html	Fri Apr 06 17:06:58 2018 -0400
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <!--
- Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
  This code is free software; you can redistribute it and/or modify it
@@ -371,7 +371,7 @@
 would do away with many useful facilities (like synchronizing
 wrappers). One view that we see as being particularly useful is
 <a href=
-"../List.html#subList-int-int-">List.subList</a>.
+"../List.html#subList(int,int)">List.subList</a>.
 The existence of this method means that people who write methods
 taking List on input do not have to write secondary forms taking an
 offset and a length (as they do for arrays).</p>
--- a/src/java.base/share/classes/java/util/doc-files/coll-overview.html	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/util/doc-files/coll-overview.html	Fri Apr 06 17:06:58 2018 -0400
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <!--
- Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
  This code is free software; you can redistribute it and/or modify it
@@ -258,7 +258,7 @@
 restrictions on the elements they may contain. They are
 unsynchronized, but the <code>Collections</code> class contains static
 factories called <a href=
-"../Collections.html#synchronizedCollection-java.util.Collection-">
+"../Collections.html#synchronizedCollection(java.util.Collection)">
 <em>synchronization wrappers</em></a> that can be used to add
 synchronization to many unsynchronized collections. All of the new
 implementations have <i>fail-fast iterators</i>, which detect
--- a/src/java.base/share/classes/java/util/doc-files/coll-reference.html	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/java/util/doc-files/coll-reference.html	Fri Apr 06 17:06:58 2018 -0400
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <!--
- Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
  This code is free software; you can redistribute it and/or modify it
@@ -177,7 +177,7 @@
 interface. An insertion-ordered <code>Map</code> implementation that
 runs nearly as fast as <code>HashMap</code>. Also useful for building
 caches (see <a href=
-"../LinkedHashMap.html#removeEldestEntry-java.util.Map.Entry-">
+"../LinkedHashMap.html#removeEldestEntry(java.util.Map.Entry)">
 removeEldestEntry(Map.Entry)</a> ).</li>
 </ul>
 </li>
@@ -186,13 +186,13 @@
 implementations. Accessed solely through static factory methods.
 <ul>
 <li><a href=
-"../Collections.html#unmodifiableCollection-java.util.Collection-">
+"../Collections.html#unmodifiableCollection(java.util.Collection)">
 <strong>Collections.unmodifiable<i>Interface</i></strong></a> -
 Returns an unmodifiable view of a specified collection that throws
 an <code>UnsupportedOperationException</code> if the user attempts to
 modify it.</li>
 <li><a href=
-"../Collections.html#synchronizedCollection-java.util.Collection-"
+"../Collections.html#synchronizedCollection(java.util.Collection)"
 id=
 "synchWrappers"><strong>Collections.synchronized<i>Interface</i></strong></a>
 - Returns a synchronized collection that is backed by the specified
@@ -200,7 +200,7 @@
 the backing collection are through the returned collection, thread
 safety is guaranteed.</li>
 <li><a href=
-"../Collections.html#checkedCollection-java.util.Collection-java.lang.Class-">
+"../Collections.html#checkedCollection(java.util.Collection,java.lang.Class)">
 <strong>Collections.checked<i>Interface</i></strong></a> - Returns
 a dynamically type-safe view of the specified collection, which
 throws a <code>ClassCastException</code> if a client attempts to add an
@@ -214,12 +214,12 @@
 adapt one collections interface to another:
 <ul>
 <li><strong><a href=
-"../Collections.html#newSetFromMap-java.util.Map-">
+"../Collections.html#newSetFromMap(java.util.Map)">
 newSetFromMap(Map)</a></strong> - Creates a general-purpose
 <code>Set</code> implementation from a general-purpose <code>Map</code>
 implementation.</li>
 <li><strong><a href=
-"../Collections.html#asLifoQueue-java.util.Deque-">
+"../Collections.html#asLifoQueue(java.util.Deque)">
 asLifoQueue(Deque)</a></strong> - Returns a view of a
 <code>Deque</code> as a Last In First Out (LIFO) <code>Queue</code>.</li>
 </ul>
@@ -228,25 +228,25 @@
 "mini-implementations" of the collection interfaces.
 <ul>
 <li><a href=
-"../Arrays.html#asList-T...-"><strong>Arrays.asList</strong></a>
+"../Arrays.html#asList(T...)"><strong>Arrays.asList</strong></a>
 - Enables an array to be viewed as a list.</li>
 <li><strong><a href=
-"../Collections.html#emptySet--">emptySet</a>,
+"../Collections.html#emptySet()">emptySet</a>,
 <a href=
-"../Collections.html#emptyList--">emptyList</a>
+"../Collections.html#emptyList()">emptyList</a>
 and <a href=
-"../Collections.html#emptyMap--">emptyMap</a></strong>
+"../Collections.html#emptyMap()">emptyMap</a></strong>
 - Return an immutable empty set, list, or map.</li>
 <li><strong><a href=
-"../Collections.html#singleton-java.lang.Object-">
+"../Collections.html#singleton(java.lang.Object)">
 singleton</a>, <a href=
-"../Collections.html#singletonList-java.lang.Object-">
+"../Collections.html#singletonList(java.lang.Object)">
 singletonList</a>, and <a href=
-"../Collections.html#singletonMap-K-V-">singletonMap</a></strong>
+"../Collections.html#singletonMap(K,V)">singletonMap</a></strong>
 - Return an immutable singleton set, list, or map, containing only
 the specified object (or key-value mapping).</li>
 <li><a href=
-"../Collections.html#nCopies-int-T-"><strong>
+"../Collections.html#nCopies(int,T)"><strong>
 nCopies</strong></a> - Returns an immutable list consisting of n
 copies of a specified object.</li>
 </ul>
@@ -410,71 +410,71 @@
 class contains these useful static methods.
 <ul>
 <li><strong><a href=
-"../Collections.html#sort-java.util.List-">sort(List)</a></strong>
+"../Collections.html#sort(java.util.List)">sort(List)</a></strong>
 - Sorts a list using a merge sort algorithm, which provides average
 case performance comparable to a high quality quicksort, guaranteed
 O(n*log n) performance (unlike quicksort), and <em>stability</em>
 (unlike quicksort). A stable sort is one that does not reorder
 equal elements.</li>
 <li><strong><a href=
-"../Collections.html#binarySearch-java.util.List-T-">
+"../Collections.html#binarySearch(java.util.List,T)">
 binarySearch(List, Object)</a></strong> - Searches for an element
 in an ordered list using the binary search algorithm.</li>
 <li><strong><a href=
-"../Collections.html#reverse-java.util.List-">reverse(List)</a></strong>
+"../Collections.html#reverse(java.util.List)">reverse(List)</a></strong>
 - Reverses the order of the elements in a list.</li>
 <li><strong><a href=
-"../Collections.html#shuffle-java.util.List-">shuffle(List)</a></strong>
+"../Collections.html#shuffle(java.util.List)">shuffle(List)</a></strong>
 - Randomly changes the order of the elements in a list.</li>
 <li><strong><a href=
-"../Collections.html#fill-java.util.List-T-">
+"../Collections.html#fill(java.util.List,T)">
 fill(List, Object)</a></strong> - Overwrites every element in a
 list with the specified value.</li>
 <li><strong><a href=
-"../Collections.html#copy-java.util.List-java.util.List-">
+"../Collections.html#copy-java.util.List(java.util.List)">
 copy(List dest, List src)</a></strong> - Copies the source list
 into the destination list.</li>
 <li><strong><a href=
-"../Collections.html#min-java.util.Collection-">
+"../Collections.html#min(java.util.Collection)">
 min(Collection)</a></strong> - Returns the minimum element in a
 collection.</li>
 <li><strong><a href=
-"../Collections.html#max-java.util.Collection-">
+"../Collections.html#max(java.util.Collection)">
 max(Collection)</a></strong> - Returns the maximum element in a
 collection.</li>
 <li><strong><a href=
-"../Collections.html#rotate-java.util.List-int-">
+"../Collections.html#rotate(java.util.List,int)">
 rotate(List list, int distance)</a></strong> - Rotates all of the
 elements in the list by the specified distance.</li>
 <li><strong><a href=
-"../Collections.html#replaceAll-java.util.List-T-T-">
+"../Collections.html#replaceAll(java.util.List,T,T)">
 replaceAll(List list, Object oldVal, Object newVal)</a></strong> -
 Replaces all occurrences of one specified value with another.</li>
 <li><strong><a href=
-"../Collections.html#indexOfSubList-java.util.List-java.util.List-">
+"../Collections.html#indexOfSubList(java.util.List,java.util.List)">
 indexOfSubList(List source, List target)</a></strong> - Returns the
 index of the first sublist of source that is equal to target.</li>
 <li><strong><a href=
-"../Collections.html#lastIndexOfSubList-java.util.List-java.util.List-">
+"../Collections.html#lastIndexOfSubList(java.util.List,java.util.List)">
 lastIndexOfSubList(List source, List target)</a></strong> - Returns
 the index of the last sublist of source that is equal to
 target.</li>
 <li><strong><a href=
-"../Collections.html#swap-java.util.List-int-int-">
+"../Collections.html#swap(java.util.List,int,int)">
 swap(List, int, int)</a></strong> - Swaps the elements at the
 specified positions in the specified list.</li>
 <li><strong><a href=
-"../Collections.html#frequency-java.util.Collection-java.lang.Object-">
+"../Collections.html#frequency(java.util.Collection,java.lang.Object)">
 frequency(Collection, Object)</a></strong> - Counts the number of
 times the specified element occurs in the specified
 collection.</li>
 <li><strong><a href=
-"../Collections.html#disjoint-java.util.Collection-java.util.Collection-">
+"../Collections.html#disjoint(java.util.Collection,java.util.Collection)">
 disjoint(Collection, Collection)</a></strong> - Determines whether
 two collections are disjoint, in other words, whether they contain
 no elements in common.</li>
 <li><strong><a href=
-"../Collections.html#addAll-java.util.Collection-T...-">
+"../Collections.html#addAll(java.util.Collection,T...)">
 addAll(Collection&lt;? super T&gt;, T...)</a></strong> - Adds all
 of the elements in the specified array to the specified
 collection.</li>
--- a/src/java.base/share/classes/jdk/internal/loader/BootLoader.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/jdk/internal/loader/BootLoader.java	Fri Apr 06 17:06:58 2018 -0400
@@ -100,8 +100,8 @@
     }
 
     /**
-     * Register a module with this class loader so that its classes (and
-     * resources) become visible via this class loader.
+     * Registers a module with this class loader so that its classes
+     * (and resources) become visible via this class loader.
      */
     public static void loadModule(ModuleReference mref) {
         ClassLoaders.bootLoader().loadModule(mref);
--- a/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java	Fri Apr 06 17:06:58 2018 -0400
@@ -584,7 +584,7 @@
     }
 
     /**
-     * A variation of {@code loadCass} to load a class with the specified
+     * A variation of {@code loadClass} to load a class with the specified
      * binary name. This method returns {@code null} when the class is not
      * found.
      */
@@ -633,16 +633,16 @@
     }
 
     /**
-     * A variation of {@code loadCass} to load a class with the specified
+     * A variation of {@code loadClass} to load a class with the specified
      * binary name. This method returns {@code null} when the class is not
      * found.
      */
-    protected  Class<?> loadClassOrNull(String cn) {
+    protected Class<?> loadClassOrNull(String cn) {
         return loadClassOrNull(cn, false);
     }
 
     /**
-     * Find the candidate loaded module for the given class name.
+     * Finds the candidate loaded module for the given class name.
      * Returns {@code null} if none of the modules defined to this
      * class loader contain the API package for the class.
      */
@@ -656,7 +656,7 @@
     }
 
     /**
-     * Find the candidate loaded module for the given class name
+     * Finds the candidate loaded module for the given class name
      * in the named module.  Returns {@code null} if the named module
      * is not defined to this class loader or does not contain
      * the API package for the class.
@@ -832,8 +832,8 @@
     }
 
     /**
-     * Get the Package with the specified package name. If defined
-     * then verify that it against the manifest and code source.
+     * Gets the Package with the specified package name. If defined
+     * then verifies it against the manifest and code source.
      *
      * @throws SecurityException if there is a sealing violation (JAR spec)
      */
@@ -859,7 +859,7 @@
 
     /**
      * Defines a new package in this ClassLoader. The attributes in the specified
-     * Manifest are use to get the package version and sealing information.
+     * Manifest are used to get the package version and sealing information.
      *
      * @throws IllegalArgumentException if the package name duplicates an
      * existing package either in this class loader or one of its ancestors
@@ -976,7 +976,7 @@
     // -- miscellaneous supporting methods
 
     /**
-     * Returns the ModuleReader for the given module, creating it if needed
+     * Returns the ModuleReader for the given module, creating it if needed.
      */
     private ModuleReader moduleReaderFor(ModuleReference mref) {
         ModuleReader reader = moduleToReader.get(mref);
--- a/src/java.base/share/classes/jdk/internal/loader/Loader.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/jdk/internal/loader/Loader.java	Fri Apr 06 17:06:58 2018 -0400
@@ -90,7 +90,7 @@
         ClassLoader.registerAsParallelCapable();
     }
 
-    // the loader pool is in a pool, can be null
+    // the pool this loader is a member of; can be null
     private final LoaderPool pool;
 
     // parent ClassLoader, can be null
@@ -487,7 +487,7 @@
     }
 
     /**
-     * Finds the class with the specified binary name in a given module.
+     * Finds the class with the specified binary name in the given module.
      * This method returns {@code null} if the class cannot be found.
      */
     @Override
--- a/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java	Fri Apr 06 17:06:58 2018 -0400
@@ -35,7 +35,6 @@
 import java.util.Deque;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.LinkedList;
 import java.util.Map;
 import java.util.Set;
 import java.util.function.Consumer;
@@ -76,16 +75,15 @@
         // build a graph containing the packaged modules and
         // its transitive dependences matching --hash-modules
         Graph.Builder<String> builder = new Graph.Builder<>();
-        Deque<ResolvedModule> deque = new ArrayDeque<>(configuration.modules());
+        Deque<ResolvedModule> todo = new ArrayDeque<>(configuration.modules());
         Set<ResolvedModule> visited = new HashSet<>();
-        while (!deque.isEmpty()) {
-            ResolvedModule rm = deque.pop();
-            if (!visited.contains(rm)) {
-                visited.add(rm);
+        ResolvedModule rm;
+        while ((rm = todo.poll()) != null) {
+            if (visited.add(rm)) {
                 builder.addNode(rm.name());
                 for (ResolvedModule dm : rm.reads()) {
                     if (!visited.contains(dm)) {
-                        deque.push(dm);
+                        todo.push(dm);
                     }
                     builder.addEdge(rm.name(), dm.name());
                 }
@@ -173,7 +171,7 @@
         }
 
         /**
-         * Traverse this graph and performs the given action in topological order
+         * Traverses this graph and performs the given action in topological order.
          */
         public void ordered(Consumer<T> action) {
             TopoSorter<T> sorter = new TopoSorter<>(this);
@@ -181,7 +179,7 @@
         }
 
         /**
-         * Traverses this graph and performs the given action in reverse topological order
+         * Traverses this graph and performs the given action in reverse topological order.
          */
         public void reverse(Consumer<T> action) {
             TopoSorter<T> sorter = new TopoSorter<>(this);
@@ -189,15 +187,14 @@
         }
 
         /**
-         * Returns a transposed graph from this graph
+         * Returns a transposed graph from this graph.
          */
         public Graph<T> transpose() {
             Builder<T> builder = new Builder<>();
-            nodes.stream().forEach(builder::addNode);
+            nodes.forEach(builder::addNode);
             // reverse edges
             edges.keySet().forEach(u -> {
-                edges.get(u).stream()
-                    .forEach(v -> builder.addEdge(v, u));
+                edges.get(u).forEach(v -> builder.addEdge(v, u));
             });
             return builder.build();
         }
@@ -213,17 +210,14 @@
          * Returns all nodes reachable from the given set of roots.
          */
         public Set<T> dfs(Set<T> roots) {
-            Deque<T> deque = new LinkedList<>(roots);
+            ArrayDeque<T> todo = new ArrayDeque<>(roots);
             Set<T> visited = new HashSet<>();
-            while (!deque.isEmpty()) {
-                T u = deque.pop();
-                if (!visited.contains(u)) {
-                    visited.add(u);
-                    if (contains(u)) {
-                        adjacentNodes(u).stream()
-                            .filter(v -> !visited.contains(v))
-                            .forEach(deque::push);
-                    }
+            T u;
+            while ((u = todo.poll()) != null) {
+                if (visited.add(u) && contains(u)) {
+                    adjacentNodes(u).stream()
+                        .filter(v -> !visited.contains(v))
+                        .forEach(todo::push);
                 }
             }
             return visited;
@@ -231,8 +225,8 @@
 
         public void printGraph(PrintStream out) {
             out.println("graph for " + nodes);
-            nodes.stream()
-                .forEach(u -> adjacentNodes(u).stream()
+            nodes
+                .forEach(u -> adjacentNodes(u)
                     .forEach(v -> out.format("  %s -> %s%n", u, v)));
         }
 
@@ -241,11 +235,9 @@
             final Map<T, Set<T>> edges = new HashMap<>();
 
             public void addNode(T node) {
-                if (nodes.contains(node)) {
-                    return;
+                if (nodes.add(node)) {
+                    edges.computeIfAbsent(node, _e -> new HashSet<>());
                 }
-                nodes.add(node);
-                edges.computeIfAbsent(node, _e -> new HashSet<>());
             }
 
             public void addEdge(T u, T v) {
@@ -264,18 +256,16 @@
      * Topological sort
      */
     private static class TopoSorter<T> {
-        final Deque<T> result = new LinkedList<>();
-        final Deque<T> nodes;
+        final Deque<T> result = new ArrayDeque<>();
         final Graph<T> graph;
 
         TopoSorter(Graph<T> graph) {
             this.graph = graph;
-            this.nodes = new LinkedList<>(graph.nodes);
             sort();
         }
 
         public void ordered(Consumer<T> action) {
-            result.iterator().forEachRemaining(action);
+            result.forEach(action);
         }
 
         public void reverse(Consumer<T> action) {
@@ -283,29 +273,26 @@
         }
 
         private void sort() {
-            Deque<T> visited = new LinkedList<>();
-            Deque<T> done = new LinkedList<>();
-            T node;
-            while ((node = nodes.poll()) != null) {
-                if (!visited.contains(node)) {
-                    visit(node, visited, done);
-                }
-            }
+            Set<T> visited = new HashSet<>();
+            Deque<T> stack = new ArrayDeque<>();
+            graph.nodes.forEach(node -> visit(node, visited, stack));
+        }
+
+        private Set<T> children(T node) {
+            return graph.edges().get(node);
         }
 
-        private void visit(T node, Deque<T> visited, Deque<T> done) {
-            if (visited.contains(node)) {
-                if (!done.contains(node)) {
-                    throw new IllegalArgumentException("Cyclic detected: " +
-                        node + " " + graph.edges().get(node));
-                }
-                return;
+        private void visit(T node, Set<T> visited, Deque<T> stack) {
+            if (visited.add(node)) {
+                stack.push(node);
+                children(node).forEach(child -> visit(child, visited, stack));
+                stack.pop();
+                result.addLast(node);
             }
-            visited.add(node);
-            graph.edges().get(node).stream()
-                .forEach(x -> visit(x, visited, done));
-            done.add(node);
-            result.addLast(node);
+            else if (stack.contains(node)) {
+                throw new IllegalArgumentException(
+                    "Cycle detected: " + node + " -> " + children(node));
+            }
         }
     }
 }
--- a/src/java.base/share/classes/jdk/internal/vm/annotation/Stable.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/jdk/internal/vm/annotation/Stable.java	Fri Apr 06 17:06:58 2018 -0400
@@ -81,7 +81,7 @@
  *
  * @implNote
  * This annotation only takes effect for fields of classes loaded by the boot
- * loader.  Annoations on fields of classes loaded outside of the boot loader
+ * loader.  Annotations on fields of classes loaded outside of the boot loader
  * are ignored.
  */
 @Target(ElementType.FIELD)
--- a/src/java.base/share/classes/sun/nio/ch/NativeObject.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/sun/nio/ch/NativeObject.java	Fri Apr 06 17:06:58 2018 -0400
@@ -388,7 +388,10 @@
         return byteOrder;
     }
 
-    // Cache for page size
+    /**
+     * Cache for page size.
+     * Lazily initialized via a data race; safe because ints are atomic.
+     */
     private static int pageSize = -1;
 
     /**
@@ -397,9 +400,10 @@
      * @return  The page size, in bytes
      */
     static int pageSize() {
-        if (pageSize == -1)
-            pageSize = unsafe.pageSize();
-        return pageSize;
+        int value = pageSize;
+        if (value == -1)
+            pageSize = value = unsafe.pageSize();
+        return value;
     }
 
 }
--- a/src/java.base/share/classes/sun/nio/ch/SelChImpl.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/sun/nio/ch/SelChImpl.java	Fri Apr 06 17:06:58 2018 -0400
@@ -49,7 +49,7 @@
      *          contains at least one bit that the previous value did not
      *          contain
      */
-    boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk);
+    boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl ski);
 
     /**
      * Sets the specified ops if present in interestOps. The specified
@@ -59,7 +59,7 @@
      *          contains at least one bit that the previous value did not
      *          contain
      */
-    boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk);
+    boolean translateAndSetReadyOps(int ops, SelectionKeyImpl ski);
 
     /**
      * Translates an interest operation set into a native event set
--- a/src/java.base/share/classes/sun/nio/ch/SelectionKeyImpl.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/sun/nio/ch/SelectionKeyImpl.java	Fri Apr 06 17:06:58 2018 -0400
@@ -39,7 +39,7 @@
 public final class SelectionKeyImpl
     extends AbstractSelectionKey
 {
-    final SelChImpl channel;                            // package-private
+    private final SelChImpl channel;
     private final SelectorImpl selector;
 
     private volatile int interestOps;
@@ -61,6 +61,10 @@
             throw new CancelledKeyException();
     }
 
+    int getFDVal() {
+        return channel.getFDVal();
+    }
+
     @Override
     public SelectableChannel channel() {
         return (SelectableChannel)channel;
@@ -103,8 +107,8 @@
     public SelectionKey nioInterestOps(int ops) {
         if ((ops & ~channel().validOps()) != 0)
             throw new IllegalArgumentException();
-        selector.putEventOps(this, channel.translateInterestOps(ops));
         interestOps = ops;
+        selector.setEventOps(this);
         return this;
     }
 
@@ -112,6 +116,18 @@
         return interestOps;
     }
 
+    int translateInterestOps() {
+        return channel.translateInterestOps(interestOps);
+    }
+
+    boolean translateAndSetReadyOps(int ops) {
+        return channel.translateAndSetReadyOps(ops, this);
+    }
+
+    boolean translateAndUpdateReadyOps(int ops) {
+        return channel.translateAndUpdateReadyOps(ops, this);
+    }
+
     void registeredEvents(int events) {
         // assert Thread.holdsLock(selector);
         this.registeredEvents = events;
--- a/src/java.base/share/classes/sun/nio/ch/SelectorImpl.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/classes/sun/nio/ch/SelectorImpl.java	Fri Apr 06 17:06:58 2018 -0400
@@ -64,17 +64,20 @@
         publicSelectedKeys = Util.ungrowableSet(selectedKeys);
     }
 
+    private void ensureOpen() {
+        if (!isOpen())
+            throw new ClosedSelectorException();
+    }
+
     @Override
     public final Set<SelectionKey> keys() {
-        if (!isOpen())
-            throw new ClosedSelectorException();
+        ensureOpen();
         return publicKeys;
     }
 
     @Override
     public final Set<SelectionKey> selectedKeys() {
-        if (!isOpen())
-            throw new ClosedSelectorException();
+        ensureOpen();
         return publicSelectedKeys;
     }
 
@@ -112,8 +115,7 @@
 
     private int lockAndDoSelect(long timeout) throws IOException {
         synchronized (this) {
-            if (!isOpen())
-                throw new ClosedSelectorException();
+            ensureOpen();
             synchronized (publicKeys) {
                 synchronized (publicSelectedKeys) {
                     return doSelect(timeout);
@@ -176,7 +178,8 @@
             throw new IllegalSelectorException();
         SelectionKeyImpl k = new SelectionKeyImpl((SelChImpl)ch, this);
         k.attach(attachment);
-        // register before adding to key set
+
+        // register with selector (if needed) before adding to key set
         implRegister(k);
         synchronized (publicKeys) {
             keys.add(k);
@@ -185,7 +188,15 @@
         return k;
     }
 
-    protected abstract void implRegister(SelectionKeyImpl ski);
+    /**
+     * Register the key in the selector.
+     *
+     * The default implementation checks if the selector is open. It should
+     * be overridden by selector implementations as needed.
+     */
+    protected void implRegister(SelectionKeyImpl ski) {
+        ensureOpen();
+    }
 
     protected abstract void implDereg(SelectionKeyImpl ski) throws IOException;
 
@@ -222,5 +233,5 @@
     /**
      * Change the event set in the selector
      */
-    protected abstract void putEventOps(SelectionKeyImpl ski, int events);
+    protected abstract void setEventOps(SelectionKeyImpl ski);
 }
--- a/src/java.base/share/native/launcher/main.c	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/share/native/launcher/main.c	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
 
 #include "defines.h"
 #include "jli_util.h"
+#include "jni.h"
 
 #ifdef _MSC_VER
 #if _MSC_VER > 1400 && _MSC_VER < 1600
@@ -92,7 +93,7 @@
     __initenv = _environ;
 
 #else /* JAVAW */
-int
+JNIEXPORT int JNICALL
 main(int argc, char **argv)
 {
     int margc;
--- a/src/java.base/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java	Fri Apr 06 17:06:58 2018 -0400
@@ -55,17 +55,14 @@
     // maps file descriptor to selection key, synchronize on selector
     private final Map<Integer, SelectionKeyImpl> fdToKey = new HashMap<>();
 
-    // pending new registrations/updates, queued by implRegister and putEventOps
+    // pending new registrations/updates, queued by setEventOps
     private final Object updateLock = new Object();
-    private final Deque<SelectionKeyImpl> newKeys = new ArrayDeque<>();
     private final Deque<SelectionKeyImpl> updateKeys = new ArrayDeque<>();
-    private final Deque<Integer> updateEvents = new ArrayDeque<>();
 
     // interrupt triggering and clearing
     private final Object interruptLock = new Object();
     private boolean interruptTriggered;
 
-
     DevPollSelectorImpl(SelectorProvider sp) throws IOException {
         super(sp);
         this.pollWrapper = new DevPollArrayWrapper();
@@ -88,18 +85,34 @@
     }
 
     @Override
-    protected int doSelect(long timeout)
-        throws IOException
-    {
+    protected int doSelect(long timeout) throws IOException {
         assert Thread.holdsLock(this);
-        boolean blocking = (timeout != 0);
+
+        long to = timeout;
+        boolean blocking = (to != 0);
+        boolean timedPoll = (to > 0);
 
         int numEntries;
         processUpdateQueue();
         processDeregisterQueue();
         try {
             begin(blocking);
-            numEntries = pollWrapper.poll(timeout);
+
+            do {
+                long startTime = timedPoll ? System.nanoTime() : 0;
+                numEntries = pollWrapper.poll(to);
+                if (numEntries == IOStatus.INTERRUPTED && timedPoll) {
+                    // timed poll interrupted so need to adjust timeout
+                    long adjust = System.nanoTime() - startTime;
+                    to -= TimeUnit.MILLISECONDS.convert(adjust, TimeUnit.NANOSECONDS);
+                    if (to <= 0) {
+                        // timeout expired so no retry
+                        numEntries = 0;
+                    }
+                }
+            } while (numEntries == IOStatus.INTERRUPTED);
+            assert IOStatus.check(numEntries);
+
         } finally {
             end(blocking);
         }
@@ -108,7 +121,7 @@
     }
 
     /**
-     * Process new registrations and changes to the interest ops.
+     * Process changes to the interest ops.
      */
     private void processUpdateQueue() throws IOException {
         assert Thread.holdsLock(this);
@@ -116,25 +129,18 @@
         synchronized (updateLock) {
             SelectionKeyImpl ski;
 
-            // new registrations
-            while ((ski = newKeys.pollFirst()) != null) {
-                if (ski.isValid()) {
-                    int fd = ski.channel.getFDVal();
-                    SelectionKeyImpl previous = fdToKey.put(fd, ski);
-                    assert previous == null;
-                    assert ski.registeredEvents() == 0;
-                }
-            }
-
             // Translate the queued updates to changes to the set of monitored
             // file descriptors. The changes are written to the /dev/poll driver
             // in bulk.
-            assert updateKeys.size() == updateEvents.size();
             int index = 0;
             while ((ski = updateKeys.pollFirst()) != null) {
-                int newEvents = updateEvents.pollFirst();
-                int fd = ski.channel.getFDVal();
-                if (ski.isValid() && fdToKey.containsKey(fd)) {
+                if (ski.isValid()) {
+                    int fd = ski.getFDVal();
+                    // add to fdToKey if needed
+                    SelectionKeyImpl previous = fdToKey.putIfAbsent(fd, ski);
+                    assert (previous == null) || (previous == ski);
+
+                    int newEvents = ski.translateInterestOps();
                     int registeredEvents = ski.registeredEvents();
                     if (newEvents != registeredEvents) {
                         if (registeredEvents != 0)
@@ -178,11 +184,11 @@
                 if (ski != null) {
                     int rOps = pollWrapper.getReventOps(i);
                     if (selectedKeys.contains(ski)) {
-                        if (ski.channel.translateAndSetReadyOps(rOps, ski)) {
+                        if (ski.translateAndUpdateReadyOps(rOps)) {
                             numKeysUpdated++;
                         }
                     } else {
-                        ski.channel.translateAndSetReadyOps(rOps, ski);
+                        ski.translateAndSetReadyOps(rOps);
                         if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) {
                             selectedKeys.add(ski);
                             numKeysUpdated++;
@@ -214,20 +220,13 @@
         FileDispatcherImpl.closeIntFD(fd1);
     }
 
-    @Override
-    protected void implRegister(SelectionKeyImpl ski) {
-        ensureOpen();
-        synchronized (updateLock) {
-            newKeys.addLast(ski);
-        }
-    }
 
     @Override
     protected void implDereg(SelectionKeyImpl ski) throws IOException {
         assert !ski.isValid();
         assert Thread.holdsLock(this);
 
-        int fd = ski.channel.getFDVal();
+        int fd = ski.getFDVal();
         if (fdToKey.remove(fd) != null) {
             if (ski.registeredEvents() != 0) {
                 pollWrapper.register(fd, POLLREMOVE);
@@ -239,10 +238,9 @@
     }
 
     @Override
-    public void putEventOps(SelectionKeyImpl ski, int events) {
+    public void setEventOps(SelectionKeyImpl ski) {
         ensureOpen();
         synchronized (updateLock) {
-            updateEvents.addLast(events);   // events first in case adding key fails
             updateKeys.addLast(ski);
         }
     }
--- a/src/java.base/solaris/classes/sun/nio/ch/EventPortSelectorImpl.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/solaris/classes/sun/nio/ch/EventPortSelectorImpl.java	Fri Apr 06 17:06:58 2018 -0400
@@ -72,12 +72,10 @@
     // the last update operation, incremented by processUpdateQueue
     private int lastUpdate;
 
-    // pending new registrations/updates, queued by implRegister, putEventOps,
-    // and updateSelectedKeys
+    // pending new registrations/updates, queued by setEventOps and
+    // updateSelectedKeys
     private final Object updateLock = new Object();
-    private final Deque<SelectionKeyImpl> newKeys = new ArrayDeque<>();
     private final Deque<SelectionKeyImpl> updateKeys = new ArrayDeque<>();
-    private final Deque<Integer> updateEvents = new ArrayDeque<>();
 
     // interrupt triggering and clearing
     private final Object interruptLock = new Object();
@@ -146,23 +144,14 @@
 
         synchronized (updateLock) {
             SelectionKeyImpl ski;
-
-            // new registrations
-            while ((ski = newKeys.pollFirst()) != null) {
+            while ((ski = updateKeys.pollFirst()) != null) {
                 if (ski.isValid()) {
-                    int fd = ski.channel.getFDVal();
-                    SelectionKeyImpl previous = fdToKey.put(fd, ski);
-                    assert previous == null;
-                    assert ski.registeredEvents() == 0;
-                }
-            }
+                    int fd = ski.getFDVal();
+                    // add to fdToKey if needed
+                    SelectionKeyImpl previous = fdToKey.putIfAbsent(fd, ski);
+                    assert (previous == null) || (previous == ski);
 
-            // changes to interest ops
-            assert updateKeys.size() == updateEvents.size();
-            while ((ski = updateKeys.pollFirst()) != null) {
-                int newEvents = updateEvents.pollFirst();
-                int fd = ski.channel.getFDVal();
-                if (ski.isValid() && fdToKey.containsKey(fd)) {
+                    int newEvents = ski.translateInterestOps();
                     if (newEvents != ski.registeredEvents()) {
                         if (newEvents == 0) {
                             port_dissociate(pfd, PORT_SOURCE_FD, fd);
@@ -199,22 +188,20 @@
                     if (ski != null) {
                         int rOps = getEventOps(i);
                         if (selectedKeys.contains(ski)) {
-                            if (ski.channel.translateAndSetReadyOps(rOps, ski)) {
+                            if (ski.translateAndUpdateReadyOps(rOps)) {
                                 numKeysUpdated++;
                             }
                         } else {
-                            ski.channel.translateAndSetReadyOps(rOps, ski);
+                            ski.translateAndSetReadyOps(rOps);
                             if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) {
                                 selectedKeys.add(ski);
                                 numKeysUpdated++;
                             }
                         }
 
-                        // re-queue key to head so that it is re-associated at
-                        // next select (and before other changes)
-                        updateEvents.addFirst(ski.registeredEvents());
-                        updateKeys.addFirst(ski);
+                        // re-queue key so it re-associated at next select
                         ski.registeredEvents(0);
+                        updateKeys.addLast(ski);
                     }
                 } else if (source == PORT_SOURCE_USER) {
                     interrupted = true;
@@ -245,19 +232,11 @@
     }
 
     @Override
-    protected void implRegister(SelectionKeyImpl ski) {
-        ensureOpen();
-        synchronized (updateLock) {
-            newKeys.addLast(ski);
-        }
-    }
-
-    @Override
     protected void implDereg(SelectionKeyImpl ski) throws IOException {
         assert !ski.isValid();
         assert Thread.holdsLock(this);
 
-        int fd = ski.channel.getFDVal();
+        int fd = ski.getFDVal();
         if (fdToKey.remove(fd) != null) {
             if (ski.registeredEvents() != 0) {
                 port_dissociate(pfd, PORT_SOURCE_FD, fd);
@@ -269,10 +248,9 @@
     }
 
     @Override
-    public void putEventOps(SelectionKeyImpl ski, int events) {
+    public void setEventOps(SelectionKeyImpl ski) {
         ensureOpen();
         synchronized (updateLock) {
-            updateEvents.addLast(events);  // events first in case adding key fails
             updateKeys.addLast(ski);
         }
     }
--- a/src/java.base/solaris/native/libnio/ch/DevPollArrayWrapper.c	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/solaris/native/libnio/ch/DevPollArrayWrapper.c	Fri Apr 06 17:06:58 2018 -0400
@@ -23,84 +23,20 @@
  * questions.
  */
 
+#include <sys/devpoll.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <poll.h>
+
 #include "jni.h"
 #include "jni_util.h"
 #include "jvm.h"
 #include "jlong.h"
-#include "sun_nio_ch_DevPollArrayWrapper.h"
-#include <poll.h>
-#include <unistd.h>
-#include <sys/time.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-typedef uint32_t        caddr32_t;
-
-/* /dev/poll ioctl */
-#define         DPIOC   (0xD0 << 8)
-#define DP_POLL         (DPIOC | 1)     /* poll on fds in cached in /dev/poll */
-#define DP_ISPOLLED     (DPIOC | 2)     /* is this fd cached in /dev/poll */
-#define DEVPOLLSIZE     1000            /* /dev/poll table size increment */
-#define POLLREMOVE      0x0800          /* Removes fd from monitored set */
-
-/*
- * /dev/poll DP_POLL ioctl format
- */
-typedef struct dvpoll {
-        pollfd_t        *dp_fds;        /* pollfd array */
-        nfds_t          dp_nfds;        /* num of pollfd's in dp_fds[] */
-        int             dp_timeout;     /* time out in millisec */
-} dvpoll_t;
-
-typedef struct dvpoll32 {
-        caddr32_t       dp_fds;         /* pollfd array */
-        uint32_t        dp_nfds;        /* num of pollfd's in dp_fds[] */
-        int32_t         dp_timeout;     /* time out in millisec */
-} dvpoll32_t;
-
-#ifdef  __cplusplus
-}
-#endif
+#include "nio.h"
+#include "nio_util.h"
 
-#define RESTARTABLE(_cmd, _result) do { \
-  do { \
-    _result = _cmd; \
-  } while((_result == -1) && (errno == EINTR)); \
-} while(0)
-
-static int
-idevpoll(jint wfd, int dpctl, struct dvpoll a)
-{
-    jlong start, now;
-    int remaining = a.dp_timeout;
-    struct timeval t;
-    int diff;
-
-    gettimeofday(&t, NULL);
-    start = t.tv_sec * 1000 + t.tv_usec / 1000;
-
-    for (;;) {
-        /*  poll(7d) ioctl does not return remaining count */
-        int res = ioctl(wfd, dpctl, &a);
-        if (res < 0 && errno == EINTR) {
-            if (remaining >= 0) {
-                gettimeofday(&t, NULL);
-                now = t.tv_sec * 1000 + t.tv_usec / 1000;
-                diff = now - start;
-                remaining -= diff;
-                if (diff < 0 || remaining <= 0) {
-                    return 0;
-                }
-                start = now;
-                a.dp_timeout = remaining;
-            }
-        } else {
-            return res;
-        }
-    }
-}
+#include "sun_nio_ch_DevPollArrayWrapper.h"
 
 JNIEXPORT jint JNICALL
 Java_sun_nio_ch_DevPollArrayWrapper_init(JNIEnv *env, jobject this)
@@ -153,26 +89,24 @@
 
 JNIEXPORT jint JNICALL
 Java_sun_nio_ch_DevPollArrayWrapper_poll0(JNIEnv *env, jobject this,
-                                       jlong address, jint numfds,
-                                       jlong timeout, jint wfd)
+                                          jlong address, jint numfds,
+                                          jlong timeout, jint wfd)
 {
     struct dvpoll a;
     void *pfd = (void *) jlong_to_ptr(address);
-    int result = 0;
+    int result;
 
     a.dp_fds = pfd;
     a.dp_nfds = numfds;
     a.dp_timeout = (int)timeout;
-
-    if (timeout <= 0) {             /* Indefinite or no wait */
-        RESTARTABLE (ioctl(wfd, DP_POLL, &a), result);
-    } else {                        /* Bounded wait; bounded restarts */
-        result = idevpoll(wfd, DP_POLL, a);
-    }
-
+    result = ioctl(wfd, DP_POLL, &a);
     if (result < 0) {
-        JNU_ThrowIOExceptionWithLastError(env, "Error reading driver");
-        return -1;
+        if (errno == EINTR) {
+            return IOS_INTERRUPTED;
+        } else {
+            JNU_ThrowIOExceptionWithLastError(env, "Error reading driver");
+            return IOS_THROWN;
+        }
     }
     return result;
 }
--- a/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java	Fri Apr 06 17:06:58 2018 -0400
@@ -60,7 +60,6 @@
     // pending updates, queued by putEventOps
     private final Object updateLock = new Object();
     private final Deque<SelectionKeyImpl> updateKeys = new ArrayDeque<>();
-    private final Deque<Integer> updateEvents = new ArrayDeque<>();
 
     // interrupt triggering and clearing
     private final Object interruptLock = new Object();
@@ -136,10 +135,9 @@
         assert Thread.holdsLock(this);
 
         synchronized (updateLock) {
-            assert updateKeys.size() == updateEvents.size();
             SelectionKeyImpl ski;
             while ((ski = updateKeys.pollFirst()) != null) {
-                int newEvents = updateEvents.pollFirst();
+                int newEvents = ski.translateInterestOps();
                 if (ski.isValid()) {
                     int index = ski.getIndex();
                     assert index >= 0 && index < pollArraySize;
@@ -173,14 +171,14 @@
             int rOps = getReventOps(i);
             if (rOps != 0) {
                 SelectionKeyImpl ski = pollKeys.get(i);
-                assert ski.channel.getFDVal() == getDescriptor(i);
+                assert ski.getFDVal() == getDescriptor(i);
                 if (ski.isValid()) {
                     if (selectedKeys.contains(ski)) {
-                        if (ski.channel.translateAndSetReadyOps(rOps, ski)) {
+                        if (ski.translateAndUpdateReadyOps(rOps)) {
                             numKeysUpdated++;
                         }
                     } else {
-                        ski.channel.translateAndSetReadyOps(rOps, ski);
+                        ski.translateAndSetReadyOps(rOps);
                         if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) {
                             selectedKeys.add(ski);
                             numKeysUpdated++;
@@ -233,10 +231,9 @@
     }
 
     @Override
-    public void putEventOps(SelectionKeyImpl ski, int events) {
+    public void setEventOps(SelectionKeyImpl ski) {
         ensureOpen();
         synchronized (updateLock) {
-            updateEvents.addLast(events);  // events first in case adding key fails
             updateKeys.addLast(ski);
         }
     }
@@ -285,7 +282,7 @@
 
         int index = pollArraySize;
         assert index > 0;
-        putDescriptor(index, ski.channel.getFDVal());
+        putDescriptor(index, ski.getFDVal());
         putEventOps(index, ops);
         putReventOps(index, 0);
         ski.setIndex(index);
@@ -301,7 +298,7 @@
     private void update(SelectionKeyImpl ski, int ops) {
         int index = ski.getIndex();
         assert index > 0 && index < pollArraySize;
-        assert getDescriptor(index) == ski.channel.getFDVal();
+        assert getDescriptor(index) == ski.getFDVal();
         putEventOps(index, ops);
     }
 
@@ -311,7 +308,7 @@
     private void remove(SelectionKeyImpl ski) {
         int index = ski.getIndex();
         assert index > 0 && index < pollArraySize;
-        assert getDescriptor(index) == ski.channel.getFDVal();
+        assert getDescriptor(index) == ski.getFDVal();
 
         // replace pollfd at index with the last pollfd in array
         int lastIndex = pollArraySize - 1;
@@ -321,7 +318,7 @@
             int lastFd = getDescriptor(lastIndex);
             int lastOps = getEventOps(lastIndex);
             int lastRevents = getReventOps(lastIndex);
-            assert lastKey.channel.getFDVal() == lastFd;
+            assert lastKey.getFDVal() == lastFd;
             putDescriptor(index, lastFd);
             putEventOps(index, lastOps);
             putReventOps(index, lastRevents);
--- a/src/java.base/windows/classes/sun/nio/ch/PollArrayWrapper.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/windows/classes/sun/nio/ch/PollArrayWrapper.java	Fri Apr 06 17:06:58 2018 -0400
@@ -64,7 +64,7 @@
 
     // Prepare another pollfd struct for use.
     void putEntry(int index, SelectionKeyImpl ski) {
-        putDescriptor(index, ski.channel.getFDVal());
+        putDescriptor(index, ski.getFDVal());
         putEventOps(index, 0);
     }
 
--- a/src/java.base/windows/classes/sun/nio/ch/WindowsSelectorImpl.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.base/windows/classes/sun/nio/ch/WindowsSelectorImpl.java	Fri Apr 06 17:06:58 2018 -0400
@@ -83,12 +83,12 @@
             return get(Integer.valueOf(desc));
         }
         private MapEntry put(SelectionKeyImpl ski) {
-            return put(Integer.valueOf(ski.channel.getFDVal()), new MapEntry(ski));
+            return put(Integer.valueOf(ski.getFDVal()), new MapEntry(ski));
         }
         private MapEntry remove(SelectionKeyImpl ski) {
-            Integer fd = Integer.valueOf(ski.channel.getFDVal());
+            Integer fd = Integer.valueOf(ski.getFDVal());
             MapEntry x = get(fd);
-            if ((x != null) && (x.ski.channel == ski.channel))
+            if ((x != null) && (x.ski.channel() == ski.channel()))
                 return remove(fd);
             return null;
         }
@@ -98,7 +98,6 @@
     private static final class MapEntry {
         final SelectionKeyImpl ski;
         long updateCount = 0;
-        long clearedCount = 0;
         MapEntry(SelectionKeyImpl ski) {
             this.ski = ski;
         }
@@ -114,11 +113,10 @@
     private final Object interruptLock = new Object();
     private volatile boolean interruptTriggered;
 
-    // pending new registrations/updates, queued by implRegister and putEventOps
+    // pending new registrations/updates, queued by implRegister and setEventOps
     private final Object updateLock = new Object();
     private final Deque<SelectionKeyImpl> newKeys = new ArrayDeque<>();
     private final Deque<SelectionKeyImpl> updateKeys = new ArrayDeque<>();
-    private final Deque<Integer> updateEvents = new ArrayDeque<>();
 
 
     WindowsSelectorImpl(SelectorProvider sp) throws IOException {
@@ -204,10 +202,9 @@
             }
 
             // changes to interest ops
-            assert updateKeys.size() == updateEvents.size();
             while ((ski = updateKeys.pollFirst()) != null) {
-                int events = updateEvents.pollFirst();
-                int fd = ski.channel.getFDVal();
+                int events = ski.translateInterestOps();
+                int fd = ski.getFDVal();
                 if (ski.isValid() && fdMap.containsKey(fd)) {
                     int index = ski.getIndex();
                     assert index >= 0 && index < totalChannels;
@@ -370,12 +367,10 @@
         }
 
         /**
-         * Note, clearedCount is used to determine if the readyOps have
-         * been reset in this select operation. updateCount is used to
-         * tell if a key has been counted as updated in this select
-         * operation.
+         * updateCount is used to tell if a key has been counted as updated
+         * in this select operation.
          *
-         * me.updateCount <= me.clearedCount <= updateCount
+         * me.updateCount <= updateCount
          */
         private int processFDSet(long updateCount, int[] fds, int rOps,
                                  boolean isExceptFds)
@@ -407,37 +402,19 @@
                 }
 
                 if (selectedKeys.contains(sk)) { // Key in selected set
-                    if (me.clearedCount != updateCount) {
-                        if (sk.channel.translateAndSetReadyOps(rOps, sk) &&
-                            (me.updateCount != updateCount)) {
-                            me.updateCount = updateCount;
-                            numKeysUpdated++;
-                        }
-                    } else { // The readyOps have been set; now add
-                        if (sk.channel.translateAndUpdateReadyOps(rOps, sk) &&
-                            (me.updateCount != updateCount)) {
+                    if (sk.translateAndUpdateReadyOps(rOps)) {
+                        if (me.updateCount != updateCount) {
                             me.updateCount = updateCount;
                             numKeysUpdated++;
                         }
                     }
-                    me.clearedCount = updateCount;
                 } else { // Key is not in selected set yet
-                    if (me.clearedCount != updateCount) {
-                        sk.channel.translateAndSetReadyOps(rOps, sk);
-                        if ((sk.nioReadyOps() & sk.nioInterestOps()) != 0) {
-                            selectedKeys.add(sk);
-                            me.updateCount = updateCount;
-                            numKeysUpdated++;
-                        }
-                    } else { // The readyOps have been set; now add
-                        sk.channel.translateAndUpdateReadyOps(rOps, sk);
-                        if ((sk.nioReadyOps() & sk.nioInterestOps()) != 0) {
-                            selectedKeys.add(sk);
-                            me.updateCount = updateCount;
-                            numKeysUpdated++;
-                        }
+                    sk.translateAndSetReadyOps(rOps);
+                    if ((sk.nioReadyOps() & sk.nioInterestOps()) != 0) {
+                        selectedKeys.add(sk);
+                        me.updateCount = updateCount;
+                        numKeysUpdated++;
                     }
-                    me.clearedCount = updateCount;
                 }
             }
             return numKeysUpdated;
@@ -613,10 +590,9 @@
     }
 
     @Override
-    public void putEventOps(SelectionKeyImpl ski, int events) {
+    public void setEventOps(SelectionKeyImpl ski) {
         ensureOpen();
         synchronized (updateLock) {
-            updateEvents.addLast(events);  // events first in case adding key fails
             updateKeys.addLast(ski);
         }
     }
--- a/src/java.desktop/share/classes/sun/applet/AppletSecurity.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.desktop/share/classes/sun/applet/AppletSecurity.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -371,30 +371,6 @@
     }
 
     /**
-     * Tests if a client can get access to the AWT event queue.
-     * <p>
-     * This method calls {@code checkPermission} with the
-     * {@code AWTPermission("accessEventQueue")} permission.
-     *
-     * @since   1.1
-     * @exception  SecurityException  if the caller does not have
-     *             permission to access the AWT event queue.
-     */
-    @SuppressWarnings({"deprecation",
-                       "removal"}) //  SecurityManager.checkAwtEventQueueAccess
-    public void checkAwtEventQueueAccess() {
-        AppContext appContext = AppContext.getAppContext();
-        AppletClassLoader appletClassLoader = currentAppletClassLoader();
-
-        if (AppContext.isMainContext(appContext) && (appletClassLoader != null)) {
-            // If we're about to allow access to the main EventQueue,
-            // and anything untrusted is on the class context stack,
-            // disallow access.
-            super.checkPermission(AWTPermissions.CHECK_AWT_EVENTQUEUE_PERMISSION);
-        }
-    } // checkAwtEventQueueAccess()
-
-    /**
      * Returns the thread group of the applet. We consult the classloader
      * if there is one.
      */
--- a/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -188,10 +188,7 @@
             {"appletsecurityexception.checkpackageaccess", "Security Exception: cannot access package: {0}"},
             {"appletsecurityexception.checkpackagedefinition", "Security Exception: cannot define package: {0}"},
             {"appletsecurityexception.cannotsetfactory", "Security Exception: cannot set factory"},
-            {"appletsecurityexception.checkmemberaccess", "Security Exception: check member access"},
             {"appletsecurityexception.checkgetprintjob", "Security Exception: getPrintJob"},
-            {"appletsecurityexception.checksystemclipboardaccess", "Security Exception: getSystemClipboard"},
-            {"appletsecurityexception.checkawteventqueueaccess", "Security Exception: getEventQueue"},
             {"appletsecurityexception.checksecurityaccess", "Security Exception: security operation: {0}"},
             {"appletsecurityexception.getsecuritycontext.unknown", "unknown class loader type. unable to check for getContext"},
             {"appletsecurityexception.checkread.unknown", "unknown class loader type. unable to check for checking read {0}"},
--- a/src/java.logging/share/classes/java/util/logging/Logger.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.logging/share/classes/java/util/logging/Logger.java	Fri Apr 06 17:06:58 2018 -0400
@@ -640,7 +640,7 @@
                     return System.getProperty(key);
                 }
             });
-            return Boolean.valueOf(s);
+            return Boolean.parseBoolean(s);
         }
     }
 
--- a/src/java.xml/share/classes/javax/xml/transform/package-info.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.xml/share/classes/javax/xml/transform/package-info.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * 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 @@
  * {@link javax.xml.transform.stax}, and {@link javax.xml.transform.stream}.
  *
  *
- * <h3>Creating Objects</h3>
+ * <h2>Creating Objects</h2>
  *
  * <p>
  * The API allows a concrete {@link javax.xml.transform.TransformerFactory}
@@ -46,7 +46,7 @@
  * {@link javax.xml.transform.TransformerFactory#newInstance}.
  *
  *
- * <h3>Specification of Inputs and Outputs</h3>
+ * <h2>Specification of Inputs and Outputs</h2>
  *
  * <p>
  * This API defines two interface objects called {@link javax.xml.transform.Source}
@@ -77,9 +77,7 @@
  * </pre>
  *
  *
- * <h3>
- * <a id="qname-delimiter">Qualified Name Representation</a>
- * </h3>
+ * <h2><a id="qname-delimiter">Qualified Name Representation</a></h2>
  *
  * <p>
  * <a href="http://www.w3.org/TR/REC-xml-names">Namespaces</a> present something
@@ -112,7 +110,7 @@
  * prefix is lost.
  *
  *
- * <h3>Result Tree Serialization</h3>
+ * <h2>Result Tree Serialization</h2>
  *
  * <p>
  * Serialization of the result tree to a stream can be controlled with the
@@ -141,7 +139,7 @@
  * the source to the result. This method may be used to create a DOM from SAX
  * events or to create an XML or HTML stream from a DOM or SAX events.
  *
- * <h3>Exceptions and Error Reporting</h3>
+ * <h2>Exceptions and Error Reporting</h2>
  *
  * <p>
  * The transformation API throw three types of specialized exceptions. A
@@ -192,7 +190,7 @@
  * errors.
  *
  *
- * <h3>Resolution of URIs within a transformation</h3>
+ * <h2>Resolution of URIs within a transformation</h2>
  *
  * <p>
  * The API provides a way for URIs referenced from within the stylesheet
--- a/src/java.xml/share/classes/javax/xml/xpath/package-info.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/java.xml/share/classes/javax/xml/xpath/package-info.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,7 +50,7 @@
  * </ul>
  * <p>
  * <a id="XPath.Overview"></a>
- * <h3>1. XPath Overview</h3>
+ * <h2>1. XPath Overview</h2>
  *
  * <p>
  * The XPath language provides a simple, concise syntax for selecting
@@ -69,7 +69,7 @@
  *
  *
  * <a id="XPath.Expressions"></a>
- * <h3>2. XPath Expressions</h3>
+ * <h2>2. XPath Expressions</h2>
  *
  * <p>
  * An XPath <em>expression</em> is composed of a <em>location
@@ -211,7 +211,7 @@
  * </blockquote>
  *
  * <a id="XPath.Datatypes"></a>
- * <h3>3. XPath Data Types</h3>
+ * <h2>3. XPath Data Types</h2>
  *
  * <p>
  * While XPath expressions select nodes in the XML document, the XPath
@@ -225,7 +225,7 @@
  * </ul>
  *
  * <a id="XPath.Datatypes.QName"></a>
- * <h3>3.1 QName types</h3>
+ * <h2>3.1 QName types</h2>
  * The XPath API defines the following {@link javax.xml.namespace.QName} types to
  * represent return types of an XPath evaluation:
  * <ul>
@@ -258,7 +258,7 @@
  * of a node to a <code>double</code> data type.
  *
  * <a id="XPath.Datatypes.Class"></a>
- * <h3>3.2 Class types</h3>
+ * <h2>3.2 Class types</h2>
  * In addition to the QName types, the XPath API supports the use of Class types
  * through the <code>XPathExpression.evaluteExpression(...)</code> or
  * <code>XPath.evaluateExpression(...)</code> methods.
@@ -276,14 +276,14 @@
  * Of the subtypes of Number, only Double, Integer and Long are supported.
  *
  * <a id="XPath.Datatypes.Enum"></a>
- * <h3>3.3 Enum types</h3>
+ * <h2>3.3 Enum types</h2>
  * Enum types are defined in {@link javax.xml.xpath.XPathEvaluationResult.XPathResultType}
  * that provide mappings between the QName and Class types above. The result of
  * evaluating an expression using the <code>XPathExpression.evaluteExpression(...)</code>
  * or <code>XPath.evaluateExpression(...)</code> methods will be of one of these types.
  *
  * <a id="XPath.Context"></a>
- * <h3>4. XPath Context</h3>
+ * <h2>4. XPath Context</h2>
  *
  * <p>
  * XPath location paths may be relative to a particular node in the
@@ -301,7 +301,7 @@
  * {@link org.w3c.dom.Node} for example, in the JDK implementation.
  *
  * <a id="XPath.Use"></a>
- * <h3>5. Using the XPath API</h3>
+ * <h2>5. Using the XPath API</h2>
  *
  * Consider the following XML document:
  * <blockquote>
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Fri Apr 06 17:06:58 2018 -0400
@@ -183,15 +183,7 @@
         public int hashCode() {
             int hashCode = this.hashCode;
             if (hashCode == 0) {
-                this.hashCode = hashCode = TreeHasher.hash(tree, sym -> {
-                    if (sym.owner == symbol) {
-                        int idx = symbol.params().indexOf(sym);
-                        if (idx != -1) {
-                            return idx;
-                        }
-                    }
-                    return null;
-                });
+                this.hashCode = hashCode = TreeHasher.hash(tree, symbol.params());
             }
             return hashCode;
         }
@@ -203,17 +195,7 @@
             }
             DedupedLambda that = (DedupedLambda) o;
             return types.isSameType(symbol.asType(), that.symbol.asType())
-                    && new TreeDiffer((lhs, rhs) -> {
-                if (lhs.owner == symbol) {
-                    int idx = symbol.params().indexOf(lhs);
-                    if (idx != -1) {
-                        if (Objects.equals(idx, that.symbol.params().indexOf(rhs))) {
-                            return true;
-                        }
-                    }
-                }
-                return null;
-            }).scan(tree, that.tree);
+                    && new TreeDiffer(symbol.params(), that.symbol.params()).scan(tree, that.tree);
         }
     }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeDiffer.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeDiffer.java	Fri Apr 06 17:06:58 2018 -0400
@@ -89,24 +89,34 @@
 import com.sun.tools.javac.tree.TreeInfo;
 import com.sun.tools.javac.tree.TreeScanner;
 import com.sun.tools.javac.util.List;
-
-import javax.lang.model.element.ElementKind;
+import java.util.Collection;
+import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Map;
 import java.util.Objects;
-import java.util.function.BiFunction;
-import java.util.function.Consumer;
 
 /** A visitor that compares two lambda bodies for structural equality. */
 public class TreeDiffer extends TreeScanner {
 
-    private BiFunction<Symbol, Symbol, Boolean> symbolDiffer;
+    public TreeDiffer(
+            Collection<? extends Symbol> symbols, Collection<? extends Symbol> otherSymbols) {
+        this.equiv = equiv(symbols, otherSymbols);
+    }
 
-    public TreeDiffer(BiFunction<Symbol, Symbol, Boolean> symbolDiffer) {
-        this.symbolDiffer = Objects.requireNonNull(symbolDiffer);
+    private static Map<Symbol, Symbol> equiv(
+            Collection<? extends Symbol> symbols, Collection<? extends Symbol> otherSymbols) {
+        Map<Symbol, Symbol> result = new HashMap<>();
+        Iterator<? extends Symbol> it = otherSymbols.iterator();
+        for (Symbol symbol : symbols) {
+            if (!it.hasNext()) break;
+            result.put(symbol, it.next());
+        }
+        return result;
     }
 
     private JCTree parameter;
     private boolean result;
+    private Map<Symbol, Symbol> equiv = new HashMap<>();
 
     public boolean scan(JCTree tree, JCTree parameter) {
         if (tree == null || parameter == null) {
@@ -172,9 +182,8 @@
         Symbol symbol = tree.sym;
         Symbol otherSymbol = that.sym;
         if (symbol != null && otherSymbol != null) {
-            Boolean tmp = symbolDiffer.apply(symbol, otherSymbol);
-            if (tmp != null) {
-                result = tmp;
+            if (Objects.equals(equiv.get(symbol), otherSymbol)) {
+                result = true;
                 return;
             }
         }
@@ -598,6 +607,10 @@
                         && scan(tree.nameexpr, that.nameexpr)
                         && scan(tree.vartype, that.vartype)
                         && scan(tree.init, that.init);
+        if (!result) {
+            return;
+        }
+        equiv.put(tree.sym, that.sym);
     }
 
     @Override
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeHasher.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeHasher.java	Fri Apr 06 17:06:58 2018 -0400
@@ -30,26 +30,31 @@
 import com.sun.tools.javac.tree.JCTree.JCFieldAccess;
 import com.sun.tools.javac.tree.JCTree.JCIdent;
 import com.sun.tools.javac.tree.JCTree.JCLiteral;
+import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
 import com.sun.tools.javac.tree.TreeInfo;
 import com.sun.tools.javac.tree.TreeScanner;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.Objects;
-import java.util.function.Function;
 
 /** A tree visitor that computes a hash code. */
 public class TreeHasher extends TreeScanner {
 
-    private final Function<Symbol, Integer> symbolHasher;
+    private final Map<Symbol, Integer> symbolHashes;
     private int result = 17;
 
-    public TreeHasher(Function<Symbol, Integer> symbolHasher) {
-        this.symbolHasher = Objects.requireNonNull(symbolHasher);
+    public TreeHasher(Map<Symbol, Integer> symbolHashes) {
+        this.symbolHashes = Objects.requireNonNull(symbolHashes);
     }
 
-    public static int hash(JCTree tree, Function<Symbol, Integer> symbolHasher) {
+    public static int hash(JCTree tree, Collection<? extends Symbol> symbols) {
         if (tree == null) {
             return 0;
         }
-        TreeHasher hasher = new TreeHasher(symbolHasher);
+        Map<Symbol, Integer> symbolHashes = new HashMap<>();
+        symbols.forEach(s -> symbolHashes.put(s, symbolHashes.size()));
+        TreeHasher hasher = new TreeHasher(symbolHashes);
         tree.accept(hasher);
         return hasher.result;
     }
@@ -85,7 +90,7 @@
     public void visitIdent(JCIdent tree) {
         Symbol sym = tree.sym;
         if (sym != null) {
-            Integer hash = symbolHasher.apply(sym);
+            Integer hash = symbolHashes.get(sym);
             if (hash != null) {
                 hash(hash);
                 return;
@@ -99,4 +104,10 @@
         hash(tree.sym);
         super.visitSelect(tree);
     }
+
+    @Override
+    public void visitVarDef(JCVariableDecl tree) {
+        symbolHashes.computeIfAbsent(tree.sym, k -> symbolHashes.size());
+        super.visitVarDef(tree);
+    }
 }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java	Fri Apr 06 17:06:58 2018 -0400
@@ -520,24 +520,24 @@
 
     XDIAGS("-Xdiags:", "opt.diags", EXTENDED, BASIC, ONEOF, "compact", "verbose"),
 
-    DEBUG("--debug:", null, HIDDEN, BASIC) {
+    DEBUG("--debug", null, HIDDEN, BASIC, ArgKind.REQUIRED) {
         @Override
-        public void process(OptionHelper helper, String option) throws InvalidValueException {
-            HiddenGroup.DEBUG.process(helper, option);
+        public void process(OptionHelper helper, String option, String arg) throws InvalidValueException {
+            HiddenGroup.DEBUG.process(helper, option, arg);
         }
     },
 
-    SHOULDSTOP("--should-stop:", null, HIDDEN, BASIC) {
+    SHOULDSTOP("--should-stop", null, HIDDEN, BASIC, ArgKind.REQUIRED) {
         @Override
-        public void process(OptionHelper helper, String option) throws InvalidValueException {
-            HiddenGroup.SHOULDSTOP.process(helper, option);
+        public void process(OptionHelper helper, String option, String arg) throws InvalidValueException {
+            HiddenGroup.SHOULDSTOP.process(helper, option, arg);
         }
     },
 
-    DIAGS("--diags:", null, HIDDEN, BASIC) {
+    DIAGS("--diags", null, HIDDEN, BASIC, ArgKind.REQUIRED) {
         @Override
-        public void process(OptionHelper helper, String option) throws InvalidValueException {
-            HiddenGroup.DIAGS.process(helper, option);
+        public void process(OptionHelper helper, String option, String arg) throws InvalidValueException {
+            HiddenGroup.DIAGS.process(helper, option, arg);
         }
     },
 
@@ -846,27 +846,19 @@
         DEBUG("debug"),
         SHOULDSTOP("should-stop");
 
-        static final Set<String> skipSet = new java.util.HashSet<>(
-                Arrays.asList("--diags:", "--debug:", "--should-stop:"));
-
         final String text;
 
         HiddenGroup(String text) {
             this.text = text;
         }
 
-        public void process(OptionHelper helper, String option) throws InvalidValueException {
-            String p = option.substring(option.indexOf(':') + 1).trim();
-            String[] subOptions = p.split(";");
+        public void process(OptionHelper helper, String option, String arg) throws InvalidValueException {
+            String[] subOptions = arg.split(";");
             for (String subOption : subOptions) {
                 subOption = text + "." + subOption.trim();
                 XD.process(helper, subOption, subOption);
             }
         }
-
-        static boolean skip(String name) {
-            return skipSet.contains(name);
-        }
     }
 
     /**
@@ -957,6 +949,11 @@
         this(text, null, descrKey, kind, group, null, null, ArgKind.NONE);
     }
 
+    Option(String text, String descrKey,
+            OptionKind kind, OptionGroup group, ArgKind argKind) {
+        this(text, null, descrKey, kind, group, null, null, argKind);
+    }
+
     Option(String text, String argsNameKey, String descrKey,
             OptionKind kind, OptionGroup group) {
         this(text, argsNameKey, descrKey, kind, group, null, null, ArgKind.REQUIRED);
@@ -1025,7 +1022,7 @@
     }
 
     private boolean matches(String option, String name) {
-        if (name.startsWith("--") && !HiddenGroup.skip(name)) {
+        if (name.startsWith("--")) {
             return option.equals(name)
                     || hasArg() && option.startsWith(name + "=");
         }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Fri Apr 06 17:06:58 2018 -0400
@@ -3106,35 +3106,34 @@
             name = token.name();
             nextToken();
         } else {
-            if (allowThisIdent && !lambdaParameter) {
+            if (allowThisIdent ||
+                !lambdaParameter ||
+                LAX_IDENTIFIER.accepts(token.kind) ||
+                mods.flags != Flags.PARAMETER ||
+                mods.annotations.nonEmpty()) {
                 JCExpression pn = qualident(false);
                 if (pn.hasTag(Tag.IDENT) && ((JCIdent)pn).name != names._this) {
                     name = ((JCIdent)pn).name;
                 } else {
-                    if ((mods.flags & Flags.VARARGS) != 0) {
-                        log.error(token.pos, Errors.VarargsAndReceiver);
-                    }
-                    if (token.kind == LBRACKET) {
-                        log.error(token.pos, Errors.ArrayAndReceiver);
+                    if (allowThisIdent) {
+                        if ((mods.flags & Flags.VARARGS) != 0) {
+                            log.error(token.pos, Errors.VarargsAndReceiver);
+                        }
+                        if (token.kind == LBRACKET) {
+                            log.error(token.pos, Errors.ArrayAndReceiver);
+                        }
                     }
                     return toP(F.at(pos).ReceiverVarDef(mods, pn, type));
                 }
             } else {
-                if (!lambdaParameter ||
-                        LAX_IDENTIFIER.accepts(token.kind) ||
-                        mods.flags != Flags.PARAMETER ||
-                        mods.annotations.nonEmpty()) {
-                    name = ident();
-                } else {
-                    /** if it is a lambda parameter and the token kind is not an identifier,
-                     *  and there are no modifiers or annotations, then this means that the compiler
-                     *  supposed the lambda to be explicit but it can contain a mix of implicit,
-                     *  var or explicit parameters. So we assign the error name to the parameter name
-                     *  instead of issuing an error and analyze the lambda parameters as a whole at
-                     *  a higher level.
-                     */
-                    name = names.empty;
-                }
+                /** if it is a lambda parameter and the token kind is not an identifier,
+                 *  and there are no modifiers or annotations, then this means that the compiler
+                 *  supposed the lambda to be explicit but it can contain a mix of implicit,
+                 *  var or explicit parameters. So we assign the error name to the parameter name
+                 *  instead of issuing an error and analyze the lambda parameters as a whole at
+                 *  a higher level.
+                 */
+                name = names.empty;
             }
         }
         if ((mods.flags & Flags.VARARGS) != 0 &&
@@ -3905,7 +3904,7 @@
         JCVariableDecl lastParam;
         accept(LPAREN);
         if (token.kind != RPAREN) {
-            this.allowThisIdent = true;
+            this.allowThisIdent = !lambdaParameters;
             lastParam = formalParameter(lambdaParameters);
             if (lastParam.nameexpr != null) {
                 this.receiverParam = lastParam;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Apr 06 17:06:58 2018 -0400
@@ -2740,7 +2740,8 @@
 
 # TODO 308: make a better error message
 compiler.err.this.as.identifier=\
-    as of release 8, ''this'' is allowed as the parameter name for the receiver type only, which has to be the first parameter
+    as of release 8, ''this'' is allowed as the parameter name for the receiver type only\n\
+    which has to be the first parameter, and cannot be a lambda parameter
 
 compiler.err.receiver.parameter.not.applicable.constructor.toplevel.class=\
     receiver parameter not applicable for constructor of top-level class
--- a/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Options.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Options.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -313,7 +313,7 @@
         }
 
         // Enable dependency generation
-        args.add("--debug:completionDeps=source,class");
+        args.add("--debug=completionDeps=source,class");
 
         // This can't be anything but 'none'. Enforced by sjavac main method.
         args.add("-implicit:" + implicitPolicy);
--- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java	Fri Apr 06 17:06:58 2018 -0400
@@ -81,6 +81,7 @@
 import jdk.jshell.ImportSnippet;
 import jdk.jshell.JShell;
 import jdk.jshell.JShell.Subscription;
+import jdk.jshell.JShellException;
 import jdk.jshell.MethodSnippet;
 import jdk.jshell.Snippet;
 import jdk.jshell.Snippet.Kind;
@@ -3357,21 +3358,61 @@
     /**
      * Print out a snippet exception.
      *
-     * @param exception the exception to print
+     * @param exception the throwable to print
      * @return true on fatal exception
      */
-    private boolean displayException(Exception exception) {
+    private boolean displayException(Throwable exception) {
+        Throwable rootCause = exception;
+        while (rootCause instanceof EvalException) {
+            rootCause = rootCause.getCause();
+        }
+        if (rootCause != exception && rootCause instanceof UnresolvedReferenceException) {
+            // An unresolved reference caused a chained exception, just show the unresolved
+            return displayException(rootCause, null);
+        } else {
+            return displayException(exception, null);
+        }
+    }
+    //where
+    private boolean displayException(Throwable exception, StackTraceElement[] caused) {
         if (exception instanceof EvalException) {
-            printEvalException((EvalException) exception);
-            return true;
+            // User exception
+            return displayEvalException((EvalException) exception, caused);
         } else if (exception instanceof UnresolvedReferenceException) {
-            printUnresolvedException((UnresolvedReferenceException) exception);
-            return false;
+            // Reference to an undefined snippet
+            return displayUnresolvedException((UnresolvedReferenceException) exception);
         } else {
+            // Should never occur
             error("Unexpected execution exception: %s", exception);
             return true;
         }
     }
+    //where
+    private boolean displayUnresolvedException(UnresolvedReferenceException ex) {
+        // Display the resolution issue
+        printSnippetStatus(ex.getSnippet(), false);
+        return false;
+    }
+
+    //where
+    private boolean displayEvalException(EvalException ex, StackTraceElement[] caused) {
+        // The message for the user exception is configured based on the
+        // existance of an exception message and if this is a recursive
+        // invocation for a chained exception.
+        String msg = ex.getMessage();
+        String key = "jshell.err.exception" +
+                (caused == null? ".thrown" : ".cause") +
+                (msg == null? "" : ".message");
+        errormsg(key, ex.getExceptionClassName(), msg);
+        // The caused trace is sent to truncate duplicate elements in the cause trace
+        printStackTrace(ex.getStackTrace(), caused);
+        JShellException cause = ex.getCause();
+        if (cause != null) {
+            // Display the cause (recursively)
+            displayException(cause, ex.getStackTrace());
+        }
+        return true;
+    }
 
     /**
      * Display a list of diagnostics.
@@ -3518,9 +3559,19 @@
         }
         return false;
     }
-    //where
-    void printStackTrace(StackTraceElement[] stes) {
-        for (StackTraceElement ste : stes) {
+
+    // Print a stack trace, elide frames displayed for the caused exception
+    void printStackTrace(StackTraceElement[] stes, StackTraceElement[] caused) {
+        int overlap = 0;
+        if (caused != null) {
+            int maxOverlap = Math.min(stes.length, caused.length);
+            while (overlap < maxOverlap
+                    && stes[stes.length - (overlap + 1)].equals(caused[caused.length - (overlap + 1)])) {
+                ++overlap;
+            }
+        }
+        for (int i = 0; i < stes.length - overlap; ++i) {
+            StackTraceElement ste = stes[i];
             StringBuilder sb = new StringBuilder();
             String cn = ste.getClassName();
             if (!cn.isEmpty()) {
@@ -3548,19 +3599,9 @@
             error("      at %s(%s)", sb, loc);
 
         }
-    }
-    //where
-    void printUnresolvedException(UnresolvedReferenceException ex) {
-        printSnippetStatus(ex.getSnippet(), false);
-    }
-    //where
-    void printEvalException(EvalException ex) {
-        if (ex.getMessage() == null) {
-            error("%s thrown", ex.getExceptionClassName());
-        } else {
-            error("%s thrown: %s", ex.getExceptionClassName(), ex.getMessage());
+        if (overlap != 0) {
+            error("      ...");
         }
-        printStackTrace(ex.getStackTrace());
     }
 
     private FormatAction toAction(Status status, Status previousStatus, boolean isSignatureChange) {
--- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties	Fri Apr 06 17:06:58 2018 -0400
@@ -163,6 +163,11 @@
 
 jshell.err.corrupted.stored.startup = Corrupted stored startup, using default -- {0}
 
+jshell.err.exception.thrown = Exception {0}
+jshell.err.exception.thrown.message = Exception {0}: {1}
+jshell.err.exception.cause = Caused by: {0}
+jshell.err.exception.cause.message = Caused by: {0}: {1}
+
 jshell.console.see.synopsis = <press tab again to see synopsis>
 jshell.console.see.full.documentation = <press tab again to see full documentation>
 jshell.console.see.documentation = <press tab again to see documentation>
--- a/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Fri Apr 06 17:06:58 2018 -0400
@@ -850,17 +850,15 @@
                             ? expunge(value)
                             : "";
                 } catch (ResolutionException ex) {
-                    DeclarationSnippet sn = (DeclarationSnippet) state.maps.getSnippetDeadOrAlive(ex.id());
-                    exception = new UnresolvedReferenceException(sn, translateExceptionStack(ex));
+                    exception = asUnresolvedReferenceException(ex);
                 } catch (UserException ex) {
-                    exception = new EvalException(ex.getMessage(),
-                            ex.causeExceptionClass(),
-                            translateExceptionStack(ex));
+                    exception = asEvalException(ex);
                 } catch (RunException ex) {
                     // StopException - no-op
                 } catch (InternalException ex) {
                     state.debug(ex, "invoke");
                 } catch (EngineTerminationException ex) {
+                    state.debug(ex, "termination");
                     state.closeDown();
                 }
             } else if (si.subKind() == SubKind.VAR_DECLARATION_SUBKIND) {
@@ -890,6 +888,36 @@
         return events(c, outs, value, exception);
     }
 
+    // Convert an internal UserException to an API EvalException, translating
+    // the stack to snippet form.  Convert any chained exceptions
+    private EvalException asEvalException(UserException ue) {
+        return new EvalException(ue.getMessage(),
+                ue.causeExceptionClass(),
+                translateExceptionStack(ue),
+                asJShellException(ue.getCause()));
+    }
+
+    // Convert an internal ResolutionException to an API UnresolvedReferenceException,
+    // translating the snippet id to snipper and the stack to snippet form
+    private UnresolvedReferenceException asUnresolvedReferenceException(ResolutionException re) {
+        DeclarationSnippet sn = (DeclarationSnippet) state.maps.getSnippetDeadOrAlive(re.id());
+        return new UnresolvedReferenceException(sn, translateExceptionStack(re));
+    }
+
+    // Convert an internal UserException/ResolutionException to an API
+    // EvalException/UnresolvedReferenceException
+    private JShellException asJShellException(Throwable e) {
+        if (e == null) {
+            return null;
+        } else if (e instanceof UserException) {
+            return asEvalException((UserException) e);
+        } else if (e instanceof ResolutionException) {
+            return asUnresolvedReferenceException((ResolutionException) e);
+        } else {
+            throw new AssertionError(e);
+        }
+    }
+
     private boolean interestingEvent(SnippetEvent e) {
         return e.isSignatureChange()
                     || e.causeSnippet() == null
--- a/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
 package jdk.jshell;
 
 /**
- * Wraps an exception thrown in the remotely executing client.
+ * Wraps an throwable thrown in the executing client.
  * An instance of <code>EvalException</code> can be returned in the
  * {@link jdk.jshell.SnippetEvent#exception()} query.
- * The name of the exception thrown is available from
+ * The name of the throwable thrown is available from
  * {@link jdk.jshell.EvalException#getExceptionClassName()}.
  * Message and stack can be queried by methods on <code>Exception</code>.
  * <p>
@@ -45,8 +45,9 @@
 public class EvalException extends JShellException {
     private final String exceptionClass;
 
-    EvalException(String message, String exceptionClass, StackTraceElement[] stackElements) {
-        super(message);
+    EvalException(String message, String exceptionClass,
+            StackTraceElement[] stackElements, JShellException cause) {
+        super(message, cause);
         this.exceptionClass = exceptionClass;
         this.setStackTrace(stackElements);
     }
@@ -63,4 +64,18 @@
         return exceptionClass;
     }
 
+    /**
+     * Returns the wrapped cause of the throwable in the executing client
+     * represented by this {@code EvalException} or {@code null} if the cause is
+     * nonexistent or unknown.
+     *
+     * @return the cause wrapped in a {@code EvalException} or
+     * {@link UnresolvedReferenceException} or return {@code null} if the cause
+     * is nonexistent or unknown.
+     * @since 11
+     */
+    @Override
+    public JShellException getCause() {
+        return (JShellException) super.getCause();
+    }
 }
--- a/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,4 +36,8 @@
     JShellException(String message) {
         super(message);
     }
+
+    JShellException(String message, Throwable cause) {
+        super(message, cause);
+    }
 }
--- a/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java	Fri Apr 06 17:06:58 2018 -0400
@@ -167,7 +167,7 @@
         WrapSourceHandler sh = new WrapSourceHandler();
         List<String> allOptions = new ArrayList<>();
 
-        allOptions.add("--should-stop:at=FLOW");
+        allOptions.add("--should-stop=at=FLOW");
         allOptions.add("-Xlint:unchecked");
         allOptions.add("-proc:none");
         allOptions.addAll(extraArgs);
--- a/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java	Fri Apr 06 17:06:58 2018 -0400
@@ -45,7 +45,7 @@
     final DeclarationSnippet snippet;
 
     UnresolvedReferenceException(DeclarationSnippet snippet, StackTraceElement[] stackElements) {
-        super("Attempt to use definition snippet with unresolved references");
+        super("Attempt to use definition snippet with unresolved references in " + snippet);
         this.snippet = snippet;
         this.setStackTrace(stackElements);
     }
--- a/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -288,11 +288,20 @@
      * @throws ExecutionControl.InternalException for internal problems
      */
     protected String throwConvertedInvocationException(Throwable cause) throws RunException, InternalException {
-        if (cause instanceof SPIResolutionException) {
-            SPIResolutionException spire = (SPIResolutionException) cause;
-            throw new ResolutionException(spire.id(), spire.getStackTrace());
+        throw asRunException(cause);
+    }
+
+    private RunException asRunException(Throwable ex) {
+        if (ex instanceof SPIResolutionException) {
+            SPIResolutionException spire = (SPIResolutionException) ex;
+            return new ResolutionException(spire.id(), spire.getStackTrace());
         } else {
-            throw new UserException(cause.getMessage(), cause.getClass().getName(), cause.getStackTrace());
+            UserException ue = new UserException(ex.getMessage(),
+                    ex.getClass().getName(),
+                    ex.getStackTrace());
+            Throwable cause = ex.getCause();
+            ue.initCause(cause == null ? null : asRunException(cause));
+            return ue;
         }
     }
 
--- a/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -195,8 +195,7 @@
             flush();
             return true;
         } catch (InternalException ex) {
-            writeStatus(RESULT_INTERNAL_PROBLEM);
-            writeUTF(ex.getMessage());
+            writeInternalException(ex);
             flush();
             return true;
         } catch (ClassInstallException ex) {
@@ -206,16 +205,24 @@
             flush();
             return true;
         } catch (UserException ex) {
-            writeStatus(RESULT_USER_EXCEPTION);
-            writeNullOrUTF(ex.getMessage());
-            writeUTF(ex.causeExceptionClass());
-            writeObject(ex.getStackTrace());
+            writeStatus(RESULT_USER_EXCEPTION_CHAINED);
+            for (Throwable e = ex; e != null; ) {
+                if (e instanceof UserException) {
+                    writeUserException((UserException) e);
+                    e = e.getCause();
+                } else if (e instanceof ResolutionException) {
+                    writeResolutionException((ResolutionException) e);
+                    e = null;
+                } else {
+                    writeInternalException(e);
+                    e = null;
+                }
+            }
+            writeStatus(RESULT_SUCCESS);
             flush();
             return true;
         } catch (ResolutionException ex) {
-            writeStatus(RESULT_CORRALLED);
-            writeInt(ex.id());
-            writeObject(ex.getStackTrace());
+            writeResolutionException(ex);
             flush();
             return true;
         } catch (StoppedException ex) {
@@ -232,6 +239,24 @@
         }
     }
 
+    void writeInternalException(Throwable ex) throws IOException {
+        writeStatus(RESULT_INTERNAL_PROBLEM);
+        writeUTF(ex.getMessage());
+    }
+
+    void writeUserException(UserException ex) throws IOException {
+        writeStatus(RESULT_USER_EXCEPTION);
+        writeNullOrUTF(ex.getMessage());
+        writeUTF(ex.causeExceptionClass());
+        writeObject(ex.getStackTrace());
+    }
+
+    void writeResolutionException(ResolutionException ex) throws IOException {
+        writeStatus(RESULT_CORRALLED);
+        writeInt(ex.id());
+        writeObject(ex.getStackTrace());
+    }
+
     void commandLoop() {
         try {
             while (processCommand()) {
--- a/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteCodes.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteCodes.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -89,7 +89,7 @@
      */
     static final int RESULT_INTERNAL_PROBLEM        = 103;
     /**
-     * User exception encountered.
+     * User exception encountered. Legacy and used within RESULT_USER_EXCEPTION_CHAINED
      */
     static final int RESULT_USER_EXCEPTION          = 104;
     /**
@@ -104,5 +104,9 @@
      * The invoke has been stopped.
      */
     static final int RESULT_STOPPED                 = 107;
-
+    /**
+     * User exception encountered.
+     * @since 11
+     */
+    static final int RESULT_USER_EXCEPTION_CHAINED  = 108;
 }
--- a/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -283,18 +283,46 @@
                     throw new NotImplementedException(message);
                 }
                 case RESULT_USER_EXCEPTION: {
-                    // A user exception was encountered.
-                    String message = readNullOrUTF();
-                    String exceptionClassName = in.readUTF();
-                    StackTraceElement[] elems = (StackTraceElement[]) in.readObject();
-                    throw new UserException(message, exceptionClassName, elems);
+                    // A user exception was encountered.  Handle pre JDK 11 back-ends
+                    throw readUserException();
                 }
                 case RESULT_CORRALLED: {
                     // An unresolved reference was encountered.
-                    int id = in.readInt();
-                    StackTraceElement[] elems = (StackTraceElement[]) in.readObject();
-                    ResolutionException re = new ResolutionException(id, elems);
-                    throw re;
+                    throw readResolutionException();
+                }
+                case RESULT_USER_EXCEPTION_CHAINED: {
+                    // A user exception was encountered -- transmit chained.
+                    in.readInt(); // always RESULT_USER_EXCEPTION
+                    UserException result = readUserException();
+                    RunException caused = result;
+                    // Loop through the chained causes (if any) building a chained exception
+                    loop: while (true) {
+                        RunException ex;
+                        int cstatus = in.readInt();
+                        switch (cstatus) {
+                            case RESULT_USER_EXCEPTION: {
+                                // A user exception was the proximal cause.
+                                ex = readUserException();
+                                break;
+                            }
+                            case RESULT_CORRALLED: {
+                                // An unresolved reference was the underlying cause.
+                                ex = readResolutionException();
+                                break;
+                            }
+                            case RESULT_SUCCESS: {
+                                // End of chained exceptions
+                                break loop;
+                            }
+                            default: {
+                                throw new EngineTerminationException("Bad chained remote result code: " + cstatus);
+                            }
+                        }
+                        caused.initCause(ex);
+                        caused = ex;
+                    }
+                    caused.initCause(null); // root cause has no cause
+                    throw result;
                 }
                 case RESULT_STOPPED: {
                     // Execution was aborted by the stop()
@@ -314,8 +342,21 @@
                 }
             }
         } catch (IOException | ClassNotFoundException ex) {
+            ex.printStackTrace();
             throw new EngineTerminationException(ex.toString());
         }
     }
 
+    private UserException readUserException() throws IOException, ClassNotFoundException {
+        String message = readNullOrUTF();
+        String exceptionClassName = in.readUTF();
+        StackTraceElement[] elems = (StackTraceElement[]) in.readObject();
+        return new UserException(message, exceptionClassName, elems);
+    }
+
+    private ResolutionException readResolutionException() throws IOException, ClassNotFoundException {
+        int id = in.readInt();
+        StackTraceElement[] elems = (StackTraceElement[]) in.readObject();
+        return new ResolutionException(id, elems);
+    }
 }
--- a/src/jdk.management.agent/share/classes/jdk/internal/agent/Agent.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.management.agent/share/classes/jdk/internal/agent/Agent.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,9 +58,11 @@
 import sun.management.jmxremote.ConnectorBootstrap;
 
 /**
- * This Agent is started by the VM when -Dcom.sun.management.snmp or
- * -Dcom.sun.management.jmxremote is set. This class will be loaded by the
- * system class loader. Also jmx framework could be started by jcmd
+ * This class provides the methods to start the management agent.
+ * 1. {@link #startAgent} method is invoked by the VM if {@code -Dcom.sun.management.*} is set
+ * 2. {@link #startLocalManagementAgent} or {@link #startRemoteManagementAgent}
+ *    is invoked to start the management agent after the VM starts
+ *    via jcmd ManagementAgent.start and start_local command.
  */
 public class Agent {
     /**
@@ -239,8 +241,6 @@
     private static ResourceBundle messageRB;
     private static final String CONFIG_FILE =
             "com.sun.management.config.file";
-    private static final String SNMP_PORT =
-            "com.sun.management.snmp.port";
     private static final String JMXREMOTE =
             "com.sun.management.jmxremote";
     private static final String JMXREMOTE_PORT =
@@ -251,8 +251,6 @@
             "com.sun.management.enableThreadContentionMonitoring";
     private static final String LOCAL_CONNECTOR_ADDRESS_PROP =
             "com.sun.management.jmxremote.localConnectorAddress";
-    private static final String SNMP_AGENT_NAME =
-            "SnmpAgent";
 
     private static final String JDP_DEFAULT_ADDRESS = "224.0.23.178";
     private static final int JDP_DEFAULT_PORT = 7095;
@@ -307,8 +305,11 @@
         startAgent(config_props);
     }
 
-    // jcmd ManagementAgent.start_local entry point
-    // Also called due to command-line via startAgent()
+    /*
+     * Starts the local management agent.
+     * This method is invoked by either startAgent method or
+     * by the VM directly via jcmd ManagementAgent.start_local command.
+     */
     private static synchronized void startLocalManagementAgent() {
         Properties agentProps = VMSupport.getAgentProperties();
 
@@ -330,10 +331,10 @@
         }
     }
 
-    // jcmd ManagementAgent.start entry point
-    // This method starts the remote JMX agent and starts neither
-    // the local JMX agent nor the SNMP agent
-    // @see #startLocalManagementAgent and also @see #startAgent.
+    /*
+     * This method is invoked by the VM to start the remote management agent
+     * via jcmd ManagementAgent.start command.
+     */
     private static synchronized void startRemoteManagementAgent(String args) throws Exception {
         if (jmxServer != null) {
             throw new RuntimeException(getText(INVALID_STATE, "Agent already started"));
@@ -418,7 +419,6 @@
     }
 
     private static void startAgent(Properties props) throws Exception {
-        String snmpPort = props.getProperty(SNMP_PORT);
         String jmxremote = props.getProperty(JMXREMOTE);
         String jmxremotePort = props.getProperty(JMXREMOTE_PORT);
 
@@ -431,9 +431,6 @@
         }
 
         try {
-            if (snmpPort != null) {
-                loadSnmpAgent(props);
-            }
 
             /*
              * If the jmxremote.port property is set then we start the
@@ -533,12 +530,10 @@
     public static synchronized Properties getManagementProperties() {
         if (mgmtProps == null) {
             String configFile = System.getProperty(CONFIG_FILE);
-            String snmpPort = System.getProperty(SNMP_PORT);
             String jmxremote = System.getProperty(JMXREMOTE);
             String jmxremotePort = System.getProperty(JMXREMOTE_PORT);
 
-            if (configFile == null && snmpPort == null
-                    && jmxremote == null && jmxremotePort == null) {
+            if (configFile == null && jmxremote == null && jmxremotePort == null) {
                 // return if out-of-the-management option is not specified
                 return null;
             }
@@ -547,27 +542,6 @@
         return mgmtProps;
     }
 
-    private static void loadSnmpAgent(Properties props) {
-        /*
-         * Load the jdk.snmp service
-         */
-        AgentProvider provider = AccessController.doPrivileged(
-            (PrivilegedAction<AgentProvider>) () -> {
-                for (AgentProvider aProvider : ServiceLoader.loadInstalled(AgentProvider.class)) {
-                    if (aProvider.getName().equals(SNMP_AGENT_NAME))
-                        return aProvider;
-                }
-                return null;
-            },  null
-        );
-
-        if (provider != null) {
-            provider.startAgent(props);
-         } else { // snmp runtime doesn't exist - initialization fails
-            throw new UnsupportedOperationException("Unsupported management property: " + SNMP_PORT);
-        }
-    }
-
     // read config file and initialize the properties
     private static void readConfiguration(String fname, Properties p) {
         if (fname == null) {
@@ -609,6 +583,10 @@
         }
     }
 
+    /**
+     * This method is invoked by the VM to start the management agent
+     * when -Dcom.sun.management.* is set during startup.
+     */
     public static void startAgent() throws Exception {
         String prop = System.getProperty("com.sun.management.agent.class");
 
--- a/src/jdk.management.agent/share/conf/management.properties	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.management.agent/share/conf/management.properties	Fri Apr 06 17:06:58 2018 -0400
@@ -5,7 +5,6 @@
 # The Management Configuration file (in java.util.Properties format)
 # will be read if one of the following system properties is set:
 #    -Dcom.sun.management.jmxremote.port=<port-number>
-# or -Dcom.sun.management.snmp.port=<port-number>
 # or -Dcom.sun.management.config.file=<this-file>
 #
 # The default Management Configuration file is:
@@ -26,8 +25,6 @@
 # For setting the JMX RMI agent port use the following line
 # com.sun.management.jmxremote.port=<port-number>
 #
-# For setting the SNMP agent port use the following line
-# com.sun.management.snmp.port=<port-number>
 
 #####################################################################
 #                   Optional Instrumentation
@@ -50,82 +47,6 @@
 # com.sun.management.enableThreadContentionMonitoring
 
 #####################################################################
-#			SNMP Management Properties
-#####################################################################
-#
-# If the system property -Dcom.sun.management.snmp.port=<port-number>
-# is set then
-#	- The SNMP agent (with the Java virtual machine MIB) is started
-#	  that listens on the specified port for incoming SNMP requests.
-#	- the following properties for read for SNMP management.
-#
-# The configuration can be specified only at startup time.
-# Later changes to the above system property (e.g. via setProperty method), this
-# config file, or the ACL file has no effect to the running SNMP agent.
-#
-
-#
-# ##################### SNMP Trap Port #########################
-#
-# com.sun.management.snmp.trap=<trap-destination-port-number>
-#      Specifies the remote port number at which managers are expected
-#      to listen for trap. For each host defined in the ACL file,
-#      the SNMP agent will send traps at <host>:<trap-destination-port-number>
-#      Default for this property is 162.
-#
-
-# To set port for sending traps to a different port use the following line
-# com.sun.management.snmp.trap=<trap-destination-port-number>
-
-#
-# ################ SNMP listen interface #########################
-#
-# com.sun.management.snmp.interface=<InetAddress>
-#      Specifies the local interface on which the SNMP agent will bind.
-#      This is useful when running on machines which have several
-#      interfaces defined. It makes it possible to listen to a specific
-#      subnet accessible through that interface.
-#      Default for this property is "localhost".
-#
-#      The format of the value for that property is any string accepted
-#      by java.net.InetAddress.getByName(String).
-#
-
-# For restricting the port on which SNMP agent listens use the following line
-# com.sun.management.snmp.interface=<InetAddress>
-
-#
-# #################### SNMP ACL file #########################
-#
-# com.sun.management.snmp.acl=true|false
-#      Default for this property is true. (Case for true/false ignored)
-#      If this property is specified as false then the ACL file
-#      is not checked:  all manager hosts are allowed all access.
-#
-
-# For SNMP without checking ACL file uncomment the following line
-# com.sun.management.snmp.acl=false
-
-#
-# com.sun.management.snmp.acl.file=filepath
-#      Specifies location for ACL file
-#      This is optional - default location is
-#      $JRE/conf/management/snmp.acl
-#
-#      If the property "com.sun.management.snmp.acl" is set to false,
-#      then this property and the ACL file are ignored.
-#      Otherwise the ACL file must exist and be in the valid format.
-#      If the ACL file is empty or non existent then no access is allowed.
-#
-#      The SNMP agent will read the ACL file at startup time.
-#      Modification to the ACL file has no effect to any running SNMP
-#      agents which read that ACL file at startup.
-#
-
-# For a non-default acl file location use the following line
-# com.sun.management.snmp.acl.file=filepath
-
-#####################################################################
 #			RMI Management Properties
 #####################################################################
 #
--- a/src/jdk.pack/share/native/unpack200/main.cpp	Fri Apr 06 17:01:04 2018 -0400
+++ b/src/jdk.pack/share/native/unpack200/main.cpp	Fri Apr 06 17:06:58 2018 -0400
@@ -45,6 +45,7 @@
 #define THREAD_SELF ((THRTYPE)pthread_self())
 #endif
 
+#include "jni.h"
 #include "defines.h"
 #include "bytes.h"
 #include "utils.h"
@@ -58,7 +59,8 @@
 #include "unpack.h"
 
 
-int main(int argc, char **argv) {
+JNIEXPORT int JNICALL
+main(int argc, char **argv) {
     return unpacker::run(argc, argv);
 }
 
--- a/test/hotspot/jtreg/runtime/RedefineObject/WalkThroughInvoke.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/hotspot/jtreg/runtime/RedefineObject/WalkThroughInvoke.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
           SecurityManager sm = new SecurityManager();
           // Walks the stack with Method.invoke in the stack (which is the
           // purpose of the test) before it gets an AccessControlException.
-          sm.checkMemberAccess(b, Member.DECLARED);
+          sm.checkPermission(new RuntimePermission("accessDeclaredMembers"));
       } catch (java.security.AccessControlException e) {
           // Ignoring an 'AccessControlException' exception since
           // it is expected as part of this test.
--- a/test/jdk/java/lang/Class/IsAnnotationType.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/jdk/java/lang/Class/IsAnnotationType.java	Fri Apr 06 17:06:58 2018 -0400
@@ -49,7 +49,7 @@
         failures += test(String.class, false);
         failures += test(Enum.class, false);
         failures += test(java.math.RoundingMode.class, false);
-        // Classes in java.lang.annoation
+        // Classes in java.lang.annotation
         failures += test(Annotation.class, false);
         failures += test(Retention.class, true);
         failures += test(RetentionPolicy.class, false);
@@ -57,7 +57,7 @@
         failures += test(AnnotationPoseur.class, false);
 
         if (failures > 0) {
-            throw new RuntimeException("Unexepcted annotation " +
+            throw new RuntimeException("Unexpected annotation " +
                                        "status detected.");
         }
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/Enum/ConstantDirectoryOptimalCapacity.java	Fri Apr 06 17:06:58 2018 -0400
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * 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 8200696
+ * @summary Initial capacity of Class.enumConstantDirectory is not optimal
+ * @library /lib/testlibrary
+ * @modules java.base/java.lang:open
+ * @build jdk.testlibrary.OptimalCapacity
+ * @run main ConstantDirectoryOptimalCapacity
+ */
+
+import jdk.testlibrary.OptimalCapacity;
+
+public class ConstantDirectoryOptimalCapacity {
+
+    public static void main(String[] args) throws Throwable {
+        test(E1.class);
+        test(E2.class);
+        test(E3.class);
+        test(E4.class);
+        test(E5.class);
+        test(E6.class);
+        test(E7.class);
+        test(E8.class);
+        test(E9.class);
+        test(E10.class);
+        test(E11.class);
+        test(E12.class);
+        test(E13.class);
+        test(E14.class);
+        test(E15.class);
+        test(E16.class);
+        test(E17.class);
+        test(E18.class);
+        test(E19.class);
+        test(E20.class);
+        test(E21.class);
+        test(E22.class);
+        test(E23.class);
+        test(E24.class);
+        test(E25.class);
+        test(E26.class);
+    }
+
+    private static void test(Class<? extends Enum> e) {
+        Enum.valueOf(e, "V0"); // trigger init of enumConstantDirectory
+
+        int initialCapacity = (int)(e.getEnumConstants().length / 0.75f) + 1;
+        OptimalCapacity.ofHashMap(e.getClass(), e, "enumConstantDirectory",
+            initialCapacity);
+    }
+
+    enum E1 { V0 }
+    enum E2 { V0, V1 }
+    enum E3 { V0, V1, V2 }
+    enum E4 { V0, V1, V2, V3 }
+    enum E5 { V0, V1, V2, V3, V4 }
+    enum E6 { V0, V1, V2, V3, V4, V5 }
+    enum E7 { V0, V1, V2, V3, V4, V5, V6 }
+    enum E8 { V0, V1, V2, V3, V4, V5, V6, V7 }
+    enum E9 { V0, V1, V2, V3, V4, V5, V6, V7, V8 }
+    enum E10 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9 }
+    enum E11 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10 }
+    enum E12 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11 }
+    enum E13 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12 }
+    enum E14 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13 }
+    enum E15 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13,
+               V14 }
+    enum E16 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13,
+               V14, V15 }
+    enum E17 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13,
+               V14, V15, V16 }
+    enum E18 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13,
+               V14, V15, V16, V17 }
+    enum E19 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13,
+               V14, V15, V16, V17, V18 }
+    enum E20 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13,
+               V14, V15, V16, V17, V18, V19 }
+    enum E21 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13,
+               V14, V15, V16, V17, V18, V19, V20 }
+    enum E22 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13,
+               V14, V15, V16, V17, V18, V19, V20, V21 }
+    enum E23 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13,
+               V14, V15, V16, V17, V18, V19, V20, V21, V22 }
+    enum E24 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13,
+               V14, V15, V16, V17, V18, V19, V20, V21, V22, V23 }
+    enum E25 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13,
+               V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24 }
+    enum E26 { V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13,
+               V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25 }
+}
--- a/test/jdk/java/lang/ProcessBuilder/DestroyTest.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/jdk/java/lang/ProcessBuilder/DestroyTest.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -145,18 +145,16 @@
         String osName = System.getProperty("os.name");
         if (osName.startsWith("Windows")) {
             return new WindowsTest();
-        } else if (osName.startsWith("Linux") == true) {
-            return new UnixTest(
-                File.createTempFile("ProcessTrap-", ".sh",null));
-        } else if (osName.startsWith("Mac OS")) {
-            return new MacTest(
-                File.createTempFile("ProcessTrap-", ".sh",null));
-        } else if (osName.equals("SunOS")) {
-            return new UnixTest(
-                File.createTempFile("ProcessTrap-", ".sh",null));
-        } else if (osName.equals("AIX")) {
-            return new UnixTest(
-                File.createTempFile("ProcessTrap-", ".sh",null));
+        } else {
+            File userDir = new File(System.getProperty("user.dir", "."));
+            File tempFile = File.createTempFile("ProcessTrap-", ".sh", userDir);
+            if (osName.startsWith("Linux") == true
+                    || osName.equals("SunOS")
+                    || osName.equals("AIX")) {
+                return new UnixTest(tempFile);
+            } else if (osName.startsWith("Mac OS")) {
+                return new MacTest(tempFile);
+            }
         }
         return null;
     }
--- a/test/jdk/java/lang/SecurityManager/DepMethodsRequireAllPerm.java	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * 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
- * 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 8004502 8008793 8029886 8186535
- * @summary Sanity check that the SecurityManager checkMemberAccess method and
- *          methods that used to check AWTPermission now check for AllPermission
- */
-
-import java.security.AllPermission;
-import java.security.Permission;
-
-public class DepMethodsRequireAllPerm {
-
-    static class MySecurityManager extends SecurityManager {
-        final Class<?> expectedClass;
-
-        MySecurityManager(Class<?> c) {
-            expectedClass = c;
-        }
-
-        @Override
-        public void checkPermission(Permission perm) {
-            if (perm.getClass() != expectedClass)
-                throw new RuntimeException("Got: " + perm.getClass() + ", expected: " + expectedClass);
-            super.checkPermission(perm);
-        }
-    }
-
-    public static void main(String[] args) {
-        MySecurityManager sm = new MySecurityManager(AllPermission.class);
-
-        try {
-            sm.checkAwtEventQueueAccess();
-            throw new RuntimeException("SecurityException expected");
-        } catch (SecurityException expected) { }
-
-        try {
-            sm.checkSystemClipboardAccess();
-            throw new RuntimeException("SecurityException expected");
-        } catch (SecurityException expected) { }
-
-        try {
-            sm.checkTopLevelWindow(null);
-            throw new RuntimeException("NullPointException expected");
-        } catch (NullPointerException expected) { }
-
-        if (sm.checkTopLevelWindow(new Object())) {
-            throw new RuntimeException("checkTopLevelWindow expected to return false");
-        }
-
-        try {
-            sm.checkMemberAccess(Object.class, java.lang.reflect.Member.DECLARED);
-            throw new RuntimeException("SecurityException expected");
-        } catch (SecurityException expected) { }
-
-        try {
-            sm.checkMemberAccess(null, java.lang.reflect.Member.DECLARED);
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException expected) { }
-    }
-}
--- a/test/jdk/java/lang/annotation/ClassFileGenerator.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/jdk/java/lang/annotation/ClassFileGenerator.java	Fri Apr 06 17:06:58 2018 -0400
@@ -38,8 +38,8 @@
 public class ClassFileGenerator {
 
     public static void main(String... args) throws Exception {
-        classFileWriter("AnnotationWithVoidReturn.class", AnnoationWithVoidReturnDump.dump());
-        classFileWriter("AnnotationWithParameter.class", AnnoationWithParameterDump.dump());
+        classFileWriter("AnnotationWithVoidReturn.class", AnnotationWithVoidReturnDump.dump());
+        classFileWriter("AnnotationWithParameter.class", AnnotationWithParameterDump.dump());
         classFileWriter("AnnotationWithExtraInterface.class", AnnotationWithExtraInterfaceDump.dump());
         classFileWriter("AnnotationWithException.class", AnnotationWithExceptionDump.dump());
         classFileWriter("AnnotationWithHashCode.class", AnnotationWithHashCodeDump.dump());
@@ -65,7 +65,7 @@
 
     */
 
-    private static class AnnoationWithVoidReturnDump implements Opcodes {
+    private static class AnnotationWithVoidReturnDump implements Opcodes {
         public static byte[] dump() throws Exception {
             ClassWriter cw = new ClassWriter(0);
             MethodVisitor mv;
@@ -106,7 +106,7 @@
 
     */
 
-    private static class AnnoationWithParameterDump implements Opcodes {
+    private static class AnnotationWithParameterDump implements Opcodes {
         public static byte[] dump() throws Exception {
 
             ClassWriter cw = new ClassWriter(0);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/nio/channels/Selector/UpdateReadyOps.java	Fri Apr 06 17:06:58 2018 -0400
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * 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
+ * @run testng UpdateReadyOps
+ * @summary Test that the ready set from a selection operation is bitwise-disjoined
+ *     into a key's ready set when the key is already in the selected-key set
+ */
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.nio.ByteBuffer;
+import java.nio.channels.SelectionKey;
+import java.nio.channels.Selector;
+import java.nio.channels.ServerSocketChannel;
+import java.nio.channels.SocketChannel;
+
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+@Test
+public class UpdateReadyOps {
+
+    /**
+     * Test that OP_WRITE is preserved when updating the ready set of a key in
+     * the selected-key set to add OP_READ.
+     */
+    public void testOpWritePreserved() throws Exception {
+        try (ConnectionPair pair = new ConnectionPair();
+             Selector sel = Selector.open()) {
+
+            SocketChannel sc1 = pair.channel1();
+            SocketChannel sc2 = pair.channel2();
+
+            sc1.configureBlocking(false);
+            SelectionKey key = sc1.register(sel, SelectionKey.OP_WRITE);
+
+            int updated = sel.select();
+            assertTrue(updated == 1);
+            assertTrue(sel.selectedKeys().contains(key));
+            assertFalse(key.isReadable());
+            assertTrue(key.isWritable());
+
+            // select again, should be no updates
+            updated = sel.select();
+            assertTrue(updated == 0);
+            assertTrue(sel.selectedKeys().contains(key));
+            assertFalse(key.isReadable());
+            assertTrue(key.isWritable());
+
+            // write some bytes
+            sc2.write(helloMessage());
+
+            // change interest ops to OP_READ, do a selection operation, and
+            // check that the ready set becomes OP_READ|OP_WRITE.
+
+            key.interestOps(SelectionKey.OP_READ);
+            updated = sel.select();
+            assertTrue(updated == 1);
+            assertTrue(sel.selectedKeys().size() == 1);
+            assertTrue(key.isReadable());
+            assertTrue(key.isWritable());
+            assertTrue(key.readyOps() == (SelectionKey.OP_READ|SelectionKey.OP_WRITE));
+
+            // select again, should be no updates
+            updated = sel.select();
+            assertTrue(updated == 0);
+            assertTrue(sel.selectedKeys().size() == 1);
+            assertTrue(key.isReadable());
+            assertTrue(key.isWritable());
+        }
+    }
+
+    /**
+     * Test that OP_READ is preserved when updating the ready set of a key in
+     * the selected-key set to add OP_WRITE.
+     */
+    public void testOpReadPreserved() throws Exception {
+        try (ConnectionPair pair = new ConnectionPair();
+             Selector sel = Selector.open()) {
+
+            SocketChannel sc1 = pair.channel1();
+            SocketChannel sc2 = pair.channel2();
+
+            sc1.configureBlocking(false);
+            SelectionKey key = sc1.register(sel, SelectionKey.OP_READ);
+
+            // write some bytes
+            sc2.write(helloMessage());
+
+            int updated = sel.select();
+            assertTrue(updated == 1);
+            assertTrue(sel.selectedKeys().size() == 1);
+            assertTrue(sel.selectedKeys().contains(key));
+            assertTrue(key.isReadable());
+            assertFalse(key.isWritable());
+
+            // select again, should be no updates
+            updated = sel.select();
+            assertTrue(updated == 0);
+            assertTrue(sel.selectedKeys().contains(key));
+            assertTrue(key.isReadable());
+            assertFalse(key.isWritable());
+
+            key.interestOps(SelectionKey.OP_WRITE);
+            updated = sel.select();
+            assertTrue(updated == 1);
+            assertTrue(sel.selectedKeys().size() == 1);
+            assertTrue(sel.selectedKeys().contains(key));
+            assertTrue(key.isReadable());
+            assertTrue(key.isWritable());
+            assertTrue(key.readyOps() == (SelectionKey.OP_READ|SelectionKey.OP_WRITE));
+
+            // select again, should be no updates
+            updated = sel.select();
+            assertTrue(updated == 0);
+            assertTrue(sel.selectedKeys().size() == 1);
+            assertTrue(key.isReadable());
+            assertTrue(key.isWritable());
+        }
+    }
+
+    static class ConnectionPair implements Closeable {
+
+        private final SocketChannel sc1;
+        private final SocketChannel sc2;
+
+        ConnectionPair() throws IOException {
+            InetAddress lb = InetAddress.getLoopbackAddress();
+            try (ServerSocketChannel ssc = ServerSocketChannel.open()) {
+                ssc.bind(new InetSocketAddress(lb, 0));
+                this.sc1 = SocketChannel.open(ssc.getLocalAddress());
+                this.sc2 = ssc.accept();
+            }
+        }
+
+        SocketChannel channel1() {
+            return sc1;
+        }
+
+        SocketChannel channel2() {
+            return sc2;
+        }
+
+        public void close() throws IOException {
+            sc1.close();
+            sc2.close();
+        }
+    }
+
+    static ByteBuffer helloMessage() throws Exception {
+        return ByteBuffer.wrap("hello".getBytes("UTF-8"));
+    }
+}
--- a/test/jdk/java/nio/channels/SocketChannel/IsConnectable.java	Fri Apr 06 17:01:04 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
- * 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 4737146 4750573
- * @summary Test if isConnectable returns true after connected
- * @library .. /test/lib
- * @build jdk.test.lib.Utils TestServers
- * @run main IsConnectable
- */
-
-import java.net.*;
-import java.nio.channels.*;
-import java.nio.channels.spi.SelectorProvider;
-import java.util.*;
-
-public class IsConnectable {
-
-    static void test(TestServers.DayTimeServer daytimeServer) throws Exception {
-        InetSocketAddress isa
-            = new InetSocketAddress(daytimeServer.getAddress(),
-                                    daytimeServer.getPort());
-        SocketChannel sc = SocketChannel.open();
-        sc.configureBlocking(false);
-        final boolean immediatelyConnected = sc.connect(isa);
-
-        Selector selector = SelectorProvider.provider().openSelector();
-        try {
-            SelectionKey key = sc.register(selector, SelectionKey.OP_CONNECT);
-            int keysAdded = selector.select();
-            if (keysAdded > 0) {
-                boolean result = sc.finishConnect();
-                if (result) {
-                    keysAdded = selector.select(5000);
-                    // 4750573: keysAdded should not be incremented when op is dropped
-                    // from a key already in the selected key set
-                    if (keysAdded > 0)
-                        throw new Exception("Test failed: 4750573 detected");
-                    Set<SelectionKey> sel = selector.selectedKeys();
-                    Iterator<SelectionKey> i = sel.iterator();
-                    SelectionKey sk = i.next();
-                    // 4737146: isConnectable should be false while connected
-                    if (sk.isConnectable())
-                        throw new Exception("Test failed: 4737146 detected");
-                }
-            } else {
-                if (!immediatelyConnected) {
-                    throw new Exception("Select failed");
-                } else {
-                    System.out.println("IsConnectable couldn't be fully tested for "
-                            + System.getProperty("os.name"));
-                }
-            }
-        } finally {
-            sc.close();
-            selector.close();
-        }
-    }
-
-    public static void main(String[] args) throws Exception {
-        try (TestServers.DayTimeServer daytimeServer
-                = TestServers.DayTimeServer.startNewServer(100)) {
-            test(daytimeServer);
-        }
-    }
-
-}
--- a/test/jdk/lib/testlibrary/jdk/testlibrary/OptimalCapacity.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/jdk/lib/testlibrary/jdk/testlibrary/OptimalCapacity.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -102,10 +102,34 @@
     public static void ofHashMap(Class<?> clazz, String fieldName,
             int initialCapacity)
     {
+        ofHashMap(clazz, null, fieldName, initialCapacity);
+    }
+
+    /**
+     * Checks adequacy of the initial capacity of a non-static field
+     * of type {@code HashMap}.
+     *
+     * Having
+     * <pre>
+     * class XClass {
+     *     HashMap theMap = new HashMap(N);
+     * }
+     * XClass instance = ...
+     * </pre>
+     *
+     * you should call from the test
+     *
+     * <pre>
+     * OptimalCapacity.ofHashMap(XClass.class, instance, "theMap", N);
+     * </pre>
+     */
+    public static void ofHashMap(Class<?> clazz, Object instance,
+            String fieldName, int initialCapacity)
+    {
         try {
             Field field = clazz.getDeclaredField(fieldName);
             field.setAccessible(true);
-            Object obj = field.get(null);
+            Object obj = field.get(instance);
             if (!HashMap.class.equals(obj.getClass())) {
                 throw new RuntimeException(field +
                     " expected to be of type HashMap");
--- a/test/jdk/sun/management/jmxremote/bootstrap/rmiregistry.properties	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/jdk/sun/management/jmxremote/bootstrap/rmiregistry.properties	Fri Apr 06 17:06:58 2018 -0400
@@ -5,7 +5,6 @@
 # The Management Configuration file (in java.util.Properties format)
 # will be read if one of the following system properties is set:
 #    -Dcom.sun.management.jmxremote.port=<port-number>
-# or -Dcom.sun.management.snmp.port=<port-number>
 # or -Dcom.sun.management.config.file=<this-file>
 #
 # The default Management Configuration file is:
@@ -26,8 +25,6 @@
 # For setting the JMX RMI agent port use the following line
 com.sun.management.jmxremote.port=${getFreePort}
 #
-# For setting the SNMP agent port use the following line
-# com.sun.management.snmp.port=<port-number>
 
 #####################################################################
 #                   Optional Instrumentation
@@ -50,82 +47,6 @@
 # com.sun.management.enableThreadContentionMonitoring
 
 #####################################################################
-#			SNMP Management Properties
-#####################################################################
-#
-# If the system property -Dcom.sun.management.snmp.port=<port-number>
-# is set then
-#	- The SNMP agent (with the Java virtual machine MIB) is started
-#	  that listens on the specified port for incoming SNMP requests.
-#	- the following properties for read for SNMP management.
-#
-# The configuration can be specified only at startup time.
-# Later changes to the above system property (e.g. via setProperty method), this
-# config file, or the ACL file has no effect to the running SNMP agent.
-#
-
-#
-# ##################### SNMP Trap Port #########################
-#
-# com.sun.management.snmp.trap=<trap-destination-port-number>
-#      Specifies the remote port number at which managers are expected
-#      to listen for trap. For each host defined in the ACL file,
-#      the SNMP agent will send traps at <host>:<trap-destination-port-number>
-#      Default for this property is 162.
-#
-
-# To set port for sending traps to a different port use following line
-# com.sun.management.snmp.trap=<trap-destination-port-number>
-
-#
-# ################ SNMP listen interface #########################
-#
-# com.sun.management.snmp.interface=<InetAddress>
-#      Specifies the local interface on which the SNMP agent will bind.
-#      This is usefull when running on machines which have several
-#      interfaces defined. It makes it possible to listen to a specific
-#      subnet accessible through that interface.
-#      Default for this property is "localhost".
-#
-#      The format of the value for that property is any string accepted
-#      by java.net.InetAddress.getByName(String).
-#
-
-# For restricting the port on which SNMP agent listens use following line
-# com.sun.management.snmp.interface=<InetAddress>
-
-#
-# #################### SNMP ACL file #########################
-#
-# com.sun.management.snmp.acl=true|false
-#      Default for this property is true. (Case for true/false ignored)
-#      If this property is specified as false then the ACL file
-#      is not checked:  all manager hosts are allowed all access.
-#
-
-# For SNMP without checking ACL file uncomment the following line
-# com.sun.management.snmp.acl=false
-
-#
-# com.sun.management.snmp.acl.file=filepath
-#      Specifies location for ACL file
-#      This is optional - default location is
-#      $JRE/conf/management/snmp.acl
-#
-#      If the property "com.sun.management.snmp.acl" is set to false,
-#      then this property and the ACL file are ignored.
-#      Otherwise the ACL file must exist and be in the valid format.
-#      If the ACL file is empty or non existent then no access is allowed.
-#
-#      The SNMP agent will read the ACL file at startup time.
-#      Modification to the ACL file has no effect to any running SNMP
-#      agents which read that ACL file at startup.
-#
-
-# For a non-default acl file location use following line
-# com.sun.management.snmp.acl.file=filepath
-
-#####################################################################
 #			RMI Management Properties
 #####################################################################
 #
--- a/test/jdk/sun/management/jmxremote/bootstrap/rmiregistryssl.properties	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/jdk/sun/management/jmxremote/bootstrap/rmiregistryssl.properties	Fri Apr 06 17:06:58 2018 -0400
@@ -5,7 +5,6 @@
 # The Management Configuration file (in java.util.Properties format)
 # will be read if one of the following system properties is set:
 #    -Dcom.sun.management.jmxremote.port=<port-number>
-# or -Dcom.sun.management.snmp.port=<port-number>
 # or -Dcom.sun.management.config.file=<this-file>
 #
 # The default Management Configuration file is:
@@ -26,8 +25,6 @@
 # For setting the JMX RMI agent port use the following line
 com.sun.management.jmxremote.port=${getFreePort}
 #
-# For setting the SNMP agent port use the following line
-# com.sun.management.snmp.port=<port-number>
 
 #####################################################################
 #                   Optional Instrumentation
@@ -50,82 +47,6 @@
 # com.sun.management.enableThreadContentionMonitoring
 
 #####################################################################
-#			SNMP Management Properties
-#####################################################################
-#
-# If the system property -Dcom.sun.management.snmp.port=<port-number>
-# is set then
-#	- The SNMP agent (with the Java virtual machine MIB) is started
-#	  that listens on the specified port for incoming SNMP requests.
-#	- the following properties for read for SNMP management.
-#
-# The configuration can be specified only at startup time.
-# Later changes to the above system property (e.g. via setProperty method), this
-# config file, or the ACL file has no effect to the running SNMP agent.
-#
-
-#
-# ##################### SNMP Trap Port #########################
-#
-# com.sun.management.snmp.trap=<trap-destination-port-number>
-#      Specifies the remote port number at which managers are expected
-#      to listen for trap. For each host defined in the ACL file,
-#      the SNMP agent will send traps at <host>:<trap-destination-port-number>
-#      Default for this property is 162.
-#
-
-# To set port for sending traps to a different port use following line
-# com.sun.management.snmp.trap=<trap-destination-port-number>
-
-#
-# ################ SNMP listen interface #########################
-#
-# com.sun.management.snmp.interface=<InetAddress>
-#      Specifies the local interface on which the SNMP agent will bind.
-#      This is usefull when running on machines which have several
-#      interfaces defined. It makes it possible to listen to a specific
-#      subnet accessible through that interface.
-#      Default for this property is "localhost".
-#
-#      The format of the value for that property is any string accepted
-#      by java.net.InetAddress.getByName(String).
-#
-
-# For restricting the port on which SNMP agent listens use following line
-# com.sun.management.snmp.interface=<InetAddress>
-
-#
-# #################### SNMP ACL file #########################
-#
-# com.sun.management.snmp.acl=true|false
-#      Default for this property is true. (Case for true/false ignored)
-#      If this property is specified as false then the ACL file
-#      is not checked:  all manager hosts are allowed all access.
-#
-
-# For SNMP without checking ACL file uncomment the following line
-# com.sun.management.snmp.acl=false
-
-#
-# com.sun.management.snmp.acl.file=filepath
-#      Specifies location for ACL file
-#      This is optional - default location is
-#      $JRE/conf/management/snmp.acl
-#
-#      If the property "com.sun.management.snmp.acl" is set to false,
-#      then this property and the ACL file are ignored.
-#      Otherwise the ACL file must exist and be in the valid format.
-#      If the ACL file is empty or non existent then no access is allowed.
-#
-#      The SNMP agent will read the ACL file at startup time.
-#      Modification to the ACL file has no effect to any running SNMP
-#      agents which read that ACL file at startup.
-#
-
-# For a non-default acl file location use following line
-# com.sun.management.snmp.acl.file=filepath
-
-#####################################################################
 #			RMI Management Properties
 #####################################################################
 #
--- a/test/jdk/sun/management/windows/README	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/jdk/sun/management/windows/README	Fri Apr 06 17:06:58 2018 -0400
@@ -5,7 +5,6 @@
 The tool is used by regression tests in the following directories :-
 
 test/sun/management/jmxremote/bootstrap
-test/sun/management/snmp/bootstrap
 
 The tests in these directories create password or ACL files that need to
 be "secured" (meaning that only the owner should have access to the 
--- a/test/jdk/tools/launcher/InfoStreams.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/jdk/tools/launcher/InfoStreams.java	Fri Apr 06 17:06:58 2018 -0400
@@ -52,27 +52,33 @@
 
         String classPath = System.getProperty("java.class.path");
 
-        run("-help").stderrShouldMatch(USAGE).stdoutShouldNotMatch(".");
-        run("--help").stdoutShouldMatch(USAGE).stderrShouldNotMatch(".");
+        run("-help").stderrShouldMatch(USAGE).stdoutShouldNotMatch(USAGE);
+        run("--help").stdoutShouldMatch(USAGE).stderrShouldNotMatch(USAGE);
 
-        run("-version").stderrShouldMatch(VERSION_ERR).stdoutShouldNotMatch(".");
-        run("--version").stdoutShouldMatch(VERSION_OUT).stderrShouldNotMatch(".");
+        run("-version").stderrShouldMatch(VERSION_ERR)
+                       .stdoutShouldNotMatch(VERSION_ERR)
+                       .stdoutShouldNotMatch(VERSION_OUT);
+        run("--version").stdoutShouldMatch(VERSION_OUT)
+                        .stderrShouldNotMatch(VERSION_OUT)
+                        .stderrShouldNotMatch(VERSION_ERR);
 
         run("-showversion", "--dry-run", "-cp", classPath, "InfoStreams")
             .stderrShouldMatch(VERSION_ERR)
-            .stdoutShouldNotMatch(".");
+            .stdoutShouldNotMatch(VERSION_ERR)
+            .stdoutShouldNotMatch(VERSION_OUT);
         run("--show-version", "--dry-run", "-cp", classPath, "InfoStreams")
             .stdoutShouldMatch(VERSION_OUT)
-            .stderrShouldNotMatch(".");
+            .stderrShouldNotMatch(VERSION_OUT)
+            .stderrShouldNotMatch(VERSION_ERR);
 
         run("-fullversion").stderrShouldMatch(FULLVERSION_ERR)
-            .stdoutShouldNotMatch(".");
+                           .stdoutShouldNotMatch(FULLVERSION_ERR)
+                           .stdoutShouldNotMatch(FULLVERSION_OUT);
         run("--full-version").stdoutShouldMatch(FULLVERSION_OUT)
-            .stderrShouldNotMatch(".");
+                             .stderrShouldNotMatch(FULLVERSION_OUT)
+                             .stderrShouldNotMatch(FULLVERSION_ERR);
 
-        run("-X").stderrShouldMatch(NONSTD).stdoutShouldNotMatch(".");
-        run("--help-extra").stdoutShouldMatch(NONSTD).stderrShouldNotMatch(".");
-
+        run("-X").stderrShouldMatch(NONSTD).stdoutShouldNotMatch(NONSTD);
+        run("--help-extra").stdoutShouldMatch(NONSTD).stderrShouldNotMatch(NONSTD);
     }
-
 }
--- a/test/jdk/tools/launcher/ToolsOpts.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/jdk/tools/launcher/ToolsOpts.java	Fri Apr 06 17:06:58 2018 -0400
@@ -184,7 +184,6 @@
                     break;
             }
 
-            String[] output = tr.testOutput.toArray(new String[tr.testOutput.size()]);
             //-Joptions should not be passed to tool
             if (jpos > -1) {
                 checkJoptionOutput(tr, arg);
@@ -194,14 +193,23 @@
                             + "CMD: " + cmdString);
                 }
             } else {
-                //check that each non -J option was passed to tool.
+                // check that each non -J option was passed to tool. It looks for each arg in the output.
+                // Irrelevant lines in the output are skipped. Arguments order is checked as well.
+                int j = 0;
+                List<String> output = tr.testOutput;
                 for (int i = 0; i < arg.length; i++) {
-                    if (output[i].compareTo(arg[i]) != 0) {
+                    boolean found = false;
+                    for (; j < output.size(); j++) {
+                        if (output.get(j).equals(arg[i])) {
+                            pass("check " + output.get(j) + " == " + arg[i]);
+                            found = true;
+                            break;
+                        }
+                    }
+                    if (!found) {
                         throw new RuntimeException(
-                                "failed! CMD: " + cmdString + "\n   case:" +
-                                output[i] + " != " + arg[i]);
-                    } else {
-                        pass("check " + output[i] + " == " + arg[i]);
+                                "failed! Should have passed non -J option [" + arg[i] + "] to tool.\n"
+                                + "CMD: " + cmdString);
                     }
                 }
             }
--- a/test/langtools/ProblemList.txt	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/ProblemList.txt	Fri Apr 06 17:06:58 2018 -0400
@@ -38,6 +38,7 @@
 
 jdk/jshell/UserJdiUserRemoteTest.java                                           8173079    linux-all
 jdk/jshell/UserInputTest.java                                                   8169536    generic-all
+jdk/jshell/ExceptionsTest.java                                                  8200701    windows-all
 
 ###########################################################################
 #
--- a/test/langtools/jdk/javadoc/doclet/testModules/jdk/element-list	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/jdk/javadoc/doclet/testModules/jdk/element-list	Fri Apr 06 17:06:58 2018 -0400
@@ -332,7 +332,6 @@
 com.sun.security.auth.module
 module:jdk.security.jgss
 com.sun.security.jgss
-module:jdk.snmp
 module:jdk.xml.dom
 org.w3c.dom.css
 org.w3c.dom.html
--- a/test/langtools/jdk/jshell/ExceptionsTest.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/jdk/jshell/ExceptionsTest.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * 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,16 +24,20 @@
 /*
  * @test
  * @summary Tests for exceptions
+ * @bug 8198801
  * @build KullaTesting TestingInputStream
  * @run testng ExceptionsTest
  */
 
-import jdk.jshell.SnippetEvent;
-import jdk.jshell.EvalException;
+import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
+import jdk.jshell.EvalException;
+import jdk.jshell.JShellException;
+import jdk.jshell.Snippet;
+import jdk.jshell.SnippetEvent;
+import jdk.jshell.UnresolvedReferenceException;
 
-import jdk.jshell.Snippet;
 import org.testng.annotations.Test;
 
 import static org.testng.Assert.*;
@@ -81,6 +85,54 @@
                         newStackTraceElement("", "", cr3.snippet(), 1)));
     }
 
+    public void throwChained() {
+        String message1 = "error_message1";
+        String message2 = "error_message2";
+        Snippet s1 = methodKey(assertEval("void p() throws Exception { ((String) null).toString(); }"));
+        Snippet s2 = methodKey(assertEval("void n() throws Exception { try { p(); } catch (Exception ex) { throw new java.io.IOException(\"" + message2 + "\", ex); }}"));
+        Snippet s3 = methodKey(assertEval("void m() {\n"
+                + "try { n(); }\n"
+                + "catch (Exception ex) {\n"
+                + "    throw new RuntimeException(\"" + message1 + "\", ex);\n"
+                + "}}"));
+        SnippetEvent cr4 = assertEvalException("m();");
+        assertExceptionMatch(cr4,
+                new ExceptionInfo(RuntimeException.class, message1,
+                        new ExceptionInfo(IOException.class, message2,
+                                new ExceptionInfo(NullPointerException.class, null,
+                                        newStackTraceElement("", "p", s1, 1),
+                                        newStackTraceElement("", "n", s2, 1),
+                                        newStackTraceElement("", "m", s3, 2),
+                                        newStackTraceElement("", "", cr4.snippet(), 1)),
+                                newStackTraceElement("", "n", s2, 1),
+                                newStackTraceElement("", "m", s3, 2),
+                                newStackTraceElement("", "", cr4.snippet(), 1)),
+                        newStackTraceElement("", "m", s3, 4),
+                        newStackTraceElement("", "", cr4.snippet(), 1)));
+    }
+
+    public void throwChainedUnresolved() {
+        String message1 = "error_message1";
+        String message2 = "error_message2";
+        Snippet s1 = methodKey(assertEval("void p() throws Exception { ((String) null).toString(); }"));
+        Snippet s2 = methodKey(assertEval("void n() throws Exception { try { p(); } catch (Exception ex) { throw new java.io.IOException(\"" + message2 + "\", ex); }}"));
+        Snippet s3 = methodKey(assertEval("void m() {\n"
+                + "try { n(); }\n"
+                + "catch (Exception ex) {\n"
+                + "    throw new RuntimeException(\"" + message1 + "\", ex);\n"
+                + "}}"));
+        getState().drop(s1);
+        SnippetEvent cr4 = assertEvalException("m();");
+        assertExceptionMatch(cr4,
+                new ExceptionInfo(RuntimeException.class, message1,
+                        new UnresolvedExceptionInfo(s2,
+                                newStackTraceElement("", "n", s2, 1),
+                                newStackTraceElement("", "m", s3, 2),
+                                newStackTraceElement("", "", cr4.snippet(), 1)),
+                        newStackTraceElement("", "m", s3, 4),
+                        newStackTraceElement("", "", cr4.snippet(), 1)));
+    }
+
     public void throwFromConstructor() {
         String message = "error_message";
         Snippet s1 = methodKey(assertEval("void f() { throw new RuntimeException(\"" + message + "\"); }"));
@@ -171,15 +223,42 @@
         return new StackTraceElement(className, methodName, "#" + key.id(), lineNumber);
     }
 
-    private static class ExceptionInfo {
-        public final Class<? extends Throwable> exception;
-        public final String message;
+    private static class AnyExceptionInfo {
+
         public final StackTraceElement[] stackTraceElements;
 
-        public ExceptionInfo(Class<? extends Throwable> exception, String message, StackTraceElement...stackTraceElements) {
+        public AnyExceptionInfo(StackTraceElement... stackTraceElements) {
+            this.stackTraceElements = stackTraceElements.length == 0 ? null : stackTraceElements;
+        }
+    }
+
+    private static class UnresolvedExceptionInfo extends AnyExceptionInfo {
+
+        public final Snippet sn;
+
+        public UnresolvedExceptionInfo(Snippet sn, StackTraceElement... stackTraceElements) {
+            super(stackTraceElements);
+            this.sn = sn;
+        }
+    }
+
+    private static class ExceptionInfo extends AnyExceptionInfo {
+
+        public final Class<? extends Throwable> exception;
+        public final String message;
+        public final AnyExceptionInfo cause;
+
+        public ExceptionInfo(Class<? extends Throwable> exception, String message,
+                StackTraceElement... stackTraceElements) {
+            this(exception, message, null, stackTraceElements);
+        }
+
+        public ExceptionInfo(Class<? extends Throwable> exception, String message,
+                AnyExceptionInfo cause, StackTraceElement... stackTraceElements) {
+            super(stackTraceElements);
             this.exception = exception;
             this.message = message;
-            this.stackTraceElements = stackTraceElements.length == 0 ? null : stackTraceElements;
+            this.cause = cause;
         }
     }
 
@@ -188,28 +267,51 @@
     }
 
     private void assertExceptionMatch(SnippetEvent cr, ExceptionInfo exceptionInfo) {
-        assertNotNull(cr.exception(), "Expected exception was not thrown: " + exceptionInfo.exception);
-        if (cr.exception() instanceof EvalException) {
-            EvalException ex = (EvalException) cr.exception();
+        assertExceptionMatch(cr.exception(), cr.snippet().source(), exceptionInfo);
+    }
+
+    private void assertExceptionMatch(Throwable exception, String source, ExceptionInfo exceptionInfo) {
+        assertNotNull(exception, "Expected exception was not thrown: " + exceptionInfo.exception);
+        if (exception instanceof EvalException) {
+            EvalException ex = (EvalException) exception;
             String actualException = ex.getExceptionClassName();
             String expectedException = exceptionInfo.exception.getCanonicalName();
-            String stackTrace = getStackTrace(ex);
-            String source = cr.snippet().source();
             assertEquals(actualException, expectedException,
                     String.format("Given \"%s\" expected exception: %s, got: %s%nStack trace:%n%s",
-                            source, expectedException, actualException, stackTrace));
+                            source, expectedException, actualException, getStackTrace(ex)));
             if (exceptionInfo.message != null) {
                 assertEquals(ex.getMessage(), exceptionInfo.message,
                         String.format("Given \"%s\" expected message: %s, got: %s",
                                 source, exceptionInfo.message, ex.getMessage()));
             }
-            if (exceptionInfo.stackTraceElements != null) {
-                assertStackTrace(ex.getStackTrace(), exceptionInfo.stackTraceElements,
-                        String.format("Given \"%s\"%nStack trace:%n%s%n",
-                                source, stackTrace));
+            assertStackMatch(ex, source, exceptionInfo);
+            if (exceptionInfo.cause != null) {
+                assertAnyExceptionMatch(exception.getCause(), exceptionInfo.cause);
             }
         } else {
-            fail("Unexpected execution exceptionInfo: " + cr.exception());
+            fail("Unexpected exception: " + exception + " or exceptionInfo: " + exceptionInfo);
+        }
+    }
+
+    private void assertStackMatch(JShellException exception, String source, AnyExceptionInfo exceptionInfo) {
+        if (exceptionInfo.stackTraceElements != null) {
+            assertStackTrace(exception.getStackTrace(), exceptionInfo.stackTraceElements,
+                    String.format("Given \"%s\"%nStack trace:%n%s%n",
+                            source, getStackTrace(exception)));
+        }
+    }
+
+    private void assertAnyExceptionMatch(Throwable exception, AnyExceptionInfo exceptionInfo) {
+        if (exceptionInfo instanceof ExceptionInfo) {
+            assertExceptionMatch(exception, "", (ExceptionInfo) exceptionInfo);
+        } else {
+            assertTrue(exceptionInfo instanceof UnresolvedExceptionInfo, "Bad exceptionInfo: " + exceptionInfo);
+            assertTrue(exception instanceof UnresolvedReferenceException,
+                    "Expected UnresolvedReferenceException: " + exception);
+            UnresolvedExceptionInfo uei = (UnresolvedExceptionInfo) exceptionInfo;
+            UnresolvedReferenceException ure = (UnresolvedReferenceException) exception;
+            assertEquals(ure.getSnippet(), uei.sn);
+            assertStackMatch(ure, "", exceptionInfo);
         }
     }
 
@@ -236,7 +338,7 @@
         }
     }
 
-    private String getStackTrace(EvalException ex) {
+    private String getStackTrace(Throwable ex) {
         StringWriter st = new StringWriter();
         ex.printStackTrace(new PrintWriter(st));
         return st.toString();
--- a/test/langtools/jdk/jshell/ToolSimpleTest.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/jdk/jshell/ToolSimpleTest.java	Fri Apr 06 17:06:58 2018 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103  8165405 8173073 8173848 8174041 8173916 8174028 8174262 8174797 8177079 8180508 8177466 8172154 8192979 8191842 8198573
+ * @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103  8165405 8173073 8173848 8174041 8173916 8174028 8174262 8174797 8177079 8180508 8177466 8172154 8192979 8191842 8198573 8198801
  * @summary Simple jshell tool tests
  * @modules jdk.compiler/com.sun.tools.javac.api
  *          jdk.compiler/com.sun.tools.javac.main
@@ -87,6 +87,32 @@
     }
 
     @Test
+    public void testChainedThrow() {
+        test(
+                (a) -> assertCommand(a, "void p() throws Exception { ((String) null).toString(); }",
+                        "|  created method p()"),
+                (a) -> assertCommand(a, "void n() throws Exception { try { p(); } catch (Exception ex) { throw new IOException(\"bar\", ex); }}",
+                        "|  created method n()"),
+                (a) -> assertCommand(a, "void m() { try { n(); } catch (Exception ex) { throw new RuntimeException(\"foo\", ex); }}",
+                        "|  created method m()"),
+                (a) -> assertCommand(a, "m()",
+                          "|  Exception java.lang.RuntimeException: foo\n"
+                        + "|        at m (#3:1)\n"
+                        + "|        at (#4:1)\n"
+                        + "|  Caused by: java.io.IOException: bar\n"
+                        + "|        at n (#2:1)\n"
+                        + "|        ...\n"
+                        + "|  Caused by: java.lang.NullPointerException\n"
+                        + "|        at p (#1:1)\n"
+                        + "|        ..."),
+                (a) -> assertCommand(a, "/drop p",
+                        "|  dropped method p()"),
+                (a) -> assertCommand(a, "m()",
+                        "|  attempted to call method n() which cannot be invoked until method p() is declared")
+        );
+    }
+
+    @Test
     public void oneLineOfError() {
         test(
                 (a) -> assertCommand(a, "12+", null),
--- a/test/langtools/tools/javac/ClassFileModifiers/ClassModifiers.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/ClassFileModifiers/ClassModifiers.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
  * file are correct, including those within InnerClasses attributes.
  * @author John Rose (jrose). Entered as a regression test by Bill Maddox (maddox).
  *
- * @compile/ref=ClassModifiers.out --debug:dumpmodifiers=ci ClassModifiers.java
+ * @compile/ref=ClassModifiers.out --debug=dumpmodifiers=ci ClassModifiers.java
  *
  */
 
--- a/test/langtools/tools/javac/ClassFileModifiers/MemberModifiers.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/ClassFileModifiers/MemberModifiers.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 4249112 4785453
  * @summary Verify that implicit member modifiers are set correctly.
  *
- * @compile/ref=MemberModifiers.out --debug:dumpmodifiers=cfm MemberModifiers.java
+ * @compile/ref=MemberModifiers.out --debug=dumpmodifiers=cfm MemberModifiers.java
  */
 
 // Currently, we check only that members of final classes are not final.
--- a/test/langtools/tools/javac/Diagnostics/6722234/T6722234a.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/Diagnostics/6722234/T6722234a.java	Fri Apr 06 17:06:58 2018 -0400
@@ -3,8 +3,8 @@
  * @bug     6722234
  * @summary javac diagnostics need better integration with the type-system
  * @author  mcimadamore
- * @compile/fail/ref=T6722234a_1.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars T6722234a.java
- * @compile/fail/ref=T6722234a_2.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T6722234a.java
+ * @compile/fail/ref=T6722234a_1.out -XDrawDiagnostics --diags=formatterOptions=disambiguateTvars T6722234a.java
+ * @compile/fail/ref=T6722234a_2.out -XDrawDiagnostics --diags=formatterOptions=disambiguateTvars,where T6722234a.java
  */
 
 class T6722234a<T extends String> {
--- a/test/langtools/tools/javac/Diagnostics/6722234/T6722234b.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/Diagnostics/6722234/T6722234b.java	Fri Apr 06 17:06:58 2018 -0400
@@ -3,8 +3,8 @@
  * @bug     6722234 8078024
  * @summary javac diagnostics need better integration with the type-system
  * @author  mcimadamore
- * @compile/fail/ref=T6722234b_1.out -XDrawDiagnostics --diags:formatterOptions=simpleNames T6722234b.java
- * @compile/fail/ref=T6722234b_2.out -XDrawDiagnostics --diags:formatterOptions=simpleNames,where T6722234b.java
+ * @compile/fail/ref=T6722234b_1.out -XDrawDiagnostics --diags=formatterOptions=simpleNames T6722234b.java
+ * @compile/fail/ref=T6722234b_2.out -XDrawDiagnostics --diags=formatterOptions=simpleNames,where T6722234b.java
  */
 
 import java.util.*;
--- a/test/langtools/tools/javac/Diagnostics/6722234/T6722234c.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/Diagnostics/6722234/T6722234c.java	Fri Apr 06 17:06:58 2018 -0400
@@ -3,7 +3,7 @@
  * @bug     6722234
  * @summary javac diagnostics need better integration with the type-system
  * @author  mcimadamore
- * @compile/fail/ref=T6722234c.out -XDrawDiagnostics --diags:formatterOptions=simpleNames T6722234c.java
+ * @compile/fail/ref=T6722234c.out -XDrawDiagnostics --diags=formatterOptions=simpleNames T6722234c.java
  */
 
 class T6722234c {
--- a/test/langtools/tools/javac/Diagnostics/6722234/T6722234d.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/Diagnostics/6722234/T6722234d.java	Fri Apr 06 17:06:58 2018 -0400
@@ -3,8 +3,8 @@
  * @bug     6722234 8078024
  * @summary javac diagnostics need better integration with the type-system
  * @author  mcimadamore
- * @compile/fail/ref=T6722234d_1.out -XDrawDiagnostics --diags:formatterOptions=where T6722234d.java
- * @compile/fail/ref=T6722234d_2.out -XDrawDiagnostics --diags:formatterOptions=where,simpleNames T6722234d.java
+ * @compile/fail/ref=T6722234d_1.out -XDrawDiagnostics --diags=formatterOptions=where T6722234d.java
+ * @compile/fail/ref=T6722234d_2.out -XDrawDiagnostics --diags=formatterOptions=where,simpleNames T6722234d.java
  */
 
 class T6722234d {
--- a/test/langtools/tools/javac/Diagnostics/6862608/T6862608a.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/Diagnostics/6862608/T6862608a.java	Fri Apr 06 17:06:58 2018 -0400
@@ -3,7 +3,7 @@
  * @bug     6862608
  * @summary rich diagnostic sometimes contain wrong type variable numbering
  * @author  mcimadamore
- * @compile/fail/ref=T6862608a.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T6862608a.java
+ * @compile/fail/ref=T6862608a.out -XDrawDiagnostics --diags=formatterOptions=disambiguateTvars,where T6862608a.java
  */
 
 
--- a/test/langtools/tools/javac/Diagnostics/6862608/T6862608b.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/Diagnostics/6862608/T6862608b.java	Fri Apr 06 17:06:58 2018 -0400
@@ -3,7 +3,7 @@
  * @bug     6862608
  * @summary rich diagnostic sometimes contain wrong type variable numbering
  * @author  mcimadamore
- * @compile/fail/ref=T6862608b.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T6862608b.java
+ * @compile/fail/ref=T6862608b.out -XDrawDiagnostics --diags=formatterOptions=disambiguateTvars,where T6862608b.java
  */
 
 class T66862608b<T extends String, S> {
--- a/test/langtools/tools/javac/Diagnostics/7010608/Test.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/Diagnostics/7010608/Test.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,9 +46,9 @@
         try {
             test(Arrays.<String>asList(),
                     "myfo://test:1: error: cannot find symbol");
-            test(Arrays.asList("--diags:layout=OLD"),
+            test(Arrays.asList("--diags=layout=OLD"),
                     "myfo://test:1: cannot find symbol");
-            test(Arrays.asList("--diags:legacy"),
+            test(Arrays.asList("--diags=legacy"),
                     "myfo://test:1: cannot find symbol");
         } finally {
             Locale.setDefault(prev);
--- a/test/langtools/tools/javac/Diagnostics/8010387/T8010387.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/Diagnostics/8010387/T8010387.java	Fri Apr 06 17:06:58 2018 -0400
@@ -2,7 +2,7 @@
  * @test /nodynamiccopyright/
  * @bug     8010387
  * @summary rich diagnostic sometimes contain wrong type variable numbering
- * @compile/fail/ref=T8010387.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T8010387.java
+ * @compile/fail/ref=T8010387.out -XDrawDiagnostics --diags=formatterOptions=disambiguateTvars,where T8010387.java
  */
 abstract class T8010387<X> {
 
--- a/test/langtools/tools/javac/InterfaceMemberClassModifiers.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/InterfaceMemberClassModifiers.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Verify that invalid access modifiers on interface members don't cause crash.
  * @author maddox
  *
- * @compile/fail/ref=InterfaceMemberClassModifiers.out --diags:layout=%b:%l:%_%m InterfaceMemberClassModifiers.java
+ * @compile/fail/ref=InterfaceMemberClassModifiers.out --diags=layout=%b:%l:%_%m InterfaceMemberClassModifiers.java
  */
 
 public interface InterfaceMemberClassModifiers {
--- a/test/langtools/tools/javac/T6214885.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/T6214885.java	Fri Apr 06 17:06:58 2018 -0400
@@ -2,8 +2,8 @@
  * @test  /nodynamiccopyright/
  * @bug 6214885
  * @summary This test exercises features provided by the new internal Diagnostics API
- * @compile/fail/ref=T6214885a.out --diags:layout=%b:%l%_%t%m|%p%m T6214885.java
- * @compile/fail/ref=T6214885b.out --diags:layout=%b:%l:%c%_%t%m|%p%m T6214885.java
+ * @compile/fail/ref=T6214885a.out --diags=layout=%b:%l%_%t%m|%p%m T6214885.java
+ * @compile/fail/ref=T6214885b.out --diags=layout=%b:%l:%c%_%t%m|%p%m T6214885.java
  */
 class T6214885
 {
--- a/test/langtools/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java	Fri Apr 06 17:06:58 2018 -0400
@@ -2,7 +2,7 @@
  * @test /nodynamiccopyright/
  * @bug 8026963
  * @summary type annotations code crashes for lambdas with void argument
- * @compile/fail/ref=TypeAnnotationsCrashWithErroneousTreeTest.out -XDrawDiagnostics --should-stop:at=FLOW TypeAnnotationsCrashWithErroneousTreeTest.java
+ * @compile/fail/ref=TypeAnnotationsCrashWithErroneousTreeTest.out -XDrawDiagnostics --should-stop=at=FLOW TypeAnnotationsCrashWithErroneousTreeTest.java
  */
 
 public class TypeAnnotationsCrashWithErroneousTreeTest {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/T8199744/IncorrectMsgQualifiedReceiverTest.java	Fri Apr 06 17:06:58 2018 -0400
@@ -0,0 +1,11 @@
+/*
+ * @test  /nodynamiccopyright/
+ * @bug 8199744
+ * @summary Incorrect compiler message for ReceiverParameter in inner class constructor
+ * @compile/fail/ref=IncorrectMsgQualifiedReceiverTest.out -XDrawDiagnostics IncorrectMsgQualifiedReceiverTest.java
+ */
+
+class IncorrectMsgQualifiedReceiverTest {
+    void foo(int any, IncorrectMsgQualifiedReceiverTest IncorrectMsgQualifiedReceiverTest.this) {}
+    void bar(int any, IncorrectMsgQualifiedReceiverTest IncorrectMsgQualifiedReceiverTest.this, int another) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/T8199744/IncorrectMsgQualifiedReceiverTest.out	Fri Apr 06 17:06:58 2018 -0400
@@ -0,0 +1,3 @@
+IncorrectMsgQualifiedReceiverTest.java:9:91: compiler.err.this.as.identifier
+IncorrectMsgQualifiedReceiverTest.java:10:91: compiler.err.this.as.identifier
+2 errors
--- a/test/langtools/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -237,7 +237,7 @@
         JavacTask task = tool.getTask(null,
                                       fm,
                                       devNull,
-                                      Arrays.asList("--should-stop:at=FLOW"),
+                                      Arrays.asList("--should-stop=at=FLOW"),
                                       null,
                                       Arrays.asList(new MyFileObject(code)));
 
--- a/test/langtools/tools/javac/annotations/repeatingAnnotations/BasicRepeatingAnnotations.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/annotations/repeatingAnnotations/BasicRepeatingAnnotations.java	Fri Apr 06 17:06:58 2018 -0400
@@ -72,7 +72,7 @@
         }
         a = BasicNonRepeatingAnno.class.getAnnotation(Foo.class);
         if (a == null) {
-            throw new RuntimeException("Repeated annoation not directly present");
+            throw new RuntimeException("Repeated annotation not directly present");
         }
     }
 }
--- a/test/langtools/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,7 +54,7 @@
             String test = TEMPLATE.replace("CONTENT", tc.snippet);
             List<JavaFileObject> files = Arrays.asList(new MyFileObject(test));
             StringWriter out = new StringWriter();
-            List<String> options = Arrays.asList("-XDrawDiagnostics", "--should-stop:at=FLOW");
+            List<String> options = Arrays.asList("-XDrawDiagnostics", "--should-stop=at=FLOW");
             JavacTask task = (JavacTask) compiler.getTask(out, null, null, options, null, files);
 
             new TreePathScanner<Void, Void>() {
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java	Fri Apr 06 17:06:58 2018 -0400
@@ -84,7 +84,7 @@
     }
 
     @TADescription(annotation = "RTAs", type = EXCEPTION_PARAMETER, exceptionIndex = 0)
-    public String exceptionRepeatableAnnoation() {
+    public String exceptionRepeatableAnnotation() {
         return "void exception() { try { new Object(); } catch(@RTA @RTA Exception e) { } }";
     }
 
--- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodParameters.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodParameters.java	Fri Apr 06 17:06:58 2018 -0400
@@ -223,7 +223,7 @@
             genericLocation = { 0, 0 }, paramIndex = 1)
     @TADescription(annotation = "RTCs", type = METHOD_FORMAL_PARAMETER,
             genericLocation = { 0, 0, 0, 0 }, paramIndex = 1)
-    public String methodParamAsVarargRepeatableAnnoattion() {
+    public String methodParamAsVarargRepeatableAnnotation() {
         return "void test(Object b, @RTC @RTC String @RTA @RTA [] @RTB @RTB ... a) { }";
     }
 
--- a/test/langtools/tools/javac/api/6731573/T6731573.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/api/6731573/T6731573.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,8 +62,8 @@
 
     enum SourceLine {
         STANDARD(null),
-        ENABLED("--diags:showSource=true"),
-        DISABLED("--diags:showSource=false");
+        ENABLED("--diags=showSource=true"),
+        DISABLED("--diags=showSource=false");
 
         String optValue;
 
--- a/test/langtools/tools/javac/api/taskListeners/EventsBalancedTest.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/api/taskListeners/EventsBalancedTest.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,11 +63,11 @@
         test(null, Arrays.asList(b, a));
 
         for (CompileState stop : CompileState.values()) {
-            test(Arrays.asList("--should-stop:ifNoError=" + stop,
-                               "--should-stop:ifError=" + stop),
+            test(Arrays.asList("--should-stop=ifNoError=" + stop,
+                               "--should-stop=ifError=" + stop),
                  Arrays.asList(a, b));
-            test(Arrays.asList("--should-stop:ifNoError=" + stop,
-                               "--should-stop:ifError=" + stop),
+            test(Arrays.asList("--should-stop=ifNoError=" + stop,
+                               "--should-stop=ifError=" + stop),
                  Arrays.asList(b, a));
         }
     }
--- a/test/langtools/tools/javac/completionDeps/DepsAndAnno.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/completionDeps/DepsAndAnno.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,7 @@
     public static void main(String[] args) {
         ToolBox toolBox = new ToolBox();
         new JavacTask(toolBox, Task.Mode.CMDLINE)
-               .options("--debug:completionDeps")
+               .options("--debug=completionDeps")
                .outdir(".")
                .files(ToolBox.testSrc + "/DepsAndAnno.java")
                .run();
--- a/test/langtools/tools/javac/completionDeps/DepsAndDocLint.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/completionDeps/DepsAndDocLint.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8078389
  * @summary Make sure there is no interference between completionDeps and doclint
- * @compile --debug:completionDeps -Xdoclint DepsAndDocLint.java
+ * @compile --debug=completionDeps -Xdoclint DepsAndDocLint.java
  */
 
 public class DepsAndDocLint {
--- a/test/langtools/tools/javac/diags/examples/ApplicableMethodFound.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/ApplicableMethodFound.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 // key: compiler.misc.applicable.method.found
 // key: compiler.note.verbose.resolve.multi
-// options: --debug:verboseResolution=applicable,success
+// options: --debug=verboseResolution=applicable,success
 
 class ApplicableMethodFound {
 
--- a/test/langtools/tools/javac/diags/examples/ApplicableMethodFound1.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/ApplicableMethodFound1.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * 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 @@
 // key: compiler.misc.applicable.method.found.1
 // key: compiler.note.verbose.resolve.multi
 // key: compiler.misc.partial.inst.sig
-// options: --debug:verboseResolution=applicable,success
+// options: --debug=verboseResolution=applicable,success
 
 class ApplicableMethodFound1 {
 
--- a/test/langtools/tools/javac/diags/examples/DeferredMethodInst.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/DeferredMethodInst.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 // key: compiler.note.verbose.resolve.multi
 // key: compiler.note.deferred.method.inst
 // key: compiler.misc.partial.inst.sig
-// options: --debug:verboseResolution=applicable,success,deferred-inference
+// options: --debug=verboseResolution=applicable,success,deferred-inference
 
 class DeferredMethodInst {
 
--- a/test/langtools/tools/javac/diags/examples/LambdaDeduplicate.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/LambdaDeduplicate.java	Fri Apr 06 17:06:58 2018 -0400
@@ -23,7 +23,7 @@
 
 
 // key: compiler.note.verbose.l2m.deduplicate
-// options: --debug:dumpLambdaToMethodDeduplication
+// options: --debug=dumpLambdaToMethodDeduplication
 
 import java.util.function.Function;
 
--- a/test/langtools/tools/javac/diags/examples/LambdaStat.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/LambdaStat.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@
  */
 
 // key: compiler.note.lambda.stat
-// options: --debug:dumpLambdaToMethodStats
+// options: --debug=dumpLambdaToMethodStats
 
 class LambdaStat {
     Runnable r = ()->{};
--- a/test/langtools/tools/javac/diags/examples/MrefStat.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/MrefStat.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@
  */
 
 // key: compiler.note.mref.stat
-// options: --debug:dumpLambdaToMethodStats
+// options: --debug=dumpLambdaToMethodStats
 
 class MrefStat {
     Runnable r = MrefStat::m;
--- a/test/langtools/tools/javac/diags/examples/MrefStat1.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/MrefStat1.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@
  */
 
 // key: compiler.note.mref.stat.1
-// options: --debug:dumpLambdaToMethodStats
+// options: --debug=dumpLambdaToMethodStats
 
 class MrefStat1 {
 
--- a/test/langtools/tools/javac/diags/examples/NotApplicableMethodFound.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/NotApplicableMethodFound.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 // key: compiler.err.cant.apply.symbol
 // key: compiler.misc.no.conforming.assignment.exists
 // key: compiler.misc.inconvertible.types
-// options: --debug:verboseResolution=inapplicable,failure
+// options: --debug=verboseResolution=inapplicable,failure
 
 class NotApplicableMethodFound {
 
--- a/test/langtools/tools/javac/diags/examples/PartialInstSig.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/PartialInstSig.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * 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 @@
 // key: compiler.misc.applicable.method.found.1
 // key: compiler.note.verbose.resolve.multi
 // key: compiler.misc.partial.inst.sig
-// options: --debug:verboseResolution=applicable,success
+// options: --debug=verboseResolution=applicable,success
 
 class PartialInstSig {
 
--- a/test/langtools/tools/javac/diags/examples/VerboseResolveMulti.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/VerboseResolveMulti.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 // key: compiler.misc.applicable.method.found
 // key: compiler.note.verbose.resolve.multi
-// options: --debug:verboseResolution=applicable,success
+// options: --debug=verboseResolution=applicable,success
 
 class VerboseResolveMulti {
 
--- a/test/langtools/tools/javac/diags/examples/VerboseResolveMulti1.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/VerboseResolveMulti1.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 // key: compiler.err.cant.apply.symbol
 // key: compiler.misc.no.conforming.assignment.exists
 // key: compiler.misc.inconvertible.types
-// options: --debug:verboseResolution=inapplicable,failure
+// options: --debug=verboseResolution=inapplicable,failure
 
 class VerboseResolveMulti1 {
 
--- a/test/langtools/tools/javac/diags/examples/WhereCaptured.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/WhereCaptured.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
 // key: compiler.err.cant.apply.symbol
 // key: compiler.misc.incompatible.eq.bounds
 // key: compiler.misc.captured.type
-// options: --diags:formatterOptions=where,simpleNames
+// options: --diags=formatterOptions=where,simpleNames
 // run: simple
 
 import java.util.*;
--- a/test/langtools/tools/javac/diags/examples/WhereCaptured1.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/WhereCaptured1.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
 // key: compiler.misc.incompatible.eq.bounds
 // key: compiler.misc.captured.type
 // key: compiler.misc.type.null
-// options: --diags:formatterOptions=where,simpleNames
+// options: --diags=formatterOptions=where,simpleNames
 // run: simple
 
 import java.util.*;
--- a/test/langtools/tools/javac/diags/examples/WhereFreshTvar.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/WhereFreshTvar.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 // key: compiler.misc.where.description.typevar
 // key: compiler.err.prob.found.req
 // key: compiler.misc.inconvertible.types
-// options: --diags:formatterOptions=where,simpleNames
+// options: --diags=formatterOptions=where,simpleNames
 // run: simple
 
 import java.util.*;
--- a/test/langtools/tools/javac/diags/examples/WhereIntersection.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/WhereIntersection.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 // key: compiler.misc.where.description.intersection.1
 // key: compiler.misc.where.intersection
 // key: compiler.err.prob.found.req
-// options: --diags:formatterOptions=where
+// options: --diags=formatterOptions=where
 // run: simple
 
 class WhereIntersection {
--- a/test/langtools/tools/javac/diags/examples/WhereIntersection2.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/WhereIntersection2.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
 // key: compiler.misc.where.description.intersection
 // key: compiler.misc.where.intersection
 // key: compiler.err.prob.found.req
-// options: --diags:formatterOptions=where
+// options: --diags=formatterOptions=where
 // run: simple
 
 class WhereIntersection2 {
--- a/test/langtools/tools/javac/diags/examples/WhereTypeVar.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/WhereTypeVar.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
 // key: compiler.err.cant.apply.symbol
 // key: compiler.misc.no.conforming.assignment.exists
 // key: compiler.misc.inconvertible.types
-// options: --diags:formatterOptions=where,disambiguateTvars
+// options: --diags=formatterOptions=where,disambiguateTvars
 // run: simple
 
 class WhereTypeVar<T extends String> {
--- a/test/langtools/tools/javac/diags/examples/WhereTypeVar2.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/diags/examples/WhereTypeVar2.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 // key: compiler.misc.where.description.typevar
 // key: compiler.misc.where.typevar
 // key: compiler.err.prob.found.req
-// options: --diags:formatterOptions=where
+// options: --diags=formatterOptions=where
 // run: simple
 
 class WhereTypeVar2 {
--- a/test/langtools/tools/javac/failover/CheckAttributedTree.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/CheckAttributedTree.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -315,7 +315,7 @@
             totalNumberOfCompilations++;
             newCompilationTask()
                 .withWriter(pw)
-                    .withOption("--should-stop:at=ATTR")
+                    .withOption("--should-stop=at=ATTR")
                     .withOption("-XDverboseCompilePolicy")
                     .withOption("-Xdoclint:none")
                     .withSource(files.iterator().next())
--- a/test/langtools/tools/javac/failover/FailOver01.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver01.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver01.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver01.java
+ * @compile/fail/ref=FailOver01.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver01.java
  */
 
 class Test { { x = "" } }
--- a/test/langtools/tools/javac/failover/FailOver02.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver02.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver02.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver02.java
+ * @compile/fail/ref=FailOver02.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver02.java
  */
 
 class Test implements AutoCloseable {
--- a/test/langtools/tools/javac/failover/FailOver03.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver03.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver03.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver03.java
+ * @compile/fail/ref=FailOver03.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver03.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver04.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver04.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver04.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver04.java
+ * @compile/fail/ref=FailOver04.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver04.java
  */
 
 class Test {
--- a/test/langtools/tools/javac/failover/FailOver05.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver05.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver05.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver05.java
+ * @compile/fail/ref=FailOver05.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver05.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver06.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver06.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver06.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver06.java
+ * @compile/fail/ref=FailOver06.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver06.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver07.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver07.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver07.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver07.java
+ * @compile/fail/ref=FailOver07.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver07.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver08.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver08.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver08.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver08.java
+ * @compile/fail/ref=FailOver08.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver08.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver09.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver09.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver09.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver09.java
+ * @compile/fail/ref=FailOver09.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver09.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver10.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver10.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver10.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver10.java
+ * @compile/fail/ref=FailOver10.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver10.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver11.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver11.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver11.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver11.java
+ * @compile/fail/ref=FailOver11.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver11.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver12.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver12.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver12.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver12.java
+ * @compile/fail/ref=FailOver12.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver12.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver13.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver13.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver13.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver13.java
+ * @compile/fail/ref=FailOver13.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver13.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver14.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver14.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver14.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver14.java
+ * @compile/fail/ref=FailOver14.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver14.java
  */
 
 class Test extends Test  {
--- a/test/langtools/tools/javac/failover/FailOver15.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/failover/FailOver15.java	Fri Apr 06 17:06:58 2018 -0400
@@ -3,7 +3,7 @@
  * @bug 6970584 7060926
  * @summary Attr.PostAttrAnalyzer misses a case
  *
- * @compile/fail/ref=FailOver15.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver15.java
+ * @compile/fail/ref=FailOver15.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver15.java
  */
 
 class Test {
--- a/test/langtools/tools/javac/generics/inference/8158355/T8158355.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/generics/inference/8158355/T8158355.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @test
  * @bug 8158355
  * @summary Inference graph dot support broken
- * @compile --debug:dumpInferenceGraphsTo=. T8158355.java
+ * @compile --debug=dumpInferenceGraphsTo=. T8158355.java
  */
 import java.util.List;
 
--- a/test/langtools/tools/javac/lambda/8131742/T8131742.out	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/lambda/8131742/T8131742.out	Fri Apr 06 17:06:58 2018 -0400
@@ -1,4 +1,2 @@
-T8131742.java:8:38: compiler.err.expected3: ',', ')', '['
 T8131742.java:8:39: compiler.err.this.as.identifier
-T8131742.java:8:43: compiler.err.expected: ';'
-3 errors
+1 error
--- a/test/langtools/tools/javac/lambda/MostSpecific09.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/lambda/MostSpecific09.java	Fri Apr 06 17:06:58 2018 -0400
@@ -2,7 +2,7 @@
  * @test /nodynamiccopyright/
  * @bug 8029718 8065800
  * @summary Should always use lambda body structure to disambiguate overload resolution
- * @compile/fail/ref=MostSpecific09.out -XDrawDiagnostics --should-stop:at=ATTR --debug:verboseResolution=applicable,success MostSpecific09.java
+ * @compile/fail/ref=MostSpecific09.out -XDrawDiagnostics --should-stop=at=ATTR --debug=verboseResolution=applicable,success MostSpecific09.java
  */
 
 class MostSpecific09 {
--- a/test/langtools/tools/javac/lambda/TestLambdaToMethodStats.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/lambda/TestLambdaToMethodStats.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -122,7 +122,7 @@
     @Override
     public void doWork() throws IOException {
         newCompilationTask()
-                .withOption("--debug:dumpLambdaToMethodStats")
+                .withOption("--debug=dumpLambdaToMethodStats")
                 .withSourceFromTemplate(template)
                 .generate(this::check);
     }
--- a/test/langtools/tools/javac/lambda/XDdumpLambdaToMethodStats.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/lambda/XDdumpLambdaToMethodStats.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8143217
  * @summary javac throws NPE when printing diagnostics for Lambda expressions
- * @compile XDdumpLambdaToMethodStats.java --debug:dumpLambdaToMethodStats
+ * @compile XDdumpLambdaToMethodStats.java --debug=dumpLambdaToMethodStats
  *
  */
 
--- a/test/langtools/tools/javac/lambda/bridge/TestMetafactoryBridges.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/lambda/bridge/TestMetafactoryBridges.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -274,7 +274,7 @@
             sourcefiles.add(new JavaSource(ck));
         }
         JavacTask ct = (JavacTask)tool.getTask(debugWriter, null, diagChecker,
-                    Arrays.asList("--debug:dumpLambdaToMethodStats", "-d", outDir.getAbsolutePath(),
+                    Arrays.asList("--debug=dumpLambdaToMethodStats", "-d", outDir.getAbsolutePath(),
                                   "-sourcepath", srcDir.getAbsolutePath(),
                                   "-classpath", classesDir.getAbsolutePath(),
                                   pp.preferOpt), null, sourcefiles);
--- a/test/langtools/tools/javac/lambda/deduplication/Deduplication.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/lambda/deduplication/Deduplication.java	Fri Apr 06 17:06:58 2018 -0400
@@ -77,18 +77,45 @@
         group((Function<Integer, Integer>) y -> j);
 
         group(
-                (Function<Integer, Integer>) y -> {
-                        while (true) {
-                              break;
-                        }
-                        return 42;
-                },
-                (Function<Integer, Integer>) y -> {
-                        while (true) {
-                              break;
-                        }
-                        return 42;
-                });
+                (Function<Integer, Integer>)
+                        y -> {
+                            while (true) {
+                                break;
+                            }
+                            return 42;
+                        },
+                (Function<Integer, Integer>)
+                        y -> {
+                            while (true) {
+                                break;
+                            }
+                            return 42;
+                        });
+
+        group(
+                (Function<Integer, Integer>)
+                        x -> {
+                            int y = x;
+                            return y;
+                        },
+                (Function<Integer, Integer>)
+                        x -> {
+                            int y = x;
+                            return y;
+                        });
+
+        group(
+                (Function<Integer, Integer>)
+                        x -> {
+                            int y = 0, z = x;
+                            return y;
+                        });
+        group(
+                (Function<Integer, Integer>)
+                        x -> {
+                            int y = 0, z = x;
+                            return z;
+                        });
 
         class Local {
             int i;
--- a/test/langtools/tools/javac/lambda/deduplication/DeduplicationTest.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/lambda/deduplication/DeduplicationTest.java	Fri Apr 06 17:06:58 2018 -0400
@@ -22,7 +22,7 @@
  */
 
 /**
- * @test 8200301
+ * @test 8200301 8201194
  * @summary deduplicate lambda methods with the same body, target type, and captured state
  * @modules jdk.jdeps/com.sun.tools.classfile jdk.compiler/com.sun.tools.javac.api
  *     jdk.compiler/com.sun.tools.javac.code jdk.compiler/com.sun.tools.javac.comp
@@ -32,6 +32,7 @@
  */
 import static java.nio.charset.StandardCharsets.UTF_8;
 import static java.util.stream.Collectors.joining;
+import static java.util.stream.Collectors.toList;
 import static java.util.stream.Collectors.toMap;
 import static java.util.stream.Collectors.toSet;
 
@@ -57,7 +58,6 @@
 import com.sun.tools.javac.tree.JCTree.JCLambda;
 import com.sun.tools.javac.tree.JCTree.JCMethodInvocation;
 import com.sun.tools.javac.tree.JCTree.JCTypeCast;
-import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
 import com.sun.tools.javac.tree.JCTree.Tag;
 import com.sun.tools.javac.tree.TreeScanner;
 import com.sun.tools.javac.util.Context;
@@ -70,10 +70,8 @@
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
-import java.util.Objects;
 import java.util.Set;
 import java.util.TreeSet;
-import java.util.function.BiFunction;
 import javax.tools.Diagnostic;
 import javax.tools.DiagnosticListener;
 import javax.tools.JavaFileObject;
@@ -160,36 +158,9 @@
         }
     }
 
-    /**
-     * Returns a symbol comparator that treats symbols that correspond to the same parameter of each
-     * of the given lambdas as equal.
-     */
-    private static BiFunction<Symbol, Symbol, Boolean> paramsEqual(JCLambda lhs, JCLambda rhs) {
-        return (x, y) -> {
-            Integer idx = paramIndex(lhs, x);
-            if (idx != null && idx != -1) {
-                if (Objects.equals(idx, paramIndex(rhs, y))) {
-                    return true;
-                }
-            }
-            return null;
-        };
-    }
-
-    /**
-     * Returns the index of the given symbol as a parameter of the given lambda, or else {@code -1}
-     * if is not a parameter.
-     */
-    private static Integer paramIndex(JCLambda lambda, Symbol sym) {
-        if (sym != null) {
-            int idx = 0;
-            for (JCVariableDecl param : lambda.params) {
-                if (sym == param.sym) {
-                    return idx;
-                }
-            }
-        }
-        return null;
+    /** Returns the parameter symbols of the given lambda. */
+    private static List<Symbol> paramSymbols(JCLambda lambda) {
+        return lambda.params.stream().map(x -> x.sym).collect(toList());
     }
 
     /** A diagnostic listener that records debug messages related to lambda desugaring. */
@@ -310,13 +281,14 @@
                         dedupedLambdas.put(lhs, first);
                     }
                     for (JCLambda rhs : curr) {
-                        if (!new TreeDiffer(paramsEqual(lhs, rhs)).scan(lhs.body, rhs.body)) {
+                        if (!new TreeDiffer(paramSymbols(lhs), paramSymbols(rhs))
+                                .scan(lhs.body, rhs.body)) {
                             throw new AssertionError(
                                     String.format(
                                             "expected lambdas to be equal\n%s\n%s", lhs, rhs));
                         }
-                        if (TreeHasher.hash(lhs, sym -> paramIndex(lhs, sym))
-                                != TreeHasher.hash(rhs, sym -> paramIndex(rhs, sym))) {
+                        if (TreeHasher.hash(lhs, paramSymbols(lhs))
+                                != TreeHasher.hash(rhs, paramSymbols(rhs))) {
                             throw new AssertionError(
                                     String.format(
                                             "expected lambdas to hash to the same value\n%s\n%s",
@@ -334,14 +306,15 @@
                     }
                     for (JCLambda lhs : curr) {
                         for (JCLambda rhs : lambdaGroups.get(j)) {
-                            if (new TreeDiffer(paramsEqual(lhs, rhs)).scan(lhs.body, rhs.body)) {
+                            if (new TreeDiffer(paramSymbols(lhs), paramSymbols(rhs))
+                                    .scan(lhs.body, rhs.body)) {
                                 throw new AssertionError(
                                         String.format(
                                                 "expected lambdas to not be equal\n%s\n%s",
                                                 lhs, rhs));
                             }
-                            if (TreeHasher.hash(lhs, sym -> paramIndex(lhs, sym))
-                                    == TreeHasher.hash(rhs, sym -> paramIndex(rhs, sym))) {
+                            if (TreeHasher.hash(lhs, paramSymbols(lhs))
+                                    == TreeHasher.hash(rhs, paramSymbols(rhs))) {
                                 throw new AssertionError(
                                         String.format(
                                                 "expected lambdas to hash to different values\n%s\n%s",
--- a/test/langtools/tools/javac/lambda/mostSpecific/StructuralMostSpecificTest.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/lambda/mostSpecific/StructuralMostSpecificTest.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -210,7 +210,7 @@
     public void doWork() throws Throwable {
         newCompilationTask()
                 .withSourceFromTemplate(sourceTemplate)
-                .withOption("--debug:verboseResolution=all,-predef,-internal,-object-init")
+                .withOption("--debug=verboseResolution=all,-predef,-internal,-object-init")
                 .analyze(this::check);
     }
 
--- a/test/langtools/tools/javac/missingSuperRecovery/MissingSuperRecovery.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/missingSuperRecovery/MissingSuperRecovery.java	Fri Apr 06 17:06:58 2018 -0400
@@ -5,7 +5,7 @@
  * class is no longer available during a subsequent compilation.
  * @author maddox
  * @build impl
- * @compile/fail/ref=MissingSuperRecovery.out --diags:layout=%b:%l:%_%m MissingSuperRecovery.java
+ * @compile/fail/ref=MissingSuperRecovery.out --diags=layout=%b:%l:%_%m MissingSuperRecovery.java
  */
 
 // Requires "golden" class file 'impl.class', which contains
--- a/test/langtools/tools/javac/modules/AddLimitMods.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/modules/AddLimitMods.java	Fri Apr 06 17:06:58 2018 -0400
@@ -120,7 +120,7 @@
         //real test
         new JavacTask(tb)
                 .options("--module-path", modulePath.toString(),
-                         "--should-stop:ifNoError=FLOW",
+                         "--should-stop=ifNoError=FLOW",
                          "--limit-modules", "java.base")
                 .outdir(modulePath)
                 .files(findJavaFiles(m1))
@@ -129,7 +129,7 @@
 
         new JavacTask(tb)
                 .options("--module-path", modulePath.toString(),
-                         "--should-stop:ifNoError=FLOW",
+                         "--should-stop=ifNoError=FLOW",
                          "--limit-modules", "java.base",
                          "--add-modules", "m2x")
                 .outdir(modulePath)
@@ -139,7 +139,7 @@
 
         new JavacTask(tb)
                 .options("--module-path", modulePath.toString(),
-                         "--should-stop:ifNoError=FLOW",
+                         "--should-stop=ifNoError=FLOW",
                          "--limit-modules", "java.base",
                          "--add-modules", "m2x,m3x")
                 .outdir(modulePath)
@@ -149,7 +149,7 @@
 
         new JavacTask(tb)
                 .options("--module-path", modulePath.toString(),
-                         "--should-stop:ifNoError=FLOW",
+                         "--should-stop=ifNoError=FLOW",
                          "--limit-modules", "m2x")
                 .outdir(modulePath)
                 .files(findJavaFiles(m1))
@@ -158,7 +158,7 @@
 
         new JavacTask(tb)
                 .options("--module-path", modulePath.toString(),
-                         "--should-stop:ifNoError=FLOW",
+                         "--should-stop=ifNoError=FLOW",
                          "--limit-modules", "m3x")
                 .outdir(modulePath)
                 .files(findJavaFiles(m1))
@@ -167,7 +167,7 @@
 
         new JavacTask(tb)
                 .options("--module-path", modulePath.toString(),
-                         "--should-stop:ifNoError=FLOW",
+                         "--should-stop=ifNoError=FLOW",
                          "--limit-modules", "m3x",
                          "--add-modules", "m2x")
                 .outdir(modulePath)
@@ -430,7 +430,7 @@
                                            auxOptions,
                                            "--module-path", modulePath.toString(),
                                            "--class-path", classpathOut.toString(),
-                                           "--should-stop:ifNoError=FLOW"))
+                                           "--should-stop=ifNoError=FLOW"))
                    .outdir(modulePath)
                    .files(findJavaFiles(m2))
                    .run(success ? Task.Expect.SUCCESS : Task.Expect.FAIL)
--- a/test/langtools/tools/javac/options/IsSupportedOptionTest.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/options/IsSupportedOptionTest.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,7 @@
         check(tool, "-Xdoclint", 0);
         check(tool, "-Xdoclint:stats", 0);
         check(tool, "-Xdoclint/package:foo", 0);
-        check(tool, "--debug:any", 0);
+        check(tool, "--debug=any", 1);
         check(tool, "-g", 0);
         check(tool, "-g:vars", 0);
         check(tool, "-g:none", 0);
--- a/test/langtools/tools/javac/policy/test3/Test.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/policy/test3/Test.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
 import java.io.*;
 import java.util.*;
 
-// Simple test of --should-stop:at.
+// Simple test of --should-stop=at.
 // For each of the permissable values, we compile a file with an error in it,
 // then using -XDverboseCompilePolicy we check that the compilation gets as
 // far as expected, but no further.
@@ -83,7 +83,7 @@
         args.add("-d");
         args.add(".");
         if (ssp.needOption)
-            args.add("--should-stop:at=" + ssp);
+            args.add("--should-stop=at=" + ssp);
         args.add(new File(System.getProperty("test.src", "."), "A.java").getPath());
 
         StringWriter sw = new StringWriter();
--- a/test/langtools/tools/javac/positions/TreeEndPosTest.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/positions/TreeEndPosTest.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -145,7 +145,7 @@
             options.add(tempDir.getPath());
             options.add("-d");
             options.add(tempDir.getPath());
-            options.add("--should-stop:at=GENERATE");
+            options.add("--should-stop=at=GENERATE");
 
             List<JavaFileObject> sources = new ArrayList<>();
             sources.add(src);
--- a/test/langtools/tools/javac/protectedAccess/ProtectedMemberAccess2.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/protectedAccess/ProtectedMemberAccess2.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Verify correct implementation of JLS2e 6.6.2.1
  * @author maddox
  *
- * @compile/fail/ref=ProtectedMemberAccess2.out --diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess2.java
+ * @compile/fail/ref=ProtectedMemberAccess2.out --diags=formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess2.java
  */
 
 // 71 errors expected.
--- a/test/langtools/tools/javac/protectedAccess/ProtectedMemberAccess3.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/protectedAccess/ProtectedMemberAccess3.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Verify correct implementation of JLS2e 6.6.2.1
  * @author maddox
  *
- * @compile/fail/ref=ProtectedMemberAccess3.out --diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess3.java
+ * @compile/fail/ref=ProtectedMemberAccess3.out --diags=formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess3.java
  */
 
 // 46 errors expected.
--- a/test/langtools/tools/javac/protectedAccess/ProtectedMemberAccess4.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/protectedAccess/ProtectedMemberAccess4.java	Fri Apr 06 17:06:58 2018 -0400
@@ -4,7 +4,7 @@
  * @summary Verify correct implementation of JLS2e 6.6.2.1
  * @author maddox
  *
- * @compile/fail/ref=ProtectedMemberAccess4.out --diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess4.java
+ * @compile/fail/ref=ProtectedMemberAccess4.out --diags=formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess4.java
  */
 
 // 33 errors expected.
--- a/test/langtools/tools/javac/resolve/ResolveHarness.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/resolve/ResolveHarness.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -132,8 +132,8 @@
 
     protected void check() throws Exception {
         String[] options = {
-            "--should-stop:at=ATTR",
-            "--debug:verboseResolution=success,failure,applicable,inapplicable,deferred-inference,predef"
+            "--should-stop=at=ATTR",
+            "--debug=verboseResolution=success,failure,applicable,inapplicable,deferred-inference,predef"
         };
 
         AbstractProcessor[] processors = { new ResolveCandidateFinder(), null };
--- a/test/langtools/tools/javac/tree/VarTree.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/tree/VarTree.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -77,7 +77,7 @@
         String src = prefix + parts[0] + parts[1] + parts[2] + " } }";
 
         JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, d -> {},
-                                                        List.of("--should-stop:at=FLOW"),
+                                                        List.of("--should-stop=at=FLOW"),
                                                         null, Arrays.asList(new MyFileObject(src)));
 
         Iterable<? extends CompilationUnitTree> units = ct.parse();
--- a/test/langtools/tools/javac/unicode/UnicodeNewline.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/javac/unicode/UnicodeNewline.java	Fri Apr 06 17:06:58 2018 -0400
@@ -3,7 +3,7 @@
  * @bug 4739428 4785453
  * @summary when \u000a is used, diagnostics are reported on the wrong line.
  *
- * @compile/fail/ref=UnicodeNewline.out --diags:layout=%b:%l:%_%m UnicodeNewline.java
+ * @compile/fail/ref=UnicodeNewline.out --diags=layout=%b:%l:%_%m UnicodeNewline.java
  */
 
 class UnicodeNewline {
--- a/test/langtools/tools/sjavac/JavacOptionPrep.java	Fri Apr 06 17:01:04 2018 -0400
+++ b/test/langtools/tools/sjavac/JavacOptionPrep.java	Fri Apr 06 17:06:58 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -96,7 +96,7 @@
 
             // Ignore this option for now. When the file=... requirement goes
             // away, this will be easier to handle.
-            if (option.startsWith("--debug:completionDeps"))
+            if (option.startsWith("--debug=completionDeps"))
                 continue;
 
             switch (option) {