Merge jdk9-b85
authorduke
Wed, 05 Jul 2017 20:52:37 +0200
changeset 32917 8392405ab038
parent 32916 21a06d94b53b (diff)
parent 32804 07769e03f4a6 (current diff)
child 32918 367632d67565
child 32919 aea2ae294bdf
child 32920 5bea8a04f0a5
child 32923 039cb4302b6f
child 32924 89da05adaa00
child 32927 4640bd6fd5a0
child 32928 a3f03999ed62
child 32936 11b5866fc8c9
child 32938 520a68d5228d
child 32939 9887198000ec
child 32944 22c83bd0488c
child 32946 ade7c78fff18
child 32948 f36f0202a450
child 32949 7e0f345e64a8
child 33034 7d4a8d4c3f24
child 33092 62c99fc4931b
Merge
--- a/.hgtags-top-repo	Wed Jul 05 20:51:37 2017 +0200
+++ b/.hgtags-top-repo	Wed Jul 05 20:52:37 2017 +0200
@@ -326,3 +326,4 @@
 b8afcf91331d78626a583ec1b63164468d6f4181 jdk9-b81
 42b56d1f418523ecb61a49d7493302c80c8009cc jdk9-b82
 ce5c14d97d95084504c32b9320cb33cce4235588 jdk9-b83
+1c8134475511ffe6726677e1418a89a7a45e92d6 jdk9-b84
--- a/common/autoconf/compare.sh.in	Wed Jul 05 20:51:37 2017 +0200
+++ b/common/autoconf/compare.sh.in	Wed Jul 05 20:52:37 2017 +0200
@@ -62,7 +62,7 @@
 export SED="@SED@"
 export SORT="@SORT@"
 export STAT="@STAT@"
-export STRIP="@POST_STRIP_CMD@"
+export STRIP="@STRIP@ @STRIPFLAGS@"
 export TEE="@TEE@"
 export UNIQ="@UNIQ@"
 export UNPACK200="@FIXPATH@ @BOOT_JDK@/bin/unpack200"
--- a/common/autoconf/configure.ac	Wed Jul 05 20:51:37 2017 +0200
+++ b/common/autoconf/configure.ac	Wed Jul 05 20:52:37 2017 +0200
@@ -165,6 +165,11 @@
 # First determine the toolchain type (compiler family)
 TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
 
+# User supplied flags should be used when configure detects compilers
+FLAGS_SETUP_USER_SUPPLIED_FLAGS
+# The sysroot cflags are needed for configure to be able to run the compilers
+FLAGS_SETUP_SYSROOT_FLAGS
+
 # Then detect the actual binaries needed
 TOOLCHAIN_PRE_DETECTION
 TOOLCHAIN_DETECT_TOOLCHAIN_CORE
--- a/common/autoconf/flags.m4	Wed Jul 05 20:51:37 2017 +0200
+++ b/common/autoconf/flags.m4	Wed Jul 05 20:52:37 2017 +0200
@@ -23,6 +23,100 @@
 # questions.
 #
 
+# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
+# corresponding configure arguments instead
+AC_DEFUN_ONCE([FLAGS_SETUP_USER_SUPPLIED_FLAGS],
+[
+  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
+    AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
+  fi
+
+  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
+    AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
+  fi
+
+  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
+    AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
+  fi
+
+  AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
+      [extra flags to be used when compiling jdk c-files])])
+
+  AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
+      [extra flags to be used when compiling jdk c++-files])])
+
+  AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
+      [extra flags to be used when linking jdk])])
+
+  EXTRA_CFLAGS="$with_extra_cflags"
+  EXTRA_CXXFLAGS="$with_extra_cxxflags"
+  EXTRA_LDFLAGS="$with_extra_ldflags"
+
+  # Hotspot needs these set in their legacy form
+  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
+  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
+  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
+
+  AC_SUBST(LEGACY_EXTRA_CFLAGS)
+  AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
+  AC_SUBST(LEGACY_EXTRA_LDFLAGS)
+
+  # The global CFLAGS and LDLAGS variables are used by configure tests and
+  # should include the extra parameters
+  CFLAGS="$EXTRA_CFLAGS"
+  CXXFLAGS="$EXTRA_CXXFLAGS"
+  LDFLAGS="$EXTRA_LDFLAGS"
+  CPPFLAGS=""
+])
+
+# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
+# that configure can use them while detecting compilers.
+# TOOLCHAIN_TYPE is available here.
+AC_DEFUN_ONCE([FLAGS_SETUP_SYSROOT_FLAGS],
+[
+  if test "x$SYSROOT" != "x"; then
+    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+        # Solaris Studio does not have a concept of sysroot. Instead we must
+        # make sure the default include and lib dirs are appended to each
+        # compile and link command line.
+        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
+        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
+            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
+            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
+      fi
+    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
+      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
+      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
+    elif test "x$TOOLCHAIN_TYPE" = xclang; then
+      SYSROOT_CFLAGS="-isysroot $SYSROOT"
+      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
+    fi
+    # Propagate the sysroot args to hotspot
+    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
+    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
+    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
+    # The global CFLAGS and LDFLAGS variables need these for configure to function
+    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
+    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
+    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
+    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
+  fi
+
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    # We also need -iframework<path>/System/Library/Frameworks
+    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
+    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
+    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
+    # set this here so it doesn't have to be peppered throughout the forest
+    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
+    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
+  fi
+
+  AC_SUBST(SYSROOT_CFLAGS)
+  AC_SUBST(SYSROOT_LDFLAGS)
+])
+
 AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
 [
   # Option used to tell the compiler whether to create 32- or 64-bit executables
@@ -60,10 +154,7 @@
     STRIPFLAGS="-X32_64"
   fi
 
-  if test "x$OPENJDK_TARGET_OS" != xwindows; then
-    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
-  fi
-  AC_SUBST(POST_STRIP_CMD)
+  AC_SUBST(STRIPFLAGS)
 
   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
     CC_OUT_OPTION=-Fo
@@ -113,44 +204,6 @@
     # silence copyright notice and other headers.
     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
   fi
-
-  if test "x$SYSROOT" != "x"; then
-    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
-      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-        # Solaris Studio does not have a concept of sysroot. Instead we must
-        # make sure the default include and lib dirs are appended to each
-        # compile and link command line.
-        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
-        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
-            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
-            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
-      fi
-    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
-      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
-      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
-      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
-    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
-      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
-      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
-    elif test "x$TOOLCHAIN_TYPE" = xclang; then
-      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
-      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
-    fi
-    # Propagate the sysroot args to hotspot
-    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
-    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
-    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
-  fi
-
-  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
-  # set this here so it doesn't have to be peppered throughout the forest
-  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
-    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
-  fi
-
-  AC_SUBST(SYSROOT_CFLAGS)
-  AC_SUBST(SYSROOT_LDFLAGS)
 ])
 
 AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
@@ -480,39 +533,9 @@
     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
   fi
 
-  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
-    AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
-  fi
-
-  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
-    AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
-  fi
-
-  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
-    AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
-  fi
-
-  AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
-      [extra flags to be used when compiling jdk c-files])])
-
-  AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
-      [extra flags to be used when compiling jdk c++-files])])
-
-  AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
-      [extra flags to be used when linking jdk])])
-
-  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
-  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
-  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
-
-  # Hotspot needs these set in their legacy form
-  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
-  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
-  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
-
-  AC_SUBST(LEGACY_EXTRA_CFLAGS)
-  AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
-  AC_SUBST(LEGACY_EXTRA_LDFLAGS)
+  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
+  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
+  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
 
   ###############################################################################
   #
--- a/common/autoconf/generated-configure.sh	Wed Jul 05 20:51:37 2017 +0200
+++ b/common/autoconf/generated-configure.sh	Wed Jul 05 20:52:37 2017 +0200
@@ -705,9 +705,6 @@
 CFLAGS_JDKEXE
 CFLAGS_JDKLIB
 MACOSX_VERSION_MIN
-LEGACY_EXTRA_LDFLAGS
-LEGACY_EXTRA_CXXFLAGS
-LEGACY_EXTRA_CFLAGS
 CXX_O_FLAG_NONE
 CXX_O_FLAG_DEBUG
 CXX_O_FLAG_NORM
@@ -728,14 +725,12 @@
 SET_EXECUTABLE_ORIGIN
 CXX_FLAG_REORDER
 C_FLAG_REORDER
-SYSROOT_LDFLAGS
-SYSROOT_CFLAGS
 RC_FLAGS
 AR_OUT_OPTION
 LD_OUT_OPTION
 EXE_OUT_OPTION
 CC_OUT_OPTION
-POST_STRIP_CMD
+STRIPFLAGS
 ARFLAGS
 COMPILER_TARGET_BITS_FLAG
 JT_HOME
@@ -747,6 +742,8 @@
 HOTSPOT_CXX
 HOTSPOT_RC
 HOTSPOT_MT
+BUILD_SYSROOT_LDFLAGS
+BUILD_SYSROOT_CFLAGS
 BUILD_LD
 BUILD_CXX
 BUILD_CC
@@ -793,6 +790,11 @@
 VS_INCLUDE
 VS_PATH
 CYGWIN_LINK
+SYSROOT_LDFLAGS
+SYSROOT_CFLAGS
+LEGACY_EXTRA_LDFLAGS
+LEGACY_EXTRA_CXXFLAGS
+LEGACY_EXTRA_CFLAGS
 EXE_SUFFIX
 OBJ_SUFFIX
 STATIC_LIBRARY
@@ -1078,11 +1080,11 @@
 with_override_jdk
 with_import_hotspot
 with_toolchain_type
-with_toolchain_version
-with_jtreg
 with_extra_cflags
 with_extra_cxxflags
 with_extra_ldflags
+with_toolchain_version
+with_jtreg
 enable_warnings_as_errors
 enable_debug_symbols
 enable_zip_debug_info
@@ -1937,14 +1939,14 @@
                           source
   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
                           to show possible values [platform dependent]
+  --with-extra-cflags     extra flags to be used when compiling jdk c-files
+  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
+  --with-extra-ldflags    extra flags to be used when linking jdk
   --with-toolchain-version
                           the version of the toolchain to look for, use
                           '--help' to show possible values [platform
                           dependent]
   --with-jtreg            Regression Test Harness [probed]
-  --with-extra-cflags     extra flags to be used when compiling jdk c-files
-  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
-  --with-extra-ldflags    extra flags to be used when linking jdk
   --with-x                use the X Window System
   --with-cups             specify prefix directory for the cups package
                           (expecting the headers under PATH/include)
@@ -3767,6 +3769,15 @@
 # questions.
 #
 
+# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
+# corresponding configure arguments instead
+
+
+# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
+# that configure can use them while detecting compilers.
+# TOOLCHAIN_TYPE is available here.
+
+
 
 
 
@@ -3886,6 +3897,8 @@
 
 apt_help() {
   case $1 in
+    reduced)
+      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
     devkit)
       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
     openjdk)
@@ -4362,7 +4375,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1442820958
+DATE_WHEN_GENERATED=1444077934
 
 ###############################################################################
 #
@@ -26825,6 +26838,109 @@
   fi
 
 
+# User supplied flags should be used when configure detects compilers
+
+  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
+$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
+  fi
+
+  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
+$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
+  fi
+
+  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
+$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
+  fi
+
+
+# Check whether --with-extra-cflags was given.
+if test "${with_extra_cflags+set}" = set; then :
+  withval=$with_extra_cflags;
+fi
+
+
+
+# Check whether --with-extra-cxxflags was given.
+if test "${with_extra_cxxflags+set}" = set; then :
+  withval=$with_extra_cxxflags;
+fi
+
+
+
+# Check whether --with-extra-ldflags was given.
+if test "${with_extra_ldflags+set}" = set; then :
+  withval=$with_extra_ldflags;
+fi
+
+
+  EXTRA_CFLAGS="$with_extra_cflags"
+  EXTRA_CXXFLAGS="$with_extra_cxxflags"
+  EXTRA_LDFLAGS="$with_extra_ldflags"
+
+  # Hotspot needs these set in their legacy form
+  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
+  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
+  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
+
+
+
+
+
+  # The global CFLAGS and LDLAGS variables are used by configure tests and
+  # should include the extra parameters
+  CFLAGS="$EXTRA_CFLAGS"
+  CXXFLAGS="$EXTRA_CXXFLAGS"
+  LDFLAGS="$EXTRA_LDFLAGS"
+  CPPFLAGS=""
+
+# The sysroot cflags are needed for configure to be able to run the compilers
+
+  if test "x$SYSROOT" != "x"; then
+    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+        # Solaris Studio does not have a concept of sysroot. Instead we must
+        # make sure the default include and lib dirs are appended to each
+        # compile and link command line.
+        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
+        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
+            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
+            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
+      fi
+    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
+      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
+      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
+    elif test "x$TOOLCHAIN_TYPE" = xclang; then
+      SYSROOT_CFLAGS="-isysroot $SYSROOT"
+      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
+    fi
+    # Propagate the sysroot args to hotspot
+    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
+    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
+    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
+    # The global CFLAGS and LDFLAGS variables need these for configure to function
+    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
+    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
+    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
+    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
+  fi
+
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    # We also need -iframework<path>/System/Library/Frameworks
+    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
+    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
+    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
+    # set this here so it doesn't have to be peppered throughout the forest
+    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
+    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
+  fi
+
+
+
+
+
 # Then detect the actual binaries needed
 
   # FIXME: Is this needed?
@@ -40555,13 +40671,19 @@
     fi
   fi
 
+    BUILD_SYSROOT_CFLAGS=""
+    BUILD_SYSROOT_LDFLAGS=""
   else
     # If we are not cross compiling, use the normal target compilers for
     # building the build platform executables.
     BUILD_CC="$CC"
     BUILD_CXX="$CXX"
     BUILD_LD="$LD"
-  fi
+    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
+    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
+  fi
+
+
 
 
 
@@ -41252,9 +41374,6 @@
     STRIPFLAGS="-X32_64"
   fi
 
-  if test "x$OPENJDK_TARGET_OS" != xwindows; then
-    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
-  fi
 
 
   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
@@ -41306,44 +41425,6 @@
     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
   fi
 
-  if test "x$SYSROOT" != "x"; then
-    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
-      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-        # Solaris Studio does not have a concept of sysroot. Instead we must
-        # make sure the default include and lib dirs are appended to each
-        # compile and link command line.
-        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
-        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
-            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
-            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
-      fi
-    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
-      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
-      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
-      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
-    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
-      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
-      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
-    elif test "x$TOOLCHAIN_TYPE" = xclang; then
-      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
-      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
-    fi
-    # Propagate the sysroot args to hotspot
-    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
-    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
-    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
-  fi
-
-  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
-  # set this here so it doesn't have to be peppered throughout the forest
-  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
-    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
-  fi
-
-
-
-
 
 # FIXME: Currently we must test this after toolchain but before flags. Fix!
 
@@ -41543,8 +41624,38 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
     if test "x$COMPILE_TYPE" = xreduced; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
-$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
+
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # reduced is the help tag: freetype, cups, pulse, alsa etc
+  MISSING_DEPENDENCY=reduced
+
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    cygwin_help $MISSING_DEPENDENCY
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    msys_help $MISSING_DEPENDENCY
+  else
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+      apt-get)
+        apt_help     $MISSING_DEPENDENCY ;;
+      yum)
+        yum_help     $MISSING_DEPENDENCY ;;
+      port)
+        port_help    $MISSING_DEPENDENCY ;;
+      pkgutil)
+        pkgutil_help $MISSING_DEPENDENCY ;;
+      pkgadd)
+        pkgadd_help  $MISSING_DEPENDENCY ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
+$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
     elif test "x$COMPILE_TYPE" = xcross; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
@@ -41603,8 +41714,8 @@
       # Let's try to implicitely set the compilers target architecture and retry the test
       { $as_echo "$as_me:${as_lineno-$LINENO}: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)." >&5
 $as_echo "$as_me: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)." >&6;}
-      { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
-$as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
+$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
 
   # When we add flags to the "official" CFLAGS etc, we need to
   # keep track of these additions in ADDED_CFLAGS etc. These
@@ -41667,7 +41778,46 @@
       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
 
       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
-        as_fn_error $? "The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" >&5
+$as_echo "$as_me: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" >&6;}
+        if test "x$COMPILE_TYPE" = xreduced; then
+
+  # Print a helpful message on how to acquire the necessary build dependency.
+  # reduced is the help tag: freetype, cups, pulse, alsa etc
+  MISSING_DEPENDENCY=reduced
+
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    cygwin_help $MISSING_DEPENDENCY
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    msys_help $MISSING_DEPENDENCY
+  else
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+      apt-get)
+        apt_help     $MISSING_DEPENDENCY ;;
+      yum)
+        yum_help     $MISSING_DEPENDENCY ;;
+      port)
+        port_help    $MISSING_DEPENDENCY ;;
+      pkgutil)
+        pkgutil_help $MISSING_DEPENDENCY ;;
+      pkgadd)
+        pkgadd_help  $MISSING_DEPENDENCY ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+  fi
+
+          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
+$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
+        elif test "x$COMPILE_TYPE" = xcross; then
+          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
+$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
+        fi
+        as_fn_error $? "Cannot continue." "$LINENO" 5
       fi
     fi
   fi
@@ -42267,54 +42417,9 @@
     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
   fi
 
-  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
-$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
-  fi
-
-  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
-$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
-  fi
-
-  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
-$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
-  fi
-
-
-# Check whether --with-extra-cflags was given.
-if test "${with_extra_cflags+set}" = set; then :
-  withval=$with_extra_cflags;
-fi
-
-
-
-# Check whether --with-extra-cxxflags was given.
-if test "${with_extra_cxxflags+set}" = set; then :
-  withval=$with_extra_cxxflags;
-fi
-
-
-
-# Check whether --with-extra-ldflags was given.
-if test "${with_extra_ldflags+set}" = set; then :
-  withval=$with_extra_ldflags;
-fi
-
-
-  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
-  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
-  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
-
-  # Hotspot needs these set in their legacy form
-  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
-  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
-  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
-
-
-
-
+  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
+  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
+  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
 
   ###############################################################################
   #
--- a/common/autoconf/help.m4	Wed Jul 05 20:51:37 2017 +0200
+++ b/common/autoconf/help.m4	Wed Jul 05 20:52:37 2017 +0200
@@ -97,6 +97,8 @@
 
 apt_help() {
   case $1 in
+    reduced)
+      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
     devkit)
       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
     openjdk)
--- a/common/autoconf/hotspot-spec.gmk.in	Wed Jul 05 20:51:37 2017 +0200
+++ b/common/autoconf/hotspot-spec.gmk.in	Wed Jul 05 20:52:37 2017 +0200
@@ -48,8 +48,8 @@
 
 # The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the
 # compiler that produces code that can be run on the build platform.
-HOSTCC:=@FIXPATH@ @BUILD_CC@
-HOSTCXX:=@FIXPATH@ @BUILD_CXX@
+HOSTCC:=@FIXPATH@ @BUILD_CC@ $(BUILD_SYSROOT_CFLAGS)
+HOSTCXX:=@FIXPATH@ @BUILD_CXX@ $(BUILD_SYSROOT_CFLAGS)
 
 ####################################################
 #
--- a/common/autoconf/platform.m4	Wed Jul 05 20:51:37 2017 +0200
+++ b/common/autoconf/platform.m4	Wed Jul 05 20:52:37 2017 +0200
@@ -489,7 +489,8 @@
   AC_CHECK_HEADERS([stdio.h], , [
     AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
     if test "x$COMPILE_TYPE" = xreduced; then
-      AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed.])
+      HELP_MSG_MISSING_DEPENDENCY([reduced])
+      AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG])
     elif test "x$COMPILE_TYPE" = xcross; then
       AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
     fi
@@ -509,7 +510,7 @@
       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
       # Let's try to implicitely set the compilers target architecture and retry the test
       AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS).])
-      AC_MSG_NOTICE([I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}])
+      AC_MSG_NOTICE([Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}])
       PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
 
       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
@@ -524,7 +525,14 @@
       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
 
       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
-        AC_MSG_ERROR([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
+        AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
+        if test "x$COMPILE_TYPE" = xreduced; then
+          HELP_MSG_MISSING_DEPENDENCY([reduced])
+          AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG])
+        elif test "x$COMPILE_TYPE" = xcross; then
+          AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
+        fi
+        AC_MSG_ERROR([Cannot continue.])
       fi
     fi
   fi
--- a/common/autoconf/spec.gmk.in	Wed Jul 05 20:51:37 2017 +0200
+++ b/common/autoconf/spec.gmk.in	Wed Jul 05 20:52:37 2017 +0200
@@ -367,6 +367,8 @@
 # build platform.
 BUILD_CC:=@FIXPATH@ @BUILD_CC@
 BUILD_LD:=@FIXPATH@ @BUILD_LD@
+BUILD_SYSROOT_CFLAGS:=@BUILD_SYSROOT_CFLAGS@
+BUILD_SYSROOT_LDFLAGS:=@BUILD_SYSROOT_LDFLAGS@
 
 AS:=@FIXPATH@ @AS@
 
@@ -421,7 +423,7 @@
 EXE_SUFFIX:=@EXE_SUFFIX@
 OBJ_SUFFIX:=@OBJ_SUFFIX@
 
-POST_STRIP_CMD:=@POST_STRIP_CMD@
+STRIPFLAGS:=@STRIPFLAGS@
 
 JAVA_FLAGS:=@JAVA_FLAGS@
 JAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@
@@ -461,9 +463,6 @@
 NEW_JAVAC   = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javac.Main
 NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javadoc.Main
 
-# The interim corba jar is needed for running rmic
-INTERIM_CORBA_JAR = $(BUILDTOOLS_OUTPUTDIR)/interim_corba.jar
-
 # Base flags for RC
 # Guarding this against resetting value. Legacy make files include spec multiple
 # times.
--- a/common/autoconf/toolchain.m4	Wed Jul 05 20:51:37 2017 +0200
+++ b/common/autoconf/toolchain.m4	Wed Jul 05 20:52:37 2017 +0200
@@ -656,17 +656,23 @@
     BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
     BASIC_PATH_PROGS(BUILD_LD, ld)
     BASIC_FIXUP_EXECUTABLE(BUILD_LD)
+    BUILD_SYSROOT_CFLAGS=""
+    BUILD_SYSROOT_LDFLAGS=""
   else
     # If we are not cross compiling, use the normal target compilers for
     # building the build platform executables.
     BUILD_CC="$CC"
     BUILD_CXX="$CXX"
     BUILD_LD="$LD"
+    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
+    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
   fi
 
   AC_SUBST(BUILD_CC)
   AC_SUBST(BUILD_CXX)
   AC_SUBST(BUILD_LD)
+  AC_SUBST(BUILD_SYSROOT_CFLAGS)
+  AC_SUBST(BUILD_SYSROOT_LDFLAGS)
 ])
 
 # Setup legacy variables that are still needed as alternative ways to refer to
--- a/corba/.hgtags	Wed Jul 05 20:51:37 2017 +0200
+++ b/corba/.hgtags	Wed Jul 05 20:52:37 2017 +0200
@@ -326,3 +326,4 @@
 45c35b7f5b40d5af0085e4a7b3a4d6e3e0347c35 jdk9-b81
 c20d8ebddaa6fb09cc81d3edf3d1d05f4232700a jdk9-b82
 ca8a1719588424f6e04e943790c7fcb7cb0b8c8f jdk9-b83
+df70bb200356fec686681f0295c50cc3ed43c3b3 jdk9-b84
--- a/corba/make/CompileInterim.gmk	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# This must be the first rule
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include JavaCompilation.gmk
-include SetupJavaCompilers.gmk
-
-################################################################################
-
-$(eval $(call SetupJavaCompilation,BUILD_INTERIM_CORBA, \
-    SETUP := GENERATE_OLDBYTECODE, \
-    SRC := $(JDK_TOPDIR)/src/jdk.rmic/share/classes \
-      $(CORBA_TOPDIR)/src/java.corba/share/classes \
-      $(CORBA_TOPDIR)/src/jdk.rmic/share/classes \
-      $(SUPPORT_OUTPUTDIR)/gensrc/java.corba, \
-    EXCLUDES := com/sun/corba/se/PortableActivationIDL, \
-    EXCLUDE_FILES := com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java \
-        com/sun/corba/se/spi/presentation/rmi/StubWrapper.java \
-        org/omg/PortableInterceptor/UNKNOWN.java \
-        com/sun/tools/corba/se/idl/ResourceBundleUtil.java \
-        com/sun/corba/se/impl/presentation/rmi/jndi.properties, \
-    COPY := .prp, \
-    CLEAN := .properties, \
-    BIN := $(BUILDTOOLS_OUTPUTDIR)/corba_interim_classes, \
-    JAR := $(INTERIM_CORBA_JAR)))
-
-################################################################################
-
-all: $(BUILD_INTERIM_CORBA)
--- a/corba/src/java.corba/share/classes/com/sun/corba/se/spi/orb/ORB.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/corba/src/java.corba/share/classes/com/sun/corba/se/spi/orb/ORB.java	Wed Jul 05 20:52:37 2017 +0200
@@ -89,6 +89,9 @@
 
 import com.sun.corba.se.impl.presentation.rmi.PresentationManagerImpl ;
 
+import jdk.internal.misc.JavaAWTAccess;
+import jdk.internal.misc.SharedSecrets;
+
 public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
     implements Broker, TypeCodeFactory
 {
@@ -202,7 +205,7 @@
     public static PresentationManager getPresentationManager()
     {
         SecurityManager sm = System.getSecurityManager();
-        sun.misc.JavaAWTAccess javaAwtAccess = sun.misc.SharedSecrets.getJavaAWTAccess();
+        JavaAWTAccess javaAwtAccess = SharedSecrets.getJavaAWTAccess();
         if (sm != null && javaAwtAccess != null) {
             final Object appletContext = javaAwtAccess.getAppletContext();
             if (appletContext != null) {
--- a/hotspot/.hgtags	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/.hgtags	Wed Jul 05 20:52:37 2017 +0200
@@ -486,3 +486,4 @@
 4142c190cd5ca4fb70ec367b4f97ef936272d8ef jdk9-b81
 1c453a12be3036d482abef1dd470f8aff536b6b9 jdk9-b82
 3ed0df2c553a80e0e26b91a6ce08806ea17a066a jdk9-b83
+184c4328444974edd6b3b490b9d0177ace7e331c jdk9-b84
--- a/hotspot/make/aix/makefiles/mapfile-vers-debug	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/make/aix/makefiles/mapfile-vers-debug	Wed Jul 05 20:52:37 2017 +0200
@@ -26,169 +26,6 @@
 
 SUNWprivate_1.1 {
         global:
-                # JNI
-                JNI_CreateJavaVM;
-                JNI_GetCreatedJavaVMs;
-                JNI_GetDefaultJavaVMInitArgs;
-
-                # JVM
-                JVM_ActiveProcessorCount;
-                JVM_ArrayCopy;
-                JVM_AssertionStatusDirectives;
-                JVM_ClassDepth;
-                JVM_ClassLoaderDepth;
-                JVM_Clone;
-                JVM_ConstantPoolGetClassAt;
-                JVM_ConstantPoolGetClassAtIfLoaded;
-                JVM_ConstantPoolGetDoubleAt;
-                JVM_ConstantPoolGetFieldAt;
-                JVM_ConstantPoolGetFieldAtIfLoaded;
-                JVM_ConstantPoolGetFloatAt;
-                JVM_ConstantPoolGetIntAt;
-                JVM_ConstantPoolGetLongAt;
-                JVM_ConstantPoolGetMethodAt;
-                JVM_ConstantPoolGetMethodAtIfLoaded;
-                JVM_ConstantPoolGetMemberRefInfoAt;
-                JVM_ConstantPoolGetSize;
-                JVM_ConstantPoolGetStringAt;
-                JVM_ConstantPoolGetUTF8At;
-                JVM_CountStackFrames;
-                JVM_CurrentClassLoader;
-                JVM_CurrentLoadedClass;
-                JVM_CurrentThread;
-                JVM_CurrentTimeMillis;
-                JVM_DefineClass;
-                JVM_DefineClassWithSource;
-                JVM_DefineClassWithSourceCond;
-                JVM_DesiredAssertionStatus;
-                JVM_DoPrivileged;
-                JVM_DumpAllStacks;
-                JVM_DumpThreads;
-                JVM_FillInStackTrace;
-                JVM_FindClassFromCaller;
-                JVM_FindClassFromClass;
-                JVM_FindClassFromBootLoader;
-                JVM_FindLibraryEntry;
-                JVM_FindLoadedClass;
-                JVM_FindPrimitiveClass;
-                JVM_FindSignal;
-                JVM_FreeMemory;
-                JVM_GC;
-                JVM_GetAllThreads;
-                JVM_GetArrayElement;
-                JVM_GetArrayLength;
-                JVM_GetCPClassNameUTF;
-                JVM_GetCPFieldClassNameUTF;
-                JVM_GetCPFieldModifiers;
-                JVM_GetCPFieldNameUTF;
-                JVM_GetCPFieldSignatureUTF;
-                JVM_GetCPMethodClassNameUTF;
-                JVM_GetCPMethodModifiers;
-                JVM_GetCPMethodNameUTF;
-                JVM_GetCPMethodSignatureUTF;
-                JVM_GetCallerClass;
-                JVM_GetClassAccessFlags;
-                JVM_GetClassAnnotations;
-                JVM_GetClassCPEntriesCount;
-                JVM_GetClassCPTypes;
-                JVM_GetClassConstantPool;
-                JVM_GetClassContext;
-                JVM_GetClassDeclaredConstructors;
-                JVM_GetClassDeclaredFields;
-                JVM_GetClassDeclaredMethods;
-                JVM_GetClassFieldsCount;
-                JVM_GetClassInterfaces;
-                JVM_GetClassMethodsCount;
-                JVM_GetClassModifiers;
-                JVM_GetClassName;
-                JVM_GetClassNameUTF;
-                JVM_GetClassSignature;
-                JVM_GetClassSigners;
-                JVM_GetClassTypeAnnotations;
-                JVM_GetDeclaredClasses;
-                JVM_GetDeclaringClass;
-                JVM_GetSimpleBinaryName;
-                JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldIxModifiers;
-                JVM_GetFieldTypeAnnotations;
-                JVM_GetInheritedAccessControlContext;
-                JVM_GetInterfaceVersion;
-                JVM_GetManagement;
-                JVM_GetMethodIxArgsSize;
-                JVM_GetMethodIxByteCode;
-                JVM_GetMethodIxByteCodeLength;
-                JVM_GetMethodIxExceptionIndexes;
-                JVM_GetMethodIxExceptionTableEntry;
-                JVM_GetMethodIxExceptionTableLength;
-                JVM_GetMethodIxExceptionsCount;
-                JVM_GetMethodIxLocalsCount;
-                JVM_GetMethodIxMaxStack;
-                JVM_GetMethodIxModifiers;
-                JVM_GetMethodIxNameUTF;
-                JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameters;
-                JVM_GetMethodTypeAnnotations;
-                JVM_GetNanoTimeAdjustment;
-                JVM_GetPrimitiveArrayElement;
-                JVM_GetProtectionDomain;
-                JVM_GetStackAccessControlContext;
-                JVM_GetStackTraceDepth;
-                JVM_GetStackTraceElement;
-                JVM_GetSystemPackage;
-                JVM_GetSystemPackages;
-                JVM_GetTemporaryDirectory;
-                JVM_GetVersionInfo;
-                JVM_Halt;
-                JVM_HoldsLock;
-                JVM_IHashCode;
-                JVM_InitAgentProperties;
-                JVM_InitProperties;
-                JVM_InternString;
-                JVM_Interrupt;
-                JVM_InvokeMethod;
-                JVM_IsArrayClass;
-                JVM_IsConstructorIx;
-                JVM_IsInterface;
-                JVM_IsInterrupted;
-                JVM_IsPrimitiveClass;
-                JVM_IsSameClassPackage;
-                JVM_IsSupportedJNIVersion;
-                JVM_IsThreadAlive;
-                JVM_IsVMGeneratedMethodIx;
-                JVM_LatestUserDefinedLoader;
-                JVM_LoadLibrary;
-                JVM_MaxObjectInspectionAge;
-                JVM_MaxMemory;
-                JVM_MonitorNotify;
-                JVM_MonitorNotifyAll;
-                JVM_MonitorWait;
-                JVM_NanoTime;
-                JVM_NativePath;
-                JVM_NewArray;
-                JVM_NewInstanceFromConstructor;
-                JVM_NewMultiArray;
-                JVM_RaiseSignal;
-                JVM_RawMonitorCreate;
-                JVM_RawMonitorDestroy;
-                JVM_RawMonitorEnter;
-                JVM_RawMonitorExit;
-                JVM_RegisterSignal;
-                JVM_ReleaseUTF;
-                JVM_ResumeThread;
-                JVM_SetArrayElement;
-                JVM_SetClassSigners;
-                JVM_SetNativeThreadName;
-                JVM_SetPrimitiveArrayElement;
-                JVM_SetProtectionDomain;
-                JVM_SetThreadPriority;
-                JVM_Sleep;
-                JVM_StartThread;
-                JVM_StopThread;
-                JVM_SuspendThread;
-                JVM_SupportsCX8;
-                JVM_TotalMemory;
-                JVM_UnloadLibrary;
-                JVM_Yield;
                 JVM_handle_linux_signal;
 
                 # debug JVM
--- a/hotspot/make/aix/makefiles/mapfile-vers-product	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/make/aix/makefiles/mapfile-vers-product	Wed Jul 05 20:52:37 2017 +0200
@@ -26,167 +26,6 @@
 
 SUNWprivate_1.1 {
         global:
-                # JNI
-                JNI_CreateJavaVM;
-                JNI_GetCreatedJavaVMs;
-                JNI_GetDefaultJavaVMInitArgs;
-
-                # JVM
-                JVM_ActiveProcessorCount;
-                JVM_ArrayCopy;
-                JVM_AssertionStatusDirectives;
-                JVM_ClassDepth;
-                JVM_ClassLoaderDepth;
-                JVM_Clone;
-                JVM_ConstantPoolGetClassAt;
-                JVM_ConstantPoolGetClassAtIfLoaded;
-                JVM_ConstantPoolGetDoubleAt;
-                JVM_ConstantPoolGetFieldAt;
-                JVM_ConstantPoolGetFieldAtIfLoaded;
-                JVM_ConstantPoolGetFloatAt;
-                JVM_ConstantPoolGetIntAt;
-                JVM_ConstantPoolGetLongAt;
-                JVM_ConstantPoolGetMethodAt;
-                JVM_ConstantPoolGetMethodAtIfLoaded;
-                JVM_ConstantPoolGetMemberRefInfoAt;
-                JVM_ConstantPoolGetSize;
-                JVM_ConstantPoolGetStringAt;
-                JVM_ConstantPoolGetUTF8At;
-                JVM_CountStackFrames;
-                JVM_CurrentClassLoader;
-                JVM_CurrentLoadedClass;
-                JVM_CurrentThread;
-                JVM_CurrentTimeMillis;
-                JVM_DefineClass;
-                JVM_DefineClassWithSource;
-                JVM_DefineClassWithSourceCond;
-                JVM_DesiredAssertionStatus;
-                JVM_DoPrivileged;
-                JVM_DumpAllStacks;
-                JVM_DumpThreads;
-                JVM_FillInStackTrace;
-                JVM_FindClassFromCaller;
-                JVM_FindClassFromClass;
-                JVM_FindClassFromBootLoader;
-                JVM_FindLibraryEntry;
-                JVM_FindLoadedClass;
-                JVM_FindPrimitiveClass;
-                JVM_FindSignal;
-                JVM_FreeMemory;
-                JVM_GC;
-                JVM_GetAllThreads;
-                JVM_GetArrayElement;
-                JVM_GetArrayLength;
-                JVM_GetCPClassNameUTF;
-                JVM_GetCPFieldClassNameUTF;
-                JVM_GetCPFieldModifiers;
-                JVM_GetCPFieldNameUTF;
-                JVM_GetCPFieldSignatureUTF;
-                JVM_GetCPMethodClassNameUTF;
-                JVM_GetCPMethodModifiers;
-                JVM_GetCPMethodNameUTF;
-                JVM_GetCPMethodSignatureUTF;
-                JVM_GetCallerClass;
-                JVM_GetClassAccessFlags;
-                JVM_GetClassAnnotations;
-                JVM_GetClassCPEntriesCount;
-                JVM_GetClassCPTypes;
-                JVM_GetClassConstantPool;
-                JVM_GetClassContext;
-                JVM_GetClassDeclaredConstructors;
-                JVM_GetClassDeclaredFields;
-                JVM_GetClassDeclaredMethods;
-                JVM_GetClassFieldsCount;
-                JVM_GetClassInterfaces;
-                JVM_GetClassMethodsCount;
-                JVM_GetClassModifiers;
-                JVM_GetClassName;
-                JVM_GetClassNameUTF;
-                JVM_GetClassSignature;
-                JVM_GetClassSigners;
-                JVM_GetClassTypeAnnotations;
-                JVM_GetDeclaredClasses;
-                JVM_GetDeclaringClass;
-                JVM_GetSimpleBinaryName;
-                JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldIxModifiers;
-                JVM_GetInheritedAccessControlContext;
-                JVM_GetInterfaceVersion;
-                JVM_GetManagement;
-                JVM_GetMethodIxArgsSize;
-                JVM_GetMethodIxByteCode;
-                JVM_GetMethodIxByteCodeLength;
-                JVM_GetMethodIxExceptionIndexes;
-                JVM_GetMethodIxExceptionTableEntry;
-                JVM_GetMethodIxExceptionTableLength;
-                JVM_GetMethodIxExceptionsCount;
-                JVM_GetMethodIxLocalsCount;
-                JVM_GetMethodIxMaxStack;
-                JVM_GetMethodIxModifiers;
-                JVM_GetMethodIxNameUTF;
-                JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameters;
-                JVM_GetNanoTimeAdjustment;
-                JVM_GetPrimitiveArrayElement;
-                JVM_GetProtectionDomain;
-                JVM_GetStackAccessControlContext;
-                JVM_GetStackTraceDepth;
-                JVM_GetStackTraceElement;
-                JVM_GetSystemPackage;
-                JVM_GetSystemPackages;
-                JVM_GetTemporaryDirectory;
-                JVM_GetVersionInfo;
-                JVM_Halt;
-                JVM_HoldsLock;
-                JVM_IHashCode;
-                JVM_InitAgentProperties;
-                JVM_InitProperties;
-                JVM_InternString;
-                JVM_Interrupt;
-                JVM_InvokeMethod;
-                JVM_IsArrayClass;
-                JVM_IsConstructorIx;
-                JVM_IsInterface;
-                JVM_IsInterrupted;
-                JVM_IsPrimitiveClass;
-                JVM_IsSameClassPackage;
-                JVM_IsSupportedJNIVersion;
-                JVM_IsThreadAlive;
-                JVM_IsVMGeneratedMethodIx;
-                JVM_LatestUserDefinedLoader;
-                JVM_LoadLibrary;
-                JVM_MaxObjectInspectionAge;
-                JVM_MaxMemory;
-                JVM_MonitorNotify;
-                JVM_MonitorNotifyAll;
-                JVM_MonitorWait;
-                JVM_NanoTime;
-                JVM_NativePath;
-                JVM_NewArray;
-                JVM_NewInstanceFromConstructor;
-                JVM_NewMultiArray;
-                JVM_RaiseSignal;
-                JVM_RawMonitorCreate;
-                JVM_RawMonitorDestroy;
-                JVM_RawMonitorEnter;
-                JVM_RawMonitorExit;
-                JVM_RegisterSignal;
-                JVM_ReleaseUTF;
-                JVM_ResumeThread;
-                JVM_SetArrayElement;
-                JVM_SetClassSigners;
-                JVM_SetNativeThreadName;
-                JVM_SetPrimitiveArrayElement;
-                JVM_SetProtectionDomain;
-                JVM_SetThreadPriority;
-                JVM_Sleep;
-                JVM_StartThread;
-                JVM_StopThread;
-                JVM_SuspendThread;
-                JVM_SupportsCX8;
-                JVM_TotalMemory;
-                JVM_UnloadLibrary;
-                JVM_Yield;
                 JVM_handle_linux_signal;
 
                 # miscellaneous functions
--- a/hotspot/make/aix/makefiles/vm.make	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/make/aix/makefiles/vm.make	Wed Jul 05 20:52:37 2017 +0200
@@ -220,10 +220,12 @@
 
 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
 
-mapfile : $(MAPFILE) vm.def
+MAPFILE_SHARE  := $(GAMMADIR)/make/share/makefiles/mapfile-vers
+
+mapfile : $(MAPFILE) $(MAPFILE_SHARE) vm.def
 	rm -f $@
 	awk '{ if ($$0 ~ "INSERT VTABLE SYMBOLS HERE")	\
-                 { system ("cat vm.def"); }		\
+                 { system ("cat ${MAPFILE_SHARE} vm.def"); } \
                else					\
                  { print $$0 }				\
              }' > $@ < $(MAPFILE)
--- a/hotspot/make/bsd/makefiles/mapfile-vers-darwin-debug	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-darwin-debug	Wed Jul 05 20:52:37 2017 +0200
@@ -24,171 +24,9 @@
 # Only used for OSX/Darwin builds
 
 # Define public interface.
-                # _JNI
-                _JNI_CreateJavaVM
-                _JNI_GetCreatedJavaVMs
-                _JNI_GetDefaultJavaVMInitArgs
-
-                # _JVM
-                _JVM_ActiveProcessorCount
-                _JVM_ArrayCopy
-                _JVM_AssertionStatusDirectives
-                _JVM_ClassDepth
-                _JVM_ClassLoaderDepth
-                _JVM_Clone
-                _JVM_ConstantPoolGetClassAt
-                _JVM_ConstantPoolGetClassAtIfLoaded
-                _JVM_ConstantPoolGetDoubleAt
-                _JVM_ConstantPoolGetFieldAt
-                _JVM_ConstantPoolGetFieldAtIfLoaded
-                _JVM_ConstantPoolGetFloatAt
-                _JVM_ConstantPoolGetIntAt
-                _JVM_ConstantPoolGetLongAt
-                _JVM_ConstantPoolGetMethodAt
-                _JVM_ConstantPoolGetMethodAtIfLoaded
-                _JVM_ConstantPoolGetMemberRefInfoAt
-                _JVM_ConstantPoolGetSize
-                _JVM_ConstantPoolGetStringAt
-                _JVM_ConstantPoolGetUTF8At
-                _JVM_CountStackFrames
-                _JVM_CurrentClassLoader
-                _JVM_CurrentLoadedClass
-                _JVM_CurrentThread
-                _JVM_CurrentTimeMillis
-                _JVM_DefineClass
-                _JVM_DefineClassWithSource
-                _JVM_DefineClassWithSourceCond
-                _JVM_DesiredAssertionStatus
-                _JVM_DoPrivileged
-                _JVM_DumpAllStacks
-                _JVM_DumpThreads
-                _JVM_FillInStackTrace
-                _JVM_FindClassFromCaller
-                _JVM_FindClassFromClass
-                _JVM_FindClassFromBootLoader
-                _JVM_FindLibraryEntry
-                _JVM_FindLoadedClass
-                _JVM_FindPrimitiveClass
-                _JVM_FindSignal
-                _JVM_FreeMemory
-                _JVM_GC
-                _JVM_GetAllThreads
-                _JVM_GetArrayElement
-                _JVM_GetArrayLength
-                _JVM_GetCPClassNameUTF
-                _JVM_GetCPFieldClassNameUTF
-                _JVM_GetCPFieldModifiers
-                _JVM_GetCPFieldNameUTF
-                _JVM_GetCPFieldSignatureUTF
-                _JVM_GetCPMethodClassNameUTF
-                _JVM_GetCPMethodModifiers
-                _JVM_GetCPMethodNameUTF
-                _JVM_GetCPMethodSignatureUTF
-                _JVM_GetCallerClass
-                _JVM_GetClassAccessFlags
-                _JVM_GetClassAnnotations
-                _JVM_GetClassCPEntriesCount
-                _JVM_GetClassCPTypes
-                _JVM_GetClassConstantPool
-                _JVM_GetClassContext
-                _JVM_GetClassDeclaredConstructors
-                _JVM_GetClassDeclaredFields
-                _JVM_GetClassDeclaredMethods
-                _JVM_GetClassFieldsCount
-                _JVM_GetClassInterfaces
-                _JVM_GetClassMethodsCount
-                _JVM_GetClassModifiers
-                _JVM_GetClassName
-                _JVM_GetClassNameUTF
-                _JVM_GetClassSignature
-                _JVM_GetClassSigners
-                _JVM_GetClassTypeAnnotations
-                _JVM_GetDeclaredClasses
-                _JVM_GetDeclaringClass
-                _JVM_GetSimpleBinaryName
-                _JVM_GetEnclosingMethodInfo
-                _JVM_GetFieldIxModifiers
-                _JVM_GetFieldTypeAnnotations
-                _JVM_GetInheritedAccessControlContext
-                _JVM_GetInterfaceVersion
-                _JVM_GetManagement
-                _JVM_GetMethodIxArgsSize
-                _JVM_GetMethodIxByteCode
-                _JVM_GetMethodIxByteCodeLength
-                _JVM_GetMethodIxExceptionIndexes
-                _JVM_GetMethodIxExceptionTableEntry
-                _JVM_GetMethodIxExceptionTableLength
-                _JVM_GetMethodIxExceptionsCount
-                _JVM_GetMethodIxLocalsCount
-                _JVM_GetMethodIxMaxStack
-                _JVM_GetMethodIxModifiers
-                _JVM_GetMethodIxNameUTF
-                _JVM_GetMethodIxSignatureUTF
-                _JVM_GetMethodParameters
-                _JVM_GetMethodTypeAnnotations
-                _JVM_GetNanoTimeAdjustment
-                _JVM_GetPrimitiveArrayElement
-                _JVM_GetProtectionDomain
-                _JVM_GetStackAccessControlContext
-                _JVM_GetStackTraceDepth
-                _JVM_GetStackTraceElement
-                _JVM_GetSystemPackage
-                _JVM_GetSystemPackages
-                _JVM_GetTemporaryDirectory
-                _JVM_GetVersionInfo
-                _JVM_Halt
-                _JVM_HoldsLock
-                _JVM_IHashCode
-                _JVM_InitAgentProperties
-                _JVM_InitProperties
-                _JVM_InternString
-                _JVM_Interrupt
-                _JVM_InvokeMethod
-                _JVM_IsArrayClass
-                _JVM_IsConstructorIx
-                _JVM_IsInterface
-                _JVM_IsInterrupted
-                _JVM_IsPrimitiveClass
-                _JVM_IsSameClassPackage
-                _JVM_IsSupportedJNIVersion
-                _JVM_IsThreadAlive
-                _JVM_IsVMGeneratedMethodIx
-                _JVM_LatestUserDefinedLoader
-                _JVM_LoadLibrary
-                _JVM_MaxObjectInspectionAge
-                _JVM_MaxMemory
-                _JVM_MonitorNotify
-                _JVM_MonitorNotifyAll
-                _JVM_MonitorWait
-                _JVM_NanoTime
-                _JVM_NativePath
-                _JVM_NewArray
-                _JVM_NewInstanceFromConstructor
-                _JVM_NewMultiArray
-                _JVM_RaiseSignal
-                _JVM_RawMonitorCreate
-                _JVM_RawMonitorDestroy
-                _JVM_RawMonitorEnter
-                _JVM_RawMonitorExit
-                _JVM_RegisterSignal
-                _JVM_ReleaseUTF
-                _JVM_ResumeThread
-                _JVM_SetArrayElement
-                _JVM_SetClassSigners
-                _JVM_SetNativeThreadName
-                _JVM_SetPrimitiveArrayElement
-                _JVM_SetThreadPriority
-                _JVM_Sleep
-                _JVM_StartThread
-                _JVM_StopThread
-                _JVM_SuspendThread
-                _JVM_SupportsCX8
-                _JVM_TotalMemory
-                _JVM_UnloadLibrary
-                _JVM_Yield
                 _JVM_handle_bsd_signal
 
-				# miscellaneous functions
+		# miscellaneous functions
                 _jio_fprintf
                 _jio_printf
                 _jio_snprintf
--- a/hotspot/make/bsd/makefiles/mapfile-vers-darwin-product	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-darwin-product	Wed Jul 05 20:52:37 2017 +0200
@@ -24,168 +24,6 @@
 # Only used for OSX/Darwin builds
 
 # Define public interface.
-                # _JNI
-                _JNI_CreateJavaVM
-                _JNI_GetCreatedJavaVMs
-                _JNI_GetDefaultJavaVMInitArgs
-
-                # _JVM
-                _JVM_ActiveProcessorCount
-                _JVM_ArrayCopy
-                _JVM_AssertionStatusDirectives
-                _JVM_ClassDepth
-                _JVM_ClassLoaderDepth
-                _JVM_Clone
-                _JVM_ConstantPoolGetClassAt
-                _JVM_ConstantPoolGetClassAtIfLoaded
-                _JVM_ConstantPoolGetDoubleAt
-                _JVM_ConstantPoolGetFieldAt
-                _JVM_ConstantPoolGetFieldAtIfLoaded
-                _JVM_ConstantPoolGetFloatAt
-                _JVM_ConstantPoolGetIntAt
-                _JVM_ConstantPoolGetLongAt
-                _JVM_ConstantPoolGetMethodAt
-                _JVM_ConstantPoolGetMethodAtIfLoaded
-                _JVM_ConstantPoolGetMemberRefInfoAt
-                _JVM_ConstantPoolGetSize
-                _JVM_ConstantPoolGetStringAt
-                _JVM_ConstantPoolGetUTF8At
-                _JVM_CountStackFrames
-                _JVM_CurrentClassLoader
-                _JVM_CurrentLoadedClass
-                _JVM_CurrentThread
-                _JVM_CurrentTimeMillis
-                _JVM_DefineClass
-                _JVM_DefineClassWithSource
-                _JVM_DefineClassWithSourceCond
-                _JVM_DesiredAssertionStatus
-                _JVM_DoPrivileged
-                _JVM_DumpAllStacks
-                _JVM_DumpThreads
-                _JVM_FillInStackTrace
-                _JVM_FindClassFromCaller
-                _JVM_FindClassFromClass
-                _JVM_FindClassFromBootLoader
-                _JVM_FindLibraryEntry
-                _JVM_FindLoadedClass
-                _JVM_FindPrimitiveClass
-                _JVM_FindSignal
-                _JVM_FreeMemory
-                _JVM_GC
-                _JVM_GetAllThreads
-                _JVM_GetArrayElement
-                _JVM_GetArrayLength
-                _JVM_GetCPClassNameUTF
-                _JVM_GetCPFieldClassNameUTF
-                _JVM_GetCPFieldModifiers
-                _JVM_GetCPFieldNameUTF
-                _JVM_GetCPFieldSignatureUTF
-                _JVM_GetCPMethodClassNameUTF
-                _JVM_GetCPMethodModifiers
-                _JVM_GetCPMethodNameUTF
-                _JVM_GetCPMethodSignatureUTF
-                _JVM_GetCallerClass
-                _JVM_GetClassAccessFlags
-                _JVM_GetClassAnnotations
-                _JVM_GetClassCPEntriesCount
-                _JVM_GetClassCPTypes
-                _JVM_GetClassConstantPool
-                _JVM_GetClassContext
-                _JVM_GetClassDeclaredConstructors
-                _JVM_GetClassDeclaredFields
-                _JVM_GetClassDeclaredMethods
-                _JVM_GetClassFieldsCount
-                _JVM_GetClassInterfaces
-                _JVM_GetClassMethodsCount
-                _JVM_GetClassModifiers
-                _JVM_GetClassName
-                _JVM_GetClassNameUTF
-                _JVM_GetClassSignature
-                _JVM_GetClassSigners
-                _JVM_GetClassTypeAnnotations
-                _JVM_GetDeclaredClasses
-                _JVM_GetDeclaringClass
-                _JVM_GetSimpleBinaryName
-                _JVM_GetEnclosingMethodInfo
-                _JVM_GetFieldIxModifiers
-                _JVM_GetFieldTypeAnnotations
-                _JVM_GetInheritedAccessControlContext
-                _JVM_GetInterfaceVersion
-                _JVM_GetManagement
-                _JVM_GetMethodIxArgsSize
-                _JVM_GetMethodIxByteCode
-                _JVM_GetMethodIxByteCodeLength
-                _JVM_GetMethodIxExceptionIndexes
-                _JVM_GetMethodIxExceptionTableEntry
-                _JVM_GetMethodIxExceptionTableLength
-                _JVM_GetMethodIxExceptionsCount
-                _JVM_GetMethodIxLocalsCount
-                _JVM_GetMethodIxMaxStack
-                _JVM_GetMethodIxModifiers
-                _JVM_GetMethodIxNameUTF
-                _JVM_GetMethodIxSignatureUTF
-                _JVM_GetMethodParameters
-                _JVM_GetMethodTypeAnnotations
-                _JVM_GetNanoTimeAdjustment
-                _JVM_GetPrimitiveArrayElement
-                _JVM_GetProtectionDomain
-                _JVM_GetStackAccessControlContext
-                _JVM_GetStackTraceDepth
-                _JVM_GetStackTraceElement
-                _JVM_GetSystemPackage
-                _JVM_GetSystemPackages
-                _JVM_GetTemporaryDirectory
-                _JVM_GetVersionInfo
-                _JVM_Halt
-                _JVM_HoldsLock
-                _JVM_IHashCode
-                _JVM_InitAgentProperties
-                _JVM_InitProperties
-                _JVM_InternString
-                _JVM_Interrupt
-                _JVM_InvokeMethod
-                _JVM_IsArrayClass
-                _JVM_IsConstructorIx
-                _JVM_IsInterface
-                _JVM_IsInterrupted
-                _JVM_IsPrimitiveClass
-                _JVM_IsSameClassPackage
-                _JVM_IsSupportedJNIVersion
-                _JVM_IsThreadAlive
-                _JVM_IsVMGeneratedMethodIx
-                _JVM_LatestUserDefinedLoader
-                _JVM_LoadLibrary
-                _JVM_MaxObjectInspectionAge
-                _JVM_MaxMemory
-                _JVM_MonitorNotify
-                _JVM_MonitorNotifyAll
-                _JVM_MonitorWait
-                _JVM_NanoTime
-                _JVM_NativePath
-                _JVM_NewArray
-                _JVM_NewInstanceFromConstructor
-                _JVM_NewMultiArray
-                _JVM_RaiseSignal
-                _JVM_RawMonitorCreate
-                _JVM_RawMonitorDestroy
-                _JVM_RawMonitorEnter
-                _JVM_RawMonitorExit
-                _JVM_RegisterSignal
-                _JVM_ReleaseUTF
-                _JVM_ResumeThread
-                _JVM_SetArrayElement
-                _JVM_SetClassSigners
-                _JVM_SetNativeThreadName
-                _JVM_SetPrimitiveArrayElement
-                _JVM_SetThreadPriority
-                _JVM_Sleep
-                _JVM_StartThread
-                _JVM_StopThread
-                _JVM_SuspendThread
-                _JVM_SupportsCX8
-                _JVM_TotalMemory
-                _JVM_UnloadLibrary
-                _JVM_Yield
                 _JVM_handle_bsd_signal
 
                 # miscellaneous functions
--- a/hotspot/make/bsd/makefiles/mapfile-vers-debug	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-debug	Wed Jul 05 20:52:37 2017 +0200
@@ -26,168 +26,6 @@
 
 SUNWprivate_1.1 {
         global:
-                # JNI
-                JNI_CreateJavaVM;
-                JNI_GetCreatedJavaVMs;
-                JNI_GetDefaultJavaVMInitArgs;
-
-                # JVM
-                JVM_ActiveProcessorCount;
-                JVM_ArrayCopy;
-                JVM_AssertionStatusDirectives;
-                JVM_ClassDepth;
-                JVM_ClassLoaderDepth;
-                JVM_Clone;
-                JVM_ConstantPoolGetClassAt;
-                JVM_ConstantPoolGetClassAtIfLoaded;
-                JVM_ConstantPoolGetDoubleAt;
-                JVM_ConstantPoolGetFieldAt;
-                JVM_ConstantPoolGetFieldAtIfLoaded;
-                JVM_ConstantPoolGetFloatAt;
-                JVM_ConstantPoolGetIntAt;
-                JVM_ConstantPoolGetLongAt;
-                JVM_ConstantPoolGetMethodAt;
-                JVM_ConstantPoolGetMethodAtIfLoaded;
-                JVM_ConstantPoolGetMemberRefInfoAt;
-                JVM_ConstantPoolGetSize;
-                JVM_ConstantPoolGetStringAt;
-                JVM_ConstantPoolGetUTF8At;
-                JVM_CountStackFrames;
-                JVM_CurrentClassLoader;
-                JVM_CurrentLoadedClass;
-                JVM_CurrentThread;
-                JVM_CurrentTimeMillis;
-                JVM_DefineClass;
-                JVM_DefineClassWithSource;
-                JVM_DefineClassWithSourceCond;
-                JVM_DesiredAssertionStatus;
-                JVM_DoPrivileged;
-                JVM_DumpAllStacks;
-                JVM_DumpThreads;
-                JVM_FillInStackTrace;
-                JVM_FindClassFromCaller;
-                JVM_FindClassFromClass;
-                JVM_FindClassFromBootLoader;
-                JVM_FindLibraryEntry;
-                JVM_FindLoadedClass;
-                JVM_FindPrimitiveClass;
-                JVM_FindSignal;
-                JVM_FreeMemory;
-                JVM_GC;
-                JVM_GetAllThreads;
-                JVM_GetArrayElement;
-                JVM_GetArrayLength;
-                JVM_GetCPClassNameUTF;
-                JVM_GetCPFieldClassNameUTF;
-                JVM_GetCPFieldModifiers;
-                JVM_GetCPFieldNameUTF;
-                JVM_GetCPFieldSignatureUTF;
-                JVM_GetCPMethodClassNameUTF;
-                JVM_GetCPMethodModifiers;
-                JVM_GetCPMethodNameUTF;
-                JVM_GetCPMethodSignatureUTF;
-                JVM_GetCallerClass;
-                JVM_GetClassAccessFlags;
-                JVM_GetClassAnnotations;
-                JVM_GetClassCPEntriesCount;
-                JVM_GetClassCPTypes;
-                JVM_GetClassConstantPool;
-                JVM_GetClassContext;
-                JVM_GetClassDeclaredConstructors;
-                JVM_GetClassDeclaredFields;
-                JVM_GetClassDeclaredMethods;
-                JVM_GetClassFieldsCount;
-                JVM_GetClassInterfaces;
-                JVM_GetClassMethodsCount;
-                JVM_GetClassModifiers;
-                JVM_GetClassName;
-                JVM_GetClassNameUTF;
-                JVM_GetClassSignature;
-                JVM_GetClassSigners;
-                JVM_GetClassTypeAnnotations;
-                JVM_GetDeclaredClasses;
-                JVM_GetDeclaringClass;
-                JVM_GetSimpleBinaryName;
-                JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldIxModifiers;
-                JVM_GetFieldTypeAnnotations;
-                JVM_GetInheritedAccessControlContext;
-                JVM_GetInterfaceVersion;
-                JVM_GetManagement;
-                JVM_GetMethodIxArgsSize;
-                JVM_GetMethodIxByteCode;
-                JVM_GetMethodIxByteCodeLength;
-                JVM_GetMethodIxExceptionIndexes;
-                JVM_GetMethodIxExceptionTableEntry;
-                JVM_GetMethodIxExceptionTableLength;
-                JVM_GetMethodIxExceptionsCount;
-                JVM_GetMethodIxLocalsCount;
-                JVM_GetMethodIxMaxStack;
-                JVM_GetMethodIxModifiers;
-                JVM_GetMethodIxNameUTF;
-                JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameters;
-                JVM_GetMethodTypeAnnotations;
-                JVM_GetNanoTimeAdjustment;
-                JVM_GetPrimitiveArrayElement;
-                JVM_GetProtectionDomain;
-                JVM_GetStackAccessControlContext;
-                JVM_GetStackTraceDepth;
-                JVM_GetStackTraceElement;
-                JVM_GetSystemPackage;
-                JVM_GetSystemPackages;
-                JVM_GetTemporaryDirectory;
-                JVM_GetVersionInfo;
-                JVM_Halt;
-                JVM_HoldsLock;
-                JVM_IHashCode;
-                JVM_InitAgentProperties;
-                JVM_InitProperties;
-                JVM_InternString;
-                JVM_Interrupt;
-                JVM_InvokeMethod;
-                JVM_IsArrayClass;
-                JVM_IsConstructorIx;
-                JVM_IsInterface;
-                JVM_IsInterrupted;
-                JVM_IsPrimitiveClass;
-                JVM_IsSameClassPackage;
-                JVM_IsSupportedJNIVersion;
-                JVM_IsThreadAlive;
-                JVM_IsVMGeneratedMethodIx;
-                JVM_LatestUserDefinedLoader;
-                JVM_LoadLibrary;
-                JVM_MaxObjectInspectionAge;
-                JVM_MaxMemory;
-                JVM_MonitorNotify;
-                JVM_MonitorNotifyAll;
-                JVM_MonitorWait;
-                JVM_NanoTime;
-                JVM_NativePath;
-                JVM_NewArray;
-                JVM_NewInstanceFromConstructor;
-                JVM_NewMultiArray;
-                JVM_RaiseSignal;
-                JVM_RawMonitorCreate;
-                JVM_RawMonitorDestroy;
-                JVM_RawMonitorEnter;
-                JVM_RawMonitorExit;
-                JVM_RegisterSignal;
-                JVM_ReleaseUTF;
-                JVM_ResumeThread;
-                JVM_SetArrayElement;
-                JVM_SetClassSigners;
-                JVM_SetNativeThreadName;
-                JVM_SetPrimitiveArrayElement;
-                JVM_SetThreadPriority;
-                JVM_Sleep;
-                JVM_StartThread;
-                JVM_StopThread;
-                JVM_SuspendThread;
-                JVM_SupportsCX8;
-                JVM_TotalMemory;
-                JVM_UnloadLibrary;
-                JVM_Yield;
                 JVM_handle_linux_signal;
 
                 # miscellaneous functions
--- a/hotspot/make/bsd/makefiles/mapfile-vers-product	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-product	Wed Jul 05 20:52:37 2017 +0200
@@ -26,168 +26,6 @@
 
 SUNWprivate_1.1 {
         global:
-                # JNI
-                JNI_CreateJavaVM;
-                JNI_GetCreatedJavaVMs;
-                JNI_GetDefaultJavaVMInitArgs;
-
-                # JVM
-                JVM_ActiveProcessorCount;
-                JVM_ArrayCopy;
-                JVM_AssertionStatusDirectives;
-                JVM_ClassDepth;
-                JVM_ClassLoaderDepth;
-                JVM_Clone;
-                JVM_ConstantPoolGetClassAt;
-                JVM_ConstantPoolGetClassAtIfLoaded;
-                JVM_ConstantPoolGetDoubleAt;
-                JVM_ConstantPoolGetFieldAt;
-                JVM_ConstantPoolGetFieldAtIfLoaded;
-                JVM_ConstantPoolGetFloatAt;
-                JVM_ConstantPoolGetIntAt;
-                JVM_ConstantPoolGetLongAt;
-                JVM_ConstantPoolGetMethodAt;
-                JVM_ConstantPoolGetMethodAtIfLoaded;
-                JVM_ConstantPoolGetMemberRefInfoAt;
-                JVM_ConstantPoolGetSize;
-                JVM_ConstantPoolGetStringAt;
-                JVM_ConstantPoolGetUTF8At;
-                JVM_CountStackFrames;
-                JVM_CurrentClassLoader;
-                JVM_CurrentLoadedClass;
-                JVM_CurrentThread;
-                JVM_CurrentTimeMillis;
-                JVM_DefineClass;
-                JVM_DefineClassWithSource;
-                JVM_DefineClassWithSourceCond;
-                JVM_DesiredAssertionStatus;
-                JVM_DoPrivileged;
-                JVM_DumpAllStacks;
-                JVM_DumpThreads;
-                JVM_FillInStackTrace;
-                JVM_FindClassFromCaller;
-                JVM_FindClassFromClass;
-                JVM_FindClassFromBootLoader;
-                JVM_FindLibraryEntry;
-                JVM_FindLoadedClass;
-                JVM_FindPrimitiveClass;
-                JVM_FindSignal;
-                JVM_FreeMemory;
-                JVM_GC;
-                JVM_GetAllThreads;
-                JVM_GetArrayElement;
-                JVM_GetArrayLength;
-                JVM_GetCPClassNameUTF;
-                JVM_GetCPFieldClassNameUTF;
-                JVM_GetCPFieldModifiers;
-                JVM_GetCPFieldNameUTF;
-                JVM_GetCPFieldSignatureUTF;
-                JVM_GetCPMethodClassNameUTF;
-                JVM_GetCPMethodModifiers;
-                JVM_GetCPMethodNameUTF;
-                JVM_GetCPMethodSignatureUTF;
-                JVM_GetCallerClass;
-                JVM_GetClassAccessFlags;
-                JVM_GetClassAnnotations;
-                JVM_GetClassCPEntriesCount;
-                JVM_GetClassCPTypes;
-                JVM_GetClassConstantPool;
-                JVM_GetClassContext;
-                JVM_GetClassDeclaredConstructors;
-                JVM_GetClassDeclaredFields;
-                JVM_GetClassDeclaredMethods;
-                JVM_GetClassFieldsCount;
-                JVM_GetClassInterfaces;
-                JVM_GetClassMethodsCount;
-                JVM_GetClassModifiers;
-                JVM_GetClassName;
-                JVM_GetClassNameUTF;
-                JVM_GetClassSignature;
-                JVM_GetClassSigners;
-                JVM_GetClassTypeAnnotations;
-                JVM_GetDeclaredClasses;
-                JVM_GetDeclaringClass;
-                JVM_GetSimpleBinaryName;
-                JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldIxModifiers;
-                JVM_GetFieldTypeAnnotations;
-                JVM_GetInheritedAccessControlContext;
-                JVM_GetInterfaceVersion;
-                JVM_GetManagement;
-                JVM_GetMethodIxArgsSize;
-                JVM_GetMethodIxByteCode;
-                JVM_GetMethodIxByteCodeLength;
-                JVM_GetMethodIxExceptionIndexes;
-                JVM_GetMethodIxExceptionTableEntry;
-                JVM_GetMethodIxExceptionTableLength;
-                JVM_GetMethodIxExceptionsCount;
-                JVM_GetMethodIxLocalsCount;
-                JVM_GetMethodIxMaxStack;
-                JVM_GetMethodIxModifiers;
-                JVM_GetMethodIxNameUTF;
-                JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameters;
-                JVM_GetMethodTypeAnnotations;
-                JVM_GetNanoTimeAdjustment;
-                JVM_GetPrimitiveArrayElement;
-                JVM_GetProtectionDomain;
-                JVM_GetStackAccessControlContext;
-                JVM_GetStackTraceDepth;
-                JVM_GetStackTraceElement;
-                JVM_GetSystemPackage;
-                JVM_GetSystemPackages;
-                JVM_GetTemporaryDirectory;
-                JVM_GetVersionInfo;
-                JVM_Halt;
-                JVM_HoldsLock;
-                JVM_IHashCode;
-                JVM_InitAgentProperties;
-                JVM_InitProperties;
-                JVM_InternString;
-                JVM_Interrupt;
-                JVM_InvokeMethod;
-                JVM_IsArrayClass;
-                JVM_IsConstructorIx;
-                JVM_IsInterface;
-                JVM_IsInterrupted;
-                JVM_IsPrimitiveClass;
-                JVM_IsSameClassPackage;
-                JVM_IsSupportedJNIVersion;
-                JVM_IsThreadAlive;
-                JVM_IsVMGeneratedMethodIx;
-                JVM_LatestUserDefinedLoader;
-                JVM_LoadLibrary;
-                JVM_MaxObjectInspectionAge;
-                JVM_MaxMemory;
-                JVM_MonitorNotify;
-                JVM_MonitorNotifyAll;
-                JVM_MonitorWait;
-                JVM_NanoTime;
-                JVM_NativePath;
-                JVM_NewArray;
-                JVM_NewInstanceFromConstructor;
-                JVM_NewMultiArray;
-                JVM_RaiseSignal;
-                JVM_RawMonitorCreate;
-                JVM_RawMonitorDestroy;
-                JVM_RawMonitorEnter;
-                JVM_RawMonitorExit;
-                JVM_RegisterSignal;
-                JVM_ReleaseUTF;
-                JVM_ResumeThread;
-                JVM_SetArrayElement;
-                JVM_SetClassSigners;
-                JVM_SetNativeThreadName;
-                JVM_SetPrimitiveArrayElement;
-                JVM_SetThreadPriority;
-                JVM_Sleep;
-                JVM_StartThread;
-                JVM_StopThread;
-                JVM_SuspendThread;
-                JVM_SupportsCX8;
-                JVM_TotalMemory;
-                JVM_UnloadLibrary;
-                JVM_Yield;
                 JVM_handle_linux_signal;
 
                 # miscellaneous functions
--- a/hotspot/make/bsd/makefiles/vm.make	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/make/bsd/makefiles/vm.make	Wed Jul 05 20:52:37 2017 +0200
@@ -234,10 +234,29 @@
 
 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
 
-mapfile : $(MAPFILE) vm.def mapfile_ext
+MAPFILE_SHARE  := $(GAMMADIR)/make/share/makefiles/mapfile-vers
+
+MAPFILE_EXT_SRC := $(HS_ALT_MAKE)/share/makefiles/mapfile-ext
+ifneq ("$(wildcard $(MAPFILE_EXT_SRC))","")
+MAPFILE_EXT     := $(MAPFILE_EXT_SRC)
+endif
+
+# For Darwin: add _ prefix and remove trailing ;
+mapfile_extra: $(MAPFILE_SHARE) $(MAPFILE_EXT)
+	rm -f $@
+ifeq ($(OS_VENDOR), Darwin)
+	cat $(MAPFILE_SHARE) $(MAPFILE_EXT) | \
+	    sed -e 's/#.*//g' -e 's/[ ]*//g' -e 's/;//g' | \
+	    awk '{ if ($$0 ~ ".") { print "\t\t_" $$0 } }' \
+	 > $@
+else
+	cat $(MAPFILE_SHARE) $(MAPFILE_EXT) > $@
+endif
+
+mapfile : $(MAPFILE) mapfile_extra vm.def
 	rm -f $@
 	awk '{ if ($$0 ~ "INSERT VTABLE SYMBOLS HERE")	\
-                 { system ("cat mapfile_ext"); system ("cat vm.def"); } \
+                 { system ("cat mapfile_extra vm.def"); } \
                else					\
                  { print $$0 }				\
              }' > $@ < $(MAPFILE)
--- a/hotspot/make/linux/makefiles/mapfile-vers-debug	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/make/linux/makefiles/mapfile-vers-debug	Wed Jul 05 20:52:37 2017 +0200
@@ -26,168 +26,6 @@
 
 SUNWprivate_1.1 {
         global:
-                # JNI
-                JNI_CreateJavaVM;
-                JNI_GetCreatedJavaVMs;
-                JNI_GetDefaultJavaVMInitArgs;
-
-                # JVM
-                JVM_ActiveProcessorCount;
-                JVM_ArrayCopy;
-                JVM_AssertionStatusDirectives;
-                JVM_ClassDepth;
-                JVM_ClassLoaderDepth;
-                JVM_Clone;
-                JVM_ConstantPoolGetClassAt;
-                JVM_ConstantPoolGetClassAtIfLoaded;
-                JVM_ConstantPoolGetDoubleAt;
-                JVM_ConstantPoolGetFieldAt;
-                JVM_ConstantPoolGetFieldAtIfLoaded;
-                JVM_ConstantPoolGetFloatAt;
-                JVM_ConstantPoolGetIntAt;
-                JVM_ConstantPoolGetLongAt;
-                JVM_ConstantPoolGetMethodAt;
-                JVM_ConstantPoolGetMethodAtIfLoaded;
-                JVM_ConstantPoolGetMemberRefInfoAt;
-                JVM_ConstantPoolGetSize;
-                JVM_ConstantPoolGetStringAt;
-                JVM_ConstantPoolGetUTF8At;
-                JVM_CountStackFrames;
-                JVM_CurrentClassLoader;
-                JVM_CurrentLoadedClass;
-                JVM_CurrentThread;
-                JVM_CurrentTimeMillis;
-                JVM_DefineClass;
-                JVM_DefineClassWithSource;
-                JVM_DefineClassWithSourceCond;
-                JVM_DesiredAssertionStatus;
-                JVM_DoPrivileged;
-                JVM_DumpAllStacks;
-                JVM_DumpThreads;
-                JVM_FillInStackTrace;
-                JVM_FindClassFromCaller;
-                JVM_FindClassFromClass;
-                JVM_FindClassFromBootLoader;
-                JVM_FindLibraryEntry;
-                JVM_FindLoadedClass;
-                JVM_FindPrimitiveClass;
-                JVM_FindSignal;
-                JVM_FreeMemory;
-                JVM_GC;
-                JVM_GetAllThreads;
-                JVM_GetArrayElement;
-                JVM_GetArrayLength;
-                JVM_GetCPClassNameUTF;
-                JVM_GetCPFieldClassNameUTF;
-                JVM_GetCPFieldModifiers;
-                JVM_GetCPFieldNameUTF;
-                JVM_GetCPFieldSignatureUTF;
-                JVM_GetCPMethodClassNameUTF;
-                JVM_GetCPMethodModifiers;
-                JVM_GetCPMethodNameUTF;
-                JVM_GetCPMethodSignatureUTF;
-                JVM_GetCallerClass;
-                JVM_GetClassAccessFlags;
-                JVM_GetClassAnnotations;
-                JVM_GetClassCPEntriesCount;
-                JVM_GetClassCPTypes;
-                JVM_GetClassConstantPool;
-                JVM_GetClassContext;
-                JVM_GetClassDeclaredConstructors;
-                JVM_GetClassDeclaredFields;
-                JVM_GetClassDeclaredMethods;
-                JVM_GetClassFieldsCount;
-                JVM_GetClassInterfaces;
-                JVM_GetClassMethodsCount;
-                JVM_GetClassModifiers;
-                JVM_GetClassName;
-                JVM_GetClassNameUTF;
-                JVM_GetClassSignature;
-                JVM_GetClassSigners;
-                JVM_GetClassTypeAnnotations;
-                JVM_GetDeclaredClasses;
-                JVM_GetDeclaringClass;
-                JVM_GetSimpleBinaryName;
-                JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldIxModifiers;
-                JVM_GetFieldTypeAnnotations;
-                JVM_GetInheritedAccessControlContext;
-                JVM_GetInterfaceVersion;
-                JVM_GetManagement;
-                JVM_GetMethodIxArgsSize;
-                JVM_GetMethodIxByteCode;
-                JVM_GetMethodIxByteCodeLength;
-                JVM_GetMethodIxExceptionIndexes;
-                JVM_GetMethodIxExceptionTableEntry;
-                JVM_GetMethodIxExceptionTableLength;
-                JVM_GetMethodIxExceptionsCount;
-                JVM_GetMethodIxLocalsCount;
-                JVM_GetMethodIxMaxStack;
-                JVM_GetMethodIxModifiers;
-                JVM_GetMethodIxNameUTF;
-                JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameters;
-                JVM_GetMethodTypeAnnotations;
-                JVM_GetNanoTimeAdjustment;
-                JVM_GetPrimitiveArrayElement;
-                JVM_GetProtectionDomain;
-                JVM_GetStackAccessControlContext;
-                JVM_GetStackTraceDepth;
-                JVM_GetStackTraceElement;
-                JVM_GetSystemPackage;
-                JVM_GetSystemPackages;
-                JVM_GetTemporaryDirectory;
-                JVM_GetVersionInfo;
-                JVM_Halt;
-                JVM_HoldsLock;
-                JVM_IHashCode;
-                JVM_InitAgentProperties;
-                JVM_InitProperties;
-                JVM_InternString;
-                JVM_Interrupt;
-                JVM_InvokeMethod;
-                JVM_IsArrayClass;
-                JVM_IsConstructorIx;
-                JVM_IsInterface;
-                JVM_IsInterrupted;
-                JVM_IsPrimitiveClass;
-                JVM_IsSameClassPackage;
-                JVM_IsSupportedJNIVersion;
-                JVM_IsThreadAlive;
-                JVM_IsVMGeneratedMethodIx;
-                JVM_LatestUserDefinedLoader;
-                JVM_LoadLibrary;
-                JVM_MaxObjectInspectionAge;
-                JVM_MaxMemory;
-                JVM_MonitorNotify;
-                JVM_MonitorNotifyAll;
-                JVM_MonitorWait;
-                JVM_NanoTime;
-                JVM_NativePath;
-                JVM_NewArray;
-                JVM_NewInstanceFromConstructor;
-                JVM_NewMultiArray;
-                JVM_RaiseSignal;
-                JVM_RawMonitorCreate;
-                JVM_RawMonitorDestroy;
-                JVM_RawMonitorEnter;
-                JVM_RawMonitorExit;
-                JVM_RegisterSignal;
-                JVM_ReleaseUTF;
-                JVM_ResumeThread;
-                JVM_SetArrayElement;
-                JVM_SetClassSigners;
-                JVM_SetNativeThreadName;
-                JVM_SetPrimitiveArrayElement;
-                JVM_SetThreadPriority;
-                JVM_Sleep;
-                JVM_StartThread;
-                JVM_StopThread;
-                JVM_SuspendThread;
-                JVM_SupportsCX8;
-                JVM_TotalMemory;
-                JVM_UnloadLibrary;
-                JVM_Yield;
                 JVM_handle_linux_signal;
 
                 # miscellaneous functions
--- a/hotspot/make/linux/makefiles/mapfile-vers-product	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/make/linux/makefiles/mapfile-vers-product	Wed Jul 05 20:52:37 2017 +0200
@@ -26,168 +26,6 @@
 
 SUNWprivate_1.1 {
         global:
-                # JNI
-                JNI_CreateJavaVM;
-                JNI_GetCreatedJavaVMs;
-                JNI_GetDefaultJavaVMInitArgs;
-
-                # JVM
-                JVM_ActiveProcessorCount;
-                JVM_ArrayCopy;
-                JVM_AssertionStatusDirectives;
-                JVM_ClassDepth;
-                JVM_ClassLoaderDepth;
-                JVM_Clone;
-                JVM_ConstantPoolGetClassAt;
-                JVM_ConstantPoolGetClassAtIfLoaded;
-                JVM_ConstantPoolGetDoubleAt;
-                JVM_ConstantPoolGetFieldAt;
-                JVM_ConstantPoolGetFieldAtIfLoaded;
-                JVM_ConstantPoolGetFloatAt;
-                JVM_ConstantPoolGetIntAt;
-                JVM_ConstantPoolGetLongAt;
-                JVM_ConstantPoolGetMethodAt;
-                JVM_ConstantPoolGetMethodAtIfLoaded;
-                JVM_ConstantPoolGetMemberRefInfoAt;
-                JVM_ConstantPoolGetSize;
-                JVM_ConstantPoolGetStringAt;
-                JVM_ConstantPoolGetUTF8At;
-                JVM_CountStackFrames;
-                JVM_CurrentClassLoader;
-                JVM_CurrentLoadedClass;
-                JVM_CurrentThread;
-                JVM_CurrentTimeMillis;
-                JVM_DefineClass;
-                JVM_DefineClassWithSource;
-                JVM_DefineClassWithSourceCond;
-                JVM_DesiredAssertionStatus;
-                JVM_DoPrivileged;
-                JVM_DumpAllStacks;
-                JVM_DumpThreads;
-                JVM_FillInStackTrace;
-                JVM_FindClassFromCaller;
-                JVM_FindClassFromClass;
-                JVM_FindClassFromBootLoader;
-                JVM_FindLibraryEntry;
-                JVM_FindLoadedClass;
-                JVM_FindPrimitiveClass;
-                JVM_FindSignal;
-                JVM_FreeMemory;
-                JVM_GC;
-                JVM_GetAllThreads;
-                JVM_GetArrayElement;
-                JVM_GetArrayLength;
-                JVM_GetCPClassNameUTF;
-                JVM_GetCPFieldClassNameUTF;
-                JVM_GetCPFieldModifiers;
-                JVM_GetCPFieldNameUTF;
-                JVM_GetCPFieldSignatureUTF;
-                JVM_GetCPMethodClassNameUTF;
-                JVM_GetCPMethodModifiers;
-                JVM_GetCPMethodNameUTF;
-                JVM_GetCPMethodSignatureUTF;
-                JVM_GetCallerClass;
-                JVM_GetClassAccessFlags;
-                JVM_GetClassAnnotations;
-                JVM_GetClassCPEntriesCount;
-                JVM_GetClassCPTypes;
-                JVM_GetClassConstantPool;
-                JVM_GetClassContext;
-                JVM_GetClassDeclaredConstructors;
-                JVM_GetClassDeclaredFields;
-                JVM_GetClassDeclaredMethods;
-                JVM_GetClassFieldsCount;
-                JVM_GetClassInterfaces;
-                JVM_GetClassMethodsCount;
-                JVM_GetClassModifiers;
-                JVM_GetClassName;
-                JVM_GetClassNameUTF;
-                JVM_GetClassSignature;
-                JVM_GetClassSigners;
-                JVM_GetClassTypeAnnotations;
-                JVM_GetDeclaredClasses;
-                JVM_GetDeclaringClass;
-                JVM_GetSimpleBinaryName;
-                JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldIxModifiers;
-                JVM_GetFieldTypeAnnotations;
-                JVM_GetInheritedAccessControlContext;
-                JVM_GetInterfaceVersion;
-                JVM_GetManagement;
-                JVM_GetMethodIxArgsSize;
-                JVM_GetMethodIxByteCode;
-                JVM_GetMethodIxByteCodeLength;
-                JVM_GetMethodIxExceptionIndexes;
-                JVM_GetMethodIxExceptionTableEntry;
-                JVM_GetMethodIxExceptionTableLength;
-                JVM_GetMethodIxExceptionsCount;
-                JVM_GetMethodIxLocalsCount;
-                JVM_GetMethodIxMaxStack;
-                JVM_GetMethodIxModifiers;
-                JVM_GetMethodIxNameUTF;
-                JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameters;
-                JVM_GetMethodTypeAnnotations;
-                JVM_GetNanoTimeAdjustment;
-                JVM_GetPrimitiveArrayElement;
-                JVM_GetProtectionDomain;
-                JVM_GetStackAccessControlContext;
-                JVM_GetStackTraceDepth;
-                JVM_GetStackTraceElement;
-                JVM_GetSystemPackage;
-                JVM_GetSystemPackages;
-                JVM_GetTemporaryDirectory;
-                JVM_GetVersionInfo;
-                JVM_Halt;
-                JVM_HoldsLock;
-                JVM_IHashCode;
-                JVM_InitAgentProperties;
-                JVM_InitProperties;
-                JVM_InternString;
-                JVM_Interrupt;
-                JVM_InvokeMethod;
-                JVM_IsArrayClass;
-                JVM_IsConstructorIx;
-                JVM_IsInterface;
-                JVM_IsInterrupted;
-                JVM_IsPrimitiveClass;
-                JVM_IsSameClassPackage;
-                JVM_IsSupportedJNIVersion;
-                JVM_IsThreadAlive;
-                JVM_IsVMGeneratedMethodIx;
-                JVM_LatestUserDefinedLoader;
-                JVM_LoadLibrary;
-                JVM_MaxObjectInspectionAge;
-                JVM_MaxMemory;
-                JVM_MonitorNotify;
-                JVM_MonitorNotifyAll;
-                JVM_MonitorWait;
-                JVM_NanoTime;
-                JVM_NativePath;
-                JVM_NewArray;
-                JVM_NewInstanceFromConstructor;
-                JVM_NewMultiArray;
-                JVM_RaiseSignal;
-                JVM_RawMonitorCreate;
-                JVM_RawMonitorDestroy;
-                JVM_RawMonitorEnter;
-                JVM_RawMonitorExit;
-                JVM_RegisterSignal;
-                JVM_ReleaseUTF;
-                JVM_ResumeThread;
-                JVM_SetArrayElement;
-                JVM_SetClassSigners;
-                JVM_SetNativeThreadName;
-                JVM_SetPrimitiveArrayElement;
-                JVM_SetThreadPriority;
-                JVM_Sleep;
-                JVM_StartThread;
-                JVM_StopThread;
-                JVM_SuspendThread;
-                JVM_SupportsCX8;
-                JVM_TotalMemory;
-                JVM_UnloadLibrary;
-                JVM_Yield;
                 JVM_handle_linux_signal;
 
                 # miscellaneous functions
--- a/hotspot/make/linux/makefiles/vm.make	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/make/linux/makefiles/vm.make	Wed Jul 05 20:52:37 2017 +0200
@@ -232,10 +232,17 @@
 
 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
 
-mapfile : $(MAPFILE) vm.def mapfile_ext
+MAPFILE_SHARE  := $(GAMMADIR)/make/share/makefiles/mapfile-vers
+
+MAPFILE_EXT_SRC := $(HS_ALT_MAKE)/share/makefiles/mapfile-ext
+ifneq ("$(wildcard $(MAPFILE_EXT_SRC))","")
+MAPFILE_EXT     := $(MAPFILE_EXT_SRC)
+endif
+
+mapfile : $(MAPFILE) $(MAPFILE_SHARE) vm.def $(MAPFILE_EXT)
 	rm -f $@
 	awk '{ if ($$0 ~ "INSERT VTABLE SYMBOLS HERE")	\
-                 { system ("cat mapfile_ext"); system ("cat vm.def"); } \
+                 { system ("cat ${MAPFILE_SHARE} $(MAPFILE_EXT) vm.def"); } \
                else					\
                  { print $$0 }				\
              }' > $@ < $(MAPFILE)
@@ -259,13 +266,6 @@
 	cat $(VM_DEF_EXT) >> $@
 endif        
 
-mapfile_ext:
-	rm -f $@
-	touch $@
-	if [ -f $(HS_ALT_MAKE)/linux/makefiles/mapfile-ext ]; then \
-	  cat $(HS_ALT_MAKE)/linux/makefiles/mapfile-ext > $@; \
-	fi
-
 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
   STATIC_CXX = false
 else
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/make/share/makefiles/mapfile-vers	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,162 @@
+                # JNI
+                JNI_CreateJavaVM;
+                JNI_GetCreatedJavaVMs;
+                JNI_GetDefaultJavaVMInitArgs;
+
+                # JVM
+                JVM_ActiveProcessorCount;
+                JVM_ArrayCopy;
+                JVM_AssertionStatusDirectives;
+                JVM_ClassDepth;
+                JVM_ClassLoaderDepth;
+                JVM_Clone;
+                JVM_ConstantPoolGetClassAt;
+                JVM_ConstantPoolGetClassAtIfLoaded;
+                JVM_ConstantPoolGetDoubleAt;
+                JVM_ConstantPoolGetFieldAt;
+                JVM_ConstantPoolGetFieldAtIfLoaded;
+                JVM_ConstantPoolGetFloatAt;
+                JVM_ConstantPoolGetIntAt;
+                JVM_ConstantPoolGetLongAt;
+                JVM_ConstantPoolGetMethodAt;
+                JVM_ConstantPoolGetMethodAtIfLoaded;
+                JVM_ConstantPoolGetMemberRefInfoAt;
+                JVM_ConstantPoolGetSize;
+                JVM_ConstantPoolGetStringAt;
+                JVM_ConstantPoolGetUTF8At;
+                JVM_CountStackFrames;
+                JVM_CurrentClassLoader;
+                JVM_CurrentLoadedClass;
+                JVM_CurrentThread;
+                JVM_CurrentTimeMillis;
+                JVM_DefineClass;
+                JVM_DefineClassWithSource;
+                JVM_DefineClassWithSourceCond;
+                JVM_DesiredAssertionStatus;
+                JVM_DoPrivileged;
+                JVM_DumpAllStacks;
+                JVM_DumpThreads;
+                JVM_FillInStackTrace;
+                JVM_FindClassFromCaller;
+                JVM_FindClassFromClass;
+                JVM_FindClassFromBootLoader;
+                JVM_FindLibraryEntry;
+                JVM_FindLoadedClass;
+                JVM_FindPrimitiveClass;
+                JVM_FindSignal;
+                JVM_FreeMemory;
+                JVM_GC;
+                JVM_GetAllThreads;
+                JVM_GetArrayElement;
+                JVM_GetArrayLength;
+                JVM_GetCPClassNameUTF;
+                JVM_GetCPFieldClassNameUTF;
+                JVM_GetCPFieldModifiers;
+                JVM_GetCPFieldNameUTF;
+                JVM_GetCPFieldSignatureUTF;
+                JVM_GetCPMethodClassNameUTF;
+                JVM_GetCPMethodModifiers;
+                JVM_GetCPMethodNameUTF;
+                JVM_GetCPMethodSignatureUTF;
+                JVM_GetCallerClass;
+                JVM_GetClassAccessFlags;
+                JVM_GetClassAnnotations;
+                JVM_GetClassCPEntriesCount;
+                JVM_GetClassCPTypes;
+                JVM_GetClassConstantPool;
+                JVM_GetClassContext;
+                JVM_GetClassDeclaredConstructors;
+                JVM_GetClassDeclaredFields;
+                JVM_GetClassDeclaredMethods;
+                JVM_GetClassFieldsCount;
+                JVM_GetClassInterfaces;
+                JVM_GetClassMethodsCount;
+                JVM_GetClassModifiers;
+                JVM_GetClassName;
+                JVM_GetClassNameUTF;
+                JVM_GetClassSignature;
+                JVM_GetClassSigners;
+                JVM_GetClassTypeAnnotations;
+                JVM_GetDeclaredClasses;
+                JVM_GetDeclaringClass;
+                JVM_GetSimpleBinaryName;
+                JVM_GetEnclosingMethodInfo;
+                JVM_GetFieldIxModifiers;
+                JVM_GetFieldTypeAnnotations;
+                JVM_GetInheritedAccessControlContext;
+                JVM_GetInterfaceVersion;
+                JVM_GetManagement;
+                JVM_GetMethodIxArgsSize;
+                JVM_GetMethodIxByteCode;
+                JVM_GetMethodIxByteCodeLength;
+                JVM_GetMethodIxExceptionIndexes;
+                JVM_GetMethodIxExceptionTableEntry;
+                JVM_GetMethodIxExceptionTableLength;
+                JVM_GetMethodIxExceptionsCount;
+                JVM_GetMethodIxLocalsCount;
+                JVM_GetMethodIxMaxStack;
+                JVM_GetMethodIxModifiers;
+                JVM_GetMethodIxNameUTF;
+                JVM_GetMethodIxSignatureUTF;
+                JVM_GetMethodParameters;
+                JVM_GetMethodTypeAnnotations;
+                JVM_GetNanoTimeAdjustment;
+                JVM_GetPrimitiveArrayElement;
+                JVM_GetProtectionDomain;
+                JVM_GetStackAccessControlContext;
+                JVM_GetStackTraceDepth;
+                JVM_GetStackTraceElement;
+                JVM_GetSystemPackage;
+                JVM_GetSystemPackages;
+                JVM_GetTemporaryDirectory;
+                JVM_GetVersionInfo;
+                JVM_Halt;
+                JVM_HoldsLock;
+                JVM_IHashCode;
+                JVM_InitAgentProperties;
+                JVM_InitProperties;
+                JVM_InternString;
+                JVM_Interrupt;
+                JVM_InvokeMethod;
+                JVM_IsArrayClass;
+                JVM_IsConstructorIx;
+                JVM_IsInterface;
+                JVM_IsInterrupted;
+                JVM_IsPrimitiveClass;
+                JVM_IsSameClassPackage;
+                JVM_IsSupportedJNIVersion;
+                JVM_IsThreadAlive;
+                JVM_IsVMGeneratedMethodIx;
+                JVM_LatestUserDefinedLoader;
+                JVM_LoadLibrary;
+                JVM_MaxObjectInspectionAge;
+                JVM_MaxMemory;
+                JVM_MonitorNotify;
+                JVM_MonitorNotifyAll;
+                JVM_MonitorWait;
+                JVM_NanoTime;
+                JVM_NativePath;
+                JVM_NewArray;
+                JVM_NewInstanceFromConstructor;
+                JVM_NewMultiArray;
+                JVM_RaiseSignal;
+                JVM_RawMonitorCreate;
+                JVM_RawMonitorDestroy;
+                JVM_RawMonitorEnter;
+                JVM_RawMonitorExit;
+                JVM_RegisterSignal;
+                JVM_ReleaseUTF;
+                JVM_ResumeThread;
+                JVM_SetArrayElement;
+                JVM_SetClassSigners;
+                JVM_SetNativeThreadName;
+                JVM_SetPrimitiveArrayElement;
+                JVM_SetThreadPriority;
+                JVM_Sleep;
+                JVM_StartThread;
+                JVM_StopThread;
+                JVM_SuspendThread;
+                JVM_SupportsCX8;
+                JVM_TotalMemory;
+                JVM_UnloadLibrary;
+                JVM_Yield;
--- a/hotspot/make/solaris/makefiles/mapfile-vers	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/make/solaris/makefiles/mapfile-vers	Wed Jul 05 20:52:37 2017 +0200
@@ -26,168 +26,6 @@
 
 SUNWprivate_1.1 {
         global:
-                # JNI
-                JNI_CreateJavaVM;
-                JNI_GetCreatedJavaVMs;
-                JNI_GetDefaultJavaVMInitArgs;
-
-                # JVM
-                JVM_ActiveProcessorCount;
-                JVM_ArrayCopy;
-                JVM_AssertionStatusDirectives;
-                JVM_ClassDepth;
-                JVM_ClassLoaderDepth;
-                JVM_Clone;
-                JVM_ConstantPoolGetClassAt;
-                JVM_ConstantPoolGetClassAtIfLoaded;
-                JVM_ConstantPoolGetDoubleAt;
-                JVM_ConstantPoolGetFieldAt;
-                JVM_ConstantPoolGetFieldAtIfLoaded;
-                JVM_ConstantPoolGetFloatAt;
-                JVM_ConstantPoolGetIntAt;
-                JVM_ConstantPoolGetLongAt;
-                JVM_ConstantPoolGetMethodAt;
-                JVM_ConstantPoolGetMethodAtIfLoaded;
-                JVM_ConstantPoolGetMemberRefInfoAt;
-                JVM_ConstantPoolGetSize;
-                JVM_ConstantPoolGetStringAt;
-                JVM_ConstantPoolGetUTF8At;
-                JVM_CountStackFrames;
-                JVM_CurrentClassLoader;
-                JVM_CurrentLoadedClass;
-                JVM_CurrentThread;
-                JVM_CurrentTimeMillis;
-                JVM_DefineClass;
-                JVM_DefineClassWithSource;
-                JVM_DefineClassWithSourceCond;
-                JVM_DesiredAssertionStatus;
-                JVM_DoPrivileged;
-                JVM_DumpAllStacks;
-                JVM_DumpThreads;
-                JVM_FillInStackTrace;
-                JVM_FindClassFromCaller;
-                JVM_FindClassFromClass;
-                JVM_FindClassFromBootLoader;
-                JVM_FindLibraryEntry;
-                JVM_FindLoadedClass;
-                JVM_FindPrimitiveClass;
-                JVM_FindSignal;
-                JVM_FreeMemory;
-                JVM_GC;
-                JVM_GetAllThreads;
-                JVM_GetArrayElement;
-                JVM_GetArrayLength;
-                JVM_GetCPClassNameUTF;
-                JVM_GetCPFieldClassNameUTF;
-                JVM_GetCPFieldModifiers;
-                JVM_GetCPFieldNameUTF;
-                JVM_GetCPFieldSignatureUTF;
-                JVM_GetCPMethodClassNameUTF;
-                JVM_GetCPMethodModifiers;
-                JVM_GetCPMethodNameUTF;
-                JVM_GetCPMethodSignatureUTF;
-                JVM_GetCallerClass;
-                JVM_GetClassAccessFlags;
-                JVM_GetClassAnnotations;
-                JVM_GetClassCPEntriesCount;
-                JVM_GetClassCPTypes;
-                JVM_GetClassConstantPool;
-                JVM_GetClassContext;
-                JVM_GetClassDeclaredConstructors;
-                JVM_GetClassDeclaredFields;
-                JVM_GetClassDeclaredMethods;
-                JVM_GetClassFieldsCount;
-                JVM_GetClassInterfaces;
-                JVM_GetClassMethodsCount;
-                JVM_GetClassModifiers;
-                JVM_GetClassName;
-                JVM_GetClassNameUTF;
-                JVM_GetClassSignature;
-                JVM_GetClassSigners;
-                JVM_GetClassTypeAnnotations;
-                JVM_GetDeclaredClasses;
-                JVM_GetDeclaringClass;
-                JVM_GetSimpleBinaryName;
-                JVM_GetEnclosingMethodInfo;
-                JVM_GetFieldIxModifiers;
-                JVM_GetFieldTypeAnnotations;
-                JVM_GetInheritedAccessControlContext;
-                JVM_GetInterfaceVersion;
-                JVM_GetManagement;
-                JVM_GetMethodIxArgsSize;
-                JVM_GetMethodIxByteCode;
-                JVM_GetMethodIxByteCodeLength;
-                JVM_GetMethodIxExceptionIndexes;
-                JVM_GetMethodIxExceptionTableEntry;
-                JVM_GetMethodIxExceptionTableLength;
-                JVM_GetMethodIxExceptionsCount;
-                JVM_GetMethodIxLocalsCount;
-                JVM_GetMethodIxMaxStack;
-                JVM_GetMethodIxModifiers;
-                JVM_GetMethodIxNameUTF;
-                JVM_GetMethodIxSignatureUTF;
-                JVM_GetMethodParameters;
-                JVM_GetMethodTypeAnnotations;
-                JVM_GetNanoTimeAdjustment;
-                JVM_GetPrimitiveArrayElement;
-                JVM_GetProtectionDomain;
-                JVM_GetStackAccessControlContext;
-                JVM_GetStackTraceDepth;
-                JVM_GetStackTraceElement;
-                JVM_GetSystemPackage;
-                JVM_GetSystemPackages;
-                JVM_GetTemporaryDirectory;
-                JVM_GetVersionInfo;
-                JVM_Halt;
-                JVM_HoldsLock;
-                JVM_IHashCode;
-                JVM_InitAgentProperties;
-                JVM_InitProperties;
-                JVM_InternString;
-                JVM_Interrupt;
-                JVM_InvokeMethod;
-                JVM_IsArrayClass;
-                JVM_IsConstructorIx;
-                JVM_IsInterface;
-                JVM_IsInterrupted;
-                JVM_IsPrimitiveClass;
-                JVM_IsSameClassPackage;
-                JVM_IsSupportedJNIVersion;
-                JVM_IsThreadAlive;
-                JVM_IsVMGeneratedMethodIx;
-                JVM_LatestUserDefinedLoader;
-                JVM_LoadLibrary;
-                JVM_MaxObjectInspectionAge;
-                JVM_MaxMemory;
-                JVM_MonitorNotify;
-                JVM_MonitorNotifyAll;
-                JVM_MonitorWait;
-                JVM_NativePath;
-                JVM_NanoTime;
-                JVM_NewArray;
-                JVM_NewInstanceFromConstructor;
-                JVM_NewMultiArray;
-                JVM_RaiseSignal;
-                JVM_RawMonitorCreate;
-                JVM_RawMonitorDestroy;
-                JVM_RawMonitorEnter;
-                JVM_RawMonitorExit;
-                JVM_RegisterSignal;
-                JVM_ReleaseUTF;
-                JVM_ResumeThread;
-                JVM_SetArrayElement;
-                JVM_SetClassSigners;
-                JVM_SetNativeThreadName;
-                JVM_SetPrimitiveArrayElement;
-                JVM_SetThreadPriority;
-                JVM_Sleep;
-                JVM_StartThread;
-                JVM_StopThread;
-                JVM_SuspendThread;
-                JVM_SupportsCX8;
-                JVM_TotalMemory;
-                JVM_UnloadLibrary;
-                JVM_Yield;
                 JVM_handle_solaris_signal;
 
                 # miscellaneous functions
--- a/hotspot/make/solaris/makefiles/vm.make	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/make/solaris/makefiles/vm.make	Wed Jul 05 20:52:37 2017 +0200
@@ -241,13 +241,19 @@
 
 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
 
-mapfile : $(MAPFILE) $(MAPFILE_DTRACE_OPT) vm.def mapfile_ext
+MAPFILE_SHARE  := $(GAMMADIR)/make/share/makefiles/mapfile-vers
+
+MAPFILE_EXT_SRC := $(HS_ALT_MAKE)/share/makefiles/mapfile-ext
+ifneq ("$(wildcard $(MAPFILE_EXT_SRC))","")
+MAPFILE_EXT     := $(MAPFILE_EXT_SRC)
+endif
+
+mapfile : $(MAPFILE) $(MAPFILE_SHARE) vm.def $(MAPFILE_EXT)
 	rm -f $@
 	cat $(MAPFILE) $(MAPFILE_DTRACE_OPT) \
 	    | $(NAWK) '{                                         \
 	              if ($$0 ~ "INSERT VTABLE SYMBOLS HERE") {  \
-	                  system ("cat mapfile_ext");            \
-	                  system ("cat vm.def");                 \
+	                  system ("cat ${MAPFILE_SHARE} $(MAPFILE_EXT) vm.def"); \
 	              } else {                                   \
 	                  print $$0;                             \
 	              }                                          \
@@ -260,12 +266,6 @@
 vm.def: $(Obj_Files)
 	sh $(GAMMADIR)/make/solaris/makefiles/build_vm_def.sh *.o > $@
 
-mapfile_ext:
-	rm -f $@
-	touch $@
-	if [ -f $(HS_ALT_MAKE)/solaris/makefiles/mapfile-ext ]; then \
-	  cat $(HS_ALT_MAKE)/solaris/makefiles/mapfile-ext > $@; \
-	fi
 
 ifeq ($(LINK_INTO),AOUT)
   LIBJVM.o                 =
--- a/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -1608,6 +1608,8 @@
     test_method_data_pointer(mdp, profile_continue);
 
     if (MethodData::profile_return_jsr292_only()) {
+      assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
       // If we don't profile all invoke bytecodes we must make sure
       // it's a bytecode we indeed profile. We can't go back to the
       // begining of the ProfileData we intend to update to check its
@@ -1620,7 +1622,7 @@
       cmp(rscratch1, Bytecodes::_invokehandle);
       br(Assembler::EQ, do_profile);
       get_method(tmp);
-      ldrb(rscratch1, Address(tmp, Method::intrinsic_id_offset_in_bytes()));
+      ldrh(rscratch1, Address(tmp, Method::intrinsic_id_offset_in_bytes()));
       cmp(rscratch1, vmIntrinsics::_compiledLambdaForm);
       br(Assembler::NE, profile_continue);
 
--- a/hotspot/src/cpu/aarch64/vm/methodHandles_aarch64.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/cpu/aarch64/vm/methodHandles_aarch64.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -188,9 +188,11 @@
   address entry_point = __ pc();
 
   if (VerifyMethodHandles) {
+    assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
     Label L;
     BLOCK_COMMENT("verify_intrinsic_id {");
-    __ ldrb(rscratch1, Address(rmethod, Method::intrinsic_id_offset_in_bytes()));
+    __ ldrh(rscratch1, Address(rmethod, Method::intrinsic_id_offset_in_bytes()));
     __ cmp(rscratch1, (int) iid);
     __ br(Assembler::EQ, L);
     if (iid == vmIntrinsics::_linkToVirtual ||
--- a/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -1817,13 +1817,15 @@
     test_method_data_pointer(profile_continue);
 
     if (MethodData::profile_return_jsr292_only()) {
+      assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
       // If we don't profile all invoke bytecodes we must make sure
       // it's a bytecode we indeed profile. We can't go back to the
       // begining of the ProfileData we intend to update to check its
       // type because we're right after it and we don't known its
       // length.
       lbz(tmp1, 0, R14_bcp);
-      lbz(tmp2, Method::intrinsic_id_offset_in_bytes(), R19_method);
+      lhz(tmp2, Method::intrinsic_id_offset_in_bytes(), R19_method);
       cmpwi(CCR0, tmp1, Bytecodes::_invokedynamic);
       cmpwi(CCR1, tmp1, Bytecodes::_invokehandle);
       cror(CCR0, Assembler::equal, CCR1, Assembler::equal);
--- a/hotspot/src/cpu/ppc/vm/methodHandles_ppc.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/cpu/ppc/vm/methodHandles_ppc.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -224,11 +224,12 @@
   address entry_point = __ pc();
 
   if (VerifyMethodHandles) {
+    assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
     Label L;
     BLOCK_COMMENT("verify_intrinsic_id {");
     __ load_sized_value(temp1, Method::intrinsic_id_offset_in_bytes(), R19_method,
-                        sizeof(u1), /*is_signed*/ false);
-    // assert(sizeof(u1) == sizeof(Method::_intrinsic_id), "");
+                        sizeof(u2), /*is_signed*/ false);
     __ cmpwi(CCR1, temp1, (int) iid);
     __ beq(CCR1, L);
     if (iid == vmIntrinsics::_linkToVirtual ||
--- a/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2021,6 +2021,8 @@
     test_method_data_pointer(profile_continue);
 
     if (MethodData::profile_return_jsr292_only()) {
+      assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
       // If we don't profile all invoke bytecodes we must make sure
       // it's a bytecode we indeed profile. We can't go back to the
       // begining of the ProfileData we intend to update to check its
@@ -2031,7 +2033,7 @@
       cmp_and_br_short(tmp1, Bytecodes::_invokedynamic, equal, pn, do_profile);
       cmp(tmp1, Bytecodes::_invokehandle);
       br(equal, false, pn, do_profile);
-      delayed()->ldub(Lmethod, Method::intrinsic_id_offset_in_bytes(), tmp1);
+      delayed()->lduh(Lmethod, Method::intrinsic_id_offset_in_bytes(), tmp1);
       cmp_and_br_short(tmp1, vmIntrinsics::_compiledLambdaForm, notEqual, pt, profile_continue);
 
       bind(do_profile);
--- a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -229,9 +229,11 @@
   address entry_point = __ pc();
 
   if (VerifyMethodHandles) {
+    assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
     Label L;
     BLOCK_COMMENT("verify_intrinsic_id {");
-    __ ldub(Address(G5_method, Method::intrinsic_id_offset_in_bytes()), O1_scratch);
+    __ lduh(Address(G5_method, Method::intrinsic_id_offset_in_bytes()), O1_scratch);
     __ cmp_and_br_short(O1_scratch, (int) iid, Assembler::equal, Assembler::pt, L);
     if (iid == vmIntrinsics::_linkToVirtual ||
         iid == vmIntrinsics::_linkToSpecial) {
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -169,6 +169,8 @@
     test_method_data_pointer(mdp, profile_continue);
 
     if (MethodData::profile_return_jsr292_only()) {
+      assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
       // If we don't profile all invoke bytecodes we must make sure
       // it's a bytecode we indeed profile. We can't go back to the
       // begining of the ProfileData we intend to update to check its
@@ -180,7 +182,7 @@
       cmpb(Address(_bcp_register, 0), Bytecodes::_invokehandle);
       jcc(Assembler::equal, do_profile);
       get_method(tmp);
-      cmpb(Address(tmp, Method::intrinsic_id_offset_in_bytes()), vmIntrinsics::_compiledLambdaForm);
+      cmpw(Address(tmp, Method::intrinsic_id_offset_in_bytes()), vmIntrinsics::_compiledLambdaForm);
       jcc(Assembler::notEqual, profile_continue);
 
       bind(do_profile);
--- a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -222,9 +222,11 @@
   address entry_point = __ pc();
 
   if (VerifyMethodHandles) {
+    assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
     Label L;
     BLOCK_COMMENT("verify_intrinsic_id {");
-    __ cmpb(Address(rbx_method, Method::intrinsic_id_offset_in_bytes()), (int) iid);
+    __ cmpw(Address(rbx_method, Method::intrinsic_id_offset_in_bytes()), (int) iid);
     __ jcc(Assembler::equal, L);
     if (iid == vmIntrinsics::_linkToVirtual ||
         iid == vmIntrinsics::_linkToSpecial) {
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -1989,6 +1989,10 @@
       flags = JVM_ACC_STATIC;
     } else if ((flags & JVM_ACC_STATIC) == JVM_ACC_STATIC) {
       flags &= JVM_ACC_STATIC | JVM_ACC_STRICT;
+    } else {
+      // As of major_version 51, a method named <clinit> without ACC_STATIC is
+      // just another method. So, do a normal method modifer check.
+      verify_legal_method_modifiers(flags, is_interface, name, CHECK_(nullHandle));
     }
   } else {
     verify_legal_method_modifiers(flags, is_interface, name, CHECK_(nullHandle));
--- a/hotspot/src/share/vm/classfile/verificationType.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/classfile/verificationType.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -70,9 +70,12 @@
     if (this_class->is_interface() && (!from_field_is_protected ||
         from.name() != vmSymbols::java_lang_Object())) {
       // If we are not trying to access a protected field or method in
-      // java.lang.Object then we treat interfaces as java.lang.Object,
-      // including java.lang.Cloneable and java.io.Serializable.
-      return true;
+      // java.lang.Object then, for arrays, we only allow assignability
+      // to interfaces java.lang.Cloneable and java.io.Serializable.
+      // Otherwise, we treat interfaces as java.lang.Object.
+      return !from.is_array() ||
+        this_class == SystemDictionary::Cloneable_klass() ||
+        this_class == SystemDictionary::Serializable_klass();
     } else if (from.is_object()) {
       Klass* from_class = SystemDictionary::resolve_or_fail(
           from.name(), Handle(THREAD, klass->class_loader()),
--- a/hotspot/src/share/vm/classfile/verifier.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/classfile/verifier.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -1579,9 +1579,11 @@
             return;
           }
           // Make sure "this" has been initialized if current method is an
-          // <init>
+          // <init>.  Note that "<init>" methods in interfaces are just
+          // normal methods.  Interfaces cannot have ctors.
           if (_method->name() == vmSymbols::object_initializer_name() &&
-              current_frame.flag_this_uninit()) {
+              current_frame.flag_this_uninit() &&
+              !current_class()->is_interface()) {
             verify_error(ErrorContext::bad_code(bci),
                          "Constructor must call super() or this() "
                          "before return");
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -73,13 +73,6 @@
 
 size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0;
 
-// turn it on so that the contents of the young list (scan-only /
-// to-be-collected) are printed at "strategic" points before / during
-// / after the collection --- this is useful for debugging
-#define YOUNG_LIST_VERBOSE 0
-// CURRENT STATUS
-// This file is under construction.  Search for "FIXME".
-
 // INVARIANTS/NOTES
 //
 // All allocation activity covered by the G1CollectedHeap interface is
@@ -4079,29 +4072,12 @@
         // the possible verification above.
         double sample_start_time_sec = os::elapsedTime();
 
-#if YOUNG_LIST_VERBOSE
-        gclog_or_tty->print_cr("\nBefore recording pause start.\nYoung_list:");
-        _young_list->print();
-        g1_policy()->print_collection_set(g1_policy()->inc_cset_head(), gclog_or_tty);
-#endif // YOUNG_LIST_VERBOSE
-
         g1_policy()->record_collection_pause_start(sample_start_time_sec);
 
-#if YOUNG_LIST_VERBOSE
-        gclog_or_tty->print_cr("\nAfter recording pause start.\nYoung_list:");
-        _young_list->print();
-#endif // YOUNG_LIST_VERBOSE
-
         if (collector_state()->during_initial_mark_pause()) {
           concurrent_mark()->checkpointRootsInitialPre();
         }
 
-#if YOUNG_LIST_VERBOSE
-        gclog_or_tty->print_cr("\nBefore choosing collection set.\nYoung_list:");
-        _young_list->print();
-        g1_policy()->print_collection_set(g1_policy()->inc_cset_head(), gclog_or_tty);
-#endif // YOUNG_LIST_VERBOSE
-
         double time_remaining_ms = g1_policy()->finalize_young_cset_part(target_pause_time_ms);
         g1_policy()->finalize_old_cset_part(time_remaining_ms);
 
@@ -4157,11 +4133,6 @@
         assert(check_young_list_empty(false /* check_heap */),
           "young list should be empty");
 
-#if YOUNG_LIST_VERBOSE
-        gclog_or_tty->print_cr("Before recording survivors.\nYoung List:");
-        _young_list->print();
-#endif // YOUNG_LIST_VERBOSE
-
         g1_policy()->record_survivor_regions(_young_list->survivor_length(),
                                              _young_list->first_survivor_region(),
                                              _young_list->last_survivor_region());
@@ -4197,12 +4168,6 @@
 
         allocate_dummy_regions();
 
-#if YOUNG_LIST_VERBOSE
-        gclog_or_tty->print_cr("\nEnd of the pause.\nYoung_list:");
-        _young_list->print();
-        g1_policy()->print_collection_set(g1_policy()->inc_cset_head(), gclog_or_tty);
-#endif // YOUNG_LIST_VERBOSE
-
         _allocator->init_mutator_alloc_region();
 
         {
--- a/hotspot/src/share/vm/gc/g1/g1EvacStats.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1EvacStats.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -93,7 +93,7 @@
     size_t const used_for_waste_calculation = used() > _region_end_waste ? used() - _region_end_waste : 0;
 
     size_t const total_waste_allowed = used_for_waste_calculation * TargetPLABWastePct;
-    size_t const cur_plab_sz = (double)total_waste_allowed / G1LastPLABAverageOccupancy;
+    size_t const cur_plab_sz = (size_t)((double)total_waste_allowed / G1LastPLABAverageOccupancy);
     // Take historical weighted average
     _filter.sample(cur_plab_sz);
     // Clip from above and below, and align to object boundary
--- a/hotspot/src/share/vm/gc/shared/gcTrace.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/gc/shared/gcTrace.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -88,8 +88,6 @@
   send_reference_stats_event(REF_WEAK, rps.weak_count());
   send_reference_stats_event(REF_FINAL, rps.final_count());
   send_reference_stats_event(REF_PHANTOM, rps.phantom_count());
-  send_reference_stats_event(REF_CLEANER, rps.cleaner_count());
-  send_reference_stats_event(REF_JNI, rps.jni_weak_ref_count());
 }
 
 #if INCLUDE_SERVICES
--- a/hotspot/src/share/vm/gc/shared/referenceProcessor.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/gc/shared/referenceProcessor.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -243,13 +243,10 @@
       process_discovered_reflist(_discoveredPhantomRefs, NULL, false,
                                  is_alive, keep_alive, complete_gc, task_executor);
 
-  }
-
-  // Cleaners
-  size_t cleaner_count = 0;
-  {
-    GCTraceTime tt("Cleaners", trace_time, false, gc_timer, gc_id);
-    cleaner_count =
+    // Process cleaners, but include them in phantom statistics.  We expect
+    // Cleaner references to be temporary, and don't want to deal with
+    // possible incompatibilities arising from making it more visible.
+    phantom_count +=
       process_discovered_reflist(_discoveredCleanerRefs, NULL, true,
                                  is_alive, keep_alive, complete_gc, task_executor);
   }
@@ -259,17 +256,15 @@
   // that is not how the JDK1.2 specification is. See #4126360. Native code can
   // thus use JNI weak references to circumvent the phantom references and
   // resurrect a "post-mortem" object.
-  size_t jni_weak_ref_count = 0;
   {
     GCTraceTime tt("JNI Weak Reference", trace_time, false, gc_timer, gc_id);
     if (task_executor != NULL) {
       task_executor->set_single_threaded_mode();
     }
-    jni_weak_ref_count =
-      process_phaseJNI(is_alive, keep_alive, complete_gc);
+    process_phaseJNI(is_alive, keep_alive, complete_gc);
   }
 
-  return ReferenceProcessorStats(soft_count, weak_count, final_count, phantom_count, cleaner_count, jni_weak_ref_count);
+  return ReferenceProcessorStats(soft_count, weak_count, final_count, phantom_count);
 }
 
 #ifndef PRODUCT
@@ -296,17 +291,17 @@
 }
 #endif
 
-size_t ReferenceProcessor::process_phaseJNI(BoolObjectClosure* is_alive,
-                                            OopClosure*        keep_alive,
-                                            VoidClosure*       complete_gc) {
-  DEBUG_ONLY(size_t check_count = count_jni_refs();)
-  size_t count = JNIHandles::weak_oops_do(is_alive, keep_alive);
-  assert(count == check_count, "Counts didn't match");
+void ReferenceProcessor::process_phaseJNI(BoolObjectClosure* is_alive,
+                                          OopClosure*        keep_alive,
+                                          VoidClosure*       complete_gc) {
+#ifndef PRODUCT
+  if (PrintGCDetails && PrintReferenceGC) {
+    unsigned int count = count_jni_refs();
+    gclog_or_tty->print(", %u refs", count);
+  }
+#endif
+  JNIHandles::weak_oops_do(is_alive, keep_alive);
   complete_gc->do_void();
-  if (PrintGCDetails && PrintReferenceGC) {
-    gclog_or_tty->print(", " SIZE_FORMAT " refs", count);
-  }
-  return count;
 }
 
 
@@ -946,10 +941,9 @@
       list = &_discoveredCleanerRefs[id];
       break;
     case REF_NONE:
-    case REF_JNI:
       // we should not reach here if we are an InstanceRefKlass
     default:
-      guarantee(false, err_msg("rt should not be %d", rt));
+      ShouldNotReachHere();
   }
   if (TraceReferenceGC && PrintGCDetails) {
     gclog_or_tty->print_cr("Thread %d gets list " INTPTR_FORMAT, id, p2i(list));
--- a/hotspot/src/share/vm/gc/shared/referenceProcessor.hpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/gc/shared/referenceProcessor.hpp	Wed Jul 05 20:52:37 2017 +0200
@@ -247,7 +247,7 @@
   DiscoveredList* _discoveredCleanerRefs;
 
  public:
-  static int number_of_subclasses_of_ref() { return REF_LISTS_COUNT; }
+  static int number_of_subclasses_of_ref() { return (REF_CLEANER - REF_OTHER); }
 
   uint num_q()                             { return _num_q; }
   uint max_num_q()                         { return _max_num_q; }
@@ -271,9 +271,9 @@
                                     VoidClosure*                 complete_gc,
                                     AbstractRefProcTaskExecutor* task_executor);
 
-  size_t process_phaseJNI(BoolObjectClosure* is_alive,
-                          OopClosure*        keep_alive,
-                          VoidClosure*       complete_gc);
+  void process_phaseJNI(BoolObjectClosure* is_alive,
+                        OopClosure*        keep_alive,
+                        VoidClosure*       complete_gc);
 
   // Work methods used by the method process_discovered_reflist
   // Phase1: keep alive all those referents that are otherwise
--- a/hotspot/src/share/vm/gc/shared/referenceProcessorStats.hpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/gc/shared/referenceProcessorStats.hpp	Wed Jul 05 20:52:37 2017 +0200
@@ -36,30 +36,22 @@
   size_t _weak_count;
   size_t _final_count;
   size_t _phantom_count;
-  size_t _cleaner_count;
-  size_t _jni_weak_ref_count;
 
  public:
   ReferenceProcessorStats() :
     _soft_count(0),
     _weak_count(0),
     _final_count(0),
-    _phantom_count(0),
-    _cleaner_count(0),
-    _jni_weak_ref_count(0) {}
+    _phantom_count(0) {}
 
   ReferenceProcessorStats(size_t soft_count,
                           size_t weak_count,
                           size_t final_count,
-                          size_t phantom_count,
-                          size_t cleaner_count,
-                          size_t jni_weak_ref_count) :
+                          size_t phantom_count) :
     _soft_count(soft_count),
     _weak_count(weak_count),
     _final_count(final_count),
-    _phantom_count(phantom_count),
-    _cleaner_count(cleaner_count),
-    _jni_weak_ref_count(jni_weak_ref_count)
+    _phantom_count(phantom_count)
   {}
 
   size_t soft_count() const {
@@ -77,13 +69,5 @@
   size_t phantom_count() const {
     return _phantom_count;
   }
-
-  size_t cleaner_count() const {
-    return _cleaner_count;
-  }
-
-  size_t jni_weak_ref_count() const {
-    return _jni_weak_ref_count;
-  }
 };
 #endif
--- a/hotspot/src/share/vm/memory/referenceType.hpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/memory/referenceType.hpp	Wed Jul 05 20:52:37 2017 +0200
@@ -32,15 +32,11 @@
 enum ReferenceType {
   REF_NONE,      // Regular class
   REF_OTHER,     // Subclass of java/lang/ref/Reference, but not subclass of one of the classes below
-  ///////////////// Only the types below have their own discovered lists
   REF_SOFT,      // Subclass of java/lang/ref/SoftReference
   REF_WEAK,      // Subclass of java/lang/ref/WeakReference
   REF_FINAL,     // Subclass of java/lang/ref/FinalReference
   REF_PHANTOM,   // Subclass of java/lang/ref/PhantomReference
-  REF_CLEANER,   // Subclass of sun/misc/Cleaner
-  ///////////////// Only the types in the above range have their own discovered lists
-  REF_JNI,        // JNI weak refs
-  REF_LISTS_COUNT = REF_CLEANER - REF_OTHER  // Number of discovered lists
+  REF_CLEANER    // Subclass of sun/misc/Cleaner
 };
 
 #endif // SHARE_VM_MEMORY_REFERENCETYPE_HPP
--- a/hotspot/src/share/vm/oops/method.hpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/oops/method.hpp	Wed Jul 05 20:52:37 2017 +0200
@@ -72,7 +72,7 @@
   int               _result_index;               // C++ interpreter needs for converting results to/from stack
 #endif
   u2                _method_size;                // size of this object
-  u1                _intrinsic_id;               // vmSymbols::intrinsic_id (0 == _none)
+  u2                _intrinsic_id;               // vmSymbols::intrinsic_id (0 == _none)
 
   // Flags
   enum Flags {
@@ -653,7 +653,7 @@
   // for code generation
   static int method_data_offset_in_bytes()       { return offset_of(Method, _method_data); }
   static int intrinsic_id_offset_in_bytes()      { return offset_of(Method, _intrinsic_id); }
-  static int intrinsic_id_size_in_bytes()        { return sizeof(u1); }
+  static int intrinsic_id_size_in_bytes()        { return sizeof(u2); }
 
   // Static methods that are used to implement member methods where an exposed this pointer
   // is needed due to possible GCs
@@ -777,7 +777,7 @@
 
   // Support for inlining of intrinsic methods
   vmIntrinsics::ID intrinsic_id() const          { return (vmIntrinsics::ID) _intrinsic_id;           }
-  void     set_intrinsic_id(vmIntrinsics::ID id) {                           _intrinsic_id = (u1) id; }
+  void     set_intrinsic_id(vmIntrinsics::ID id) {                           _intrinsic_id = (u2) id; }
 
   // Helper routines for intrinsic_id() and vmIntrinsics::method().
   void init_intrinsic_id();     // updates from _none if a match
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -2181,8 +2181,8 @@
   JvmtiVMObjectAllocEventCollector::oops_do_for_all_threads(f);
 }
 
-size_t JvmtiExport::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
-  return JvmtiTagMap::weak_oops_do(is_alive, f);
+void JvmtiExport::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
+  JvmtiTagMap::weak_oops_do(is_alive, f);
 }
 
 void JvmtiExport::gc_epilogue() {
--- a/hotspot/src/share/vm/prims/jvmtiExport.hpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiExport.hpp	Wed Jul 05 20:52:37 2017 +0200
@@ -366,7 +366,7 @@
   static void clear_detected_exception   (JavaThread* thread) NOT_JVMTI_RETURN;
 
   static void oops_do(OopClosure* f) NOT_JVMTI_RETURN;
-  static size_t weak_oops_do(BoolObjectClosure* b, OopClosure* f) NOT_JVMTI_RETURN_(0);
+  static void weak_oops_do(BoolObjectClosure* b, OopClosure* f) NOT_JVMTI_RETURN;
   static void gc_epilogue() NOT_JVMTI_RETURN;
 
   static void transition_pending_onload_raw_monitors() NOT_JVMTI_RETURN;
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -3284,35 +3284,32 @@
 }
 
 
-size_t JvmtiTagMap::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
+void JvmtiTagMap::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
   // No locks during VM bring-up (0 threads) and no safepoints after main
   // thread creation and before VMThread creation (1 thread); initial GC
   // verification can happen in that window which gets to here.
   assert(Threads::number_of_threads() <= 1 ||
          SafepointSynchronize::is_at_safepoint(),
          "must be executed at a safepoint");
-  size_t count = 0;
   if (JvmtiEnv::environments_might_exist()) {
     JvmtiEnvIterator it;
     for (JvmtiEnvBase* env = it.first(); env != NULL; env = it.next(env)) {
       JvmtiTagMap* tag_map = env->tag_map();
       if (tag_map != NULL && !tag_map->is_empty()) {
-        count += tag_map->do_weak_oops(is_alive, f);
+        tag_map->do_weak_oops(is_alive, f);
       }
     }
   }
-  return count;
 }
 
-size_t JvmtiTagMap::do_weak_oops(BoolObjectClosure* is_alive, OopClosure* f) {
+void JvmtiTagMap::do_weak_oops(BoolObjectClosure* is_alive, OopClosure* f) {
 
   // does this environment have the OBJECT_FREE event enabled
   bool post_object_free = env()->is_enabled(JVMTI_EVENT_OBJECT_FREE);
 
   // counters used for trace message
-  size_t freed = 0;
-  size_t moved = 0;
-  size_t stayed = 0;
+  int freed = 0;
+  int moved = 0;
 
   JvmtiTagHashmap* hashmap = this->hashmap();
 
@@ -3321,7 +3318,7 @@
 
   // if the hashmap is empty then we can skip it
   if (hashmap->_entry_count == 0) {
-    return 0;
+    return;
   }
 
   // now iterate through each entry in the table
@@ -3383,7 +3380,6 @@
         } else {
           // object didn't move
           prev = entry;
-          stayed++;
         }
       }
 
@@ -3402,12 +3398,10 @@
 
   // stats
   if (TraceJVMTIObjectTagging) {
-    size_t post_total = hashmap->_entry_count;
-    size_t pre_total = post_total + freed;
-
-    tty->print_cr("(" SIZE_FORMAT "->" SIZE_FORMAT ", " SIZE_FORMAT " freed, " SIZE_FORMAT " stayed, " SIZE_FORMAT " moved)",
-        pre_total, post_total, freed, stayed, moved);
+    int post_total = hashmap->_entry_count;
+    int pre_total = post_total + freed;
+
+    tty->print_cr("(%d->%d, %d freed, %d total moves)",
+        pre_total, post_total, freed, moved);
   }
-
-  return (freed + stayed + moved);
 }
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.hpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.hpp	Wed Jul 05 20:52:37 2017 +0200
@@ -60,7 +60,7 @@
   inline Mutex* lock()                      { return &_lock; }
   inline JvmtiEnv* env() const              { return _env; }
 
-  size_t do_weak_oops(BoolObjectClosure* is_alive, OopClosure* f);
+  void do_weak_oops(BoolObjectClosure* is_alive, OopClosure* f);
 
   // iterate over all entries in this tag map
   void entry_iterate(JvmtiTagHashmapEntryClosure* closure);
@@ -122,8 +122,8 @@
                                    jint* count_ptr, jobject** object_result_ptr,
                                    jlong** tag_result_ptr);
 
-  static size_t weak_oops_do(BoolObjectClosure* is_alive,
-                             OopClosure* f) NOT_JVMTI_RETURN_(0);
+  static void weak_oops_do(
+      BoolObjectClosure* is_alive, OopClosure* f) NOT_JVMTI_RETURN;
 };
 
 #endif // SHARE_VM_PRIMS_JVMTITAGMAP_HPP
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -118,7 +118,7 @@
 // part of the option string.
 static bool match_option(const JavaVMOption *option, const char* name,
                          const char** tail) {
-  int len = (int)strlen(name);
+  size_t len = strlen(name);
   if (strncmp(option->optionString, name, len) == 0) {
     *tail = option->optionString + len;
     return true;
@@ -219,11 +219,9 @@
 void Arguments::init_version_specific_system_properties() {
   enum { bufsz = 16 };
   char buffer[bufsz];
-  const char* spec_vendor = "Sun Microsystems Inc.";
-  uint32_t spec_version = 0;
-
-  spec_vendor = "Oracle Corporation";
-  spec_version = JDK_Version::current().major_version();
+  const char* spec_vendor = "Oracle Corporation";
+  uint32_t spec_version = JDK_Version::current().major_version();
+
   jio_snprintf(buffer, bufsz, "1." UINT32_FORMAT, spec_version);
 
   PropertyList_add(&_system_properties,
@@ -234,75 +232,290 @@
       new SystemProperty("java.vm.vendor", VM_Version::vm_vendor(),  false));
 }
 
-/**
- * Provide a slightly more user-friendly way of eliminating -XX flags.
- * When a flag is eliminated, it can be added to this list in order to
- * continue accepting this flag on the command-line, while issuing a warning
- * and ignoring the value.  Once the JDK version reaches the 'accept_until'
- * limit, we flatly refuse to admit the existence of the flag.  This allows
- * a flag to die correctly over JDK releases using HSX.
- * But now that HSX is no longer supported only options with a future
- * accept_until value need to be listed, and the list can be pruned
- * on each major release.
+/*
+ *  -XX argument processing:
+ *
+ *  -XX arguments are defined in several places, such as:
+ *      globals.hpp, globals_<cpu>.hpp, globals_<os>.hpp, <compiler>_globals.hpp, or <gc>_globals.hpp.
+ *  -XX arguments are parsed in parse_argument().
+ *  -XX argument bounds checking is done in check_vm_args_consistency().
+ *
+ * Over time -XX arguments may change. There are mechanisms to handle common cases:
+ *
+ *      ALIASED: An option that is simply another name for another option. This is often
+ *               part of the process of deprecating a flag, but not all aliases need
+ *               to be deprecated.
+ *
+ *               Create an alias for an option by adding the old and new option names to the
+ *               "aliased_jvm_flags" table. Delete the old variable from globals.hpp (etc).
+ *
+ *   DEPRECATED: An option that is supported, but a warning is printed to let the user know that
+ *               support may be removed in the future. Both regular and aliased options may be
+ *               deprecated.
+ *
+ *               Add a deprecation warning for an option (or alias) by adding an entry in the
+ *               "special_jvm_flags" table and setting the "deprecated_in" field.
+ *               Often an option "deprecated" in one major release will
+ *               be made "obsolete" in the next. In this case the entry should also have it's
+ *               "obsolete_in" field set.
+ *
+ *     OBSOLETE: An option that has been removed (and deleted from globals.hpp), but is still accepted
+ *               on the command line. A warning is printed to let the user know that option might not
+ *               be accepted in the future.
+ *
+ *               Add an obsolete warning for an option by adding an entry in the "special_jvm_flags"
+ *               table and setting the "obsolete_in" field.
+ *
+ *      EXPIRED: A deprecated or obsolete option that has an "accept_until" version less than or equal
+ *               to the current JDK version. The system will flatly refuse to admit the existence of
+ *               the flag. This allows a flag to die automatically over JDK releases.
+ *
+ *               Note that manual cleanup of expired options should be done at major JDK version upgrades:
+ *                  - Newly expired options should be removed from the special_jvm_flags and aliased_jvm_flags tables.
+ *                  - Newly obsolete or expired deprecated options should have their global variable
+ *                    definitions removed (from globals.hpp, etc) and related implementations removed.
+ *
+ * Recommended approach for removing options:
+ *
+ * To remove options commonly used by customers (e.g. product, commercial -XX options), use
+ * the 3-step model adding major release numbers to the deprecate, obsolete and expire columns.
+ *
+ * To remove internal options (e.g. diagnostic, experimental, develop options), use
+ * a 2-step model adding major release numbers to the obsolete and expire columns.
+ *
+ * To change the name of an option, use the alias table as well as a 2-step
+ * model adding major release numbers to the deprecate and expire columns.
+ * Think twice about aliasing commonly used customer options.
+ *
+ * There are times when it is appropriate to leave a future release number as undefined.
+ *
+ * Tests:  Aliases should be tested in VMAliasOptions.java.
+ *         Deprecated options should be tested in VMDeprecatedOptions.java.
  */
+
+// Obsolete or deprecated -XX flag.
 typedef struct {
   const char* name;
-  JDK_Version obsoleted_in; // when the flag went away
-  JDK_Version accept_until; // which version to start denying the existence
-} ObsoleteFlag;
-
-static ObsoleteFlag obsolete_jvm_flags[] = {
-  { "UseOldInlining",                JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "SafepointPollOffset",           JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "UseBoundThreads",               JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "DefaultThreadPriority",         JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "NoYieldsInMicrolock",           JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "BackEdgeThreshold",             JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "UseNewReflection",              JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "ReflectionWrapResolutionErrors",JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "VerifyReflectionBytecodes",     JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "AutoShutdownNMT",               JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "NmethodSweepFraction",          JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "NmethodSweepCheckInterval",     JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "CodeCacheMinimumFreeSpace",     JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  JDK_Version deprecated_in; // When the deprecation warning started (or "undefined").
+  JDK_Version obsolete_in;   // When the obsolete warning started (or "undefined").
+  JDK_Version expired_in;    // When the option expires (or "undefined").
+} SpecialFlag;
+
+// The special_jvm_flags table declares options that are being deprecated and/or obsoleted. The
+// "deprecated_in" or "obsolete_in" fields may be set to "undefined", but not both.
+// When the JDK version reaches 'deprecated_in' limit, the JVM will process this flag on
+// the command-line as usual, but will issue a warning.
+// When the JDK version reaches 'obsolete_in' limit, the JVM will continue accepting this flag on
+// the command-line, while issuing a warning and ignoring the flag value.
+// Once the JDK version reaches 'expired_in' limit, the JVM will flatly refuse to admit the
+// existence of the flag.
+//
+// MANUAL CLEANUP ON JDK VERSION UPDATES:
+// This table ensures that the handling of options will update automatically when the JDK
+// version is incremented, but the source code needs to be cleanup up manually:
+// - As "deprecated" options age into "obsolete" or "expired" options, the associated "globals"
+//   variable should be removed, as well as users of the variable.
+// - As "deprecated" options age into "obsolete" options, move the entry into the
+//   "Obsolete Flags" section of the table.
+// - All expired options should be removed from the table.
+static SpecialFlag const special_jvm_flags[] = {
+  // -------------- Deprecated Flags --------------
+  // --- Non-alias flags - sorted by obsolete_in then expired_in:
+  { "MaxGCMinorPauseMillis",        JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },
+  { "UseParNewGC",                  JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
+
+  // --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in:
+  { "DefaultMaxRAMFraction",        JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },
+  { "CreateMinidumpOnCrash",        JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() },
+  { "CMSMarkStackSizeMax",          JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
+  { "CMSMarkStackSize",             JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
+  { "G1MarkStackSize",              JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
+  { "ParallelMarkingThreads",       JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
+  { "ParallelCMSThreads",           JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
+
+  // -------------- Obsolete Flags - sorted by expired_in --------------
+  { "UseOldInlining",                JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "SafepointPollOffset",           JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "UseBoundThreads",               JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "DefaultThreadPriority",         JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "NoYieldsInMicrolock",           JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "BackEdgeThreshold",             JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "UseNewReflection",              JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "ReflectionWrapResolutionErrors",JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "VerifyReflectionBytecodes",     JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "AutoShutdownNMT",               JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "NmethodSweepFraction",          JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "NmethodSweepCheckInterval",     JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "CodeCacheMinimumFreeSpace",     JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
 #ifndef ZERO
-  { "UseFastAccessorMethods",        JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "UseFastEmptyMethods",           JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "UseFastAccessorMethods",        JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "UseFastEmptyMethods",           JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
 #endif // ZERO
-  { "UseCompilerSafepoints",         JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "AdaptiveSizePausePolicy",       JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "ParallelGCRetainPLAB",          JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "ThreadSafetyMargin",            JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "LazyBootClassLoader",           JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "StarvationMonitorInterval",     JDK_Version::jdk(9), JDK_Version::jdk(10) },
-  { "PreInflateSpin",                JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "UseCompilerSafepoints",         JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "AdaptiveSizePausePolicy",       JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "ParallelGCRetainPLAB",          JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "ThreadSafetyMargin",            JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "LazyBootClassLoader",           JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "StarvationMonitorInterval",     JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "PreInflateSpin",                JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+
+#ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
+  { "dep > obs",                    JDK_Version::jdk(9), JDK_Version::jdk(8), JDK_Version::undefined() },
+  { "dep > exp ",                   JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(8) },
+  { "obs > exp ",                   JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(8) },
+  { "not deprecated or obsolete",   JDK_Version::undefined(), JDK_Version::undefined(), JDK_Version::jdk(9) },
+  { "dup option",                   JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() },
+  { "dup option",                   JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() },
+  { "BytecodeVerificationRemote",   JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::undefined() },
+#endif
+
   { NULL, JDK_Version(0), JDK_Version(0) }
 };
 
-// Returns true if the flag is obsolete and fits into the range specified
-// for being ignored.  In the case that the flag is ignored, the 'version'
-// value is filled in with the version number when the flag became
-// obsolete so that that value can be displayed to the user.
-bool Arguments::is_newly_obsolete(const char *s, JDK_Version* version) {
-  int i = 0;
-  assert(version != NULL, "Must provide a version buffer");
-  while (obsolete_jvm_flags[i].name != NULL) {
-    const ObsoleteFlag& flag_status = obsolete_jvm_flags[i];
-    // <flag>=xxx form
-    // [-|+]<flag> form
-    size_t len = strlen(flag_status.name);
-    if ((strncmp(flag_status.name, s, len) == 0) &&
-        (strlen(s) == len)){
-      if (JDK_Version::current().compare(flag_status.accept_until) == -1) {
-          *version = flag_status.obsoleted_in;
-          return true;
-      }
+// Flags that are aliases for other flags.
+typedef struct {
+  const char* alias_name;
+  const char* real_name;
+} AliasedFlag;
+
+static AliasedFlag const aliased_jvm_flags[] = {
+  { "DefaultMaxRAMFraction",    "MaxRAMFraction"    },
+  { "CMSMarkStackSizeMax",      "MarkStackSizeMax"  },
+  { "CMSMarkStackSize",         "MarkStackSize"     },
+  { "G1MarkStackSize",          "MarkStackSize"     },
+  { "ParallelMarkingThreads",   "ConcGCThreads"     },
+  { "ParallelCMSThreads",       "ConcGCThreads"     },
+  { "CreateMinidumpOnCrash",    "CreateCoredumpOnCrash" },
+  { NULL, NULL}
+};
+
+// Return true if "v" is less than "other", where "other" may be "undefined".
+static bool version_less_than(JDK_Version v, JDK_Version other) {
+  assert(!v.is_undefined(), "must be defined");
+  if (!other.is_undefined() && v.compare(other) >= 0) {
+    return false;
+  } else {
+    return true;
+  }
+}
+
+static bool lookup_special_flag(const char *flag_name, SpecialFlag& flag) {
+  for (size_t i = 0; special_jvm_flags[i].name != NULL; i++) {
+    if ((strcmp(special_jvm_flags[i].name, flag_name) == 0)) {
+      flag = special_jvm_flags[i];
+      return true;
     }
-    i++;
   }
   return false;
 }
 
+bool Arguments::is_obsolete_flag(const char *flag_name, JDK_Version* version) {
+  assert(version != NULL, "Must provide a version buffer");
+  SpecialFlag flag;
+  if (lookup_special_flag(flag_name, flag)) {
+    if (!flag.obsolete_in.is_undefined()) {
+      if (version_less_than(JDK_Version::current(), flag.expired_in)) {
+        *version = flag.obsolete_in;
+        return true;
+      }
+    }
+  }
+  return false;
+}
+
+int Arguments::is_deprecated_flag(const char *flag_name, JDK_Version* version) {
+  assert(version != NULL, "Must provide a version buffer");
+  SpecialFlag flag;
+  if (lookup_special_flag(flag_name, flag)) {
+    if (!flag.deprecated_in.is_undefined()) {
+      if (version_less_than(JDK_Version::current(), flag.obsolete_in) &&
+          version_less_than(JDK_Version::current(), flag.expired_in)) {
+        *version = flag.deprecated_in;
+        return 1;
+      } else {
+        return -1;
+      }
+    }
+  }
+  return 0;
+}
+
+const char* Arguments::real_flag_name(const char *flag_name) {
+  for (size_t i = 0; aliased_jvm_flags[i].alias_name != NULL; i++) {
+    const AliasedFlag& flag_status = aliased_jvm_flags[i];
+    if (strcmp(flag_status.alias_name, flag_name) == 0) {
+        return flag_status.real_name;
+    }
+  }
+  return flag_name;
+}
+
+#ifndef PRODUCT
+static bool lookup_special_flag(const char *flag_name, size_t skip_index) {
+  for (size_t i = 0; special_jvm_flags[i].name != NULL; i++) {
+    if ((i != skip_index) && (strcmp(special_jvm_flags[i].name, flag_name) == 0)) {
+      return true;
+    }
+  }
+  return false;
+}
+
+static bool verify_special_jvm_flags() {
+  bool success = true;
+  for (size_t i = 0; special_jvm_flags[i].name != NULL; i++) {
+    const SpecialFlag& flag = special_jvm_flags[i];
+    if (lookup_special_flag(flag.name, i)) {
+      warning("Duplicate special flag declaration \"%s\"", flag.name);
+      success = false;
+    }
+    if (flag.deprecated_in.is_undefined() &&
+        flag.obsolete_in.is_undefined()) {
+      warning("Special flag entry \"%s\" must declare version deprecated and/or obsoleted in.", flag.name);
+      success = false;
+    }
+
+    if (!flag.deprecated_in.is_undefined()) {
+      if (!version_less_than(flag.deprecated_in, flag.obsolete_in)) {
+        warning("Special flag entry \"%s\" must be deprecated before obsoleted.", flag.name);
+        success = false;
+      }
+
+      if (!version_less_than(flag.deprecated_in, flag.expired_in)) {
+        warning("Special flag entry \"%s\" must be deprecated before expired.", flag.name);
+        success = false;
+      }
+    }
+
+    if (!flag.obsolete_in.is_undefined()) {
+      if (!version_less_than(flag.obsolete_in, flag.expired_in)) {
+        warning("Special flag entry \"%s\" must be obsoleted before expired.", flag.name);
+        success = false;
+      }
+
+      // if flag has become obsolete it should not have a "globals" flag defined anymore.
+      if (!version_less_than(JDK_Version::current(), flag.obsolete_in)) {
+        if (Flag::find_flag(flag.name) != NULL) {
+          warning("Global variable for obsolete special flag entry \"%s\" should be removed", flag.name);
+          success = false;
+        }
+      }
+    }
+
+    if (!flag.expired_in.is_undefined()) {
+      // if flag has become expired it should not have a "globals" flag defined anymore.
+      if (!version_less_than(JDK_Version::current(), flag.expired_in)) {
+        if (Flag::find_flag(flag.name) != NULL) {
+          warning("Global variable for expired flag entry \"%s\" should be removed", flag.name);
+          success = false;
+        }
+      }
+    }
+
+  }
+  return success;
+}
+#endif
+
 // Constructs the system class path (aka boot class path) from the following
 // components, in order:
 //
@@ -571,7 +784,7 @@
   }
 }
 
-static bool set_bool_flag(char* name, bool value, Flag::Flags origin) {
+static bool set_bool_flag(const char* name, bool value, Flag::Flags origin) {
   if (CommandLineFlags::boolAtPut(name, &value, origin) == Flag::SUCCESS) {
     return true;
   } else {
@@ -579,7 +792,7 @@
   }
 }
 
-static bool set_fp_numeric_flag(char* name, char* value, Flag::Flags origin) {
+static bool set_fp_numeric_flag(const char* name, char* value, Flag::Flags origin) {
   double v;
   if (sscanf(value, "%lf", &v) != 1) {
     return false;
@@ -591,7 +804,7 @@
   return false;
 }
 
-static bool set_numeric_flag(char* name, char* value, Flag::Flags origin) {
+static bool set_numeric_flag(const char* name, char* value, Flag::Flags origin) {
   julong v;
   int int_v;
   intx intx_v;
@@ -640,14 +853,14 @@
   return false;
 }
 
-static bool set_string_flag(char* name, const char* value, Flag::Flags origin) {
+static bool set_string_flag(const char* name, const char* value, Flag::Flags origin) {
   if (CommandLineFlags::ccstrAtPut(name, &value, origin) != Flag::SUCCESS) return false;
   // Contract:  CommandLineFlags always returns a pointer that needs freeing.
   FREE_C_HEAP_ARRAY(char, value);
   return true;
 }
 
-static bool append_to_string_flag(char* name, const char* new_value, Flag::Flags origin) {
+static bool append_to_string_flag(const char* name, const char* new_value, Flag::Flags origin) {
   const char* old_value = "";
   if (CommandLineFlags::ccstrAt(name, &old_value) != Flag::SUCCESS) return false;
   size_t old_len = old_value != NULL ? strlen(old_value) : 0;
@@ -675,6 +888,33 @@
   return true;
 }
 
+const char* Arguments::handle_aliases_and_deprecation(const char* arg, bool warn) {
+  const char* real_name = real_flag_name(arg);
+  JDK_Version since = JDK_Version();
+  switch (is_deprecated_flag(arg, &since)) {
+    case -1:
+      return NULL; // obsolete or expired, don't process normally
+    case 0:
+      return real_name;
+    case 1: {
+      if (warn) {
+        char version[256];
+        since.to_string(version, sizeof(version));
+        if (real_name != arg) {
+          warning("Option %s was deprecated in version %s and will likely be removed in a future release. Use option %s instead.",
+                  arg, version, real_name);
+        } else {
+          warning("Option %s was deprecated in version %s and will likely be removed in a future release.",
+                  arg, version);
+        }
+      }
+      return real_name;
+    }
+  }
+  ShouldNotReachHere();
+  return NULL;
+}
+
 bool Arguments::parse_argument(const char* arg, Flag::Flags origin) {
 
   // range of acceptable characters spelled out for portability reasons
@@ -682,27 +922,46 @@
 #define BUFLEN 255
   char name[BUFLEN+1];
   char dummy;
+  const char* real_name;
+  bool warn_if_deprecated = true;
 
   if (sscanf(arg, "-%" XSTR(BUFLEN) NAME_RANGE "%c", name, &dummy) == 1) {
-    return set_bool_flag(name, false, origin);
+    real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
+    if (real_name == NULL) {
+      return false;
+    }
+    return set_bool_flag(real_name, false, origin);
   }
   if (sscanf(arg, "+%" XSTR(BUFLEN) NAME_RANGE "%c", name, &dummy) == 1) {
-    return set_bool_flag(name, true, origin);
+    real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
+    if (real_name == NULL) {
+      return false;
+    }
+    return set_bool_flag(real_name, true, origin);
   }
 
   char punct;
   if (sscanf(arg, "%" XSTR(BUFLEN) NAME_RANGE "%c", name, &punct) == 2 && punct == '=') {
     const char* value = strchr(arg, '=') + 1;
-    Flag* flag = Flag::find_flag(name, strlen(name));
+    Flag* flag;
+
+    // this scanf pattern matches both strings (handled here) and numbers (handled later))
+    real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
+    if (real_name == NULL) {
+      return false;
+    }
+    flag = Flag::find_flag(real_name);
     if (flag != NULL && flag->is_ccstr()) {
       if (flag->ccstr_accumulates()) {
-        return append_to_string_flag(name, value, origin);
+        return append_to_string_flag(real_name, value, origin);
       } else {
         if (value[0] == '\0') {
           value = NULL;
         }
-        return set_string_flag(name, value, origin);
+        return set_string_flag(real_name, value, origin);
       }
+    } else {
+      warn_if_deprecated = false; // if arg is deprecated, we've already done warning...
     }
   }
 
@@ -712,7 +971,11 @@
     if (value[0] == '\0') {
       value = NULL;
     }
-    return set_string_flag(name, value, origin);
+    real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
+    if (real_name == NULL) {
+      return false;
+    }
+    return set_string_flag(real_name, value, origin);
   }
 
 #define SIGNED_FP_NUMBER_RANGE "[-0123456789.]"
@@ -723,13 +986,21 @@
   if (sscanf(arg, "%" XSTR(BUFLEN) NAME_RANGE "=" "%" XSTR(BUFLEN) SIGNED_NUMBER_RANGE "." "%" XSTR(BUFLEN) NUMBER_RANGE "%c", name, value, value2, &dummy) == 3) {
     // Looks like a floating-point number -- try again with more lenient format string
     if (sscanf(arg, "%" XSTR(BUFLEN) NAME_RANGE "=" "%" XSTR(BUFLEN) SIGNED_FP_NUMBER_RANGE "%c", name, value, &dummy) == 2) {
-      return set_fp_numeric_flag(name, value, origin);
+      real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
+      if (real_name == NULL) {
+        return false;
+      }
+      return set_fp_numeric_flag(real_name, value, origin);
     }
   }
 
 #define VALUE_RANGE "[-kmgtxKMGTX0123456789abcdefABCDEF]"
   if (sscanf(arg, "%" XSTR(BUFLEN) NAME_RANGE "=" "%" XSTR(BUFLEN) VALUE_RANGE "%c", name, value, &dummy) == 2) {
-    return set_numeric_flag(name, value, origin);
+    real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
+    if (real_name == NULL) {
+      return false;
+    }
+    return set_numeric_flag(real_name, value, origin);
   }
 
   return false;
@@ -837,8 +1108,8 @@
 }
 
 bool Arguments::process_argument(const char* arg,
-    jboolean ignore_unrecognized, Flag::Flags origin) {
-
+                                 jboolean ignore_unrecognized,
+                                 Flag::Flags origin) {
   JDK_Version since = JDK_Version();
 
   if (parse_argument(arg, origin) || ignore_unrecognized) {
@@ -864,10 +1135,10 @@
     strncpy(stripped_argname, argname, arg_len);
     stripped_argname[arg_len] = '\0';  // strncpy may not null terminate.
 
-    if (is_newly_obsolete(stripped_argname, &since)) {
+    if (is_obsolete_flag(stripped_argname, &since)) {
       char version[256];
       since.to_string(version, sizeof(version));
-      warning("ignoring option %s; support was removed in %s", stripped_argname, version);
+      warning("Ignoring option %s; support was removed in %s", stripped_argname, version);
       return true;
     }
   }
@@ -1235,7 +1506,7 @@
 static void disable_adaptive_size_policy(const char* collector_name) {
   if (UseAdaptiveSizePolicy) {
     if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) {
-      warning("disabling UseAdaptiveSizePolicy; it is incompatible with %s.",
+      warning("Disabling UseAdaptiveSizePolicy; it is incompatible with %s.",
               collector_name);
     }
     FLAG_SET_DEFAULT(UseAdaptiveSizePolicy, false);
@@ -1707,7 +1978,6 @@
   } else if (UseG1GC) {
     set_g1_gc_flags();
   }
-  check_deprecated_gc_flags();
   if (AssumeMP && !UseSerialGC) {
     if (FLAG_IS_DEFAULT(ParallelGCThreads) && ParallelGCThreads == 1) {
       warning("If the number of processors is expected to increase from one, then"
@@ -1737,11 +2007,6 @@
 static const size_t DefaultHeapBaseMinAddress = HeapBaseMinAddress;
 
 void Arguments::set_heap_size() {
-  if (!FLAG_IS_DEFAULT(DefaultMaxRAMFraction)) {
-    // Deprecated flag
-    FLAG_SET_CMDLINE(uintx, MaxRAMFraction, DefaultMaxRAMFraction);
-  }
-
   const julong phys_mem =
     FLAG_IS_DEFAULT(MaxRAM) ? MIN2(os::physical_memory(), (julong)MaxRAM)
                             : (julong)MaxRAM;
@@ -1844,6 +2109,122 @@
   }
 }
 
+// This option inspects the machine and attempts to set various
+// parameters to be optimal for long-running, memory allocation
+// intensive jobs.  It is intended for machines with large
+// amounts of cpu and memory.
+jint Arguments::set_aggressive_heap_flags() {
+  // initHeapSize is needed since _initial_heap_size is 4 bytes on a 32 bit
+  // VM, but we may not be able to represent the total physical memory
+  // available (like having 8gb of memory on a box but using a 32bit VM).
+  // Thus, we need to make sure we're using a julong for intermediate
+  // calculations.
+  julong initHeapSize;
+  julong total_memory = os::physical_memory();
+
+  if (total_memory < (julong) 256 * M) {
+    jio_fprintf(defaultStream::error_stream(),
+            "You need at least 256mb of memory to use -XX:+AggressiveHeap\n");
+    vm_exit(1);
+  }
+
+  // The heap size is half of available memory, or (at most)
+  // all of possible memory less 160mb (leaving room for the OS
+  // when using ISM).  This is the maximum; because adaptive sizing
+  // is turned on below, the actual space used may be smaller.
+
+  initHeapSize = MIN2(total_memory / (julong) 2,
+          total_memory - (julong) 160 * M);
+
+  initHeapSize = limit_by_allocatable_memory(initHeapSize);
+
+  if (FLAG_IS_DEFAULT(MaxHeapSize)) {
+    if (FLAG_SET_CMDLINE(size_t, MaxHeapSize, initHeapSize) != Flag::SUCCESS) {
+      return JNI_EINVAL;
+    }
+    if (FLAG_SET_CMDLINE(size_t, InitialHeapSize, initHeapSize) != Flag::SUCCESS) {
+      return JNI_EINVAL;
+    }
+    // Currently the minimum size and the initial heap sizes are the same.
+    set_min_heap_size(initHeapSize);
+  }
+  if (FLAG_IS_DEFAULT(NewSize)) {
+    // Make the young generation 3/8ths of the total heap.
+    if (FLAG_SET_CMDLINE(size_t, NewSize,
+            ((julong) MaxHeapSize / (julong) 8) * (julong) 3) != Flag::SUCCESS) {
+      return JNI_EINVAL;
+    }
+    if (FLAG_SET_CMDLINE(size_t, MaxNewSize, NewSize) != Flag::SUCCESS) {
+      return JNI_EINVAL;
+    }
+  }
+
+#if !defined(_ALLBSD_SOURCE) && !defined(AIX)  // UseLargePages is not yet supported on BSD and AIX.
+  FLAG_SET_DEFAULT(UseLargePages, true);
+#endif
+
+  // Increase some data structure sizes for efficiency
+  if (FLAG_SET_CMDLINE(size_t, BaseFootPrintEstimate, MaxHeapSize) != Flag::SUCCESS) {
+    return JNI_EINVAL;
+  }
+  if (FLAG_SET_CMDLINE(bool, ResizeTLAB, false) != Flag::SUCCESS) {
+    return JNI_EINVAL;
+  }
+  if (FLAG_SET_CMDLINE(size_t, TLABSize, 256 * K) != Flag::SUCCESS) {
+    return JNI_EINVAL;
+  }
+
+  // See the OldPLABSize comment below, but replace 'after promotion'
+  // with 'after copying'.  YoungPLABSize is the size of the survivor
+  // space per-gc-thread buffers.  The default is 4kw.
+  if (FLAG_SET_CMDLINE(size_t, YoungPLABSize, 256 * K) != Flag::SUCCESS) { // Note: this is in words
+    return JNI_EINVAL;
+  }
+
+  // OldPLABSize is the size of the buffers in the old gen that
+  // UseParallelGC uses to promote live data that doesn't fit in the
+  // survivor spaces.  At any given time, there's one for each gc thread.
+  // The default size is 1kw. These buffers are rarely used, since the
+  // survivor spaces are usually big enough.  For specjbb, however, there
+  // are occasions when there's lots of live data in the young gen
+  // and we end up promoting some of it.  We don't have a definite
+  // explanation for why bumping OldPLABSize helps, but the theory
+  // is that a bigger PLAB results in retaining something like the
+  // original allocation order after promotion, which improves mutator
+  // locality.  A minor effect may be that larger PLABs reduce the
+  // number of PLAB allocation events during gc.  The value of 8kw
+  // was arrived at by experimenting with specjbb.
+  if (FLAG_SET_CMDLINE(size_t, OldPLABSize, 8 * K) != Flag::SUCCESS) { // Note: this is in words
+    return JNI_EINVAL;
+  }
+
+  // Enable parallel GC and adaptive generation sizing
+  if (FLAG_SET_CMDLINE(bool, UseParallelGC, true) != Flag::SUCCESS) {
+    return JNI_EINVAL;
+  }
+  FLAG_SET_DEFAULT(ParallelGCThreads,
+          Abstract_VM_Version::parallel_worker_threads());
+
+  // Encourage steady state memory management
+  if (FLAG_SET_CMDLINE(uintx, ThresholdTolerance, 100) != Flag::SUCCESS) {
+    return JNI_EINVAL;
+  }
+
+  // This appears to improve mutator locality
+  if (FLAG_SET_CMDLINE(bool, ScavengeBeforeFullGC, false) != Flag::SUCCESS) {
+    return JNI_EINVAL;
+  }
+
+  // Get around early Solaris scheduling bug
+  // (affinity vs other jobs on system)
+  // but disallow DR and offlining (5008695).
+  if (FLAG_SET_CMDLINE(bool, BindGCTaskThreadsToCPUs, true) != Flag::SUCCESS) {
+    return JNI_EINVAL;
+  }
+
+  return JNI_OK;
+}
+
 // This must be called after ergonomics.
 void Arguments::set_bytecode_flags() {
   if (!RewriteBytecodes) {
@@ -2027,20 +2408,6 @@
   return true;
 }
 
-void Arguments::check_deprecated_gc_flags() {
-  if (FLAG_IS_CMDLINE(UseParNewGC)) {
-    warning("The UseParNewGC flag is deprecated and will likely be removed in a future release");
-  }
-  if (FLAG_IS_CMDLINE(MaxGCMinorPauseMillis)) {
-    warning("Using MaxGCMinorPauseMillis as minor pause goal is deprecated"
-            "and will likely be removed in future release");
-  }
-  if (FLAG_IS_CMDLINE(DefaultMaxRAMFraction)) {
-    warning("DefaultMaxRAMFraction is deprecated and will likely be removed in a future release. "
-        "Use MaxRAMFraction instead.");
-  }
-}
-
 // Check the consistency of vm_init_args
 bool Arguments::check_vm_args_consistency() {
   // Method for adding checks for flag consistency.
@@ -2576,7 +2943,7 @@
       // All these options are deprecated in JDK 9 and will be removed in a future release
       char version[256];
       JDK_Version::jdk(9).to_string(version, sizeof(version));
-      warning("ignoring option %s; support was removed in %s", option->optionString, version);
+      warning("Ignoring option %s; support was removed in %s", option->optionString, version);
     } else if (match_option(option, "-XX:CodeCacheExpansionSize=", &tail)) {
       julong long_CodeCacheExpansionSize = 0;
       ArgsRange errcode = parse_memory_size(tail, &long_CodeCacheExpansionSize, os::vm_page_size());
@@ -2843,120 +3210,10 @@
       _abort_hook = CAST_TO_FN_PTR(abort_hook_t, option->extraInfo);
     // -XX:+AggressiveHeap
     } else if (match_option(option, "-XX:+AggressiveHeap")) {
-
-      // This option inspects the machine and attempts to set various
-      // parameters to be optimal for long-running, memory allocation
-      // intensive jobs.  It is intended for machines with large
-      // amounts of cpu and memory.
-
-      // initHeapSize is needed since _initial_heap_size is 4 bytes on a 32 bit
-      // VM, but we may not be able to represent the total physical memory
-      // available (like having 8gb of memory on a box but using a 32bit VM).
-      // Thus, we need to make sure we're using a julong for intermediate
-      // calculations.
-      julong initHeapSize;
-      julong total_memory = os::physical_memory();
-
-      if (total_memory < (julong)256*M) {
-        jio_fprintf(defaultStream::error_stream(),
-                    "You need at least 256mb of memory to use -XX:+AggressiveHeap\n");
-        vm_exit(1);
-      }
-
-      // The heap size is half of available memory, or (at most)
-      // all of possible memory less 160mb (leaving room for the OS
-      // when using ISM).  This is the maximum; because adaptive sizing
-      // is turned on below, the actual space used may be smaller.
-
-      initHeapSize = MIN2(total_memory / (julong)2,
-                          total_memory - (julong)160*M);
-
-      initHeapSize = limit_by_allocatable_memory(initHeapSize);
-
-      if (FLAG_IS_DEFAULT(MaxHeapSize)) {
-         if (FLAG_SET_CMDLINE(size_t, MaxHeapSize, initHeapSize) != Flag::SUCCESS) {
-           return JNI_EINVAL;
-         }
-         if (FLAG_SET_CMDLINE(size_t, InitialHeapSize, initHeapSize) != Flag::SUCCESS) {
-           return JNI_EINVAL;
-         }
-         // Currently the minimum size and the initial heap sizes are the same.
-         set_min_heap_size(initHeapSize);
-      }
-      if (FLAG_IS_DEFAULT(NewSize)) {
-         // Make the young generation 3/8ths of the total heap.
-         if (FLAG_SET_CMDLINE(size_t, NewSize,
-                                ((julong)MaxHeapSize / (julong)8) * (julong)3) != Flag::SUCCESS) {
-           return JNI_EINVAL;
-         }
-         if (FLAG_SET_CMDLINE(size_t, MaxNewSize, NewSize) != Flag::SUCCESS) {
-           return JNI_EINVAL;
-         }
+      jint result = set_aggressive_heap_flags();
+      if (result != JNI_OK) {
+          return result;
       }
-
-#if !defined(_ALLBSD_SOURCE) && !defined(AIX)  // UseLargePages is not yet supported on BSD and AIX.
-      FLAG_SET_DEFAULT(UseLargePages, true);
-#endif
-
-      // Increase some data structure sizes for efficiency
-      if (FLAG_SET_CMDLINE(size_t, BaseFootPrintEstimate, MaxHeapSize) != Flag::SUCCESS) {
-        return JNI_EINVAL;
-      }
-      if (FLAG_SET_CMDLINE(bool, ResizeTLAB, false) != Flag::SUCCESS) {
-        return JNI_EINVAL;
-      }
-      if (FLAG_SET_CMDLINE(size_t, TLABSize, 256*K) != Flag::SUCCESS) {
-        return JNI_EINVAL;
-      }
-
-      // See the OldPLABSize comment below, but replace 'after promotion'
-      // with 'after copying'.  YoungPLABSize is the size of the survivor
-      // space per-gc-thread buffers.  The default is 4kw.
-      if (FLAG_SET_CMDLINE(size_t, YoungPLABSize, 256*K) != Flag::SUCCESS) {      // Note: this is in words
-        return JNI_EINVAL;
-      }
-
-      // OldPLABSize is the size of the buffers in the old gen that
-      // UseParallelGC uses to promote live data that doesn't fit in the
-      // survivor spaces.  At any given time, there's one for each gc thread.
-      // The default size is 1kw. These buffers are rarely used, since the
-      // survivor spaces are usually big enough.  For specjbb, however, there
-      // are occasions when there's lots of live data in the young gen
-      // and we end up promoting some of it.  We don't have a definite
-      // explanation for why bumping OldPLABSize helps, but the theory
-      // is that a bigger PLAB results in retaining something like the
-      // original allocation order after promotion, which improves mutator
-      // locality.  A minor effect may be that larger PLABs reduce the
-      // number of PLAB allocation events during gc.  The value of 8kw
-      // was arrived at by experimenting with specjbb.
-      if (FLAG_SET_CMDLINE(size_t, OldPLABSize, 8*K) != Flag::SUCCESS) {  // Note: this is in words
-        return JNI_EINVAL;
-      }
-
-      // Enable parallel GC and adaptive generation sizing
-      if (FLAG_SET_CMDLINE(bool, UseParallelGC, true) != Flag::SUCCESS) {
-        return JNI_EINVAL;
-      }
-      FLAG_SET_DEFAULT(ParallelGCThreads,
-                       Abstract_VM_Version::parallel_worker_threads());
-
-      // Encourage steady state memory management
-      if (FLAG_SET_CMDLINE(uintx, ThresholdTolerance, 100) != Flag::SUCCESS) {
-        return JNI_EINVAL;
-      }
-
-      // This appears to improve mutator locality
-      if (FLAG_SET_CMDLINE(bool, ScavengeBeforeFullGC, false) != Flag::SUCCESS) {
-        return JNI_EINVAL;
-      }
-
-      // Get around early Solaris scheduling bug
-      // (affinity vs other jobs on system)
-      // but disallow DR and offlining (5008695).
-      if (FLAG_SET_CMDLINE(bool, BindGCTaskThreadsToCPUs, true) != Flag::SUCCESS) {
-        return JNI_EINVAL;
-      }
-
     // Need to keep consistency of MaxTenuringThreshold and AlwaysTenure/NeverTenure;
     // and the last option wins.
     } else if (match_option(option, "-XX:+NeverTenure")) {
@@ -3049,52 +3306,6 @@
         return JNI_EINVAL;
       }
 #endif
-    } else if (match_option(option, "-XX:CMSMarkStackSize=", &tail) ||
-               match_option(option, "-XX:G1MarkStackSize=", &tail)) {
-      julong stack_size = 0;
-      ArgsRange errcode = parse_memory_size(tail, &stack_size, 1);
-      if (errcode != arg_in_range) {
-        jio_fprintf(defaultStream::error_stream(),
-                    "Invalid mark stack size: %s\n", option->optionString);
-        describe_range_error(errcode);
-        return JNI_EINVAL;
-      }
-      jio_fprintf(defaultStream::error_stream(),
-        "Please use -XX:MarkStackSize in place of "
-        "-XX:CMSMarkStackSize or -XX:G1MarkStackSize in the future\n");
-      if (FLAG_SET_CMDLINE(size_t, MarkStackSize, stack_size) != Flag::SUCCESS) {
-        return JNI_EINVAL;
-      }
-    } else if (match_option(option, "-XX:CMSMarkStackSizeMax=", &tail)) {
-      julong max_stack_size = 0;
-      ArgsRange errcode = parse_memory_size(tail, &max_stack_size, 1);
-      if (errcode != arg_in_range) {
-        jio_fprintf(defaultStream::error_stream(),
-                    "Invalid maximum mark stack size: %s\n",
-                    option->optionString);
-        describe_range_error(errcode);
-        return JNI_EINVAL;
-      }
-      jio_fprintf(defaultStream::error_stream(),
-         "Please use -XX:MarkStackSizeMax in place of "
-         "-XX:CMSMarkStackSizeMax in the future\n");
-      if (FLAG_SET_CMDLINE(size_t, MarkStackSizeMax, max_stack_size) != Flag::SUCCESS) {
-        return JNI_EINVAL;
-      }
-    } else if (match_option(option, "-XX:ParallelMarkingThreads=", &tail) ||
-               match_option(option, "-XX:ParallelCMSThreads=", &tail)) {
-      uintx conc_threads = 0;
-      if (!parse_uintx(tail, &conc_threads, 1)) {
-        jio_fprintf(defaultStream::error_stream(),
-                    "Invalid concurrent threads: %s\n", option->optionString);
-        return JNI_EINVAL;
-      }
-      jio_fprintf(defaultStream::error_stream(),
-        "Please use -XX:ConcGCThreads in place of "
-        "-XX:ParallelMarkingThreads or -XX:ParallelCMSThreads in the future\n");
-      if (FLAG_SET_CMDLINE(uint, ConcGCThreads, conc_threads) != Flag::SUCCESS) {
-        return JNI_EINVAL;
-      }
     } else if (match_option(option, "-XX:MaxDirectMemorySize=", &tail)) {
       julong max_direct_memory_size = 0;
       ArgsRange errcode = parse_memory_size(tail, &max_direct_memory_size, 0);
@@ -3114,19 +3325,6 @@
           "ManagementServer is not supported in this VM.\n");
         return JNI_ERR;
 #endif // INCLUDE_MANAGEMENT
-    // CreateMinidumpOnCrash is removed, and replaced by CreateCoredumpOnCrash
-    } else if (match_option(option, "-XX:+CreateMinidumpOnCrash")) {
-      if (FLAG_SET_CMDLINE(bool, CreateCoredumpOnCrash, true) != Flag::SUCCESS) {
-        return JNI_EINVAL;
-      }
-      jio_fprintf(defaultStream::output_stream(),
-          "CreateMinidumpOnCrash is replaced by CreateCoredumpOnCrash: CreateCoredumpOnCrash is on\n");
-    } else if (match_option(option, "-XX:-CreateMinidumpOnCrash")) {
-      if (FLAG_SET_CMDLINE(bool, CreateCoredumpOnCrash, false) != Flag::SUCCESS) {
-        return JNI_EINVAL;
-      }
-      jio_fprintf(defaultStream::output_stream(),
-          "CreateMinidumpOnCrash is replaced by CreateCoredumpOnCrash: CreateCoredumpOnCrash is off\n");
     } else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx
       // Skip -XX:Flags= and -XX:VMOptionsFile= since those cases have
       // already been handled
@@ -3623,7 +3821,7 @@
 void Arguments::set_shared_spaces_flags() {
   if (DumpSharedSpaces) {
     if (RequireSharedSpaces) {
-      warning("cannot dump shared archive while using shared archive");
+      warning("Cannot dump shared archive while using shared archive");
     }
     UseSharedSpaces = false;
 #ifdef _LP64
@@ -3848,6 +4046,7 @@
 // Parse entry point called from JNI_CreateJavaVM
 
 jint Arguments::parse(const JavaVMInitArgs* args) {
+  assert(verify_special_jvm_flags(), "deprecated and obsolete flag table inconsistent");
 
   // Initialize ranges and constraints
   CommandLineFlagRangeList::init();
@@ -3984,7 +4183,7 @@
 
   if (ScavengeRootsInCode == 0) {
     if (!FLAG_IS_DEFAULT(ScavengeRootsInCode)) {
-      warning("forcing ScavengeRootsInCode non-zero");
+      warning("Forcing ScavengeRootsInCode non-zero");
     }
     ScavengeRootsInCode = 1;
   }
--- a/hotspot/src/share/vm/runtime/arguments.hpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.hpp	Wed Jul 05 20:52:37 2017 +0200
@@ -364,6 +364,8 @@
   // Aggressive optimization flags.
   static jint set_aggressive_opts_flags();
 
+  static jint set_aggressive_heap_flags();
+
   // Argument parsing
   static void do_pd_flag_adjustments();
   static bool parse_argument(const char* arg, Flag::Flags origin);
@@ -427,11 +429,24 @@
     short* methodsNum, short* methodsMax, char*** methods, bool** allClasses
   );
 
-  // Returns true if the string s is in the list of flags that have recently
-  // been made obsolete.  If we detect one of these flags on the command
-  // line, instead of failing we print a warning message and ignore the
-  // flag.  This gives the user a release or so to stop using the flag.
-  static bool is_newly_obsolete(const char* s, JDK_Version* buffer);
+  // Returns true if the flag is obsolete (and not yet expired).
+  // In this case the 'version' buffer is filled in with
+  // the version number when the flag became obsolete.
+  static bool is_obsolete_flag(const char* flag_name, JDK_Version* version);
+
+  // Returns 1 if the flag is deprecated (and not yet obsolete or expired).
+  //     In this case the 'version' buffer is filled in with the version number when
+  //     the flag became deprecated.
+  // Returns -1 if the flag is expired or obsolete.
+  // Returns 0 otherwise.
+  static int is_deprecated_flag(const char* flag_name, JDK_Version* version);
+
+  // Return the real name for the flag passed on the command line (either an alias name or "flag_name").
+  static const char* real_flag_name(const char *flag_name);
+
+  // Return the "real" name for option arg if arg is an alias, and print a warning if arg is deprecated.
+  // Return NULL if the arg has expired.
+  static const char* handle_aliases_and_deprecation(const char* arg, bool warn);
 
   static short  CompileOnlyClassesNum;
   static short  CompileOnlyClassesMax;
@@ -478,7 +493,6 @@
 
   // Check for consistency in the selection of the garbage collector.
   static bool check_gc_consistency();        // Check user-selected gc
-  static void check_deprecated_gc_flags();
   // Check consistency or otherwise of VM argument settings
   static bool check_vm_args_consistency();
   // Used by os_solaris
--- a/hotspot/src/share/vm/runtime/globals.hpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Wed Jul 05 20:52:37 2017 +0200
@@ -1599,7 +1599,7 @@
           "(ParallelGC only)")                                              \
                                                                             \
   product(bool, ScavengeBeforeFullGC, true,                                 \
-          "Scavenge young generation before each full GC.")                 \
+          "Scavenge youngest generation before each full GC.")              \
                                                                             \
   develop(bool, ScavengeWithObjectsInToSpace, false,                        \
           "Allow scavenges to occur when to-space contains objects")        \
@@ -2097,7 +2097,7 @@
           "promotion failure")                                              \
                                                                             \
   notproduct(bool, PromotionFailureALot, false,                             \
-          "Use promotion failure handling on every young generation "       \
+          "Use promotion failure handling on every youngest generation "    \
           "collection")                                                     \
                                                                             \
   develop(uintx, PromotionFailureALotCount, 1000,                           \
@@ -2183,11 +2183,6 @@
           "size")                                                           \
           range(1, max_uintx)                                               \
                                                                             \
-  product(uintx, DefaultMaxRAMFraction, 4,                                  \
-          "Maximum fraction (1/n) of real memory used for maximum heap "    \
-          "size; deprecated: to be renamed to MaxRAMFraction")              \
-          range(1, max_uintx)                                               \
-                                                                            \
   product(uintx, MinRAMFraction, 2,                                         \
           "Minimum fraction (1/n) of real memory used for maximum heap "    \
           "size on systems with small physical memory size")                \
--- a/hotspot/src/share/vm/runtime/java.hpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/runtime/java.hpp	Wed Jul 05 20:52:37 2017 +0200
@@ -137,6 +137,14 @@
     return JDK_Version(major, 0, 0, update_number);
   }
 
+  static JDK_Version undefined() {
+    return JDK_Version(0);
+  }
+
+  bool is_undefined() const {
+    return (_major == 0);
+  }
+
   uint8_t major_version() const          { return _major; }
   uint8_t minor_version() const          { return _minor; }
   uint8_t micro_version() const          { return _micro; }
--- a/hotspot/src/share/vm/runtime/jniHandles.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/runtime/jniHandles.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -124,8 +124,8 @@
 }
 
 
-size_t JNIHandles::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
-  return _weak_global_handles->weak_oops_do(is_alive, f);
+void JNIHandles::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
+  _weak_global_handles->weak_oops_do(is_alive, f);
 }
 
 
@@ -380,9 +380,8 @@
 }
 
 
-size_t JNIHandleBlock::weak_oops_do(BoolObjectClosure* is_alive,
-                                    OopClosure* f) {
-  size_t count = 0;
+void JNIHandleBlock::weak_oops_do(BoolObjectClosure* is_alive,
+                                  OopClosure* f) {
   for (JNIHandleBlock* current = this; current != NULL; current = current->_next) {
     assert(current->pop_frame_link() == NULL,
       "blocks holding weak global JNI handles should not have pop frame link set");
@@ -391,7 +390,6 @@
       oop value = *root;
       // traverse heap pointers only, not deleted handles or free list pointers
       if (value != NULL && Universe::heap()->is_in_reserved(value)) {
-        count++;
         if (is_alive->do_object_b(value)) {
           // The weakly referenced object is alive, update pointer
           f->do_oop(root);
@@ -414,9 +412,7 @@
    * JVMTI data structures may also contain weak oops.  The iteration of them
    * is placed here so that we don't need to add it to each of the collectors.
    */
-  count += JvmtiExport::weak_oops_do(is_alive, f);
-
-  return count;
+  JvmtiExport::weak_oops_do(is_alive, f);
 }
 
 
--- a/hotspot/src/share/vm/runtime/jniHandles.hpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/runtime/jniHandles.hpp	Wed Jul 05 20:52:37 2017 +0200
@@ -85,7 +85,7 @@
   // Traversal of regular global handles
   static void oops_do(OopClosure* f);
   // Traversal of weak global handles. Unreachable oops are cleared.
-  static size_t weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f);
+  static void weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f);
 };
 
 
@@ -153,7 +153,7 @@
   // Traversal of regular handles
   void oops_do(OopClosure* f);
   // Traversal of weak handles. Unreachable oops are cleared.
-  size_t weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f);
+  void weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f);
 
   // Checked JNI support
   void set_planned_capacity(size_t planned_capacity) { _planned_capacity = planned_capacity; }
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -383,7 +383,7 @@
   nonstatic_field(Method,                      _access_flags,                                 AccessFlags)                           \
   nonstatic_field(Method,                      _vtable_index,                                 int)                                   \
   nonstatic_field(Method,                      _method_size,                                  u2)                                    \
-  nonstatic_field(Method,                      _intrinsic_id,                                 u1)                                    \
+  nonstatic_field(Method,                      _intrinsic_id,                                 u2)                                    \
   nonproduct_nonstatic_field(Method,           _compiled_invocation_count,                    int)                                   \
   volatile_nonstatic_field(Method,             _code,                                         nmethod*)                              \
   nonstatic_field(Method,                      _i2i_entry,                                    address)                               \
--- a/hotspot/test/TEST.groups	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/test/TEST.groups	Wed Jul 05 20:52:37 2017 +0200
@@ -190,7 +190,6 @@
   gc/g1/TestShrinkToOneRegion.java \
   gc/metaspace/G1AddMetaspaceDependency.java \
   gc/startup_warnings/TestCMS.java \
-  gc/startup_warnings/TestDefaultMaxRAMFraction.java \
   gc/startup_warnings/TestDefNewCMS.java \
   gc/startup_warnings/TestParallelGC.java \
   gc/startup_warnings/TestParallelScavengeSerialOld.java \
--- a/hotspot/test/gc/logging/TestPrintReferences.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test TestPrintReferences
- * @bug 8133818
- * @summary Validate the reference processing logging
- * @key gc
- * @library /testlibrary
- * @modules java.base/sun.misc
- *          java.management
- */
-
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
-
-public class TestPrintReferences {
-  public static void main(String[] args) throws Exception {
-    ProcessBuilder pb_enabled =
-      ProcessTools.createJavaProcessBuilder("-XX:+PrintGCDetails", "-XX:+PrintReferenceGC", "-Xmx10M", GCTest.class.getName());
-    OutputAnalyzer output = new OutputAnalyzer(pb_enabled.start());
-
-    output.shouldMatch(
-      "#[0-9]+: \\[SoftReference, [0-9]+ refs, [0-9]+\\.[0-9]+ secs\\]" +
-      "#[0-9]+: \\[WeakReference, [0-9]+ refs, [0-9]+\\.[0-9]+ secs\\]" +
-      "#[0-9]+: \\[FinalReference, [0-9]+ refs, [0-9]+\\.[0-9]+ secs\\]" +
-      "#[0-9]+: \\[PhantomReference, [0-9]+ refs, [0-9]+\\.[0-9]+ secs\\]" +
-      "#[0-9]+: \\[Cleaners, [0-9]+ refs, [0-9]+\\.[0-9]+ secs\\]" +
-      "#[0-9]+: \\[JNI Weak Reference, [0-9]+ refs, [0-9]+\\.[0-9]+ secs\\]");
-
-    output.shouldHaveExitValue(0);
-  }
-
-  static class GCTest {
-    public static void main(String [] args) {
-      System.gc();
-    }
-  }
-}
--- a/hotspot/test/gc/startup_warnings/TestDefaultMaxRAMFraction.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* This code is free software; you can redistribute it and/or modify it
-* 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 TestDefaultMaxRAMFraction
-* @key gc
-* @bug 8021967
-* @summary Test that the deprecated TestDefaultMaxRAMFraction flag print a warning message
-* @library /testlibrary
-* @modules java.base/sun.misc
-*          java.management
-*/
-
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
-
-public class TestDefaultMaxRAMFraction {
-  public static void main(String[] args) throws Exception {
-    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:DefaultMaxRAMFraction=4", "-version");
-    OutputAnalyzer output = new OutputAnalyzer(pb.start());
-    output.shouldContain("warning: DefaultMaxRAMFraction is deprecated and will likely be removed in a future release. Use MaxRAMFraction instead.");
-    output.shouldNotContain("error");
-    output.shouldHaveExitValue(0);
-  }
-
-}
--- a/hotspot/test/gc/startup_warnings/TestNoParNew.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* This code is free software; you can redistribute it and/or modify it
-* under the terms of the GNU General Public License version 2 only, as
-* published by the Free Software Foundation.
-*
-* This code is distributed in the hope that it will be useful, but WITHOUT
-* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-* version 2 for more details (a copy is included in the LICENSE file that
-* accompanied this code).
-*
-* You should have received a copy of the GNU General Public License version
-* 2 along with this work; if not, write to the Free Software Foundation,
-* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-*
-* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-* or visit www.oracle.com if you need additional information or have any
-* questions.
-*/
-
-/*
-* @test TestNoParNew
-* @key gc
-* @bug 8065972
-* @summary Test that specifying -XX:-UseParNewGC on the command line logs a warning message
-* @library /testlibrary
-* @modules java.base/sun.misc
-*          java.management
-*/
-
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
-
-
-public class TestNoParNew {
-
-  public static void main(String args[]) throws Exception {
-    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:-UseParNewGC", "-version");
-    OutputAnalyzer output = new OutputAnalyzer(pb.start());
-    output.shouldContain("warning: The UseParNewGC flag is deprecated and will likely be removed in a future release");
-    output.shouldNotContain("error");
-    output.shouldHaveExitValue(0);
-  }
-
-}
--- a/hotspot/test/gc/startup_warnings/TestParNewCMS.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/test/gc/startup_warnings/TestParNewCMS.java	Wed Jul 05 20:52:37 2017 +0200
@@ -40,7 +40,7 @@
   public static void main(String args[]) throws Exception {
     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParNewGC", "-XX:+UseConcMarkSweepGC", "-version");
     OutputAnalyzer output = new OutputAnalyzer(pb.start());
-    output.shouldContain("warning: The UseParNewGC flag is deprecated and will likely be removed in a future release");
+    output.shouldContain("warning: Option UseParNewGC was deprecated in version");
     output.shouldNotContain("error");
     output.shouldHaveExitValue(0);
   }
--- a/hotspot/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java	Wed Jul 05 20:52:37 2017 +0200
@@ -46,7 +46,7 @@
         "-XX:NmethodSweepFraction=10", "-version");
 
     OutputAnalyzer output2 = new OutputAnalyzer(pb2.start());
-    output2.shouldContain("ignoring option").shouldContain("support was removed");
+    output2.shouldContain("Ignoring option").shouldContain("support was removed");
     output2.shouldContain("NmethodSweepFraction");
   }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/CommandLine/VMAliasOptions.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import jdk.test.lib.*;
+import jdk.test.lib.cli.*;
+
+/*
+ * @test
+ * @bug 8061611
+ * @summary Test that various alias options correctly set the target options. See aliased_jvm_flags in arguments.cpp.
+ * @library /testlibrary
+ */
+public class VMAliasOptions {
+
+    /**
+     * each entry is {[0]: alias name, [1]: alias target, [2]: value to set
+     * (true/false/n/string)}.
+     */
+    public static final String[][] ALIAS_OPTIONS = {
+        {"DefaultMaxRAMFraction",   "MaxRAMFraction", "1032"},
+        {"CMSMarkStackSizeMax",     "MarkStackSizeMax", "1032"},
+        {"CMSMarkStackSize",        "MarkStackSize", "1032"},
+        {"G1MarkStackSize",         "MarkStackSize", "1032"},
+        {"ParallelMarkingThreads",  "ConcGCThreads", "2"},
+        {"ParallelCMSThreads",      "ConcGCThreads", "2"},
+        {"CreateMinidumpOnCrash",   "CreateCoredumpOnCrash", "false" },
+    };
+
+    static void testAliases(String[][] optionInfo) throws Throwable {
+        String aliasNames[]     = new String[optionInfo.length];
+        String optionNames[]    = new String[optionInfo.length];
+        String expectedValues[] = new String[optionInfo.length];
+        for (int i = 0; i < optionInfo.length; i++) {
+            aliasNames[i]     = optionInfo[i][0];
+            optionNames[i]    = optionInfo[i][1];
+            expectedValues[i] = optionInfo[i][2];
+        }
+
+        OutputAnalyzer output = CommandLineOptionTest.startVMWithOptions(aliasNames, expectedValues, "-XX:+PrintFlagsFinal");
+        CommandLineOptionTest.verifyOptionValuesFromOutput(output, optionNames, expectedValues);
+    }
+
+    public static void main(String[] args) throws Throwable {
+        testAliases(ALIAS_OPTIONS);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/CommandLine/VMDeprecatedOptions.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import jdk.test.lib.*;
+import jdk.test.lib.cli.*;
+
+/*
+ * @test
+ * @bug 8066821
+ * @summary Test that various options are deprecated. See deprecated_jvm_flags in arguments.cpp.
+ * @library /testlibrary
+ */
+public class VMDeprecatedOptions {
+
+    /**
+     * each entry is {[0]: option name, [1]: value to set
+     * (true/false/n/string)}.
+     */
+    public static final String[][] DEPRECATED_OPTIONS = {
+        // deprecated non-alias flags:
+        {"MaxGCMinorPauseMillis", "1032"},
+        {"UseParNewGC", "false"},
+
+        // deprecated alias flags (see also aliased_jvm_flags):
+        {"DefaultMaxRAMFraction", "4"},
+        {"CMSMarkStackSizeMax", "1032"},
+        {"CMSMarkStackSize", "1032"},
+        {"G1MarkStackSize", "1032"},
+        {"ParallelMarkingThreads", "2"},
+        {"ParallelCMSThreads", "2"},
+        {"CreateMinidumpOnCrash", "false"}
+    };
+
+    static String getDeprecationString(String optionName) {
+        return "Option " + optionName
+            + " was deprecated in version [\\S]+ and will likely be removed in a future release";
+    }
+
+    static void testDeprecated(String[][] optionInfo) throws Throwable {
+        String optionNames[] = new String[optionInfo.length];
+        String expectedValues[] = new String[optionInfo.length];
+        for (int i = 0; i < optionInfo.length; i++) {
+            optionNames[i] = optionInfo[i][0];
+            expectedValues[i] = optionInfo[i][1];
+        }
+
+        OutputAnalyzer output = CommandLineOptionTest.startVMWithOptions(optionNames, expectedValues);
+
+        // check for option deprecation messages:
+        output.shouldHaveExitValue(0);
+        for (String[] deprecated : optionInfo) {
+            String match = getDeprecationString(deprecated[0]);
+            output.shouldMatch(match);
+        }
+    }
+
+    public static void main(String[] args) throws Throwable {
+        testDeprecated(DEPRECATED_OPTIONS);  // Make sure that each deprecated option is mentioned in the output.
+    }
+}
--- a/hotspot/test/runtime/NMT/AutoshutdownNMT.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/test/runtime/NMT/AutoshutdownNMT.java	Wed Jul 05 20:52:37 2017 +0200
@@ -41,6 +41,6 @@
                 "-XX:-AutoShutdownNMT",
                 "-version");
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
-        output.shouldContain("ignoring option AutoShutdownNMT");
+        output.shouldContain("Ignoring option AutoShutdownNMT");
     }
 }
--- a/hotspot/test/testlibrary/jdk/test/lib/cli/CommandLineOptionTest.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/hotspot/test/testlibrary/jdk/test/lib/cli/CommandLineOptionTest.java	Wed Jul 05 20:52:37 2017 +0200
@@ -261,6 +261,73 @@
     }
 
     /**
+     * Start VM with given options and values.
+     * Generates command line option flags from
+     * {@code optionNames} and {@code optionValues}.
+     *
+     * @param optionNames names of options to pass in
+     * @param optionValues  values of option
+     * @param additionalVMOpts additional options that should be
+     *                         passed to JVM.
+     * @return output from vm process
+     */
+    public static OutputAnalyzer startVMWithOptions(String[] optionNames,
+            String[] optionValues,
+            String... additionalVMOpts) throws Throwable {
+        List<String> vmOpts = new ArrayList<>();
+        if (optionNames == null || optionValues == null || optionNames.length != optionValues.length) {
+            throw new IllegalArgumentException("optionNames and/or optionValues");
+        }
+
+        for (int i = 0; i < optionNames.length; i++) {
+          vmOpts.add(prepareFlag(optionNames[i], optionValues[i]));
+        }
+        Collections.addAll(vmOpts, additionalVMOpts);
+        Collections.addAll(vmOpts, "-version");
+
+        ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
+                vmOpts.toArray(new String[vmOpts.size()]));
+
+        return new OutputAnalyzer(processBuilder.start());
+    }
+
+    /**
+     * Verifies from the output that values of specified JVM options were the same as
+     * expected values.
+     *
+     * @param outputAnalyzer search output for expect options and values.
+     * @param optionNames names of tested options.
+     * @param expectedValues expected values of tested options.
+     * @throws Throwable if verification fails or some other issues occur.
+     */
+    public static void verifyOptionValuesFromOutput(OutputAnalyzer outputAnalyzer,
+            String[] optionNames,
+            String[] expectedValues) throws Throwable {
+        outputAnalyzer.shouldHaveExitValue(0);
+        for (int i = 0; i < optionNames.length; i++) {
+          outputAnalyzer.shouldMatch(String.format(
+                CommandLineOptionTest.PRINT_FLAGS_FINAL_FORMAT,
+                optionNames[i], expectedValues[i]));
+        }
+    }
+
+   /**
+     * Verifies that value of specified JVM options are the same as
+     * expected values.
+     * Generates command line option flags from
+     * {@code optionNames} and {@code expectedValues}.
+     *
+     * @param optionNames names of tested options.
+     * @param expectedValues expected values of tested options.
+     * @throws Throwable if verification fails or some other issues occur.
+     */
+    public static void verifyOptionValues(String[] optionNames,
+            String[] expectedValues) throws Throwable {
+       OutputAnalyzer outputAnalyzer = startVMWithOptions(optionNames, expectedValues, "-XX:+PrintFlagsFinal");
+       verifyOptionValuesFromOutput(outputAnalyzer, optionNames, expectedValues);
+    }
+
+    /**
      * Verifies that value of specified JVM when type of newly started VM
      * is the same as the type of current.
      * This method filter out option with {@code optionName}
@@ -312,6 +379,24 @@
     }
 
     /**
+     * Prepares generic command line flag with name {@code name} by setting
+     * it's value to {@code value}.
+     *
+     * @param name the name of option to be prepared
+     * @param value the value of option ("+" or "-" can be used instead of "true" or "false")
+     * @return prepared command line flag
+     */
+    public static String prepareFlag(String name, String value) {
+        if (value.equals("+") || value.equalsIgnoreCase("true")) {
+          return "-XX:+" + name;
+      } else if (value.equals("-") || value.equalsIgnoreCase("false")) {
+        return "-XX:-" + name;
+      } else {
+        return "-XX:" + name + "=" + value;
+      }
+    }
+
+    /**
      * Returns message that should occur in VM output if option
      * {@code optionName} if unrecognized.
      *
--- a/jaxp/.hgtags	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxp/.hgtags	Wed Jul 05 20:52:37 2017 +0200
@@ -326,3 +326,4 @@
 6a418934997fc4b56664b88f8417e2f0fe658091 jdk9-b81
 53fe3c103b6fdf48e2b2676c0c4818ef5a10fa21 jdk9-b82
 497bc2654e11684b11de46744227883d7e760f35 jdk9-b83
+91795d86744f3074d1e59b1e75d9c851c098688f jdk9-b84
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -101,7 +101,7 @@
          * This is interpreted as "Version of the DOM API supported for the
          * specified Feature", and in Level 1 should be "1.0"
          *
-         * @return true iff this implementation is compatable with the specified
+         * @return true if this implementation is compatible with the specified
          * feature and version.
          */
         public boolean hasFeature(String feature, String version) {
@@ -111,19 +111,22 @@
             if (feature.startsWith("+")) {
                 feature = feature.substring(1);
             }
-            return (
-                feature.equalsIgnoreCase("Core")
-                    && (anyVersion
-                        || version.equals("1.0")
-                        || version.equals("2.0")
-                        || version.equals("3.0")))
-                        || (feature.equalsIgnoreCase("XML")
-                    && (anyVersion
-                        || version.equals("1.0")
-                        || version.equals("2.0")
-                        || version.equals("3.0")))
-                        || (feature.equalsIgnoreCase("LS")
-                    && (anyVersion || version.equals("3.0")));
+            return (feature.equalsIgnoreCase("Core")
+                        && (anyVersion
+                            || version.equals("1.0")
+                            || version.equals("2.0")
+                            || version.equals("3.0")))
+                    || (feature.equalsIgnoreCase("XML")
+                        && (anyVersion
+                            || version.equals("1.0")
+                            || version.equals("2.0")
+                            || version.equals("3.0")))
+                    || (feature.equalsIgnoreCase("LS")
+                        && (anyVersion
+                            || version.equals("3.0")))
+                    || (feature.equalsIgnoreCase("ElementTraversal")
+                        && (anyVersion
+                            || version.equals("1.0")));
         } // hasFeature(String,String):boolean
 
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -83,6 +83,9 @@
      * specified feature and version.
      */
     public boolean hasFeature(String feature, String version) {
+        if (feature == null || feature.length() == 0) {
+            return false;
+        }
 
         boolean result = super.hasFeature(feature, version);
         if (!result) {
--- a/jaxp/src/java.xml/share/classes/org/w3c/dom/ElementTraversal.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/ElementTraversal.java	Wed Jul 05 20:52:37 2017 +0200
@@ -50,7 +50,7 @@
  * elements of an element, for preprocessing before navigation.
  *
  * @see
- * <a href='http://www.w3.org/TR/ElementTraversal/'><cite>Element Traversal Specification</cite></a>.
+ * <a href='http://www.w3.org/TR/ElementTraversal/'><cite>Element Traversal Specification</cite></a>
  *
  * @since 9
  */
--- a/jaxp/test/javax/xml/jaxp/unittest/dom/ElementTraversal.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ElementTraversal.java	Wed Jul 05 20:52:37 2017 +0200
@@ -31,16 +31,35 @@
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 import org.w3c.dom.Document;
+import org.w3c.dom.DOMImplementation;
 import org.w3c.dom.Element;
 import org.xml.sax.SAXException;
 
 /*
- * @bug 8135283
+ * @bug 8135283 8138721
  * @summary Tests for the Element Traversal interface.
  */
 
 public class ElementTraversal {
     /*
+       Verifies that ElementTraversal is supported.
+     */
+    @Test(dataProvider = "doc")
+    public void testHasFeature(Document doc) {
+        DOMImplementation di = doc.getImplementation();
+
+        //return false if feasure == null
+        Assert.assertFalse(di.hasFeature(null, null));
+
+        //A feature is supported without specifying version
+        Assert.assertTrue(di.hasFeature("ElementTraversal", null));
+        Assert.assertTrue(di.hasFeature("ElementTraversal", ""));
+
+        //ElementTraversal Version 1.0 is supported
+        Assert.assertTrue(di.hasFeature("ElementTraversal", "1.0"));
+    }
+
+    /*
        Verifies the ElementTraversal interface by exercising all of its five
        methods while reading through the xml document.
      */
--- a/jaxws/.hgtags	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/.hgtags	Wed Jul 05 20:52:37 2017 +0200
@@ -329,3 +329,4 @@
 139338618c77d793ab8b550f06819ddb8381316f jdk9-b81
 52d9ad2536ba6c6f1cc5561c0a0ee2b4847fd62c jdk9-b82
 d7ee8157f4feced67924e421225c6f844079a03d jdk9-b83
+51729143f8fe038f52cf55720c4c1f89267f5948 jdk9-b84
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Language.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Language.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,5 @@
 public enum Language {
     DTD,
     XMLSCHEMA,
-    RELAXNG,
-    RELAXNG_COMPACT,
     WSDL
 }
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -73,8 +73,6 @@
 \ \ -disableXmlSecurity  :  disables XML security features when parsing XML documents \n\
 \ \ -contentForWildcard  :  generates content property for types with multiple xs:any derived elements \n\
 \ \ -xmlschema         :  treat input as W3C XML Schema (default)\n\
-\ \ -relaxng           :  treat input as RELAX NG (experimental,unsupported)\n\
-\ \ -relaxng-compact   :  treat input as RELAX NG compact syntax (experimental,unsupported)\n\
 \ \ -dtd               :  treat input as XML DTD (experimental,unsupported)\n\
 \ \ -wsdl              :  treat input as WSDL and compile schemas inside it (experimental,unsupported)\n\
 \ \ -verbose           :  be extra verbose\n\
@@ -85,7 +83,7 @@
 
 Driver.AddonUsage = \nExtensions:
 
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
 Driver.ExperimentalLanguageWarning = \
         Are you trying to compile {0}? Support for {0} is experimental. \
         You may enable it by using the {1} option.
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -33,10 +33,41 @@
 ConsoleErrorReporter.UnknownFile = unbekannte Datei
 
 Driver.Private.Usage = Zus\u00e4tzliche private Testoptionen:\n\\ \\ -debug             : Ausf\u00fchrung im Debug-Modus (umfasst -verbose)\n\\ \\ -mode <mode>       : F\u00fchrt XJC in einem anderen Ausf\u00fchrungsmodus aus\n\\ \\ -private           :  Zeigt diese Hilfemeldung an\nModus:\n\\ \\ code         :  Generiert Java-Quellcode (Standard)\n\\ \\ dryrun       :  Kompiliert das Schema im Speicher, generiert die Java-Quelle jedoch nicht\n\\ \\ zip          :  Generiert den Java-Quellcode in einer .zip-Datei, wie mit der Option -d angegeben\n\\ \\ sig          :  Gibt die Signaturen des generierten Codes aus\n\\ \\ forest       :  Gibt transformierte DOM-Gesamtstruktur aus\n
-Driver.Public.Usage = Verwendung: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\nWenn dir angegeben wird, werden alle Schemadateien im Verzeichnis kompiliert.\nWenn jar angegeben wird, wird die /META-INF/sun-jaxb.episode-Binding-Datei kompiliert.\nOptionen:\n\\ \\ -nv                :  F\u00fchrt keine strikte Validierung der Eingabeschemas durch\n\\ \\ -extension         :  L\u00e4sst Herstellererweiterungen zu - Befolgt die \n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Kompatibilit\u00e4tsregeln und App E.2 der JAXB-Spezifikation nicht strikt\n\\ \\ -b <file/dir>      :  Gibt externe Bindings-Dateien an (jede <file> muss ihre eigene Option -b haben)\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Wenn ein Verzeichnis angegeben wird, wird **/*.xjb durchsucht\n\\ \\ -d <dir>           :  Generierte Dateien werden in diesem Verzeichnis gespeichert\n\\ \\ -p <pkg>           :  Gibt das Zielpackage an\n\\ \\ -httpproxy <proxy> :  set HTTP/HTTPS proxy. Format ist [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile <f> : Wird wie -httpproxy verwendet, verwendet jedoch das Argument in einer Datei zum Schutz des Kennwortes \n\\ \\ -classpath <arg>   :  Gibt an, wo die Benutzerklassendateien gefunden werden\n\\ \\ -catalog <file>    :  Gibt Katalogdateien zur Aufl\u00f6sung von externen Entity-Referenzen an\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Unterst\u00fctzt TR9401, XCatalog und OASIS-XML-Katalogformat.\n\\ \\ -readOnly          :  Generierte Dateien werden im schreibgesch\u00fctzten Modus gelesen\n\\ \\ -npa               :  Unterdr\u00fcckt die Generierung von Annotationen auf Packageebene (**/package-info.java)\n\\ \\ -no-header         :  Unterdr\u00fcckt die Generierung eines Datei-Headers mit Zeitstempel\n\\ \\ -target (2.0|2.1)  :  Verh\u00e4lt sich wie XJC 2.0 oder 2.1 und generiert Code, der keine 2.2-Features verwendet.\n\\ \\ -encoding <encoding> :  Gibt Zeichencodierung f\u00fcr generierte Quelldateien an\n\\ \\ -enableIntrospection :  Aktiviert die ordnungsgem\u00e4\u00dfe Generierung von booleschen Gettern/Settern zur Aktivierung von Bean Introspection-APIs \n\\ \\ -contentForWildcard  :  Generiert Contenteigenschaft f\u00fcr Typen mit mehreren von xs:any abgeleiteten Elementen \n\\ \\ -xmlschema         :  Behandelt Eingabe als W3C-XML-Schema (Standard)\n\\ \\ -relaxng           :  Behandelt Eingabe als RELAX NG (experimentell, nicht unterst\u00fctzt)\n\\ \\ -relaxng-compact   :  Behandelt Eingabe als RELAX NG-Kompaktsyntax (experimentell, nicht unterst\u00fctzt)\n\\ \\ -dtd               :  Behandelt Eingabe als XML DTD (experimentell, nicht unterst\u00fctzt)\n\\ \\ -wsdl              :  Behandelt Eingabe als WSDL und kompiliert enthaltene Schemas (experimentell, nicht unterst\u00fctzt)\n\\ \\ -verbose           :  Verwendet extra-verbose\n\\ \\ -quiet             :  Unterdr\u00fcckt die Compilerausgabe\n\\ \\ -help              :  Zeigt diese Hilfemeldung an\n\\ \\ -version           :  Zeigt Versionsinformationen an\n\\ \\ -fullversion       :  Zeigt vollst\u00e4ndige Versionsinformationen an\n
+Driver.Public.Usage = Verwendung: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+Wenn dir angegeben wird, werden alle Schemadateien im Verzeichnis kompiliert.\n\
+Wenn jar angegeben wird, wird die /META-INF/sun-jaxb.episode-Binding-Datei kompiliert.\n\
+Optionen:\n\
+\ \ -nv                :  F\u00fchrt keine strikte Validierung der Eingabeschemas durch\n\
+\ \ -extension         :  L\u00e4sst Herstellererweiterungen zu - Befolgt die \n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Kompatibilit\u00e4tsregeln und App E.2 der JAXB-Spezifikation nicht strikt\n\
+\ \ -b <file/dir>      :  Gibt externe Bindings-Dateien an (jede <file> muss ihre eigene Option -b haben)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Wenn ein Verzeichnis angegeben wird, wird **/*.xjb durchsucht\n\
+\ \ -d <dir>           :  Generierte Dateien werden in diesem Verzeichnis gespeichert\n\
+\ \ -p <pkg>           :  Gibt das Zielpackage an\n\
+\ \ -httpproxy <proxy> :  set HTTP/HTTPS proxy. Format ist [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> : Wird wie -httpproxy verwendet, verwendet jedoch das Argument in einer Datei zum Schutz des Kennwortes \n\
+\ \ -classpath <arg>   :  Gibt an, wo die Benutzerklassendateien gefunden werden\n\
+\ \ -catalog <file>    :  Gibt Katalogdateien zur Aufl\u00f6sung von externen Entity-Referenzen an\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Unterst\u00fctzt TR9401, XCatalog und OASIS-XML-Katalogformat.\n\
+\ \ -readOnly          :  Generierte Dateien werden im schreibgesch\u00fctzten Modus gelesen\n\
+\ \ -npa               :  Unterdr\u00fcckt die Generierung von Annotationen auf Packageebene (**/package-info.java)\n\
+\ \ -no-header         :  Unterdr\u00fcckt die Generierung eines Datei-Headers mit Zeitstempel\n\
+\ \ -target (2.0|2.1)  :  Verh\u00e4lt sich wie XJC 2.0 oder 2.1 und generiert Code, der keine 2.2-Features verwendet.\n\
+\ \ -encoding <encoding> :  Gibt Zeichencodierung f\u00fcr generierte Quelldateien an\n\
+\ \ -enableIntrospection :  Aktiviert die ordnungsgem\u00e4\u00dfe Generierung von booleschen Gettern/Settern zur Aktivierung von Bean Introspection-APIs \n\
+\ \ -contentForWildcard  :  Generiert Contenteigenschaft f\u00fcr Typen mit mehreren von xs:any abgeleiteten Elementen \n\
+\ \ -xmlschema         :  Behandelt Eingabe als W3C-XML-Schema (Standard)\n\
+\ \ -dtd               :  Behandelt Eingabe als XML DTD (experimentell, nicht unterst\u00fctzt)\n\
+\ \ -wsdl              :  Behandelt Eingabe als WSDL und kompiliert enthaltene Schemas (experimentell, nicht unterst\u00fctzt)\n\
+\ \ -verbose           :  Verwendet extra-verbose\n\
+\ \ -quiet             :  Unterdr\u00fcckt die Compilerausgabe\n\
+\ \ -help              :  Zeigt diese Hilfemeldung an\n\
+\ \ -version           :  Zeigt Versionsinformationen an\n\
+\ \ -fullversion       :  Zeigt vollst\u00e4ndige Versionsinformationen an\n\
+
 Driver.AddonUsage = \nErweiterungen:
 
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
 Driver.ExperimentalLanguageWarning = Versuchen Sie, {0} zu kompilieren? Unterst\u00fctzung f\u00fcr {0} ist zu Testzwecken bestimmt. Eine Aktivierung ist mit der Option {1} m\u00f6glich.
 
 # Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -33,10 +33,41 @@
 ConsoleErrorReporter.UnknownFile = archivo desconocido
 
 Driver.Private.Usage = Opciones de pruebas privadas adicionales:\n\\ \\ -debug             :  se ejecuta en modo de depuraci\u00f3n (incluye -verbose)\n\\ \\ -mode <modo>       :  ejecuta XJC en otro modo de ejecuci\u00f3n\n\\ \\ -private           :  muestra este mensaje de ayuda\nModo:\n\\ \\ code         :  genera c\u00f3digo fuente Java (por defecto)\n\\ \\ dryrun       :  compila el esquema en la memoria, pero no genera el c\u00f3digo fuente Java\n\\ \\ zip          :  genera c\u00f3digo fuente Java en un archivo zip especificado por la opci\u00f3n -d\n\\ \\ sig          :  vuelca las firmas del c\u00f3digo generado\n\\ \\ forest       :  vuelca el bosque DOM transformado\n
-Driver.Public.Usage = Sintaxis: xjc [-options ...] <archivo de esquema/URL/dir/jar> ... [-b <infoenlace>] ...\nSi se especifica dir, se compilar\u00e1n todos los archivos de esquema que hay en \u00e9l.\nSi se especifica jar, se compilar\u00e1 el archivo de enlace /META-INF/sun-jaxb.episode.\nOpciones:\n\\ \\ -nv                :  no realiza una validaci\u00f3n estricta de los esquemas de entrada\n\\ \\ -extension         :  permite extensiones de proveedor - no cumple estrictamente las\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ reglas de compatibilidad y el ap\u00e9ndice E.2 de la especificaci\u00f3n JAXB\n\\ \\ -b <archivo/dir>      :  especifica archivos de enlace externos (cada <archivo> debe tener su propio -b)\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Si se proporciona un directorio, se busca **/*.xjb\n\\ \\ -d <directorio>           :  los archivos generados ir\u00e1n a este directorio\n\\ \\ -p <paquete>           :  especifica el paquete de destino\n\\ \\ -httpproxy <proxy> :  define el proxy HTTP/HTTPS. El formato es [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile <f> :  funciona como -httpproxy, pero toma el argumento de un archivo para proteger la contrase\u00f1a \n\\ \\ -classpath <arg>   :  especifica d\u00f3nde encontrar archivos de clase de usuario\n\\ \\ -catalog <archivo>    :  especifica archivos de cat\u00e1logo para resolver referencias de entidades externas\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ soporta el formato de cat\u00e1logo TR9401, XCatalog y OASIS XML.\n\\ \\ -readOnly          :  los archivos generados estar\u00e1n en modo de s\u00f3lo lectura\n\\ \\ -npa               :  suprime la generaci\u00f3n de anotaciones de nivel de paquete (**/package-info.java)\n\\ \\ -no-header         :  suprime la generaci\u00f3n de una cabecera de archivo con registro de hora\n\\ \\ -target (2.0|2.1)  :  se comporta como XJC 2.0 o 2.1 y genera c\u00f3digo que no utiliza ninguna de las funciones de 2.2.\n\\ \\ -encoding <codificaci\u00f3n> :especifica la codificaci\u00f3n de caracteres de los archivos de origen generados\n\\ \\ -enableIntrospection :  permite la generaci\u00f3n correcta de getters/setters booleanos para permitir API de introspecci\u00f3n de bean \n\\ \\ -contentForWildcard  :  genera la propiedad de contenido para tipos con m\u00faltiples elementos derivados de xs:any \n\\ \\ -xmlschema         :  trata la entrada como un esquema XML de W3C (por defecto)\n\\ \\ -relaxng           :  trata la entrada como RELAX NG (experimental, no soportado)\n\\ \\ -relaxng-compact   :  trata la entrada como sintaxis compacta de RELAX NG (experimental, no soportado)\n\\ \\ -dtd               :  trata la entrada como DTD de XML (experimental, no soportado)\n\\ \\ -wsdl              :  trata la entrada como WSDL y compila esquemas en su interior (experimental, no soportado)\n\\ \\ -verbose           :  con detalles adicionales\n\\ \\ -quiet             :  suprime la salida del compilador\n\\ \\ -help              :  muestra este mensaje de ayuda\n\\ \\ -version           :  muestra informaci\u00f3n de la versi\u00f3n\n\\ \\ -fullversion       :  muestra informaci\u00f3n completa de la versi\u00f3n\n
+Driver.Public.Usage = Sintaxis: xjc [-options ...] <archivo de esquema/URL/dir/jar> ... [-b <infoenlace>] ...\n\
+Si se especifica dir, se compilar\u00e1n todos los archivos de esquema que hay en \u00e9l.\n\
+Si se especifica jar, se compilar\u00e1 el archivo de enlace /META-INF/sun-jaxb.episode.\n\
+Opciones:\n\
+\ \ -nv                :  no realiza una validaci\u00f3n estricta de los esquemas de entrada\n\
+\ \ -extension         :  permite extensiones de proveedor - no cumple estrictamente las\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ reglas de compatibilidad y el ap\u00e9ndice E.2 de la especificaci\u00f3n JAXB\n\
+\ \ -b <archivo/dir>      :  especifica archivos de enlace externos (cada <archivo> debe tener su propio -b)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Si se proporciona un directorio, se busca **/*.xjb\n\
+\ \ -d <directorio>           :  los archivos generados ir\u00e1n a este directorio\n\
+\ \ -p <paquete>           :  especifica el paquete de destino\n\
+\ \ -httpproxy <proxy> :  define el proxy HTTP/HTTPS. El formato es [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> :  funciona como -httpproxy, pero toma el argumento de un archivo para proteger la contrase\u00f1a \n\
+\ \ -classpath <arg>   :  especifica d\u00f3nde encontrar archivos de clase de usuario\n\
+\ \ -catalog <archivo>    :  especifica archivos de cat\u00e1logo para resolver referencias de entidades externas\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ soporta el formato de cat\u00e1logo TR9401, XCatalog y OASIS XML.\n\
+\ \ -readOnly          :  los archivos generados estar\u00e1n en modo de s\u00f3lo lectura\n\
+\ \ -npa               :  suprime la generaci\u00f3n de anotaciones de nivel de paquete (**/package-info.java)\n\
+\ \ -no-header         :  suprime la generaci\u00f3n de una cabecera de archivo con registro de hora\n\
+\ \ -target (2.0|2.1)  :  se comporta como XJC 2.0 o 2.1 y genera c\u00f3digo que no utiliza ninguna de las funciones de 2.2.\n\
+\ \ -encoding <codificaci\u00f3n> :especifica la codificaci\u00f3n de caracteres de los archivos de origen generados\n\
+\ \ -enableIntrospection :  permite la generaci\u00f3n correcta de getters/setters booleanos para permitir API de introspecci\u00f3n de bean \n\
+\ \ -contentForWildcard  :  genera la propiedad de contenido para tipos con m\u00faltiples elementos derivados de xs:any \n\
+\ \ -xmlschema         :  trata la entrada como un esquema XML de W3C (por defecto)\n\
+\ \ -dtd               :  trata la entrada como DTD de XML (experimental, no soportado)\n\
+\ \ -wsdl              :  trata la entrada como WSDL y compila esquemas en su interior (experimental, no soportado)\n\
+\ \ -verbose           :  con detalles adicionales\n\
+\ \ -quiet             :  suprime la salida del compilador\n\
+\ \ -help              :  muestra este mensaje de ayuda\n\
+\ \ -version           :  muestra informaci\u00f3n de la versi\u00f3n\n\
+\ \ -fullversion       :  muestra informaci\u00f3n completa de la versi\u00f3n\n\
+
 Driver.AddonUsage = \nExtensiones:
 
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
 Driver.ExperimentalLanguageWarning = \u00bfEst\u00e1 intentando compilar {0}? El soporte de {0} es experimental. Para activarlo, utilice la opci\u00f3n {1}.
 
 # Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -36,7 +36,42 @@
 Driver.Public.Usage = Syntaxe : xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\nSi le r\u00e9pertoire est indiqu\u00e9, tous les fichiers de sch\u00e9ma qu'il contient seront compil\u00e9s.\nSi le fichier JAR est indiqu\u00e9, le fichier de binding /META-INF/sun-jaxb.episode sera compil\u00e9.\nOptions :\n\ \ -nv                :  n'effectuez pas de validation stricte des sch\u00e9mas d'entr\u00e9e\n\ \ -extension         :  autorisez les extensions fournisseur, ne suivez pas strictement les\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ R\u00e8gles de compatibilit\u00e9 et App E.2 de la sp\u00e9cification JAXB\n\ \ -b <file/dir>      :  indiquez les fichiers de binding externes (chaque \u00e9l\u00e9ment <file> doit avoir sa propre option -b)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Si un r\u00e9pertoire est indiqu\u00e9, **/*.xjb est recherch\u00e9\n\ \ -d <dir>           :  les fichiers g\u00e9n\u00e9r\u00e9s seront plac\u00e9s dans ce r\u00e9pertoire\n\ \ -p <pkg>           :  indique le package cible\n\ \ -httpproxy <proxy> :  d\u00e9finissez le proxy HTTP/HTTPS. Le format est [user[:password]@]proxyHost:proxyPort\n\ \ -httpproxyfile <f> :  fonctionne comme -httpproxy mais prend l'argument dans un fichier pour prot\u00e9ger le mot de passe \n\ \ -classpath <arg>   :  indiquez o\u00f9 trouver les fichiers de classe utilisateur\n\ \ -catalog <file>    :  indiquez les fichiers de catalogue pour r\u00e9soudre les r\u00e9f\u00e9rences d'entit\u00e9 externes\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ prenez en charge le format de catalogue TR9401, XCatalog et OASIS XML.\n\ \ -readOnly          :  les fichiers g\u00e9n\u00e9r\u00e9s seront en mode lecture seule\n\ \ -npa               :  supprimez la g\u00e9n\u00e9ration des annotations de niveau package (**/package-info.java)\n\ \ -no-header         :  supprimez la g\u00e9n\u00e9ration d'un en-t\u00eate de fichier avec horodatage\n\ \ -target (2.0|2.1)  :  comportez-vous comme XJC 2.0 ou 2.1 et g\u00e9n\u00e9rez du code qui n'utilise aucune fonctionnalit\u00e9 2.2.\n\ \ -encoding <encoding> :  indiquez l'encodage de caract\u00e8res pour les fichiers source g\u00e9n\u00e9r\u00e9s\n\ \ -enableIntrospection :  activez la g\u00e9n\u00e9ration correcte des m\u00e9thodes get/set bool\u00e9ennes pour activer les API d'introspection de bean \n\ \ -contentForWildcard  :  g\u00e9n\u00e8re la propri\u00e9t\u00e9 de contenu pour les types avec plusieurs \u00e9l\u00e9ments d\u00e9riv\u00e9s xs:any \n\ \ -xmlschema         :  traitez l'entr\u00e9e en tant que W3C XML Schema (par d\u00e9faut)\n\ \ -relaxng           :  traitez l'entr\u00e9e en tant que RELAX NG (exp\u00e9rimental, non pris en charge)\n\ \ -relaxng-compact   :  traitez l'entr\u00e9e en tant que syntaxe compacte RELAX NG (exp\u00e9rimental, non pris en charge)\n\ \ -dtd               :  traitez l'entr\u00e9e en tant que DTD XML (exp\u00e9rimental, non pris en charge)\n\ \ -wsdl              :  traitez l'entr\u00e9e en tant que WSDL et compilez-y les sch\u00e9mas (exp\u00e9rimental, non pris en charge)\n\ \ -verbose           :  agissez en mode extra verbose\n\ \ -quiet             :  supprimez la sortie de compilateur\n\ \ -help              :  affichez ce message d'aide\n\ \ -version           :  affichez ces informations de version\n\ \ -fullversion       :  affichez ces informations de version compl\u00e8te\n
 Driver.AddonUsage = \nExtensions :
 
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+Driver.Public.Usage = Syntaxe : xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+Si le r\u00e9pertoire est indiqu\u00e9, tous les fichiers de sch\u00e9ma qu'il contient seront compil\u00e9s.\n\
+Si le fichier JAR est indiqu\u00e9, le fichier de binding /META-INF/sun-jaxb.episode sera compil\u00e9.\n\
+Options :\n\
+\ \ -nv                :  n'effectuez pas de validation stricte des sch\u00e9mas d'entr\u00e9e\n\
+\ \ -extension         :  autorisez les extensions fournisseur, ne suivez pas strictement les\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ R\u00e8gles de compatibilit\u00e9 et App E.2 de la sp\u00e9cification JAXB\n\
+\ \ -b <file/dir>      :  indiquez les fichiers de binding externes (chaque \u00e9l\u00e9ment <file> doit avoir sa propre option -b)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Si un r\u00e9pertoire est indiqu\u00e9, **/*.xjb est recherch\u00e9\n\
+\ \ -d <dir>           :  les fichiers g\u00e9n\u00e9r\u00e9s seront plac\u00e9s dans ce r\u00e9pertoire\n\
+\ \ -p <pkg>           :  indique le package cible\n\
+\ \ -httpproxy <proxy> :  d\u00e9finissez le proxy HTTP/HTTPS. Le format est [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> :  fonctionne comme -httpproxy mais prend l'argument dans un fichier pour prot\u00e9ger le mot de passe \n\
+\ \ -classpath <arg>   :  indiquez o\u00f9 trouver les fichiers de classe utilisateur\n\
+\ \ -catalog <file>    :  indiquez les fichiers de catalogue pour r\u00e9soudre les r\u00e9f\u00e9rences d'entit\u00e9 externes\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ prenez en charge le format de catalogue TR9401, XCatalog et OASIS XML.\n\
+\ \ -readOnly          :  les fichiers g\u00e9n\u00e9r\u00e9s seront en mode lecture seule\n\
+\ \ -npa               :  supprimez la g\u00e9n\u00e9ration des annotations de niveau package (**/package-info.java)\n\
+\ \ -no-header         :  supprimez la g\u00e9n\u00e9ration d'un en-t\u00eate de fichier avec horodatage\n\
+\ \ -target (2.0|2.1)  :  comportez-vous comme XJC 2.0 ou 2.1 et g\u00e9n\u00e9rez du code qui n'utilise aucune fonctionnalit\u00e9 2.2.\n\
+\ \ -encoding <encoding> :  indiquez l'encodage de caract\u00e8res pour les fichiers source g\u00e9n\u00e9r\u00e9s\n\
+\ \ -enableIntrospection :  activez la g\u00e9n\u00e9ration correcte des m\u00e9thodes get/set bool\u00e9ennes pour activer les API d'introspection de bean \n\
+\ \ -contentForWildcard  :  g\u00e9n\u00e8re la propri\u00e9t\u00e9 de contenu pour les types avec plusieurs \u00e9l\u00e9ments d\u00e9riv\u00e9s xs:any \n\
+\ \ -xmlschema         :  traitez l'entr\u00e9e en tant que W3C XML Schema (par d\u00e9faut)\n\
+\ \ -dtd               :  traitez l'entr\u00e9e en tant que DTD XML (exp\u00e9rimental, non pris en charge)\n\
+\ \ -wsdl              :  traitez l'entr\u00e9e en tant que WSDL et compilez-y les sch\u00e9mas (exp\u00e9rimental, non pris en charge)\n\
+\ \ -verbose           :  agissez en mode extra verbose\n\
+\ \ -quiet             :  supprimez la sortie de compilateur\n\
+\ \ -help              :  affichez ce message d'aide\n\
+\ \ -version           :  affichez ces informations de version\n\
+\ \ -fullversion       :  affichez ces informations de version compl\u00e8te\n\
+
+Driver.AddonUsage = \n\
+Extensions :
+
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
 Driver.ExperimentalLanguageWarning = Essayez-vous de compiler {0} ? La prise en charge de {0} est exp\u00e9rimentale. Vous pouvez l''activer \u00e0 l''aide de l''option {1}.
 
 # Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -33,10 +33,41 @@
 ConsoleErrorReporter.UnknownFile = file sconosciuto
 
 Driver.Private.Usage = Opzioni di test private aggiuntive:\n\ \ -debug             :  l'esecuzione avviene in modalit\u00e0 debug (include -verbose)\n\ \ -mode <modalit\u00e0>       :  XJC viene eseguito in un'altra modalit\u00e0 di esecuzione\n\ \ -private           :  visualizza questo messaggio della Guida\nModalit\u00e0:\n\ \ code         :  genera il codice sorgente Java (valore predefinito)\n\ \ dryrun       :  compila lo schema nella memoria ma non genera il codice sorgente Java\n\ \ zip          :  genera il codice sorgente Java in un file zip specificato dall'opzione -d\n\ \ sig          :  esegue il dump del firme del codice generato\n\ \ forest       :  esegue il dump dell'insieme di strutture DOM trasformato\n
-Driver.Public.Usage = Uso: xjc [-options ...] <file schema/URL/dir/jar> ... [-b <bindinfo>] ...\nSe viene specificato dir, verranno compilati tutti i file dello schema in essa contenuti.\nSe viene specificato jar, verr\u00e0 compilato il file di associazione /META-INF/sun-jaxb.episode.\nOpzioni:\n\ \ -nv                :  non esegue la convalida rigorosa degli schemi di input\n\ \ -extension         :  consente le estensioni del fornitore; non segue in modo rigoroso le\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ regole di compatibilit\u00e0 e App E.2 dalla specifica JAXB\n\ \ -b <file/dir>      :  specifica i file di associazione esterni (ogni <file> deve avere la relativa -b)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Se viene fornita una directory, la ricerca viene eseguita in **/*.xjb\n\ \ -d <dir>           :  i file generati andranno in questa directory\n\ \ -p <pkg>           :  specifica il package di destinazione\n\ \ -httpproxy <proxy> :  imposta il proxy HTTP/HTTPS. Il formato \u00e8 [user[:password]@]proxyHost:proxyPort\n\ \ -httpproxyfile <f> :  funziona come -httpproxy ma prende l'argomento da un file per proteggere la password \n\ \ -classpath <arg>   :  specifica dove trovare i file delle classi utente\n\ \ -catalog <file>    :  specifica i file di catalogo per risolvere i riferimenti a entit\u00e0 esterne\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ supporta il formato di catalogo XML TR9401, XCatalog e OASIS.\n\ \ -readOnly          :  i file generati saranno in modalit\u00e0 di sola lettura\n\ \ -npa               :  elimina la generazione delle annotazioni a livello di package (**/package-info.java)\n\ \ -no-header         :  elimina la generazione di un'intestazione di file con indicatore orario\n\ \ -target (2.0|2.1)  :  funziona come XJC 2.0 o 2.1 e genera del codice che non usa alcuna funzione 2.2.\n\ \ -encoding <encoding> :  specifica la codifica di caratteri per i file di origine generati\n\ \ -enableIntrospection :  abilita la generazione di getter/setter booleani per abilitare le API di introspezione dei bean \n\ \ -contentForWildcard  :  genera la propriet\u00e0 di contenuto per i tipi con pi\u00f9 elementi derivati xs:any \n\ \ -xmlschema         :  tratta l'input come schema XML W3C (valore predefinito)\n\ \ -relaxng           :  tratta l'input come NG RELAX (sperimentale, non supportato)\n\ \ -relaxng-compact   :  tratta l'input come sintassi compatta NG RELAX (sperimentale, non supportato)\n\ \ -dtd               :  tratta l'input come DTD XML (sperimentale, non supportato)\n\ \ -wsdl              :  tratta l'input come WSDL e compila gli schemi al suo interno (sperimentale, non supportato)\n\ \ -verbose           :  be extra verbose\n\ \ -quiet             :  elimina l'output del compilatore\n\ \ -help              :  visualizza questo messaggio della Guida\n\ \ -version           :  visualizza le informazioni sulla versione\n\ \ -fullversion       :  visualizza le informazioni sulla versione completa\n
+Driver.Public.Usage = Uso: xjc [-options ...] <file schema/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+Se viene specificato dir, verranno compilati tutti i file dello schema in essa contenuti.\n\
+Se viene specificato jar, verr\u00e0 compilato il file di associazione /META-INF/sun-jaxb.episode.\n\
+Opzioni:\n\
+\ \ -nv                :  non esegue la convalida rigorosa degli schemi di input\n\
+\ \ -extension         :  consente le estensioni del fornitore; non segue in modo rigoroso le\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ regole di compatibilit\u00e0 e App E.2 dalla specifica JAXB\n\
+\ \ -b <file/dir>      :  specifica i file di associazione esterni (ogni <file> deve avere la relativa -b)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Se viene fornita una directory, la ricerca viene eseguita in **/*.xjb\n\
+\ \ -d <dir>           :  i file generati andranno in questa directory\n\
+\ \ -p <pkg>           :  specifica il package di destinazione\n\
+\ \ -httpproxy <proxy> :  imposta il proxy HTTP/HTTPS. Il formato \u00e8 [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> :  funziona come -httpproxy ma prende l'argomento da un file per proteggere la password \n\
+\ \ -classpath <arg>   :  specifica dove trovare i file delle classi utente\n\
+\ \ -catalog <file>    :  specifica i file di catalogo per risolvere i riferimenti a entit\u00e0 esterne\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ supporta il formato di catalogo XML TR9401, XCatalog e OASIS.\n\
+\ \ -readOnly          :  i file generati saranno in modalit\u00e0 di sola lettura\n\
+\ \ -npa               :  elimina la generazione delle annotazioni a livello di package (**/package-info.java)\n\
+\ \ -no-header         :  elimina la generazione di un'intestazione di file con indicatore orario\n\
+\ \ -target (2.0|2.1)  :  funziona come XJC 2.0 o 2.1 e genera del codice che non usa alcuna funzione 2.2.\n\
+\ \ -encoding <encoding> :  specifica la codifica di caratteri per i file di origine generati\n\
+\ \ -enableIntrospection :  abilita la generazione di getter/setter booleani per abilitare le API di introspezione dei bean \n\
+\ \ -contentForWildcard  :  genera la propriet\u00e0 di contenuto per i tipi con pi\u00f9 elementi derivati xs:any \n\
+\ \ -xmlschema         :  tratta l'input come schema XML W3C (valore predefinito)\n\
+\ \ -dtd               :  tratta l'input come DTD XML (sperimentale, non supportato)\n\
+\ \ -wsdl              :  tratta l'input come WSDL e compila gli schemi al suo interno (sperimentale, non supportato)\n\
+\ \ -verbose           :  be extra verbose\n\
+\ \ -quiet             :  elimina l'output del compilatore\n\
+\ \ -help              :  visualizza questo messaggio della Guida\n\
+\ \ -version           :  visualizza le informazioni sulla versione\n\
+\ \ -fullversion       :  visualizza le informazioni sulla versione completa\n\
+
 Driver.AddonUsage = \nEstensioni:
 
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
 Driver.ExperimentalLanguageWarning = Si sta tentando di compilare {0}? Il supporto per {0} \u00e8 sperimentale. \u00c8 possibile abilitarlo usando l''opzione {1}.
 
 # Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -33,10 +33,41 @@
 ConsoleErrorReporter.UnknownFile = \u4e0d\u660e\u306a\u30d5\u30a1\u30a4\u30eb
 
 Driver.Private.Usage = \u8ffd\u52a0\u306e\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30fb\u30c6\u30b9\u30c8\u30fb\u30aa\u30d7\u30b7\u30e7\u30f3:\n\ \ -debug             : \u30c7\u30d0\u30c3\u30b0\u30fb\u30e2\u30fc\u30c9\u3067\u5b9f\u884c\u3057\u307e\u3059(-verbose\u3092\u542b\u3080)\n\ \ -mode <mode>       : XJC\u3092\u4ed6\u306e\u5b9f\u884c\u30e2\u30fc\u30c9\u3067\u5b9f\u884c\u3057\u307e\u3059\n\ \ -private           : \u3053\u306e\u30d8\u30eb\u30d7\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u307e\u3059\n\u30e2\u30fc\u30c9:\n\ \ code         : Java\u30bd\u30fc\u30b9\u30fb\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u3059(\u30c7\u30d5\u30a9\u30eb\u30c8)\n\ \ dryrun       : \u30e1\u30e2\u30ea\u30fc\u5185\u306e\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059\u304c\u3001Java\u30bd\u30fc\u30b9\u306f\u751f\u6210\u3057\u307e\u305b\u3093\n\ \ zip          : Java\u30bd\u30fc\u30b9\u30fb\u30b3\u30fc\u30c9\u3092\u3001-d\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3055\u308c\u305fzip\u30d5\u30a1\u30a4\u30eb\u306b\u751f\u6210\u3057\u307e\u3059\n\ \ sig          : \u751f\u6210\u3055\u308c\u305f\u30b3\u30fc\u30c9\u306e\u7f72\u540d\u3092\u30c0\u30f3\u30d7\u3057\u307e\u3059\n\ \ forest       : \u5909\u63db\u3055\u308c\u305fDOM\u30d5\u30a9\u30ec\u30b9\u30c8\u3092\u30c0\u30f3\u30d7\u3057\u307e\u3059\n
-Driver.Public.Usage = \u4f7f\u7528\u65b9\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\ndir\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001dir\u5185\u306e\u3059\u3079\u3066\u306e\u30b9\u30ad\u30fc\u30de\u30fb\u30d5\u30a1\u30a4\u30eb\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u3059\u3002\njar\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001/META-INF/sun-jaxb.episode\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u3059\u3002\n\u30aa\u30d7\u30b7\u30e7\u30f3:\n\ \ -nv                : \u5165\u529b\u30b9\u30ad\u30fc\u30de\u306e\u53b3\u5bc6\u306a\u691c\u8a3c\u3092\u5b9f\u884c\u3057\u307e\u305b\u3093\n\ \ -extension         : \u30d9\u30f3\u30c0\u30fc\u306e\u62e1\u5f35\u6a5f\u80fd\u3092\u8a31\u53ef\u3057\u307e\u3059 - JAXB\u4ed5\u69d8\u306e\u4e92\u63db\u6027\u30eb\u30fc\u30eb\u304a\u3088\u3073App E.2\u306b\u306f\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u53b3\u5bc6\u306b\u5f93\u3044\u307e\u305b\u3093\n\ \ -b <file/dir>      : \u5916\u90e8\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059(\u5404<file>\u306b\u72ec\u81ea\u306e-b\u304c\u5fc5\u8981\u3067\u3059)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001**/*.xjb\u304c\u691c\u7d22\u3055\u308c\u307e\u3059\n\ \ -d <dir>           : \u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u9077\u79fb\u3057\u307e\u3059\n\ \ -p <pkg>           : \u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ -httpproxy <proxy> : HTTP/HTTPS\u30d7\u30ed\u30ad\u30b7\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u5f62\u5f0f\u306f[user[:password]@]proxyHost:proxyPort\u3067\u3059\n\ \ -httpproxyfile <f> : -httpproxy\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4fdd\u8b77\u3059\u308b\u305f\u3081\u306b\u30d5\u30a1\u30a4\u30eb\u5185\u306e\u5f15\u6570\u3092\u53d6\u308a\u307e\u3059\n\ \ -classpath <arg>   : \u30e6\u30fc\u30b6\u30fc\u30fb\u30af\u30e9\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ -catalog <file>    : \u5916\u90e8\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u53c2\u7167\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u3001\u30ab\u30bf\u30ed\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TR9401\u3001XCatalog\u304a\u3088\u3073OASIS XML Catalog\u5f62\u5f0f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\n\ \ -readOnly          : \u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u8aad\u53d6\u308a\u5c02\u7528\u30e2\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059\n\ \ -npa               : \u30d1\u30c3\u30b1\u30fc\u30b8\u30fb\u30ec\u30d9\u30eb\u6ce8\u91c8(**/package-info.java)\u306e\u751f\u6210\u3092\u6291\u5236\u3057\u307e\u3059\n\ \ -no-header         : \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u4ed8\u304d\u306e\u30d5\u30a1\u30a4\u30eb\u30fb\u30d8\u30c3\u30c0\u30fc\u306e\u751f\u6210\u3092\u6291\u5236\u3057\u307e\u3059\n\ \ -target (2.0|2.1)  : XJC 2.0\u307e\u305f\u306f2.1\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3057\u30012.2\u306e\u6a5f\u80fd\u3092\u4f7f\u7528\u3057\u306a\u3044\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u3059\u3002\n\ \ -encoding <encoding> : \u751f\u6210\u3055\u308c\u305f\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ -enableIntrospection : Boolean getters/setters\u3092\u6b63\u3057\u304f\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3001Bean Introspection apis\u3092\u6709\u52b9\u306b\u3057\u307e\u3059 \n\ \ -contentForWildcard  : \u8907\u6570\u306exs:any\u5c0e\u51fa\u8981\u7d20\u3092\u6301\u3064\u30bf\u30a4\u30d7\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u30fb\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u751f\u6210\u3057\u307e\u3059\n\ \ -xmlschema         : \u5165\u529b\u3092W3C XML\u30b9\u30ad\u30fc\u30de\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u30c7\u30d5\u30a9\u30eb\u30c8)\n\ \ -relaxng           : \u5165\u529b\u3092RELAX NG\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -relaxng-compact   : \u5165\u529b\u3092RELAX NG\u306e\u7c21\u5358\u306a\u69cb\u6587\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -dtd               : \u5165\u529b\u3092XML DTD\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -wsdl              : \u5165\u529b\u3092WSDL\u3068\u3057\u3066\u51e6\u7406\u3057\u3001\u305d\u306e\u5185\u90e8\u306e\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -verbose           : \u5197\u9577\u306b\u306a\u308a\u307e\u3059\n\ \ -quiet             : \u30b3\u30f3\u30d1\u30a4\u30e9\u51fa\u529b\u3092\u975e\u8868\u793a\u306b\u3057\u307e\u3059\n\ \ -help              : \u3053\u306e\u30d8\u30eb\u30d7\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u307e\u3059\n\ \ -version           : \u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\n\ \ -fullversion       : \u30d5\u30eb\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\n
+Driver.Public.Usage = \u4f7f\u7528\u65b9\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+dir\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001dir\u5185\u306e\u3059\u3079\u3066\u306e\u30b9\u30ad\u30fc\u30de\u30fb\u30d5\u30a1\u30a4\u30eb\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u3059\u3002\n\
+jar\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001/META-INF/sun-jaxb.episode\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u3059\u3002\n\
+\u30aa\u30d7\u30b7\u30e7\u30f3:\n\
+\ \ -nv                : \u5165\u529b\u30b9\u30ad\u30fc\u30de\u306e\u53b3\u5bc6\u306a\u691c\u8a3c\u3092\u5b9f\u884c\u3057\u307e\u305b\u3093\n\
+\ \ -extension         : \u30d9\u30f3\u30c0\u30fc\u306e\u62e1\u5f35\u6a5f\u80fd\u3092\u8a31\u53ef\u3057\u307e\u3059 - JAXB\u4ed5\u69d8\u306e\u4e92\u63db\u6027\u30eb\u30fc\u30eb\u304a\u3088\u3073App E.2\u306b\u306f\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u53b3\u5bc6\u306b\u5f93\u3044\u307e\u305b\u3093\n\
+\ \ -b <file/dir>      : \u5916\u90e8\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059(\u5404<file>\u306b\u72ec\u81ea\u306e-b\u304c\u5fc5\u8981\u3067\u3059)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001**/*.xjb\u304c\u691c\u7d22\u3055\u308c\u307e\u3059\n\
+\ \ -d <dir>           : \u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u9077\u79fb\u3057\u307e\u3059\n\
+\ \ -p <pkg>           : \u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6307\u5b9a\u3057\u307e\u3059\n\
+\ \ -httpproxy <proxy> : HTTP/HTTPS\u30d7\u30ed\u30ad\u30b7\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u5f62\u5f0f\u306f[user[:password]@]proxyHost:proxyPort\u3067\u3059\n\
+\ \ -httpproxyfile <f> : -httpproxy\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4fdd\u8b77\u3059\u308b\u305f\u3081\u306b\u30d5\u30a1\u30a4\u30eb\u5185\u306e\u5f15\u6570\u3092\u53d6\u308a\u307e\u3059\n\
+\ \ -classpath <arg>   : \u30e6\u30fc\u30b6\u30fc\u30fb\u30af\u30e9\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u307e\u3059\n\
+\ \ -catalog <file>    : \u5916\u90e8\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u53c2\u7167\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u3001\u30ab\u30bf\u30ed\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TR9401\u3001XCatalog\u304a\u3088\u3073OASIS XML Catalog\u5f62\u5f0f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\n\
+\ \ -readOnly          : \u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u8aad\u53d6\u308a\u5c02\u7528\u30e2\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059\n\
+\ \ -npa               : \u30d1\u30c3\u30b1\u30fc\u30b8\u30fb\u30ec\u30d9\u30eb\u6ce8\u91c8(**/package-info.java)\u306e\u751f\u6210\u3092\u6291\u5236\u3057\u307e\u3059\n\
+\ \ -no-header         : \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u4ed8\u304d\u306e\u30d5\u30a1\u30a4\u30eb\u30fb\u30d8\u30c3\u30c0\u30fc\u306e\u751f\u6210\u3092\u6291\u5236\u3057\u307e\u3059\n\
+\ \ -target (2.0|2.1)  : XJC 2.0\u307e\u305f\u306f2.1\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3057\u30012.2\u306e\u6a5f\u80fd\u3092\u4f7f\u7528\u3057\u306a\u3044\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u3059\u3002\n\
+\ \ -encoding <encoding> : \u751f\u6210\u3055\u308c\u305f\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u6307\u5b9a\u3057\u307e\u3059\n\
+\ \ -enableIntrospection : Boolean getters/setters\u3092\u6b63\u3057\u304f\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3001Bean Introspection apis\u3092\u6709\u52b9\u306b\u3057\u307e\u3059 \n\
+\ \ -contentForWildcard  : \u8907\u6570\u306exs:any\u5c0e\u51fa\u8981\u7d20\u3092\u6301\u3064\u30bf\u30a4\u30d7\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u30fb\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u751f\u6210\u3057\u307e\u3059\n\
+\ \ -xmlschema         : \u5165\u529b\u3092W3C XML\u30b9\u30ad\u30fc\u30de\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u30c7\u30d5\u30a9\u30eb\u30c8)\n\
+\ \ -dtd               : \u5165\u529b\u3092XML DTD\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\
+\ \ -wsdl              : \u5165\u529b\u3092WSDL\u3068\u3057\u3066\u51e6\u7406\u3057\u3001\u305d\u306e\u5185\u90e8\u306e\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\
+\ \ -verbose           : \u5197\u9577\u306b\u306a\u308a\u307e\u3059\n\
+\ \ -quiet             : \u30b3\u30f3\u30d1\u30a4\u30e9\u51fa\u529b\u3092\u975e\u8868\u793a\u306b\u3057\u307e\u3059\n\
+\ \ -help              : \u3053\u306e\u30d8\u30eb\u30d7\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u307e\u3059\n\
+\ \ -version           : \u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\n\
+\ \ -fullversion       : \u30d5\u30eb\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\n\
+
 Driver.AddonUsage = \n\u62e1\u5f35:
 
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
 Driver.ExperimentalLanguageWarning = {0}\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u304b\u3002{0}\u306e\u30b5\u30dd\u30fc\u30c8\u306f\u8a66\u9a13\u7684\u3067\u3059\u3002{1}\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u6709\u52b9\u306b\u3067\u304d\u307e\u3059\u3002
 
 # Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -33,10 +33,41 @@
 ConsoleErrorReporter.UnknownFile = \uc54c \uc218 \uc5c6\ub294 \ud30c\uc77c
 
 Driver.Private.Usage = \ucd94\uac00 \uc804\uc6a9 \ud14c\uc2a4\ud2b8 \uc635\uc158:\n\ \ -debug             : \ub514\ubc84\uadf8 \ubaa8\ub4dc\ub85c \uc2e4\ud589\ud569\ub2c8\ub2e4(-verbose \ud3ec\ud568).\n\ \ -mode <mode>       : \uae30\ud0c0 \uc2e4\ud589 \ubaa8\ub4dc\ub85c XJC\ub97c \uc2e4\ud589\ud569\ub2c8\ub2e4.\n\ \ -private           : \uc774 \ub3c4\uc6c0\ub9d0 \uba54\uc2dc\uc9c0\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\ubaa8\ub4dc:\n\ \ code         : Java \uc18c\uc2a4 \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4(\uae30\ubcf8\uac12).\n\ \ dryrun       : \uba54\ubaa8\ub9ac\uc758 \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\ub418 Java \uc18c\uc2a4\ub97c \uc0dd\uc131\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ \ zip          : -d \uc635\uc158\uc73c\ub85c \uc9c0\uc815\ub41c zip \ud30c\uc77c\uc5d0 Java \uc18c\uc2a4 \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\ \ sig          : \uc0dd\uc131\ub41c \ucf54\ub4dc\uc758 \uc11c\uba85\uc744 \ub364\ud504\ud569\ub2c8\ub2e4.\n\ \ forest       : \ubcc0\ud658\ub41c DOM \uc601\uc5ed\uc744 \ub364\ud504\ud569\ub2c8\ub2e4.\n
-Driver.Public.Usage = \uc0ac\uc6a9\ubc95: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\ndir\uc774 \uc9c0\uc815\ub41c \uacbd\uc6b0 \ud3ec\ud568\ub41c \ubaa8\ub4e0 \uc2a4\ud0a4\ub9c8 \ud30c\uc77c\uc774 \ucef4\ud30c\uc77c\ub429\ub2c8\ub2e4.\njar\uc774 \uc9c0\uc815\ub41c \uacbd\uc6b0 /META-INF/sun-jaxb.episode \ubc14\uc778\ub529 \ud30c\uc77c\uc774 \ucef4\ud30c\uc77c\ub429\ub2c8\ub2e4.\n\uc635\uc158:\n\ \ -nv                : \uc785\ub825 \uc2a4\ud0a4\ub9c8\uc5d0 \ub300\ud574 \uc5c4\uaca9\ud55c \uac80\uc99d\uc744 \uc218\ud589\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ \ -extension         : \uacf5\uae09\uc5c5\uccb4 \ud655\uc7a5\uc744 \ud5c8\uc6a9\ud569\ub2c8\ub2e4.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ JAXB \uc0ac\uc591\uc758 \ud638\ud658\uc131 \uaddc\uce59 \ubc0f \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 E.2\ub97c \uc5c4\uaca9\ud558\uac8c \ub530\ub974\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ \ -b <file/dir>      : \uc678\ubd80 \ubc14\uc778\ub529 \ud30c\uc77c\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4. \uac01 <file>\uc5d0\ub294 \uace0\uc720\ud55c -b\uac00 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ub514\ub809\ud1a0\ub9ac\uac00 \uc81c\uacf5\ub41c \uacbd\uc6b0 **/*.xjb\uac00 \uac80\uc0c9\ub429\ub2c8\ub2e4.\n\ \ -d <dir>           : \uc0dd\uc131\ub41c \ud30c\uc77c\uc774 \uc774 \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc800\uc7a5\ub429\ub2c8\ub2e4.\n\ \ -p <pkg>           : \ub300\uc0c1 \ud328\ud0a4\uc9c0\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ -httpproxy <proxy> : HTTP/HTTPS \ud504\ub85d\uc2dc\ub97c \uc124\uc815\ud569\ub2c8\ub2e4. \ud615\uc2dd\uc740 [user[:password]@]proxyHost:proxyPort\uc785\ub2c8\ub2e4.\n\ \ -httpproxyfile <f> : -httpproxy\uc640 \ub3d9\uc77c\ud558\uac8c \uc791\ub3d9\ud558\uc9c0\ub9cc \ube44\ubc00\ubc88\ud638\ub97c \ubcf4\ud638\ud558\uae30 \uc704\ud574 \ud30c\uc77c\uc5d0 \uc778\uc218\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \n\ \ -classpath <arg>   : \uc0ac\uc6a9\uc790 \ud074\ub798\uc2a4 \ud30c\uc77c\uc744 \ucc3e\uc744 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ -catalog <file>    : \uc678\ubd80 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\ub97c \ubd84\uc11d\ud560 \uce74\ud0c8\ub85c\uadf8 \ud30c\uc77c\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TR9401, XCatalog \ubc0f OASIS XML \uce74\ud0c8\ub85c\uadf8 \ud615\uc2dd\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4.\n\ \ -readOnly          : \uc0dd\uc131\ub41c \ud30c\uc77c\uc774 \uc77d\uae30 \uc804\uc6a9 \ubaa8\ub4dc\ub85c \uc124\uc815\ub429\ub2c8\ub2e4.\n\ \ -npa               : \ud328\ud0a4\uc9c0 \ub808\ubca8 \uc8fc\uc11d(**/package-info.java)\uc774 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.\n\ \ -no-header         : \uc2dc\uac04 \uae30\ub85d\uc744 \ud3ec\ud568\ud558\ub294 \ud30c\uc77c \uba38\ub9ac\uae00\uc774 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.\n\ \ -target (2.0|2.1)  : XJC 2.0 \ub610\ub294 2.1\ucc98\ub7fc \uc791\ub3d9\ud558\uba70 2.2 \uae30\ub2a5\uc744 \uc0ac\uc6a9\ud558\uc9c0 \uc54a\ub294 \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\ \ -encoding <encoding> : \uc0dd\uc131\ub41c \uc18c\uc2a4 \ud30c\uc77c\uc5d0 \ub300\ud55c \ubb38\uc790 \uc778\ucf54\ub529\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ -enableIntrospection : \ubd80\uc6b8 getter/setter\uac00 \uc62c\ubc14\ub974\uac8c \uc0dd\uc131\ub418\ub3c4\ub85d \ud558\uc5ec Bean \uac80\uc0ac API\ub97c \uc0ac\uc6a9\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4. \n\ \ -contentForWildcard  : xs:any \ud30c\uc0dd \uc694\uc18c\uac00 \uc5ec\ub7ec \uac1c\uc778 \uc720\ud615\uc5d0 \ub300\ud574 \ucf58\ud150\uce20 \uc18d\uc131\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. \n\ \ -xmlschema         : \uc785\ub825\uac12\uc744 W3C XML \uc2a4\ud0a4\ub9c8\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uae30\ubcf8\uac12).\n\ \ -relaxng           : \uc785\ub825\uac12\uc744 RELAX NG\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -relaxng-compact   : \uc785\ub825\uac12\uc744 RELAX NG \uc555\ucd95 \uad6c\ubb38\uc73c\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -dtd               : \uc785\ub825\uac12\uc744 XML DTD\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -wsdl              : \uc785\ub825\uac12\uc744 WSDL\ub85c \ucc98\ub9ac\ud558\uace0 \ud3ec\ud568\ub41c \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -verbose           : \ucd94\uac00 \uc138\ubd80 \uc815\ubcf4 \ud45c\uc2dc \ubaa8\ub4dc\uc785\ub2c8\ub2e4.\n\ \ -quiet             : \ucef4\ud30c\uc77c\ub7ec \ucd9c\ub825\uc744 \ud45c\uc2dc\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ \ -help              : \uc774 \ub3c4\uc6c0\ub9d0 \uba54\uc2dc\uc9c0\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\ \ -version           : \ubc84\uc804 \uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\ \ -fullversion       : \uc815\uc2dd \ubc84\uc804 \uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n
+Driver.Public.Usage = \uc0ac\uc6a9\ubc95: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+dir\uc774 \uc9c0\uc815\ub41c \uacbd\uc6b0 \ud3ec\ud568\ub41c \ubaa8\ub4e0 \uc2a4\ud0a4\ub9c8 \ud30c\uc77c\uc774 \ucef4\ud30c\uc77c\ub429\ub2c8\ub2e4.\n\
+jar\uc774 \uc9c0\uc815\ub41c \uacbd\uc6b0 /META-INF/sun-jaxb.episode \ubc14\uc778\ub529 \ud30c\uc77c\uc774 \ucef4\ud30c\uc77c\ub429\ub2c8\ub2e4.\n\
+\uc635\uc158:\n\
+\ \ -nv                : \uc785\ub825 \uc2a4\ud0a4\ub9c8\uc5d0 \ub300\ud574 \uc5c4\uaca9\ud55c \uac80\uc99d\uc744 \uc218\ud589\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\
+\ \ -extension         : \uacf5\uae09\uc5c5\uccb4 \ud655\uc7a5\uc744 \ud5c8\uc6a9\ud569\ub2c8\ub2e4.\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ JAXB \uc0ac\uc591\uc758 \ud638\ud658\uc131 \uaddc\uce59 \ubc0f \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 E.2\ub97c \uc5c4\uaca9\ud558\uac8c \ub530\ub974\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\
+\ \ -b <file/dir>      : \uc678\ubd80 \ubc14\uc778\ub529 \ud30c\uc77c\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4. \uac01 <file>\uc5d0\ub294 \uace0\uc720\ud55c -b\uac00 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ub514\ub809\ud1a0\ub9ac\uac00 \uc81c\uacf5\ub41c \uacbd\uc6b0 **/*.xjb\uac00 \uac80\uc0c9\ub429\ub2c8\ub2e4.\n\
+\ \ -d <dir>           : \uc0dd\uc131\ub41c \ud30c\uc77c\uc774 \uc774 \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc800\uc7a5\ub429\ub2c8\ub2e4.\n\
+\ \ -p <pkg>           : \ub300\uc0c1 \ud328\ud0a4\uc9c0\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\
+\ \ -httpproxy <proxy> : HTTP/HTTPS \ud504\ub85d\uc2dc\ub97c \uc124\uc815\ud569\ub2c8\ub2e4. \ud615\uc2dd\uc740 [user[:password]@]proxyHost:proxyPort\uc785\ub2c8\ub2e4.\n\
+\ \ -httpproxyfile <f> : -httpproxy\uc640 \ub3d9\uc77c\ud558\uac8c \uc791\ub3d9\ud558\uc9c0\ub9cc \ube44\ubc00\ubc88\ud638\ub97c \ubcf4\ud638\ud558\uae30 \uc704\ud574 \ud30c\uc77c\uc5d0 \uc778\uc218\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \n\
+\ \ -classpath <arg>   : \uc0ac\uc6a9\uc790 \ud074\ub798\uc2a4 \ud30c\uc77c\uc744 \ucc3e\uc744 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\
+\ \ -catalog <file>    : \uc678\ubd80 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\ub97c \ubd84\uc11d\ud560 \uce74\ud0c8\ub85c\uadf8 \ud30c\uc77c\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TR9401, XCatalog \ubc0f OASIS XML \uce74\ud0c8\ub85c\uadf8 \ud615\uc2dd\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4.\n\
+\ \ -readOnly          : \uc0dd\uc131\ub41c \ud30c\uc77c\uc774 \uc77d\uae30 \uc804\uc6a9 \ubaa8\ub4dc\ub85c \uc124\uc815\ub429\ub2c8\ub2e4.\n\
+\ \ -npa               : \ud328\ud0a4\uc9c0 \ub808\ubca8 \uc8fc\uc11d(**/package-info.java)\uc774 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.\n\
+\ \ -no-header         : \uc2dc\uac04 \uae30\ub85d\uc744 \ud3ec\ud568\ud558\ub294 \ud30c\uc77c \uba38\ub9ac\uae00\uc774 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.\n\
+\ \ -target (2.0|2.1)  : XJC 2.0 \ub610\ub294 2.1\ucc98\ub7fc \uc791\ub3d9\ud558\uba70 2.2 \uae30\ub2a5\uc744 \uc0ac\uc6a9\ud558\uc9c0 \uc54a\ub294 \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\
+\ \ -encoding <encoding> : \uc0dd\uc131\ub41c \uc18c\uc2a4 \ud30c\uc77c\uc5d0 \ub300\ud55c \ubb38\uc790 \uc778\ucf54\ub529\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\
+\ \ -enableIntrospection : \ubd80\uc6b8 getter/setter\uac00 \uc62c\ubc14\ub974\uac8c \uc0dd\uc131\ub418\ub3c4\ub85d \ud558\uc5ec Bean \uac80\uc0ac API\ub97c \uc0ac\uc6a9\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4. \n\
+\ \ -contentForWildcard  : xs:any \ud30c\uc0dd \uc694\uc18c\uac00 \uc5ec\ub7ec \uac1c\uc778 \uc720\ud615\uc5d0 \ub300\ud574 \ucf58\ud150\uce20 \uc18d\uc131\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. \n\
+\ \ -xmlschema         : \uc785\ub825\uac12\uc744 W3C XML \uc2a4\ud0a4\ub9c8\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uae30\ubcf8\uac12).\n\
+\ \ -dtd               : \uc785\ub825\uac12\uc744 XML DTD\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\
+\ \ -wsdl              : \uc785\ub825\uac12\uc744 WSDL\ub85c \ucc98\ub9ac\ud558\uace0 \ud3ec\ud568\ub41c \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\
+\ \ -verbose           : \ucd94\uac00 \uc138\ubd80 \uc815\ubcf4 \ud45c\uc2dc \ubaa8\ub4dc\uc785\ub2c8\ub2e4.\n\
+\ \ -quiet             : \ucef4\ud30c\uc77c\ub7ec \ucd9c\ub825\uc744 \ud45c\uc2dc\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\
+\ \ -help              : \uc774 \ub3c4\uc6c0\ub9d0 \uba54\uc2dc\uc9c0\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\
+\ \ -version           : \ubc84\uc804 \uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\
+\ \ -fullversion       : \uc815\uc2dd \ubc84\uc804 \uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\
+
 Driver.AddonUsage = \n\ud655\uc7a5:
 
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
 Driver.ExperimentalLanguageWarning = {0} \ucef4\ud30c\uc77c\uc744 \uc2dc\ub3c4\ud558\uace0 \uc788\uc2b5\ub2c8\uae4c? {0}\uc5d0 \ub300\ud55c \uc9c0\uc6d0\uc740 \uc2e4\ud5d8 \ub2e8\uacc4\uc785\ub2c8\ub2e4. {1} \uc635\uc158\uc744 \ud1b5\ud574 \uc0ac\uc6a9\uc73c\ub85c \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.
 
 # Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -33,10 +33,41 @@
 ConsoleErrorReporter.UnknownFile = arquivo desconhecido
 
 Driver.Private.Usage = Op\u00e7\u00f5es adicionais de teste privado:\n\\ \\ -debug             :  executar no modo de depura\u00e7\u00e3o (inclui -verbose)\n\\ \\ -mode <mode>       :  executar XJC em outro modo de execu\u00e7\u00e3o\n\\ \\ -private           :  exibir esta mensagem de ajuda\nModo:\n\\ \\ code         :  gerar c\u00f3digo de origem Java (default)\n\\ \\ dryrun       :  compilar o esquema na mem\u00f3ria, mas n\u00e3o gerar a origem Java\n\\ \\ zip          :  gerar c\u00f3digo de origem Java em um arquivo zip especificado pela op\u00e7\u00e3o -d\n\\ \\ sig          :  fazer dump das assinaturas do c\u00f3digo gerado\n\\ \\ forest       :  fazer dump do DOM transformado\n
-Driver.Public.Usage = Uso: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\nSe dir for especificado, todos os arquivos do esquema dele ser\u00e3o compilados.\nSe jar for especificado, o arquivo de bind /META-INF/sun-jaxb.episode ser\u00e1 compilado.\nOp\u00e7\u00f5es:\n\\ \\ -nv                :  n\u00e3o executar valida\u00e7\u00e3o restrita do(s) esquema(s) de entrada\n\\ \\ -extension         :  permitir extens\u00f5es do fornecedor - n\u00e3o seguir rigorosamente as\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Regras de Compatibilidade e Ap\u00eandice E.2 da Espec. JAXB\n\\ \\ -b <file/dir>      :  especifica arquivos de bind externos (cada <file> deve ter seu pr\u00f3prio -b)\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Se for fornecido um diret\u00f3rio, **/*.xjb ser\u00e1 pesquisado\n\\ \\ -d <dir>           :  os arquivos gerados ficar\u00e3o neste diret\u00f3rio\n\\ \\ -p <pkg>           :  especifica o pacote do alvo\n\\ \\ -httpproxy <proxy> :  definir proxy HTTP/HTTPS. O formato \u00e9 [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile <f> :  Funciona como -httpproxy, mas usa o argumento em um arquivo para proteger a senha \n\\ \\ -classpath <arg>   :  especifica onde localizar os arquivos de classe do usu\u00e1rio\n\\ \\ -catalog <file>    :  especifica arquivos do cat\u00e1logo para resolver refer\u00eancias da entidade externa\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ suporta TR9401, formato de XCatalog e do Cat\u00e1logo XML do OASIS.\n\\ \\ -readOnly          :  os arquivos gerados ficar\u00e3o no modo somente leitura\n\\ \\ -npa               :  suprime a gera\u00e7\u00e3o de anota\u00e7\u00f5es do n\u00edvel do pacote (**/package-info.java)\n\\ \\ -no-header         :  suprime a gera\u00e7\u00e3o de um cabe\u00e7alho do arquivo com timestamp\n\\ \\ -target (2.0|2.1)  :  atua como XJC 2.0 ou 2.1 e gera c\u00f3digo que n\u00e3o usa nenhum recurso 2.2.\n\\ \\ -encoding <encoding> :  especifica codifica\u00e7\u00e3o de caracteres para arquivos de origem gerados\n\\ \\ -enableIntrospection :  ativa a gera\u00e7\u00e3o correta de getters/setters Boolianos para ativar apis de Introspec\u00e7\u00e3o de Bean \n\\ \\ -contentForWildcard  :  gera a propriedade do conte\u00fado dos tipos com v\u00e1rios xs:todos elementos derivados \n\\ \\ -xmlschema         :  trata a sa\u00edda como Esquema XML de W3C (default)\n\\ \\ -relaxng           :  trata a entrada como RELAX NG (experimental, n\u00e3o suportada)\n\\ \\ -relaxng-compact   :  trata a entrada como sintaxe compacta RELAX NG (experimental, n\u00e3o suportada)\n\\ \\ -dtd               :  trata a entrada como XML DTD (experimental,n\u00e3o suportada)\n\\ \\ -wsdl              :  trata a entrada como WSDL e compila esquemas dentro dela (experimental,n\u00e3o suportada)\n\\ \\ -verbose           :  verbose extra\n\\ \\ -quiet             :  suprime a sa\u00edda do compilador\n\\ \\ -help              :  exibe esta mensagem de ajuda\n\\ \\ -version           :  exibe informa\u00e7\u00f5es da vers\u00e3o\n\\ \\ -fullversion       :  exibe informa\u00e7\u00f5es da vers\u00e3o completa\n
+Driver.Public.Usage = Uso: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+Se dir for especificado, todos os arquivos do esquema dele ser\u00e3o compilados.\n\
+Se jar for especificado, o arquivo de bind /META-INF/sun-jaxb.episode ser\u00e1 compilado.\n\
+Op\u00e7\u00f5es:\n\
+\ \ -nv                :  n\u00e3o executar valida\u00e7\u00e3o restrita do(s) esquema(s) de entrada\n\
+\ \ -extension         :  permitir extens\u00f5es do fornecedor - n\u00e3o seguir rigorosamente as\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Regras de Compatibilidade e Ap\u00eandice E.2 da Espec. JAXB\n\
+\ \ -b <file/dir>      :  especifica arquivos de bind externos (cada <file> deve ter seu pr\u00f3prio -b)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Se for fornecido um diret\u00f3rio, **/*.xjb ser\u00e1 pesquisado\n\
+\ \ -d <dir>           :  os arquivos gerados ficar\u00e3o neste diret\u00f3rio\n\
+\ \ -p <pkg>           :  especifica o pacote do alvo\n\
+\ \ -httpproxy <proxy> :  definir proxy HTTP/HTTPS. O formato \u00e9 [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> :  Funciona como -httpproxy, mas usa o argumento em um arquivo para proteger a senha \n\
+\ \ -classpath <arg>   :  especifica onde localizar os arquivos de classe do usu\u00e1rio\n\
+\ \ -catalog <file>    :  especifica arquivos do cat\u00e1logo para resolver refer\u00eancias da entidade externa\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ suporta TR9401, formato de XCatalog e do Cat\u00e1logo XML do OASIS.\n\
+\ \ -readOnly          :  os arquivos gerados ficar\u00e3o no modo somente leitura\n\
+\ \ -npa               :  suprime a gera\u00e7\u00e3o de anota\u00e7\u00f5es do n\u00edvel do pacote (**/package-info.java)\n\
+\ \ -no-header         :  suprime a gera\u00e7\u00e3o de um cabe\u00e7alho do arquivo com timestamp\n\
+\ \ -target (2.0|2.1)  :  atua como XJC 2.0 ou 2.1 e gera c\u00f3digo que n\u00e3o usa nenhum recurso 2.2.\n\
+\ \ -encoding <encoding> :  especifica codifica\u00e7\u00e3o de caracteres para arquivos de origem gerados\n\
+\ \ -enableIntrospection :  ativa a gera\u00e7\u00e3o correta de getters/setters Boolianos para ativar apis de Introspec\u00e7\u00e3o de Bean \n\
+\ \ -contentForWildcard  :  gera a propriedade do conte\u00fado dos tipos com v\u00e1rios xs:todos elementos derivados \n\
+\ \ -xmlschema         :  trata a sa\u00edda como Esquema XML de W3C (default)\n\
+\ \ -dtd               :  trata a entrada como XML DTD (experimental,n\u00e3o suportada)\n\
+\ \ -wsdl              :  trata a entrada como WSDL e compila esquemas dentro dela (experimental,n\u00e3o suportada)\n\
+\ \ -verbose           :  verbose extra\n\
+\ \ -quiet             :  suprime a sa\u00edda do compilador\n\
+\ \ -help              :  exibe esta mensagem de ajuda\n\
+\ \ -version           :  exibe informa\u00e7\u00f5es da vers\u00e3o\n\
+\ \ -fullversion       :  exibe informa\u00e7\u00f5es da vers\u00e3o completa\n\
+
 Driver.AddonUsage = \nExtens\u00f5es:
 
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
 Driver.ExperimentalLanguageWarning = Voc\u00ea est\u00e1 tentando compilar {0}? O suporte para {0} \u00e9 experimental. Voc\u00ea pode ativ\u00e1-lo usando a op\u00e7\u00e3o {1}.
 
 # Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -36,7 +36,42 @@
 Driver.Public.Usage = \u7528\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\u5982\u679c\u6307\u5b9a dir, \u5c06\u7f16\u8bd1\u8be5\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6a21\u5f0f\u6587\u4ef6\u3002\n\u5982\u679c\u6307\u5b9a jar, \u5c06\u7f16\u8bd1 /META-INF/sun-jaxb.episode \u7ed1\u5b9a\u6587\u4ef6\u3002\n\u9009\u9879:\n\ \ -nv                :  \u4e0d\u5bf9\u8f93\u5165\u6a21\u5f0f\u6267\u884c\u4e25\u683c\u9a8c\u8bc1\n\ \ -extension         :  \u5141\u8bb8\u4f9b\u5e94\u5546\u6269\u5c55 - \u4e0d\u4e25\u683c\u9075\u5faa\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ JAXB \u89c4\u8303\u4e2d\u7684\u517c\u5bb9\u6027\u89c4\u5219\u548c\u5e94\u7528\u7a0b\u5e8f E.2\n\ \ -b <file/dir>      :  \u6307\u5b9a\u5916\u90e8\u7ed1\u5b9a\u6587\u4ef6 (\u6bcf\u4e2a <file> \u5fc5\u987b\u5177\u6709\u81ea\u5df1\u7684 -b)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u5982\u679c\u6307\u5b9a\u76ee\u5f55, \u5219\u5c06\u641c\u7d22 **/*.xjb\n\ \ -d <dir>           :  \u751f\u6210\u7684\u6587\u4ef6\u5c06\u653e\u5165\u6b64\u76ee\u5f55\u4e2d\n\ \ -p <pkg>           :  \u6307\u5b9a\u76ee\u6807\u7a0b\u5e8f\u5305\n\ \ -httpproxy <proxy> :  \u8bbe\u7f6e HTTP/HTTPS \u4ee3\u7406\u3002\u683c\u5f0f\u4e3a [user[:password]@]proxyHost:proxyPort\n\ \ -httpproxyfile <f> :  \u4f5c\u7528\u4e0e -httpproxy \u7c7b\u4f3c, \u4f46\u5728\u6587\u4ef6\u4e2d\u91c7\u7528\u53c2\u6570\u6765\u4fdd\u62a4\u53e3\u4ee4\n\ \ -classpath <arg>   :  \u6307\u5b9a\u67e5\u627e\u7528\u6237\u7c7b\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ \ -catalog <file>    :  \u6307\u5b9a\u7528\u4e8e\u89e3\u6790\u5916\u90e8\u5b9e\u4f53\u5f15\u7528\u7684\u76ee\u5f55\u6587\u4ef6\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u652f\u6301 TR9401, XCatalog \u548c OASIS XML \u76ee\u5f55\u683c\u5f0f\u3002\n\ \ -readOnly          :  \u751f\u6210\u7684\u6587\u4ef6\u5c06\u5904\u4e8e\u53ea\u8bfb\u6a21\u5f0f\n\ \ -npa               :  \u7981\u6b62\u751f\u6210\u7a0b\u5e8f\u5305\u7ea7\u522b\u6ce8\u91ca (**/package-info.java)\n\ \ -no-header         :  \u7981\u6b62\u751f\u6210\u5e26\u6709\u65f6\u95f4\u6233\u7684\u6587\u4ef6\u5934\n\ \ -target (2.0|2.1)  :  \u884c\u4e3a\u4e0e XJC 2.0 \u6216 2.1 \u7c7b\u4f3c, \u7528\u4e8e\u751f\u6210\u4e0d\u4f7f\u7528\u4efb\u4f55 2.2 \u529f\u80fd\u7684\u4ee3\u7801\u3002\n\ \ -encoding <encoding> :  \u4e3a\u751f\u6210\u7684\u6e90\u6587\u4ef6\u6307\u5b9a\u5b57\u7b26\u7f16\u7801\n\ \ -enableIntrospection :  \u7528\u4e8e\u6b63\u786e\u751f\u6210\u5e03\u5c14\u578b getter/setter \u4ee5\u542f\u7528 Bean \u81ea\u6d4b apis \n\ \ -contentForWildcard  :  \u4e3a\u5177\u6709\u591a\u4e2a xs:any \u6d3e\u751f\u5143\u7d20\u7684\u7c7b\u578b\u751f\u6210\u5185\u5bb9\u5c5e\u6027\n\ \ -xmlschema         :  \u91c7\u7528 W3C XML \u6a21\u5f0f\u5904\u7406\u8f93\u5165 (\u9ed8\u8ba4\u503c)\n\ \ -relaxng           :  \u91c7\u7528 RELAX NG \u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -relaxng-compact   :  \u91c7\u7528 RELAX NG \u7b80\u6d01\u8bed\u6cd5\u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -dtd               :  \u91c7\u7528 XML DTD \u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -wsdl              :  \u91c7\u7528 WSDL \u5904\u7406\u8f93\u5165\u5e76\u7f16\u8bd1\u5176\u4e2d\u7684\u6a21\u5f0f (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -verbose           :  \u7279\u522b\u8be6\u7ec6\n\ \ -quiet             :  \u9690\u85cf\u7f16\u8bd1\u5668\u8f93\u51fa\n\ \ -help              :  \u663e\u793a\u6b64\u5e2e\u52a9\u6d88\u606f\n\ \ -version           :  \u663e\u793a\u7248\u672c\u4fe1\u606f\n\ \ -fullversion       :  \u663e\u793a\u5b8c\u6574\u7684\u7248\u672c\u4fe1\u606f\n
 Driver.AddonUsage = \n\u6269\u5c55:
 
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+Driver.Public.Usage = \u7528\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+\u5982\u679c\u6307\u5b9a dir, \u5c06\u7f16\u8bd1\u8be5\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6a21\u5f0f\u6587\u4ef6\u3002\n\
+\u5982\u679c\u6307\u5b9a jar, \u5c06\u7f16\u8bd1 /META-INF/sun-jaxb.episode \u7ed1\u5b9a\u6587\u4ef6\u3002\n\
+\u9009\u9879:\n\
+\ \ -nv                :  \u4e0d\u5bf9\u8f93\u5165\u6a21\u5f0f\u6267\u884c\u4e25\u683c\u9a8c\u8bc1\n\
+\ \ -extension         :  \u5141\u8bb8\u4f9b\u5e94\u5546\u6269\u5c55 - \u4e0d\u4e25\u683c\u9075\u5faa\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ JAXB \u89c4\u8303\u4e2d\u7684\u517c\u5bb9\u6027\u89c4\u5219\u548c\u5e94\u7528\u7a0b\u5e8f E.2\n\
+\ \ -b <file/dir>      :  \u6307\u5b9a\u5916\u90e8\u7ed1\u5b9a\u6587\u4ef6 (\u6bcf\u4e2a <file> \u5fc5\u987b\u5177\u6709\u81ea\u5df1\u7684 -b)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u5982\u679c\u6307\u5b9a\u76ee\u5f55, \u5219\u5c06\u641c\u7d22 **/*.xjb\n\
+\ \ -d <dir>           :  \u751f\u6210\u7684\u6587\u4ef6\u5c06\u653e\u5165\u6b64\u76ee\u5f55\u4e2d\n\
+\ \ -p <pkg>           :  \u6307\u5b9a\u76ee\u6807\u7a0b\u5e8f\u5305\n\
+\ \ -httpproxy <proxy> :  \u8bbe\u7f6e HTTP/HTTPS \u4ee3\u7406\u3002\u683c\u5f0f\u4e3a [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> :  \u4f5c\u7528\u4e0e -httpproxy \u7c7b\u4f3c, \u4f46\u5728\u6587\u4ef6\u4e2d\u91c7\u7528\u53c2\u6570\u6765\u4fdd\u62a4\u53e3\u4ee4\n\
+\ \ -classpath <arg>   :  \u6307\u5b9a\u67e5\u627e\u7528\u6237\u7c7b\u6587\u4ef6\u7684\u4f4d\u7f6e\n\
+\ \ -catalog <file>    :  \u6307\u5b9a\u7528\u4e8e\u89e3\u6790\u5916\u90e8\u5b9e\u4f53\u5f15\u7528\u7684\u76ee\u5f55\u6587\u4ef6\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u652f\u6301 TR9401, XCatalog \u548c OASIS XML \u76ee\u5f55\u683c\u5f0f\u3002\n\
+\ \ -readOnly          :  \u751f\u6210\u7684\u6587\u4ef6\u5c06\u5904\u4e8e\u53ea\u8bfb\u6a21\u5f0f\n\
+\ \ -npa               :  \u7981\u6b62\u751f\u6210\u7a0b\u5e8f\u5305\u7ea7\u522b\u6ce8\u91ca (**/package-info.java)\n\
+\ \ -no-header         :  \u7981\u6b62\u751f\u6210\u5e26\u6709\u65f6\u95f4\u6233\u7684\u6587\u4ef6\u5934\n\
+\ \ -target (2.0|2.1)  :  \u884c\u4e3a\u4e0e XJC 2.0 \u6216 2.1 \u7c7b\u4f3c, \u7528\u4e8e\u751f\u6210\u4e0d\u4f7f\u7528\u4efb\u4f55 2.2 \u529f\u80fd\u7684\u4ee3\u7801\u3002\n\
+\ \ -encoding <encoding> :  \u4e3a\u751f\u6210\u7684\u6e90\u6587\u4ef6\u6307\u5b9a\u5b57\u7b26\u7f16\u7801\n\
+\ \ -enableIntrospection :  \u7528\u4e8e\u6b63\u786e\u751f\u6210\u5e03\u5c14\u578b getter/setter \u4ee5\u542f\u7528 Bean \u81ea\u6d4b apis \n\
+\ \ -contentForWildcard  :  \u4e3a\u5177\u6709\u591a\u4e2a xs:any \u6d3e\u751f\u5143\u7d20\u7684\u7c7b\u578b\u751f\u6210\u5185\u5bb9\u5c5e\u6027\n\
+\ \ -xmlschema         :  \u91c7\u7528 W3C XML \u6a21\u5f0f\u5904\u7406\u8f93\u5165 (\u9ed8\u8ba4\u503c)\n\
+\ \ -dtd               :  \u91c7\u7528 XML DTD \u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\
+\ \ -wsdl              :  \u91c7\u7528 WSDL \u5904\u7406\u8f93\u5165\u5e76\u7f16\u8bd1\u5176\u4e2d\u7684\u6a21\u5f0f (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\
+\ \ -verbose           :  \u7279\u522b\u8be6\u7ec6\n\
+\ \ -quiet             :  \u9690\u85cf\u7f16\u8bd1\u5668\u8f93\u51fa\n\
+\ \ -help              :  \u663e\u793a\u6b64\u5e2e\u52a9\u6d88\u606f\n\
+\ \ -version           :  \u663e\u793a\u7248\u672c\u4fe1\u606f\n\
+\ \ -fullversion       :  \u663e\u793a\u5b8c\u6574\u7684\u7248\u672c\u4fe1\u606f\n\
+
+Driver.AddonUsage = \n\
+\u6269\u5c55:
+
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
 Driver.ExperimentalLanguageWarning = \u662f\u5426\u8981\u5c1d\u8bd5\u7f16\u8bd1{0}? \u5bf9{0}\u7684\u652f\u6301\u662f\u5b9e\u9a8c\u6027\u7684\u3002\u53ef\u901a\u8fc7\u4f7f\u7528{1}\u9009\u9879\u542f\u7528\u5b83\u3002
 
 # Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -33,10 +33,41 @@
 ConsoleErrorReporter.UnknownFile = \u4e0d\u660e\u7684\u6a94\u6848
 
 Driver.Private.Usage = \u5176\u4ed6\u5c08\u7528\u6e2c\u8a66\u9078\u9805:\n\\ \\ -debug             :  \u5728\u9664\u932f\u6a21\u5f0f\u4e2d\u57f7\u884c (\u5305\u542b -verbose)\n\\ \\ -mode <mode>       :  \u5728\u5176\u4ed6\u57f7\u884c\u4e2d\u6a21\u5f0f\u4e0b\u57f7\u884c XJC\n\\ \\ -private           :  \u986f\u793a\u6b64\u8aaa\u660e\u8a0a\u606f\n\u6a21\u5f0f:\n\\ \\ code         :  \u7522\u751f Java \u4f86\u6e90\u7a0b\u5f0f\u78bc (\u9810\u8a2d\u503c)\n\\ \\ dryrun       :  \u5728\u8a18\u61b6\u9ad4\u4e2d\u7de8\u8b6f\u7db1\u8981, \u4f46\u4e0d\u7522\u751f Java \u4f86\u6e90\n\\ \\ zip          :  \u5c07 Java \u4f86\u6e90\u7a0b\u5f0f\u78bc\u8f49\u63db\u70ba -d \u9078\u9805\u6307\u5b9a\u7684 zip \u6a94\u6848\n\\ \\ sig          :  \u50be\u5370\u7522\u751f\u4e4b\u7a0b\u5f0f\u78bc\u7684\u7c3d\u7ae0\n\\ \\ forest       :  \u50be\u5370\u8f49\u63db\u7684 DOM \u6a39\u7cfb\n
-Driver.Public.Usage = \u7528\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\u82e5\u6307\u5b9a dir, \u5c07\u7de8\u8b6f\u5176\u4e2d\u7684\u6240\u6709\u7db1\u8981\u6a94\u6848.\n\u82e5\u6307\u5b9a jar, \u5c07\u7de8\u8b6f /META-INF/sun-jaxb.episode \u9023\u7d50\u6a94.\n\u9078\u9805:\n\\ \\ -nv                :  \u4e0d\u57f7\u884c\u56b4\u683c\u7684\u8f38\u5165\u7db1\u8981\u9a57\u8b49\n\\ \\ -extension         :  \u5141\u8a31\u5ee0\u5546\u64f4\u5145\u5957\u4ef6 - \u4e0d\u56b4\u683c\u9075\u5faa\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ JAXB \u898f\u683c\u4e2d\u7684\u76f8\u5bb9\u6027\u898f\u5247\u8207 App E.2\n\\ \\ -b <file/dir>      :  \u6307\u5b9a\u5916\u90e8\u9023\u7d50\u6a94 (\u6bcf\u500b <file> \u9700\u6709\u81ea\u5df1\u7684 -b)\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \u82e5\u6307\u5b9a\u76ee\u9304, \u5247\u6703\u641c\u5c0b **/*.xjb\n\\ \\ -d <dir>           :  \u7522\u751f\u7684\u6a94\u6848\u5c07\u79fb\u81f3\u6b64\u76ee\u9304\n\\ \\ -p <pkg>           :  \u6307\u5b9a\u76ee\u6a19\u5957\u88dd\u7a0b\u5f0f\n\\ \\ -httpproxy <proxy> :  \u8a2d\u5b9a HTTP/HTTPS \u4ee3\u7406\u4e3b\u6a5f. \u683c\u5f0f\u70ba [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile <f> :  \u4f5c\u7528\u5982\u540c -httpproxy, \u4f46\u63a5\u53d7\u6a94\u6848\u4e2d\u7684\u5f15\u6578\u4ee5\u4fdd\u8b77\u5bc6\u78bc \n\\ \\ -classpath <arg>   :  \u6307\u5b9a\u5c0b\u627e\u4f7f\u7528\u8005\u985e\u5225\u6a94\u6848\u7684\u4f4d\u7f6e\n\\ \\ -catalog <file>    :  \u6307\u5b9a\u89e3\u6790\u5916\u90e8\u5be6\u9ad4\u53c3\u7167\u7684\u76ee\u9304\u6a94\u6848\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \u652f\u63f4 TR9401\u3001XCatalog \u4ee5\u53ca OASIS XML \u76ee\u9304\u683c\u5f0f.\n\\ \\ -readOnly          :  \u7522\u751f\u7684\u6a94\u6848\u5c07\u662f\u552f\u8b80\u6a21\u5f0f\n\\ \\ -npa               :  \u6291\u5236\u5957\u88dd\u7a0b\u5f0f\u5c64\u6b21\u8a3b\u89e3 (**/package-info.java) \u7684\u7522\u751f\n\\ \\ -no-header         :  \u6291\u5236\u6a94\u6848\u6a19\u982d\u548c\u6642\u6233\u7684\u7522\u751f\n\\ \\ -target (2.0|2.1)  :  \u4f5c\u7528\u5982\u540c XJC 2.0 \u6216 2.1, \u4e26\u4e14\u6703\u7522\u751f\u4e0d\u4f7f\u7528\u4efb\u4f55 2.2 \u529f\u80fd\u7684\u7a0b\u5f0f\u78bc.\n\\ \\ -encoding <encoding> :  \u70ba\u7522\u751f\u7684\u4f86\u6e90\u6a94\u6848\u6307\u5b9a\u5b57\u5143\u7de8\u78bc\n\\ \\ -enableIntrospection :  \u6b63\u78ba\u7522\u751f\u5e03\u6797\u503c getter/setter \u4ee5\u555f\u7528 Bean \u81ea\u6211\u6aa2\u67e5 api \n\\ \\ -contentForWildcard  :  \u70ba\u542b\u6709\u591a\u500b xs:any \u884d\u751f\u4e4b\u5143\u7d20\u7684\u985e\u578b\u7522\u751f\u5167\u5bb9\u7279\u6027 \n\\ \\ -xmlschema         :  \u5c07\u8f38\u5165\u8996\u70ba W3C XML \u7db1\u8981 (\u9810\u8a2d\u503c)\n\\ \\ -relaxng           :  \u5c07\u8f38\u5165\u8996\u70ba RELAX NG (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\\ \\ -relaxng-compact   :  \u5c07\u8f38\u5165\u8996\u70ba RELAX NG \u7cbe\u7c21\u8a9e\u6cd5 (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u4e0d\u652f\u63f4)\n\\ \\ -dtd               :  \u5c07\u8f38\u5165\u8996\u70ba XML DTD (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\\ \\ -wsdl              :  \u5c07\u8f38\u5165\u8996\u70ba WSDL, \u4e26\u7de8\u8b6f\u5176\u4e2d\u7684\u7db1\u8981 (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\\ \\ -verbose           :  \u63d0\u4f9b\u984d\u5916\u7684\u8a73\u7d30\u8cc7\u8a0a\n\\ \\ -quiet             :  \u6291\u5236\u7de8\u8b6f\u5668\u8f38\u51fa\n\\ \\ -help              :  \u986f\u793a\u6b64\u8aaa\u660e\u8a0a\u606f\n\\ \\ -version           :  \u986f\u793a\u7248\u672c\u8cc7\u8a0a\n\\ \\ -fullversion       :  \u986f\u793a\u5b8c\u6574\u7248\u672c\u8cc7\u8a0a\n
+Driver.Public.Usage = \u7528\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+\u82e5\u6307\u5b9a dir, \u5c07\u7de8\u8b6f\u5176\u4e2d\u7684\u6240\u6709\u7db1\u8981\u6a94\u6848.\n\
+\u82e5\u6307\u5b9a jar, \u5c07\u7de8\u8b6f /META-INF/sun-jaxb.episode \u9023\u7d50\u6a94.\n\
+\u9078\u9805:\n\
+\ \ -nv                :  \u4e0d\u57f7\u884c\u56b4\u683c\u7684\u8f38\u5165\u7db1\u8981\u9a57\u8b49\n\
+\ \ -extension         :  \u5141\u8a31\u5ee0\u5546\u64f4\u5145\u5957\u4ef6 - \u4e0d\u56b4\u683c\u9075\u5faa\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ JAXB \u898f\u683c\u4e2d\u7684\u76f8\u5bb9\u6027\u898f\u5247\u8207 App E.2\n\
+\ \ -b <file/dir>      :  \u6307\u5b9a\u5916\u90e8\u9023\u7d50\u6a94 (\u6bcf\u500b <file> \u9700\u6709\u81ea\u5df1\u7684 -b)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u82e5\u6307\u5b9a\u76ee\u9304, \u5247\u6703\u641c\u5c0b **/*.xjb\n\
+\ \ -d <dir>           :  \u7522\u751f\u7684\u6a94\u6848\u5c07\u79fb\u81f3\u6b64\u76ee\u9304\n\
+\ \ -p <pkg>           :  \u6307\u5b9a\u76ee\u6a19\u5957\u88dd\u7a0b\u5f0f\n\
+\ \ -httpproxy <proxy> :  \u8a2d\u5b9a HTTP/HTTPS \u4ee3\u7406\u4e3b\u6a5f. \u683c\u5f0f\u70ba [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> :  \u4f5c\u7528\u5982\u540c -httpproxy, \u4f46\u63a5\u53d7\u6a94\u6848\u4e2d\u7684\u5f15\u6578\u4ee5\u4fdd\u8b77\u5bc6\u78bc \n\
+\ \ -classpath <arg>   :  \u6307\u5b9a\u5c0b\u627e\u4f7f\u7528\u8005\u985e\u5225\u6a94\u6848\u7684\u4f4d\u7f6e\n\
+\ \ -catalog <file>    :  \u6307\u5b9a\u89e3\u6790\u5916\u90e8\u5be6\u9ad4\u53c3\u7167\u7684\u76ee\u9304\u6a94\u6848\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u652f\u63f4 TR9401\u3001XCatalog \u4ee5\u53ca OASIS XML \u76ee\u9304\u683c\u5f0f.\n\
+\ \ -readOnly          :  \u7522\u751f\u7684\u6a94\u6848\u5c07\u662f\u552f\u8b80\u6a21\u5f0f\n\
+\ \ -npa               :  \u6291\u5236\u5957\u88dd\u7a0b\u5f0f\u5c64\u6b21\u8a3b\u89e3 (**/package-info.java) \u7684\u7522\u751f\n\
+\ \ -no-header         :  \u6291\u5236\u6a94\u6848\u6a19\u982d\u548c\u6642\u6233\u7684\u7522\u751f\n\
+\ \ -target (2.0|2.1)  :  \u4f5c\u7528\u5982\u540c XJC 2.0 \u6216 2.1, \u4e26\u4e14\u6703\u7522\u751f\u4e0d\u4f7f\u7528\u4efb\u4f55 2.2 \u529f\u80fd\u7684\u7a0b\u5f0f\u78bc.\n\
+\ \ -encoding <encoding> :  \u70ba\u7522\u751f\u7684\u4f86\u6e90\u6a94\u6848\u6307\u5b9a\u5b57\u5143\u7de8\u78bc\n\
+\ \ -enableIntrospection :  \u6b63\u78ba\u7522\u751f\u5e03\u6797\u503c getter/setter \u4ee5\u555f\u7528 Bean \u81ea\u6211\u6aa2\u67e5 api \n\
+\ \ -contentForWildcard  :  \u70ba\u542b\u6709\u591a\u500b xs:any \u884d\u751f\u4e4b\u5143\u7d20\u7684\u985e\u578b\u7522\u751f\u5167\u5bb9\u7279\u6027 \n\
+\ \ -xmlschema         :  \u5c07\u8f38\u5165\u8996\u70ba W3C XML \u7db1\u8981 (\u9810\u8a2d\u503c)\n\
+\ \ -dtd               :  \u5c07\u8f38\u5165\u8996\u70ba XML DTD (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\
+\ \ -wsdl              :  \u5c07\u8f38\u5165\u8996\u70ba WSDL, \u4e26\u7de8\u8b6f\u5176\u4e2d\u7684\u7db1\u8981 (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\
+\ \ -verbose           :  \u63d0\u4f9b\u984d\u5916\u7684\u8a73\u7d30\u8cc7\u8a0a\n\
+\ \ -quiet             :  \u6291\u5236\u7de8\u8b6f\u5668\u8f38\u51fa\n\
+\ \ -help              :  \u986f\u793a\u6b64\u8aaa\u660e\u8a0a\u606f\n\
+\ \ -version           :  \u986f\u793a\u7248\u672c\u8cc7\u8a0a\n\
+\ \ -fullversion       :  \u986f\u793a\u5b8c\u6574\u7248\u672c\u8cc7\u8a0a\n\
+
 Driver.AddonUsage = \n\u64f4\u5145\u5957\u4ef6:
 
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
 Driver.ExperimentalLanguageWarning = \u60a8\u6b63\u5728\u5617\u8a66\u7de8\u8b6f {0} \u55ce? \u5c0d {0} \u7684\u652f\u63f4\u662f\u5be6\u9a57\u6027\u7684. \u60a8\u53ef\u4f7f\u7528 {1} \u9078\u9805\u4f86\u555f\u7528.
 
 # Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/ModelLoader.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/ModelLoader.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,8 +38,6 @@
 import com.sun.tools.internal.xjc.reader.internalizer.InternalizationLogic;
 import com.sun.tools.internal.xjc.reader.internalizer.SCDBasedBindingSet;
 import com.sun.tools.internal.xjc.reader.internalizer.VersionChecker;
-import com.sun.tools.internal.xjc.reader.relaxng.RELAXNGCompiler;
-import com.sun.tools.internal.xjc.reader.relaxng.RELAXNGInternalizationLogic;
 import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
 import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl;
 import com.sun.tools.internal.xjc.reader.xmlschema.parser.CustomizationContextChecker;
@@ -54,15 +52,6 @@
 import com.sun.xml.internal.xsom.parser.XSOMParser;
 import javax.xml.XMLConstants;
 
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.util.CheckingSchemaBuilder;
-import com.sun.xml.internal.rngom.digested.DPattern;
-import com.sun.xml.internal.rngom.digested.DSchemaBuilderImpl;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import com.sun.xml.internal.rngom.parse.compact.CompactParseable;
-import com.sun.xml.internal.rngom.parse.xml.SAXParseable;
-import com.sun.xml.internal.rngom.xml.sax.XMLReaderCreator;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
@@ -73,8 +62,6 @@
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLFilter;
-import org.xml.sax.XMLReader;
 import org.xml.sax.helpers.XMLFilterImpl;
 
 /**
@@ -141,16 +128,6 @@
                 grammar = loadDTD(opt.getGrammars()[0], bindFile );
                 break;
 
-            case RELAXNG :
-                checkTooManySchemaErrors();
-                grammar = loadRELAXNG();
-                break;
-
-            case RELAXNG_COMPACT :
-                checkTooManySchemaErrors();
-                grammar = loadRELAXNGCompact();
-                break;
-
             case WSDL:
                 grammar = annotateXMLSchema( loadWSDL() );
                 break;
@@ -206,12 +183,6 @@
             case DTD:
                 msg = new String[]{"DTD","-dtd"};
                 break;
-            case RELAXNG:
-                msg = new String[]{"RELAX NG","-relaxng"};
-                break;
-            case RELAXNG_COMPACT:
-                msg = new String[]{"RELAX NG compact syntax","-relaxng-compact"};
-                break;
             case WSDL:
                 msg = new String[]{"WSDL","-wsdl"};
                 break;
@@ -528,71 +499,4 @@
         return result;
     }
 
-    /**
-     * Parses a RELAX NG grammar into an annotated grammar.
-     */
-    private Model loadRELAXNG() throws SAXException {
-
-        // build DOM forest
-        final DOMForest forest = buildDOMForest( new RELAXNGInternalizationLogic() );
-
-        // use JAXP masquerading to validate the input document.
-        // DOMForest -> ExtensionBindingChecker -> RNGOM
-
-        XMLReaderCreator xrc = new XMLReaderCreator() {
-            public XMLReader createXMLReader() {
-
-                // foreset parser cannot change the receivers while it's working,
-                // so we need to have one XMLFilter that works as a buffer
-                XMLFilter buffer = new XMLFilterImpl() {
-                    @Override
-                    public void parse(InputSource source) throws IOException, SAXException {
-                        forest.createParser().parse( source, this, this, this );
-                    }
-                };
-
-                XMLFilter f = new ExtensionBindingChecker(Const.RELAXNG_URI,opt,errorReceiver);
-                f.setParent(buffer);
-
-                f.setEntityResolver(opt.entityResolver);
-
-                return f;
-            }
-        };
-
-        Parseable p = new SAXParseable( opt.getGrammars()[0], errorReceiver, xrc );
-
-        return loadRELAXNG(p);
-
-    }
-
-    /**
-     * Loads RELAX NG compact syntax
-     */
-    private Model loadRELAXNGCompact() {
-        if(opt.getBindFiles().length>0)
-            errorReceiver.error(new SAXParseException(
-                Messages.format(Messages.ERR_BINDING_FILE_NOT_SUPPORTED_FOR_RNC),null));
-
-        // TODO: entity resolver?
-        Parseable p = new CompactParseable( opt.getGrammars()[0], errorReceiver );
-
-        return loadRELAXNG(p);
-
-    }
-
-    /**
-     * Common part between the XML syntax and the compact syntax.
-     */
-    private Model loadRELAXNG(Parseable p) {
-        SchemaBuilder sb = new CheckingSchemaBuilder(new DSchemaBuilderImpl(),errorReceiver);
-
-        try {
-            DPattern out = (DPattern)p.parse(sb);
-            return RELAXNGCompiler.build(out,codeModel,opt);
-        } catch (IllegalSchemaException e) {
-            errorReceiver.error(e.getMessage(),e);
-            return null;
-        }
-    }
 }
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Options.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Options.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -562,14 +562,6 @@
             schemaLanguage = Language.DTD;
             return 1;
         }
-        if (args[i].equals("-relaxng")) {
-            schemaLanguage = Language.RELAXNG;
-            return 1;
-        }
-        if (args[i].equals("-relaxng-compact")) {
-            schemaLanguage = Language.RELAXNG_COMPACT;
-            return 1;
-        }
         if (args[i].equals("-xmlschema")) {
             schemaLanguage = Language.XMLSCHEMA;
             return 1;
@@ -869,10 +861,6 @@
         if ((grammars != null) && (grammars.size() > 0)) {
             String name = grammars.get(0).getSystemId().toLowerCase();
 
-            if (name.endsWith(".rng"))
-                return Language.RELAXNG;
-            if (name.endsWith(".rnc"))
-                return Language.RELAXNG_COMPACT;
             if (name.endsWith(".dtd"))
                 return Language.DTD;
             if (name.endsWith(".wsdl"))
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/util/NamespaceContextAdapter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/util/NamespaceContextAdapter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,7 @@
 
 import com.sun.xml.internal.xsom.XmlString;
 
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
 
 /**
  * Take a {@link ValidationContext} and make it look like a {@link NamespaceContext}.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/Datatype.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,271 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *     Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *     Neither the name of the Thai Open Source Software Center Ltd nor
+ *     the names of its contributors may be used to endorse or promote
+ *     products derived from this software without specific prior written
+ *     permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * Datatype object.
+ *
+ * This object has the following functionality:
+ *
+ * <ol>
+ *  <li> functionality to identify a class of character sequences. This is
+ *       done through the isValid method.
+ *
+ *  <li> functionality to produce a "value object" from a character sequence and
+ *               context information.
+ *
+ *  <li> functionality to test the equality of two value objects.
+ * </ol>
+ *
+ * This interface also defines the createStreamingValidator method,
+ * which is intended to efficiently support the validation of
+ * large character sequences.
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public interface Datatype {
+
+        /**
+         * Checks if the specified 'literal' matches this Datatype
+         * with respect to the current context.
+         *
+         * @param literal
+         *              the lexical representation to be checked.
+         * @param context
+         *              If this datatype is context-dependent
+         *              (i.e. the {@link #isContextDependent} method returns true),
+         *              then the caller must provide a non-null valid context object.
+         *              Otherwise, the caller can pass null.
+         *
+         * @return
+         *              true if the 'literal' is a member of this Datatype;
+         *              false if it's not a member of this Datatype.
+         */
+        boolean isValid( String literal, ValidationContext context );
+
+        /**
+         * Similar to the isValid method but throws an exception with diagnosis
+         * in case of errors.
+         *
+         * <p>
+         * If the specified 'literal' is a valid lexical representation for this
+         * datatype, then this method must return without throwing any exception.
+         * If not, the callee must throw an exception (with diagnosis message,
+         * if possible.)
+         *
+         * <p>
+         * The application can use this method to provide detailed error message
+         * to users. This method is kept separate from the isValid method to
+         * achieve higher performance during normal validation.
+         *
+         * @exception DatatypeException
+         *              If the given literal is invalid, then this exception is thrown.
+         *              If the callee supports error diagnosis, then the exception should
+         *              contain a diagnosis message.
+         */
+        void checkValid( String literal, ValidationContext context )
+                throws DatatypeException;
+
+        /**
+         * Creates an instance of a streaming validator for this type.
+         *
+         * <p>
+         * By using streaming validators instead of the isValid method,
+         * the caller can avoid keeping the entire string, which is
+         * sometimes quite big, in memory.
+         *
+         * @param context
+         *              If this datatype is context-dependent
+         *              (i.e. the {@link #isContextDependent} method returns true),
+         *              then the caller must provide a non-null valid context object.
+         *              Otherwise, the caller can pass null.
+         *              The callee may keep a reference to this context object
+         *              only while the returned streaming validator is being used.
+         */
+        DatatypeStreamingValidator createStreamingValidator( ValidationContext context );
+
+        /**
+         * Converts lexcial value and the current context to the corresponding
+         * value object.
+         *
+         * <p>
+         * The caller cannot generally assume that the value object is
+         * a meaningful Java object. For example, the caller cannot expect
+         * this method to return <code>java.lang.Number</code> type for
+         * the "integer" type of XML Schema Part 2.
+         *
+         * <p>
+         * Also, the caller cannot assume that the equals method and
+         * the hashCode method of the value object are consistent with
+         * the semantics of the datatype. For that purpose, the sameValue
+         * method and the valueHashCode method have to be used. Note that
+         * this means you cannot use classes like
+         * <code>java.util.Hashtable</code> to store the value objects.
+         *
+         * <p>
+         * The returned value object should be used solely for the sameValue
+         * and valueHashCode methods.
+         *
+         * @param context
+         *              If this datatype is context-dependent
+         *              (when the {@link #isContextDependent} method returns true),
+         *              then the caller must provide a non-null valid context object.
+         *              Otherwise, the caller can pass null.
+         *
+         * @return      null
+         *              when the given lexical value is not a valid lexical
+         *              value for this type.
+         */
+        Object createValue( String literal, ValidationContext context );
+
+        /**
+         * Tests the equality of two value objects which were originally
+         * created by the createValue method of this object.
+         *
+         * The behavior is undefined if objects not created by this type
+         * are passed. It is the caller's responsibility to ensure that
+         * value objects belong to this type.
+         *
+         * @return
+         *              true if two value objects are considered equal according to
+         *              the definition of this datatype; false if otherwise.
+         */
+        boolean sameValue( Object value1, Object value2 );
+
+
+        /**
+         * Computes the hash code for a value object,
+         * which is consistent with the sameValue method.
+         *
+         * @return
+         *              hash code for the specified value object.
+         */
+        int valueHashCode( Object value );
+
+
+
+
+        /**
+         * Indicates that the datatype doesn't have ID/IDREF semantics.
+         *
+         * This value is one of the possible return values of the
+         * {@link #getIdType} method.
+         */
+        public static final int ID_TYPE_NULL = 0;
+
+        /**
+         * Indicates that RELAX NG compatibility processors should
+         * treat this datatype as having ID semantics.
+         *
+         * This value is one of the possible return values of the
+         * {@link #getIdType} method.
+         */
+        public static final int ID_TYPE_ID = 1;
+
+        /**
+         * Indicates that RELAX NG compatibility processors should
+         * treat this datatype as having IDREF semantics.
+         *
+         * This value is one of the possible return values of the
+         * {@link #getIdType} method.
+         */
+        public static final int ID_TYPE_IDREF = 2;
+
+        /**
+         * Indicates that RELAX NG compatibility processors should
+         * treat this datatype as having IDREFS semantics.
+         *
+         * This value is one of the possible return values of the
+         * {@link #getIdType} method.
+         */
+        public static final int ID_TYPE_IDREFS = 3;
+
+        /**
+         * Checks if the ID/IDREF semantics is associated with this
+         * datatype.
+         *
+         * <p>
+         * This method is introduced to support the RELAX NG DTD
+         * compatibility spec. (Of course it's always free to use
+         * this method for other purposes.)
+         *
+         * <p>
+         * If you are implementing a datatype library and have no idea about
+         * the "RELAX NG DTD compatibility" thing, just return
+         * <code>ID_TYPE_NULL</code> is fine.
+         *
+         * @return
+         *              If this datatype doesn't have any ID/IDREF semantics,
+         *              it returns {@link #ID_TYPE_NULL}. If it has such a semantics
+         *              (for example, XSD:ID, XSD:IDREF and comp:ID type), then
+         *              it returns {@link #ID_TYPE_ID}, {@link #ID_TYPE_IDREF} or
+         *              {@link #ID_TYPE_IDREFS}.
+         */
+        public int getIdType();
+
+
+        /**
+         * Checks if this datatype may need a context object for
+         * the validation.
+         *
+         * <p>
+         * The callee must return true even when the context
+         * is not always necessary. (For example, the "QName" type
+         * doesn't need a context object when validating unprefixed
+         * string. But nonetheless QName must return true.)
+         *
+         * <p>
+         * XSD's <code>string</code> and <code>short</code> types
+         * are examples of context-independent datatypes.
+         * Its <code>QName</code> and <code>ENTITY</code> types
+         * are examples of context-dependent datatypes.
+         *
+         * <p>
+         * When a datatype is context-independent, then
+         * the {@link #isValid} method, the {@link #checkValid} method,
+         * the {@link #createStreamingValidator} method and
+         * the {@link #createValue} method can be called without
+         * providing a context object.
+         *
+         * @return
+         *              <b>true</b> if this datatype is context-dependent
+         *              (it needs a context object sometimes);
+         *
+         *              <b>false</b> if this datatype is context-<b>in</b>dependent
+         *              (it never needs a context object).
+         */
+        public boolean isContextDependent();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/DatatypeBuilder.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *     Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *     Neither the name of the Thai Open Source Software Center Ltd nor
+ *     the names of its contributors may be used to endorse or promote
+ *     products derived from this software without specific prior written
+ *     permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * Creates a user-defined type by adding parameters to
+ * the pre-defined type.
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public interface DatatypeBuilder {
+
+        /**
+         * Adds a new parameter.
+         *
+         * @param name
+         *              The name of the parameter to be added.
+         * @param strValue
+         *              The raw value of the parameter. Caller may not normalize
+         *              this value because any white space is potentially significant.
+         * @param context
+         *              The context information which can be used by the callee to
+         *              acquire additional information. This context object is
+         *              valid only during this method call. The callee may not
+         *              keep a reference to this object.
+         * @exception   DatatypeException
+         *              When the given parameter is inappropriate for some reason.
+         *              The callee is responsible to recover from this error.
+         *              That is, the object should behave as if no such error
+         *              was occured.
+         */
+        void addParameter( String name, String strValue, ValidationContext context )
+                throws DatatypeException;
+
+        /**
+         * Derives a new Datatype from a Datatype by parameters that
+         * were already set through the addParameter method.
+         *
+         * @exception DatatypeException
+         *              DatatypeException must be thrown if the derivation is
+         *              somehow invalid. For example, a required parameter is missing,
+         *              etc. The exception should contain a diagnosis message
+         *              if possible.
+         */
+        Datatype createDatatype() throws DatatypeException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/DatatypeException.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *     Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *     Neither the name of the Thai Open Source Software Center Ltd nor
+ *     the names of its contributors may be used to endorse or promote
+ *     products derived from this software without specific prior written
+ *     permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * Signals Datatype related exceptions.
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public class DatatypeException extends Exception {
+
+        public DatatypeException( int index, String msg ) {
+                super(msg);
+                this.index = index;
+        }
+        public DatatypeException( String msg ) {
+                this(UNKNOWN,msg);
+        }
+        /**
+         * A constructor for those datatype libraries which don't support any
+         * diagnostic information at all.
+         */
+        public DatatypeException() {
+                this(UNKNOWN,null);
+        }
+
+
+        private final int index;
+
+        public static final int UNKNOWN = -1;
+
+        /**
+         * Gets the index of the content where the error occured.
+         * UNKNOWN can be returned to indicate that no index information
+         * is available.
+         */
+        public int getIndex() {
+                return index;
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/DatatypeLibrary.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *     Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *     Neither the name of the Thai Open Source Software Center Ltd nor
+ *     the names of its contributors may be used to endorse or promote
+ *     products derived from this software without specific prior written
+ *     permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * A Datatype library
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public interface DatatypeLibrary {
+
+        /**
+         * Creates a new instance of DatatypeBuilder.
+         *
+         * The callee should throw a DatatypeException in case of an error.
+         *
+         * @param baseTypeLocalName
+         *              The local name of the base type.
+         *
+         * @return
+         *              A non-null valid datatype object.
+         */
+        DatatypeBuilder createDatatypeBuilder( String baseTypeLocalName )
+                throws DatatypeException;
+
+        /**
+         * Gets or creates a pre-defined type.
+         *
+         * This is just a short-cut of
+         * <code>createDatatypeBuilder(typeLocalName).createDatatype();</code>
+         *
+         * The callee should throw a DatatypeException in case of an error.
+         *
+         * @return
+         *              A non-null valid datatype object.
+         */
+        Datatype createDatatype( String typeLocalName ) throws DatatypeException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/DatatypeLibraryFactory.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *     Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *     Neither the name of the Thai Open Source Software Center Ltd nor
+ *     the names of its contributors may be used to endorse or promote
+ *     products derived from this software without specific prior written
+ *     permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * Factory class for the DatatypeLibrary class.
+ *
+ * <p>
+ * The datatype library should provide the implementation of
+ * this interface if it wants to be found by the schema processors.
+ * The implementor also have to place a file in your jar file.
+ * See the reference datatype library implementation for detail.
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public interface DatatypeLibraryFactory
+{
+        /**
+         * Creates a new instance of a DatatypeLibrary that supports
+         * the specified namespace URI.
+         *
+         * @return
+         *              <code>null</code> if the specified namespace URI is not
+         *              supported.
+         */
+        DatatypeLibrary createDatatypeLibrary( String namespaceURI );
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/DatatypeStreamingValidator.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *     Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *     Neither the name of the Thai Open Source Software Center Ltd nor
+ *     the names of its contributors may be used to endorse or promote
+ *     products derived from this software without specific prior written
+ *     permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * Datatype streaming validator.
+ *
+ * <p>
+ * The streaming validator is an optional feature that is useful for
+ * certain Datatypes. It allows the caller to incrementally provide
+ * the literal.
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public interface DatatypeStreamingValidator {
+
+        /**
+         * Passes an additional fragment of the literal.
+         *
+         * <p>
+         * The application can call this method several times, then call
+         * the isValid method (or the checkValid method) to check the validity
+         * of the accumulated characters.
+         */
+        void addCharacters( char[] buf, int start, int len );
+
+        /**
+         * Tells if the accumulated literal is valid with respect to
+         * the underlying Datatype.
+         *
+         * @return
+         *              True if it is valid. False if otherwise.
+         */
+        boolean isValid();
+
+        /**
+         * Similar to the isValid method, but this method throws
+         * Exception (with possibly diagnostic information), instead of
+         * returning false.
+         *
+         * @exception DatatypeException
+         *              If the callee supports the diagnosis and the accumulated
+         *              literal is invalid, then this exception that possibly
+         *              contains diagnosis information is thrown.
+         */
+        void checkValid() throws DatatypeException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/ValidationContext.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *     Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *     Neither the name of the Thai Open Source Software Center Ltd nor
+ *     the names of its contributors may be used to endorse or promote
+ *     products derived from this software without specific prior written
+ *     permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * An interface that must be implemented by caller to
+ * provide context information that is necessary to
+ * perform validation of some Datatypes.
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public interface ValidationContext {
+
+        /**
+         * Resolves a namespace prefix to the corresponding namespace URI.
+         *
+         * This method is used for validating the QName type, for example.
+         *
+         * <p>
+         * If the prefix is "" (empty string), it indicates
+         * an unprefixed value. The callee
+         * should resolve it as for an unprefixed
+         * element, rather than for an unprefixed attribute.
+         *
+         * <p>
+         * If the prefix is "xml", then the callee must resolve
+         * this prefix into "http://www.w3.org/XML/1998/namespace",
+         * as defined in the XML Namespaces Recommendation.
+         *
+         * @return
+         *              namespace URI of this prefix.
+         *              If the specified prefix is not declared,
+         *              the implementation must return null.
+         */
+        String resolveNamespacePrefix( String prefix );
+
+        /**
+         * Returns the base URI of the context.  The null string may be returned
+         * if no base URI is known.
+         */
+        String getBaseUri();
+
+        /**
+         * Checks if an unparsed entity is declared with the
+         * specified name.
+         *
+         * @return
+         *  true
+         *              if the DTD has an unparsed entity declaration for
+         *              the specified name.
+         *  false
+         *              otherwise.
+         */
+        boolean isUnparsedEntity( String entityName );
+
+        /**
+         * Checks if a notation is declared with the
+         * specified name.
+         *
+         * @return
+         *  true
+         *              if the DTD has a notation declaration for the specified name.
+         *  false
+         *              otherwise.
+         */
+        boolean isNotation( String notationName );
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,261 @@
+/**
+ * Copyright (c) 2001, 2015 Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *     Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *     Neither the name of the Thai Open Source Software Center Ltd nor
+ *     the names of its contributors may be used to endorse or promote
+ *     products derived from this software without specific prior written
+ *     permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.sun.xml.internal.org.relaxng.datatype.helpers;
+
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import java.util.Enumeration;
+import java.util.NoSuchElementException;
+import java.util.Vector;
+import java.io.Reader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URL;
+
+/**
+ * Discovers the datatype library implementation from the classpath.
+ *
+ * <p>
+ * The call of the createDatatypeLibrary method finds an implementation
+ * from a given datatype library URI at run-time.
+ */
+public class DatatypeLibraryLoader implements DatatypeLibraryFactory {
+  private final Service service = new Service(DatatypeLibraryFactory.class);
+
+  public DatatypeLibrary createDatatypeLibrary(String uri) {
+    for (Enumeration e = service.getProviders();
+         e.hasMoreElements();) {
+      DatatypeLibraryFactory factory
+        = (DatatypeLibraryFactory)e.nextElement();
+      DatatypeLibrary library = factory.createDatatypeLibrary(uri);
+      if (library != null)
+        return library;
+    }
+    return null;
+  }
+
+        private static class Service {
+          private final Class serviceClass;
+          private final Enumeration configFiles;
+          private Enumeration classNames = null;
+          private final Vector providers = new Vector();
+          private Loader loader;
+
+          private class ProviderEnumeration implements Enumeration {
+            private int nextIndex = 0;
+
+            public boolean hasMoreElements() {
+              return nextIndex < providers.size() || moreProviders();
+            }
+
+            public Object nextElement() {
+              try {
+                return providers.elementAt(nextIndex++);
+              }
+              catch (ArrayIndexOutOfBoundsException e) {
+                throw new NoSuchElementException();
+              }
+            }
+          }
+
+          private static class Singleton implements Enumeration {
+            private Object obj;
+            private Singleton(Object obj) {
+              this.obj = obj;
+            }
+
+            public boolean hasMoreElements() {
+              return obj != null;
+            }
+
+            public Object nextElement() {
+              if (obj == null)
+                throw new NoSuchElementException();
+              Object tem = obj;
+              obj = null;
+              return tem;
+            }
+          }
+
+          // JDK 1.1
+          private static class Loader {
+            Enumeration getResources(String resName) {
+              ClassLoader cl = Loader.class.getClassLoader();
+              URL url;
+              if (cl == null)
+                url = ClassLoader.getSystemResource(resName);
+              else
+                url = cl.getResource(resName);
+              return new Singleton(url);
+            }
+
+            Class loadClass(String name) throws ClassNotFoundException {
+              return Class.forName(name);
+            }
+          }
+
+          // JDK 1.2+
+          private static class Loader2 extends Loader {
+            private ClassLoader cl;
+
+            Loader2() {
+              cl = Loader2.class.getClassLoader();
+              // If the thread context class loader has the class loader
+              // of this class as an ancestor, use the thread context class
+              // loader.  Otherwise, the thread context class loader
+              // probably hasn't been set up properly, so don't use it.
+              ClassLoader clt = Thread.currentThread().getContextClassLoader();
+              for (ClassLoader tem = clt; tem != null; tem = tem.getParent())
+                if (tem == cl) {
+                  cl = clt;
+                  break;
+                }
+            }
+
+            Enumeration getResources(String resName) {
+              try {
+                return cl.getResources(resName);
+              }
+              catch (IOException e) {
+                return new Singleton(null);
+              }
+            }
+
+            Class loadClass(String name) throws ClassNotFoundException {
+              return Class.forName(name, true, cl);
+            }
+          }
+
+          public Service(Class cls) {
+            try {
+              loader = new Loader2();
+            }
+            catch (NoSuchMethodError e) {
+              loader = new Loader();
+            }
+            serviceClass = cls;
+            String resName = "META-INF/services/" + serviceClass.getName();
+            configFiles = loader.getResources(resName);
+          }
+
+          public Enumeration getProviders() {
+            return new ProviderEnumeration();
+          }
+
+          synchronized private boolean moreProviders() {
+            for (;;) {
+              while (classNames == null) {
+                if (!configFiles.hasMoreElements())
+                  return false;
+                classNames = parseConfigFile((URL)configFiles.nextElement());
+              }
+              while (classNames.hasMoreElements()) {
+                String className = (String)classNames.nextElement();
+                try {
+                  Class cls = loader.loadClass(className);
+                  Object obj = cls.newInstance();
+                  if (serviceClass.isInstance(obj)) {
+                    providers.addElement(obj);
+                    return true;
+                  }
+                }
+                catch (ClassNotFoundException e) { }
+                catch (InstantiationException e) { }
+                catch (IllegalAccessException e) { }
+                catch (LinkageError e) { }
+              }
+              classNames = null;
+            }
+          }
+
+          private static final int START = 0;
+          private static final int IN_NAME = 1;
+          private static final int IN_COMMENT = 2;
+
+          private static Enumeration parseConfigFile(URL url) {
+            try {
+              InputStream in = url.openStream();
+              Reader r;
+              try {
+                r = new InputStreamReader(in, "UTF-8");
+              }
+              catch (UnsupportedEncodingException e) {
+                r = new InputStreamReader(in, "UTF8");
+              }
+              r = new BufferedReader(r);
+              Vector tokens = new Vector();
+              StringBuffer tokenBuf = new StringBuffer();
+              int state = START;
+              for (;;) {
+                int n = r.read();
+                if (n < 0)
+                  break;
+                char c = (char)n;
+                switch (c) {
+                case '\r':
+                case '\n':
+                  state = START;
+                  break;
+                case ' ':
+                case '\t':
+                  break;
+                case '#':
+                  state = IN_COMMENT;
+                  break;
+                default:
+                  if (state != IN_COMMENT) {
+                    state = IN_NAME;
+                    tokenBuf.append(c);
+                  }
+                  break;
+                }
+                if (tokenBuf.length() != 0 && state != IN_NAME) {
+                  tokens.addElement(tokenBuf.toString());
+                  tokenBuf.setLength(0);
+                }
+              }
+              if (tokenBuf.length() != 0)
+                tokens.addElement(tokenBuf.toString());
+              return tokens.elements();
+            }
+            catch (IOException e) {
+              return null;
+            }
+          }
+        }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *     Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *     Neither the name of the Thai Open Source Software Center Ltd nor
+ *     the names of its contributors may be used to endorse or promote
+ *     products derived from this software without specific prior written
+ *     permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype.helpers;
+
+import com.sun.xml.internal.org.relaxng.datatype.*;
+
+/**
+ * Dummy implementation of {@link DatatypeBuilder}.
+ *
+ * This implementation can be used for Datatypes which have no parameters.
+ * Any attempt to add parameters will be rejected.
+ *
+ * <p>
+ * Typical usage would be:
+ * <PRE>{@code
+ * class MyDatatypeLibrary implements DatatypeLibrary {
+ *     ....
+ *     DatatypeBuilder createDatatypeBuilder( String typeName ) {
+ *         return new ParameterleessDatatypeBuilder(createDatatype(typeName));
+ *     }
+ *     ....
+ * }
+ * }</PRE>
+ *
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public final class ParameterlessDatatypeBuilder implements DatatypeBuilder {
+
+        /** This type object is returned for the derive method. */
+        private final Datatype baseType;
+
+        public ParameterlessDatatypeBuilder( Datatype baseType ) {
+                this.baseType = baseType;
+        }
+
+        public void addParameter( String name, String strValue, ValidationContext context )
+                        throws DatatypeException {
+                throw new DatatypeException();
+        }
+
+        public Datatype createDatatype() throws DatatypeException {
+                return baseType;
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/helpers/StreamingValidatorImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *     Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *     Neither the name of the Thai Open Source Software Center Ltd nor
+ *     the names of its contributors may be used to endorse or promote
+ *     products derived from this software without specific prior written
+ *     permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype.helpers;
+
+import com.sun.xml.internal.org.relaxng.datatype.*;
+
+/**
+ * Dummy implementation of {@link DatatypeStreamingValidator}.
+ *
+ * <p>
+ * This implementation can be used as a quick hack when the performance
+ * of streaming validation is not important. And this implementation
+ * also shows you how to implement the DatatypeStreamingValidator interface.
+ *
+ * <p>
+ * Typical usage would be:
+ * <PRE>{@code
+ * class MyDatatype implements Datatype {
+ *     ....
+ *     public DatatypeStreamingValidator createStreamingValidator( ValidationContext context ) {
+ *         return new StreamingValidatorImpl(this,context);
+ *     }
+ *     ....
+ * }
+ * }</PRE>
+ *
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public final class StreamingValidatorImpl implements DatatypeStreamingValidator {
+
+        /** This buffer accumulates characters. */
+        private final StringBuffer buffer = new StringBuffer();
+
+        /** Datatype obejct that creates this streaming validator. */
+        private final Datatype baseType;
+
+        /** The current context. */
+        private final ValidationContext context;
+
+        public void addCharacters( char[] buf, int start, int len ) {
+                // append characters to the current buffer.
+                buffer.append(buf,start,len);
+        }
+
+        public boolean isValid() {
+                return baseType.isValid(buffer.toString(),context);
+        }
+
+        public void checkValid() throws DatatypeException {
+                baseType.checkValid(buffer.toString(),context);
+        }
+
+        public StreamingValidatorImpl( Datatype baseType, ValidationContext context ) {
+                this.baseType = baseType;
+                this.context = context;
+        }
+}
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/ast/util/CheckingSchemaBuilder.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/ast/util/CheckingSchemaBuilder.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,7 +53,7 @@
 import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
 import com.sun.xml.internal.rngom.parse.host.ParsedPatternHost;
 import com.sun.xml.internal.rngom.parse.host.SchemaBuilderHost;
-import org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
 import org.xml.sax.ErrorHandler;
 
 /**
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/DataExceptPattern.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/DataExceptPattern.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,7 @@
 
 import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
 import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
 import org.xml.sax.Locator;
 
 public class DataExceptPattern extends DataPattern {
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/DataPattern.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/DataPattern.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,7 @@
 
 import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
 import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
 
 public class DataPattern extends StringPattern {
   private Datatype dt;
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -75,13 +75,13 @@
 import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
 import com.sun.xml.internal.rngom.parse.Parseable;
 import com.sun.xml.internal.rngom.util.Localizer;
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
-import org.relaxng.datatype.ValidationContext;
-import org.relaxng.datatype.helpers.DatatypeLibraryLoader;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeBuilder;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeException;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.helpers.DatatypeLibraryLoader;
 import org.xml.sax.ErrorHandler;
 import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/SchemaPatternBuilder.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/SchemaPatternBuilder.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,7 @@
 package com.sun.xml.internal.rngom.binary;
 
 import com.sun.xml.internal.rngom.nc.NameClass;
-import org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
 import org.xml.sax.Locator;
 
 public class SchemaPatternBuilder extends PatternBuilder {
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/ValuePattern.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/ValuePattern.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,7 @@
 
 import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
 import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
 
 public class ValuePattern extends StringPattern {
   Object obj;
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/visitor/PatternVisitor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/visitor/PatternVisitor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,7 @@
 
 import com.sun.xml.internal.rngom.binary.Pattern;
 import com.sun.xml.internal.rngom.nc.NameClass;
-import org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
 
 public interface PatternVisitor {
     void visitEmpty();
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/visitor/PatternWalker.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/visitor/PatternWalker.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,7 @@
 
 import com.sun.xml.internal.rngom.binary.Pattern;
 import com.sun.xml.internal.rngom.nc.NameClass;
-import org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
 
 /**
  * Walks the pattern tree.
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/CachedDatatypeLibraryFactory.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/CachedDatatypeLibraryFactory.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,8 +45,8 @@
  */
 package com.sun.xml.internal.rngom.dt;
 
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
 
 /**
  *
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/CascadingDatatypeLibraryFactory.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/CascadingDatatypeLibraryFactory.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,8 +45,8 @@
  */
 package com.sun.xml.internal.rngom.dt;
 
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
 
 /**
  *
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/DoNothingDatatypeLibraryFactoryImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/DoNothingDatatypeLibraryFactoryImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,14 +45,14 @@
  */
 package com.sun.xml.internal.rngom.dt;
 
-import org.relaxng.datatype.DatatypeLibraryFactory;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.ValidationContext;
-import org.relaxng.datatype.DatatypeStreamingValidator;
-import org.relaxng.datatype.helpers.StreamingValidatorImpl;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeBuilder;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeException;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeStreamingValidator;
+import com.sun.xml.internal.org.relaxng.datatype.helpers.StreamingValidatorImpl;
 
 /**
  * {@link DatatypeLibraryFactory} implementation
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeBuilder.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeBuilder.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,10 +45,10 @@
  */
 package com.sun.xml.internal.rngom.dt.builtin;
 
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeBuilder;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeException;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
 
 import com.sun.xml.internal.rngom.util.Localizer;
 
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibrary.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibrary.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,11 +45,11 @@
  */
 package com.sun.xml.internal.rngom.dt.builtin;
 
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeBuilder;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeException;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
 
 import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
 
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibraryFactory.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibraryFactory.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,8 +45,8 @@
  */
 package com.sun.xml.internal.rngom.dt.builtin;
 
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
 
 import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
 
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/CompatibilityDatatypeLibrary.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/CompatibilityDatatypeLibrary.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,11 +45,11 @@
  */
 package com.sun.xml.internal.rngom.dt.builtin;
 
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeBuilder;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeException;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
 import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
 
 class CompatibilityDatatypeLibrary implements DatatypeLibrary {
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/parse/Context.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/parse/Context.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,7 @@
 package com.sun.xml.internal.rngom.parse;
 
 import java.util.Enumeration;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
 
 /**
  * Provides contextual information.
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/parse/xml/DtdContext.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/parse/xml/DtdContext.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,7 @@
 
 import org.xml.sax.DTDHandler;
 import org.xml.sax.SAXException;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
 
 import java.util.Hashtable;
 
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/ForeignAttributes.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/ForeignAttributes.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
 
 import org.xml.sax.Attributes;
 import org.xml.sax.Locator;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
 
 /**
  * Foreign attributes on schema elements.
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/XmlString.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/XmlString.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 package com.sun.xml.internal.xsom;
 
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
 
 /**
  * String with in-scope namespace binding information.
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/ForeignAttributesImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/ForeignAttributesImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 package com.sun.xml.internal.xsom.impl;
 
 import com.sun.xml.internal.xsom.ForeignAttributes;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
 import org.xml.sax.Locator;
 import org.xml.sax.helpers.AttributesImpl;
 
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
 import com.sun.xml.internal.xsom.impl.parser.state.Schema;
 import com.sun.xml.internal.xsom.impl.util.Uri;
 import com.sun.xml.internal.xsom.parser.AnnotationParser;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
 import org.xml.sax.Attributes;
 import org.xml.sax.EntityResolver;
 import org.xml.sax.ErrorHandler;
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/Datatype.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,270 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *     Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *     Neither the name of the Thai Open Source Software Center Ltd nor
- *     the names of its contributors may be used to endorse or promote
- *     products derived from this software without specific prior written
- *     permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Datatype object.
- *
- * This object has the following functionality:
- *
- * <ol>
- *  <li> functionality to identify a class of character sequences. This is
- *       done through the isValid method.
- *
- *  <li> functionality to produce a "value object" from a character sequence and
- *               context information.
- *
- *  <li> functionality to test the equality of two value objects.
- * </ol>
- *
- * This interface also defines the createStreamingValidator method,
- * which is intended to efficiently support the validation of
- * large character sequences.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface Datatype {
-
-        /**
-         * Checks if the specified 'literal' matches this Datatype
-         * with respect to the current context.
-         *
-         * @param literal
-         *              the lexical representation to be checked.
-         * @param context
-         *              If this datatype is context-dependent
-         *              (i.e. the {@link #isContextDependent} method returns true),
-         *              then the caller must provide a non-null valid context object.
-         *              Otherwise, the caller can pass null.
-         *
-         * @return
-         *              true if the 'literal' is a member of this Datatype;
-         *              false if it's not a member of this Datatype.
-         */
-        boolean isValid( String literal, ValidationContext context );
-
-        /**
-         * Similar to the isValid method but throws an exception with diagnosis
-         * in case of errors.
-         *
-         * <p>
-         * If the specified 'literal' is a valid lexical representation for this
-         * datatype, then this method must return without throwing any exception.
-         * If not, the callee must throw an exception (with diagnosis message,
-         * if possible.)
-         *
-         * <p>
-         * The application can use this method to provide detailed error message
-         * to users. This method is kept separate from the isValid method to
-         * achieve higher performance during normal validation.
-         *
-         * @exception DatatypeException
-         *              If the given literal is invalid, then this exception is thrown.
-         *              If the callee supports error diagnosis, then the exception should
-         *              contain a diagnosis message.
-         */
-        void checkValid( String literal, ValidationContext context )
-                throws DatatypeException;
-
-        /**
-         * Creates an instance of a streaming validator for this type.
-         *
-         * <p>
-         * By using streaming validators instead of the isValid method,
-         * the caller can avoid keeping the entire string, which is
-         * sometimes quite big, in memory.
-         *
-         * @param context
-         *              If this datatype is context-dependent
-         *              (i.e. the {@link #isContextDependent} method returns true),
-         *              then the caller must provide a non-null valid context object.
-         *              Otherwise, the caller can pass null.
-         *              The callee may keep a reference to this context object
-         *              only while the returned streaming validator is being used.
-         */
-        DatatypeStreamingValidator createStreamingValidator( ValidationContext context );
-
-        /**
-         * Converts lexcial value and the current context to the corresponding
-         * value object.
-         *
-         * <p>
-         * The caller cannot generally assume that the value object is
-         * a meaningful Java object. For example, the caller cannot expect
-         * this method to return <code>java.lang.Number</code> type for
-         * the "integer" type of XML Schema Part 2.
-         *
-         * <p>
-         * Also, the caller cannot assume that the equals method and
-         * the hashCode method of the value object are consistent with
-         * the semantics of the datatype. For that purpose, the sameValue
-         * method and the valueHashCode method have to be used. Note that
-         * this means you cannot use classes like
-         * <code>java.util.Hashtable</code> to store the value objects.
-         *
-         * <p>
-         * The returned value object should be used solely for the sameValue
-         * and valueHashCode methods.
-         *
-         * @param context
-         *              If this datatype is context-dependent
-         *              (when the {@link #isContextDependent} method returns true),
-         *              then the caller must provide a non-null valid context object.
-         *              Otherwise, the caller can pass null.
-         *
-         * @return      null
-         *              when the given lexical value is not a valid lexical
-         *              value for this type.
-         */
-        Object createValue( String literal, ValidationContext context );
-
-        /**
-         * Tests the equality of two value objects which were originally
-         * created by the createValue method of this object.
-         *
-         * The behavior is undefined if objects not created by this type
-         * are passed. It is the caller's responsibility to ensure that
-         * value objects belong to this type.
-         *
-         * @return
-         *              true if two value objects are considered equal according to
-         *              the definition of this datatype; false if otherwise.
-         */
-        boolean sameValue( Object value1, Object value2 );
-
-
-        /**
-         * Computes the hash code for a value object,
-         * which is consistent with the sameValue method.
-         *
-         * @return
-         *              hash code for the specified value object.
-         */
-        int valueHashCode( Object value );
-
-
-
-
-        /**
-         * Indicates that the datatype doesn't have ID/IDREF semantics.
-         *
-         * This value is one of the possible return values of the
-         * {@link #getIdType} method.
-         */
-        public static final int ID_TYPE_NULL = 0;
-
-        /**
-         * Indicates that RELAX NG compatibility processors should
-         * treat this datatype as having ID semantics.
-         *
-         * This value is one of the possible return values of the
-         * {@link #getIdType} method.
-         */
-        public static final int ID_TYPE_ID = 1;
-
-        /**
-         * Indicates that RELAX NG compatibility processors should
-         * treat this datatype as having IDREF semantics.
-         *
-         * This value is one of the possible return values of the
-         * {@link #getIdType} method.
-         */
-        public static final int ID_TYPE_IDREF = 2;
-
-        /**
-         * Indicates that RELAX NG compatibility processors should
-         * treat this datatype as having IDREFS semantics.
-         *
-         * This value is one of the possible return values of the
-         * {@link #getIdType} method.
-         */
-        public static final int ID_TYPE_IDREFS = 3;
-
-        /**
-         * Checks if the ID/IDREF semantics is associated with this
-         * datatype.
-         *
-         * <p>
-         * This method is introduced to support the RELAX NG DTD
-         * compatibility spec. (Of course it's always free to use
-         * this method for other purposes.)
-         *
-         * <p>
-         * If you are implementing a datatype library and have no idea about
-         * the "RELAX NG DTD compatibility" thing, just return
-         * <code>ID_TYPE_NULL</code> is fine.
-         *
-         * @return
-         *              If this datatype doesn't have any ID/IDREF semantics,
-         *              it returns {@link #ID_TYPE_NULL}. If it has such a semantics
-         *              (for example, XSD:ID, XSD:IDREF and comp:ID type), then
-         *              it returns {@link #ID_TYPE_ID}, {@link #ID_TYPE_IDREF} or
-         *              {@link #ID_TYPE_IDREFS}.
-         */
-        public int getIdType();
-
-
-        /**
-         * Checks if this datatype may need a context object for
-         * the validation.
-         *
-         * <p>
-         * The callee must return true even when the context
-         * is not always necessary. (For example, the "QName" type
-         * doesn't need a context object when validating unprefixed
-         * string. But nonetheless QName must return true.)
-         *
-         * <p>
-         * XSD's <code>string</code> and <code>short</code> types
-         * are examples of context-independent datatypes.
-         * Its <code>QName</code> and <code>ENTITY</code> types
-         * are examples of context-dependent datatypes.
-         *
-         * <p>
-         * When a datatype is context-independent, then
-         * the {@link #isValid} method, the {@link #checkValid} method,
-         * the {@link #createStreamingValidator} method and
-         * the {@link #createValue} method can be called without
-         * providing a context object.
-         *
-         * @return
-         *              <b>true</b> if this datatype is context-dependent
-         *              (it needs a context object sometimes);
-         *
-         *              <b>false</b> if this datatype is context-<b>in</b>dependent
-         *              (it never needs a context object).
-         */
-        public boolean isContextDependent();
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/DatatypeBuilder.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *     Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *     Neither the name of the Thai Open Source Software Center Ltd nor
- *     the names of its contributors may be used to endorse or promote
- *     products derived from this software without specific prior written
- *     permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Creates a user-defined type by adding parameters to
- * the pre-defined type.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeBuilder {
-
-        /**
-         * Adds a new parameter.
-         *
-         * @param name
-         *              The name of the parameter to be added.
-         * @param strValue
-         *              The raw value of the parameter. Caller may not normalize
-         *              this value because any white space is potentially significant.
-         * @param context
-         *              The context information which can be used by the callee to
-         *              acquire additional information. This context object is
-         *              valid only during this method call. The callee may not
-         *              keep a reference to this object.
-         * @exception   DatatypeException
-         *              When the given parameter is inappropriate for some reason.
-         *              The callee is responsible to recover from this error.
-         *              That is, the object should behave as if no such error
-         *              was occured.
-         */
-        void addParameter( String name, String strValue, ValidationContext context )
-                throws DatatypeException;
-
-        /**
-         * Derives a new Datatype from a Datatype by parameters that
-         * were already set through the addParameter method.
-         *
-         * @exception DatatypeException
-         *              DatatypeException must be thrown if the derivation is
-         *              somehow invalid. For example, a required parameter is missing,
-         *              etc. The exception should contain a diagnosis message
-         *              if possible.
-         */
-        Datatype createDatatype() throws DatatypeException;
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/DatatypeException.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *     Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *     Neither the name of the Thai Open Source Software Center Ltd nor
- *     the names of its contributors may be used to endorse or promote
- *     products derived from this software without specific prior written
- *     permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Signals Datatype related exceptions.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class DatatypeException extends Exception {
-
-        public DatatypeException( int index, String msg ) {
-                super(msg);
-                this.index = index;
-        }
-        public DatatypeException( String msg ) {
-                this(UNKNOWN,msg);
-        }
-        /**
-         * A constructor for those datatype libraries which don't support any
-         * diagnostic information at all.
-         */
-        public DatatypeException() {
-                this(UNKNOWN,null);
-        }
-
-
-        private final int index;
-
-        public static final int UNKNOWN = -1;
-
-        /**
-         * Gets the index of the content where the error occured.
-         * UNKNOWN can be returned to indicate that no index information
-         * is available.
-         */
-        public int getIndex() {
-                return index;
-        }
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/DatatypeLibrary.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *     Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *     Neither the name of the Thai Open Source Software Center Ltd nor
- *     the names of its contributors may be used to endorse or promote
- *     products derived from this software without specific prior written
- *     permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * A Datatype library
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeLibrary {
-
-        /**
-         * Creates a new instance of DatatypeBuilder.
-         *
-         * The callee should throw a DatatypeException in case of an error.
-         *
-         * @param baseTypeLocalName
-         *              The local name of the base type.
-         *
-         * @return
-         *              A non-null valid datatype object.
-         */
-        DatatypeBuilder createDatatypeBuilder( String baseTypeLocalName )
-                throws DatatypeException;
-
-        /**
-         * Gets or creates a pre-defined type.
-         *
-         * This is just a short-cut of
-         * <code>createDatatypeBuilder(typeLocalName).createDatatype();</code>
-         *
-         * The callee should throw a DatatypeException in case of an error.
-         *
-         * @return
-         *              A non-null valid datatype object.
-         */
-        Datatype createDatatype( String typeLocalName ) throws DatatypeException;
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/DatatypeLibraryFactory.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *     Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *     Neither the name of the Thai Open Source Software Center Ltd nor
- *     the names of its contributors may be used to endorse or promote
- *     products derived from this software without specific prior written
- *     permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Factory class for the DatatypeLibrary class.
- *
- * <p>
- * The datatype library should provide the implementation of
- * this interface if it wants to be found by the schema processors.
- * The implementor also have to place a file in your jar file.
- * See the reference datatype library implementation for detail.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeLibraryFactory
-{
-        /**
-         * Creates a new instance of a DatatypeLibrary that supports
-         * the specified namespace URI.
-         *
-         * @return
-         *              <code>null</code> if the specified namespace URI is not
-         *              supported.
-         */
-        DatatypeLibrary createDatatypeLibrary( String namespaceURI );
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/DatatypeStreamingValidator.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *     Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *     Neither the name of the Thai Open Source Software Center Ltd nor
- *     the names of its contributors may be used to endorse or promote
- *     products derived from this software without specific prior written
- *     permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Datatype streaming validator.
- *
- * <p>
- * The streaming validator is an optional feature that is useful for
- * certain Datatypes. It allows the caller to incrementally provide
- * the literal.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeStreamingValidator {
-
-        /**
-         * Passes an additional fragment of the literal.
-         *
-         * <p>
-         * The application can call this method several times, then call
-         * the isValid method (or the checkValid method) to check the validity
-         * of the accumulated characters.
-         */
-        void addCharacters( char[] buf, int start, int len );
-
-        /**
-         * Tells if the accumulated literal is valid with respect to
-         * the underlying Datatype.
-         *
-         * @return
-         *              True if it is valid. False if otherwise.
-         */
-        boolean isValid();
-
-        /**
-         * Similar to the isValid method, but this method throws
-         * Exception (with possibly diagnostic information), instead of
-         * returning false.
-         *
-         * @exception DatatypeException
-         *              If the callee supports the diagnosis and the accumulated
-         *              literal is invalid, then this exception that possibly
-         *              contains diagnosis information is thrown.
-         */
-        void checkValid() throws DatatypeException;
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/ValidationContext.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *     Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *     Neither the name of the Thai Open Source Software Center Ltd nor
- *     the names of its contributors may be used to endorse or promote
- *     products derived from this software without specific prior written
- *     permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * An interface that must be implemented by caller to
- * provide context information that is necessary to
- * perform validation of some Datatypes.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface ValidationContext {
-
-        /**
-         * Resolves a namespace prefix to the corresponding namespace URI.
-         *
-         * This method is used for validating the QName type, for example.
-         *
-         * <p>
-         * If the prefix is "" (empty string), it indicates
-         * an unprefixed value. The callee
-         * should resolve it as for an unprefixed
-         * element, rather than for an unprefixed attribute.
-         *
-         * <p>
-         * If the prefix is "xml", then the callee must resolve
-         * this prefix into "http://www.w3.org/XML/1998/namespace",
-         * as defined in the XML Namespaces Recommendation.
-         *
-         * @return
-         *              namespace URI of this prefix.
-         *              If the specified prefix is not declared,
-         *              the implementation must return null.
-         */
-        String resolveNamespacePrefix( String prefix );
-
-        /**
-         * Returns the base URI of the context.  The null string may be returned
-         * if no base URI is known.
-         */
-        String getBaseUri();
-
-        /**
-         * Checks if an unparsed entity is declared with the
-         * specified name.
-         *
-         * @return
-         *  true
-         *              if the DTD has an unparsed entity declaration for
-         *              the specified name.
-         *  false
-         *              otherwise.
-         */
-        boolean isUnparsedEntity( String entityName );
-
-        /**
-         * Checks if a notation is declared with the
-         * specified name.
-         *
-         * @return
-         *  true
-         *              if the DTD has a notation declaration for the specified name.
-         *  false
-         *              otherwise.
-         */
-        boolean isNotation( String notationName );
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,261 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *     Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *     Neither the name of the Thai Open Source Software Center Ltd nor
- *     the names of its contributors may be used to endorse or promote
- *     products derived from this software without specific prior written
- *     permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype.helpers;
-
-import org.relaxng.datatype.DatatypeLibraryFactory;
-import org.relaxng.datatype.DatatypeLibrary;
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-import java.util.Vector;
-import java.io.Reader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URL;
-
-/**
- * Discovers the datatype library implementation from the classpath.
- *
- * <p>
- * The call of the createDatatypeLibrary method finds an implementation
- * from a given datatype library URI at run-time.
- */
-public class DatatypeLibraryLoader implements DatatypeLibraryFactory {
-  private final Service service = new Service(DatatypeLibraryFactory.class);
-
-  public DatatypeLibrary createDatatypeLibrary(String uri) {
-    for (Enumeration e = service.getProviders();
-         e.hasMoreElements();) {
-      DatatypeLibraryFactory factory
-        = (DatatypeLibraryFactory)e.nextElement();
-      DatatypeLibrary library = factory.createDatatypeLibrary(uri);
-      if (library != null)
-        return library;
-    }
-    return null;
-  }
-
-        private static class Service {
-          private final Class serviceClass;
-          private final Enumeration configFiles;
-          private Enumeration classNames = null;
-          private final Vector providers = new Vector();
-          private Loader loader;
-
-          private class ProviderEnumeration implements Enumeration {
-            private int nextIndex = 0;
-
-            public boolean hasMoreElements() {
-              return nextIndex < providers.size() || moreProviders();
-            }
-
-            public Object nextElement() {
-              try {
-                return providers.elementAt(nextIndex++);
-              }
-              catch (ArrayIndexOutOfBoundsException e) {
-                throw new NoSuchElementException();
-              }
-            }
-          }
-
-          private static class Singleton implements Enumeration {
-            private Object obj;
-            private Singleton(Object obj) {
-              this.obj = obj;
-            }
-
-            public boolean hasMoreElements() {
-              return obj != null;
-            }
-
-            public Object nextElement() {
-              if (obj == null)
-                throw new NoSuchElementException();
-              Object tem = obj;
-              obj = null;
-              return tem;
-            }
-          }
-
-          // JDK 1.1
-          private static class Loader {
-            Enumeration getResources(String resName) {
-              ClassLoader cl = Loader.class.getClassLoader();
-              URL url;
-              if (cl == null)
-                url = ClassLoader.getSystemResource(resName);
-              else
-                url = cl.getResource(resName);
-              return new Singleton(url);
-            }
-
-            Class loadClass(String name) throws ClassNotFoundException {
-              return Class.forName(name);
-            }
-          }
-
-          // JDK 1.2+
-          private static class Loader2 extends Loader {
-            private ClassLoader cl;
-
-            Loader2() {
-              cl = Loader2.class.getClassLoader();
-              // If the thread context class loader has the class loader
-              // of this class as an ancestor, use the thread context class
-              // loader.  Otherwise, the thread context class loader
-              // probably hasn't been set up properly, so don't use it.
-              ClassLoader clt = Thread.currentThread().getContextClassLoader();
-              for (ClassLoader tem = clt; tem != null; tem = tem.getParent())
-                if (tem == cl) {
-                  cl = clt;
-                  break;
-                }
-            }
-
-            Enumeration getResources(String resName) {
-              try {
-                return cl.getResources(resName);
-              }
-              catch (IOException e) {
-                return new Singleton(null);
-              }
-            }
-
-            Class loadClass(String name) throws ClassNotFoundException {
-              return Class.forName(name, true, cl);
-            }
-          }
-
-          public Service(Class cls) {
-            try {
-              loader = new Loader2();
-            }
-            catch (NoSuchMethodError e) {
-              loader = new Loader();
-            }
-            serviceClass = cls;
-            String resName = "META-INF/services/" + serviceClass.getName();
-            configFiles = loader.getResources(resName);
-          }
-
-          public Enumeration getProviders() {
-            return new ProviderEnumeration();
-          }
-
-          synchronized private boolean moreProviders() {
-            for (;;) {
-              while (classNames == null) {
-                if (!configFiles.hasMoreElements())
-                  return false;
-                classNames = parseConfigFile((URL)configFiles.nextElement());
-              }
-              while (classNames.hasMoreElements()) {
-                String className = (String)classNames.nextElement();
-                try {
-                  Class cls = loader.loadClass(className);
-                  Object obj = cls.newInstance();
-                  if (serviceClass.isInstance(obj)) {
-                    providers.addElement(obj);
-                    return true;
-                  }
-                }
-                catch (ClassNotFoundException e) { }
-                catch (InstantiationException e) { }
-                catch (IllegalAccessException e) { }
-                catch (LinkageError e) { }
-              }
-              classNames = null;
-            }
-          }
-
-          private static final int START = 0;
-          private static final int IN_NAME = 1;
-          private static final int IN_COMMENT = 2;
-
-          private static Enumeration parseConfigFile(URL url) {
-            try {
-              InputStream in = url.openStream();
-              Reader r;
-              try {
-                r = new InputStreamReader(in, "UTF-8");
-              }
-              catch (UnsupportedEncodingException e) {
-                r = new InputStreamReader(in, "UTF8");
-              }
-              r = new BufferedReader(r);
-              Vector tokens = new Vector();
-              StringBuffer tokenBuf = new StringBuffer();
-              int state = START;
-              for (;;) {
-                int n = r.read();
-                if (n < 0)
-                  break;
-                char c = (char)n;
-                switch (c) {
-                case '\r':
-                case '\n':
-                  state = START;
-                  break;
-                case ' ':
-                case '\t':
-                  break;
-                case '#':
-                  state = IN_COMMENT;
-                  break;
-                default:
-                  if (state != IN_COMMENT) {
-                    state = IN_NAME;
-                    tokenBuf.append(c);
-                  }
-                  break;
-                }
-                if (tokenBuf.length() != 0 && state != IN_NAME) {
-                  tokens.addElement(tokenBuf.toString());
-                  tokenBuf.setLength(0);
-                }
-              }
-              if (tokenBuf.length() != 0)
-                tokens.addElement(tokenBuf.toString());
-              return tokens.elements();
-            }
-            catch (IOException e) {
-              return null;
-            }
-          }
-        }
-
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *     Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *     Neither the name of the Thai Open Source Software Center Ltd nor
- *     the names of its contributors may be used to endorse or promote
- *     products derived from this software without specific prior written
- *     permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype.helpers;
-
-import org.relaxng.datatype.*;
-
-/**
- * Dummy implementation of {@link DatatypeBuilder}.
- *
- * This implementation can be used for Datatypes which have no parameters.
- * Any attempt to add parameters will be rejected.
- *
- * <p>
- * Typical usage would be:
- * <PRE>{@code
- * class MyDatatypeLibrary implements DatatypeLibrary {
- *     ....
- *     DatatypeBuilder createDatatypeBuilder( String typeName ) {
- *         return new ParameterleessDatatypeBuilder(createDatatype(typeName));
- *     }
- *     ....
- * }
- * }</PRE>
- *
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public final class ParameterlessDatatypeBuilder implements DatatypeBuilder {
-
-        /** This type object is returned for the derive method. */
-        private final Datatype baseType;
-
-        public ParameterlessDatatypeBuilder( Datatype baseType ) {
-                this.baseType = baseType;
-        }
-
-        public void addParameter( String name, String strValue, ValidationContext context )
-                        throws DatatypeException {
-                throw new DatatypeException();
-        }
-
-        public Datatype createDatatype() throws DatatypeException {
-                return baseType;
-        }
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/helpers/StreamingValidatorImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *     Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *     Neither the name of the Thai Open Source Software Center Ltd nor
- *     the names of its contributors may be used to endorse or promote
- *     products derived from this software without specific prior written
- *     permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype.helpers;
-
-import org.relaxng.datatype.*;
-
-/**
- * Dummy implementation of {@link DatatypeStreamingValidator}.
- *
- * <p>
- * This implementation can be used as a quick hack when the performance
- * of streaming validation is not important. And this implementation
- * also shows you how to implement the DatatypeStreamingValidator interface.
- *
- * <p>
- * Typical usage would be:
- * <PRE>{@code
- * class MyDatatype implements Datatype {
- *     ....
- *     public DatatypeStreamingValidator createStreamingValidator( ValidationContext context ) {
- *         return new StreamingValidatorImpl(this,context);
- *     }
- *     ....
- * }
- * }</PRE>
- *
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public final class StreamingValidatorImpl implements DatatypeStreamingValidator {
-
-        /** This buffer accumulates characters. */
-        private final StringBuffer buffer = new StringBuffer();
-
-        /** Datatype obejct that creates this streaming validator. */
-        private final Datatype baseType;
-
-        /** The current context. */
-        private final ValidationContext context;
-
-        public void addCharacters( char[] buf, int start, int len ) {
-                // append characters to the current buffer.
-                buffer.append(buf,start,len);
-        }
-
-        public boolean isValid() {
-                return baseType.isValid(buffer.toString(),context);
-        }
-
-        public void checkValid() throws DatatypeException {
-                baseType.checkValid(buffer.toString(),context);
-        }
-
-        public StreamingValidatorImpl( Datatype baseType, ValidationContext context ) {
-                this.baseType = baseType;
-                this.context = context;
-        }
-}
--- a/jdk/.hgtags	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/.hgtags	Wed Jul 05 20:52:37 2017 +0200
@@ -326,3 +326,4 @@
 fdc13a2d32867ca3c57b7fa2620c6b59c83168cb jdk9-b81
 b10b64263b563e21f055c881444f625ec618b826 jdk9-b82
 d11f25ce3c545823f53bb978d454a4d2901abac3 jdk9-b83
+757ef7f6d0042934edea3e0bf616fad2c1a22789 jdk9-b84
--- a/jdk/make/data/fontconfig/windows.fontconfig.properties	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/data/fontconfig/windows.fontconfig.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -40,6 +40,7 @@
 allfonts.dingbats=Wingdings
 allfonts.lucida=Lucida Sans Regular
 allfonts.symbol=Symbol
+allfonts.symbols=Segoe UI Symbol
 allfonts.thai=Lucida Sans Regular
 allfonts.georgian=Sylfaen
 
@@ -236,7 +237,7 @@
 
 sequence.allfonts.x-windows-874=alphabetic,thai,dingbats,symbol
 
-sequence.fallback=lucida,\
+sequence.fallback=lucida,symbols,\
                   chinese-ms950,chinese-hkscs,chinese-ms936,chinese-gb18030,\
                   japanese,korean,chinese-ms950-extb,chinese-ms936-extb,georgian
 
@@ -298,3 +299,4 @@
 filename.Wingdings=WINGDING.TTF
 
 filename.Sylfaen=sylfaen.ttf
+filename.Segoe_UI_Symbol=SEGUISYM.TTF
--- a/jdk/make/data/tzdata/VERSION	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/data/tzdata/VERSION	Wed Jul 05 20:52:37 2017 +0200
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2015f
+tzdata2015g
--- a/jdk/make/data/tzdata/asia	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/data/tzdata/asia	Wed Jul 05 20:52:37 2017 +0200
@@ -154,7 +154,8 @@
 # Azerbaijan
 # From Rustam Aliyev of the Azerbaijan Internet Forum (2005-10-23):
 # According to the resolution of Cabinet of Ministers, 1997
-# Resolution available at: http://aif.az/docs/daylight_res.pdf
+# From Paul Eggert (2015-09-17): It was Resolution No. 21 (1997-03-17).
+# http://code.az/files/daylight_res.pdf
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Azer	1997	max	-	Mar	lastSun	 4:00	1:00	S
 Rule	Azer	1997	max	-	Oct	lastSun	 5:00	0	-
@@ -1740,11 +1741,12 @@
 # the 8:30 time zone on August 15, one example:
 # http://www.bbc.com/news/world-asia-33815049
 #
-# From Paul Eggert (2015-08-07):
-# No transition time is specified; assume 00:00.
+# From Paul Eggert (2015-08-15):
+# Bells rang out midnight (00:00) Friday as part of the celebrations.  See:
+# Talmadge E. North Korea celebrates new time zone, 'Pyongyang Time'
+# http://news.yahoo.com/north-korea-celebrates-time-zone-pyongyang-time-164038128.html
 # There is no common English-language abbreviation for this time zone.
-# Use %z rather than invent one.  We can't assume %z works everywhere yet,
-# so for now substitute its output manually.
+# Use KST, as that's what we already use for 1954-1961 in ROK.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Seoul	8:27:52	-	LMT	1908 Apr  1
@@ -1758,7 +1760,7 @@
 			8:30	-	KST	1912 Jan  1
 			9:00	-	JCST	1937 Oct  1
 			9:00	-	JST	1945 Aug 24
-			9:00	-	KST	2015 Aug 15
+			9:00	-	KST	2015 Aug 15 00:00
 			8:30	-	KST
 
 ###############################################################################
--- a/jdk/make/data/tzdata/australasia	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/data/tzdata/australasia	Wed Jul 05 20:52:37 2017 +0200
@@ -358,10 +358,17 @@
 # DST will start Nov. 2 this year.
 # http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-NOVEMBER-2ND.aspx
 
-# From Paul Eggert (2014-10-20):
+# From a government order dated 2015-08-26 and published as Legal Notice No. 77
+# in the Government of Fiji Gazette Supplement No. 24 (2015-08-28),
+# via Ken Rylander (2015-09-02):
+# the daylight saving period is 1 hour in advance of the standard time
+# commencing at 2.00 am on Sunday 1st November, 2015 and ending at
+# 3.00 am on Sunday 17th January, 2016.
+
+# From Paul Eggert (2015-09-01):
 # For now, guess DST from 02:00 the first Sunday in November to
-# 03:00 the first Sunday on or after January 18.  Although ad hoc, it
-# matches this year's plan and seems more likely to match future
+# 03:00 the third Sunday in January.  Although ad hoc, it matches
+# transitions since late 2014 and seems more likely to match future
 # practice than guessing no DST.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -374,7 +381,7 @@
 Rule	Fiji	2012	2013	-	Jan	Sun>=18	3:00	0	-
 Rule	Fiji	2014	only	-	Jan	Sun>=18	2:00	0	-
 Rule	Fiji	2014	max	-	Nov	Sun>=1	2:00	1:00	S
-Rule	Fiji	2015	max	-	Jan	Sun>=18	3:00	0	-
+Rule	Fiji	2015	max	-	Jan	Sun>=15	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:55:44 -	LMT	1915 Oct 26 # Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -533,7 +540,10 @@
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Norfolk	11:11:52 -	LMT	1901 # Kingston
 			11:12	-	NMT	1951 # Norfolk Mean Time
-			11:30	-	NFT	# Norfolk Time
+			11:30	-	NFT	1974 Oct 27 02:00 # Norfolk T.
+			11:30	1:00	NFST	1975 Mar  2 02:00
+			11:30	-	NFT	2015 Oct  4 02:00
+			11:00	-	NFT
 
 # Palau (Belau)
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1573,6 +1583,20 @@
 # started DST on June 3.  Possibly DST was observed other years
 # in Midway, but we have no record of it.
 
+# Norfolk
+
+# From Alexander Krivenyshev (2015-09-23):
+# Norfolk Island will change ... from +1130 to +1100:
+# https://www.comlaw.gov.au/Details/F2015L01483/Explanatory%20Statement/Text
+# ... at 12.30 am (by legal time in New South Wales) on 4 October 2015.
+# http://www.norfolkisland.gov.nf/nia/MediaRelease/Media%20Release%20Norfolk%20Island%20Standard%20Time%20Change.pdf
+
+# From Paul Eggert (2015-09-23):
+# Transitions before 2015 are from timeanddate.com, which consulted
+# the Norfolk Island Museum and the Australian Bureau of Meteorology's
+# Norfolk Island station, and found no record of Norfolk observing DST
+# other than in 1974/5.  See:
+# http://www.timeanddate.com/time/australia/norfolk-island.html
 
 # Pitcairn
 
--- a/jdk/make/data/tzdata/europe	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/data/tzdata/europe	Wed Jul 05 20:52:37 2017 +0200
@@ -3173,6 +3173,11 @@
 # http://www.balkaneu.com/eventful-elections-turkey/ 2014-03-30.
 # I guess the best we can do is document the official time.
 
+# From Fatih (2015-09-29):
+# It's officially announced now by the Ministry of Energy.
+# Turkey delays winter time to 8th of November 04:00
+# http://www.aa.com.tr/tr/turkiye/yaz-saati-uygulamasi-8-kasimda-sona-erecek/362217
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Turkey	1916	only	-	May	 1	0:00	1:00	S
 Rule	Turkey	1916	only	-	Oct	 1	0:00	0	-
@@ -3242,6 +3247,8 @@
 			2:00	-	EET	2011 Mar 28  1:00u
 			2:00	EU	EE%sT	2014 Mar 30  1:00u
 			2:00	-	EET	2014 Mar 31  1:00u
+			2:00	EU	EE%sT	2015 Oct 25  1:00u
+			2:00	1:00	EEST	2015 Nov  8  1:00u
 			2:00	EU	EE%sT
 Link	Europe/Istanbul	Asia/Istanbul	# Istanbul is in both continents.
 
--- a/jdk/make/data/tzdata/northamerica	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/data/tzdata/northamerica	Wed Jul 05 20:52:37 2017 +0200
@@ -1849,6 +1849,22 @@
 
 # The transition dates (and times) are guesses.
 
+# From Matt Johnson (2015-09-21):
+# Fort Nelson, BC, Canada will cancel DST this year.  So while previously they
+# were aligned with America/Vancouver, they're now aligned with
+# America/Dawson_Creek.
+# http://www.northernrockies.ca/EN/meta/news/archives/2015/northern-rockies-time-change.html
+#
+# From Tim Parenti (2015-09-23):
+# This requires a new zone for the Northern Rockies Regional Municipality,
+# America/Fort_Nelson.  The resolution of 2014-12-08 was reached following a
+# 2014-11-15 poll with nearly 75% support.  Effectively, the municipality has
+# been on MST (-0700) like Dawson Creek since it advanced its clocks on
+# 2015-03-08.
+#
+# From Paul Eggert (2015-09-23):
+# Shanks says Fort Nelson did not observe DST in 1946, unlike Vancouver.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Vanc	1918	only	-	Apr	14	2:00	1:00	D
 Rule	Vanc	1918	only	-	Oct	27	2:00	0	S
@@ -1867,6 +1883,12 @@
 			-8:00	Canada	P%sT	1947
 			-8:00	Vanc	P%sT	1972 Aug 30  2:00
 			-7:00	-	MST
+Zone America/Fort_Nelson	-8:10:47 -	LMT	1884
+			-8:00	Vanc	P%sT	1946
+			-8:00	-	PST	1947
+			-8:00	Vanc	P%sT	1987
+			-8:00	Canada	P%sT	2015 Mar  8  2:00
+			-7:00	-	MST
 Zone America/Creston	-7:46:04 -	LMT	1884
 			-7:00	-	MST	1916 Oct 1
 			-8:00	-	PST	1918 Jun 2
--- a/jdk/make/data/tzdata/zone.tab	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/data/tzdata/zone.tab	Wed Jul 05 20:52:37 2017 +0200
@@ -152,6 +152,7 @@
 CA	+682059-1334300	America/Inuvik	Mountain Time - west Northwest Territories
 CA	+4906-11631	America/Creston	Mountain Standard Time - Creston, British Columbia
 CA	+5946-12014	America/Dawson_Creek	Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia
+CA	+5848-12242	America/Fort_Nelson	Mountain Standard Time - Fort Nelson, British Columbia
 CA	+4916-12307	America/Vancouver	Pacific Time - west British Columbia
 CA	+6043-13503	America/Whitehorse	Pacific Time - south Yukon
 CA	+6404-13925	America/Dawson	Pacific Time - north Yukon
--- a/jdk/make/gensrc/GensrcProperties.gmk	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/gensrc/GensrcProperties.gmk	Wed Jul 05 20:52:37 2017 +0200
@@ -93,8 +93,7 @@
   $$($1_TARGET): $$($1_SRCS) $$($1_JAVAS) $(BUILD_TOOLS_JDK)
 	$(MKDIR) -p $$(@D) $$($1_DIRS)
 	$(ECHO) Compiling $$(words $$($1_SRCS)) properties into resource bundles for $(MODULE)
-	$(RM) $$($1_CMDLINE_FILE)
-	$$(call ListPathsSafely,$1_CMDLINE,\n, >> $$($1_CMDLINE_FILE))
+	$$(eval $$(call ListPathsSafely, $1_CMDLINE, $$($1_CMDLINE_FILE)))
 	$(TOOL_COMPILEPROPERTIES) -quiet @$$($1_CMDLINE_FILE)
 	$(TOUCH) $$@
 
--- a/jdk/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk	Wed Jul 05 20:52:37 2017 +0200
@@ -26,5 +26,6 @@
 include LauncherCommon.gmk
 
 $(eval $(call SetupLauncher,jjs, \
+    -DENABLE_ARG_FILES \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.nashorn.tools.jjs.Main"$(COMMA) }'))
 
--- a/jdk/make/lib/Awt2dLibraries.gmk	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/lib/Awt2dLibraries.gmk	Wed Jul 05 20:52:37 2017 +0200
@@ -959,10 +959,9 @@
           $(X_CFLAGS) \
           $(X_LIBS) \
           $(LIBAWT_LWAWT_CFLAGS), \
-      DISABLED_WARNINGS_clang := incomplete-implementation \
+      DISABLED_WARNINGS_clang := incomplete-implementation enum-conversion \
           deprecated-declarations objc-method-access bitwise-op-parentheses \
           incompatible-pointer-types parentheses-equality extra-tokens, \
-      WARNINGS_AS_ERRORS_clang := false, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN) \
           -L$(INSTALL_LIBRARIES_HERE), \
--- a/jdk/make/lib/CoreLibraries.gmk	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/lib/CoreLibraries.gmk	Wed Jul 05 20:52:37 2017 +0200
@@ -160,6 +160,7 @@
         -framework Security -framework SystemConfiguration, \
     LDFLAGS_SUFFIX_windows := -export:winFileHandleOpen -export:handleLseek \
         -export:getLastErrorString \
+        -export:getErrorString \
         jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
         shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \
         advapi32.lib version.lib, \
--- a/jdk/make/mapfiles/libjava/mapfile-vers	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/mapfiles/libjava/mapfile-vers	Wed Jul 05 20:52:37 2017 +0200
@@ -282,8 +282,9 @@
 
                 # ZipFile.c needs this one
 		throwFileNotFoundException;
-                # zip_util.c needs this one
+                # zip_util.c needs these
 		getLastErrorString;
+		getErrorString;
 
 	# Outcalls from libjvm done using dlsym().
 
--- a/jdk/make/rmic/RmicCommon.gmk	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/rmic/RmicCommon.gmk	Wed Jul 05 20:52:37 2017 +0200
@@ -31,9 +31,9 @@
 
 ##########################################################################################
 
-BTRMIC_CP := $(call PathList, $(INTERIM_CORBA_JAR) \
+BTRMIC_CP := $(call PathList, \
     $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_classes $(INTERIM_LANGTOOLS_JAR))
-BTRMIC_ARGS := -Xbootclasspath/p:$(BTRMIC_CP) -cp $(BTRMIC_CP)
+BTRMIC_ARGS := -cp $(BTRMIC_CP)
 RMIC := $(JAVA) $(BTRMIC_ARGS) sun.rmi.rmic.Main
 
 CLASSES_DIR := $(JDK_OUTPUTDIR)/modules
--- a/jdk/make/src/classes/build/tools/module/ModuleArchive.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/make/src/classes/build/tools/module/ModuleArchive.java	Wed Jul 05 20:52:37 2017 +0200
@@ -105,6 +105,7 @@
                     entries.addAll(stream
                             .filter(p -> !Files.isDirectory(p)
                                     && !classes.relativize(p).toString().startsWith("_the.")
+                                    && !classes.relativize(p).toString().endsWith(".bc")
                                     && !classes.relativize(p).toString().equals("javac_state"))
                             .sorted()
                             .map(p -> toEntry(p, classes, EntryType.CLASS_OR_RESOURCE))
--- a/jdk/src/demo/share/applets/MoleculeViewer/XYZApp.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/demo/share/applets/MoleculeViewer/XYZApp.java	Wed Jul 05 20:52:37 2017 +0200
@@ -504,11 +504,11 @@
 
     private static Applet applet;
     private static byte[] data;
-    private final static int R = 40;
-    private final static int hx = 15;
-    private final static int hy = 15;
-    private final static int bgGrey = 192;
-    private final static int nBalls = 16;
+    private static final int R = 40;
+    private static final int hx = 15;
+    private static final int hy = 15;
+    private static final int bgGrey = 192;
+    private static final int nBalls = 16;
     private static int maxr;
     private int Rl;
     private int Gl;
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/ImageTests.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/ImageTests.java	Wed Jul 05 20:52:37 2017 +0200
@@ -771,7 +771,7 @@
         }
     }
 
-    private static abstract class ImageOpTests extends ImageTests {
+    private abstract static class ImageOpTests extends ImageTests {
         ImageOpTests(Group parent, String nodeName, String desc) {
             super(parent, nodeName, desc,
                   new Modifier.Filter() {
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/PixelTests.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/PixelTests.java	Wed Jul 05 20:52:37 2017 +0200
@@ -245,7 +245,7 @@
         }
     }
 
-    public static abstract class BufImgTest extends PixelTests {
+    public abstract static class BufImgTest extends PixelTests {
         public BufImgTest(String nodeName, String description) {
             super(bufimgtestroot, nodeName, description);
         }
@@ -281,7 +281,7 @@
         }
     }
 
-    public static abstract class RasTest extends PixelTests {
+    public abstract static class RasTest extends PixelTests {
         public RasTest(String nodeName, String description) {
             super(rastertestroot, nodeName, description);
         }
@@ -355,7 +355,7 @@
         }
     }
 
-    public static abstract class DataBufTest extends PixelTests {
+    public abstract static class DataBufTest extends PixelTests {
         public DataBufTest(String nodeName, String description) {
             super(dbtestroot, nodeName, description);
         }
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/InputTests.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/InputTests.java	Wed Jul 05 20:52:37 2017 +0200
@@ -161,7 +161,7 @@
         }
     }
 
-    protected static abstract class Context {
+    protected abstract static class Context {
         int size;
         Object input;
         int inputType;
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/OutputTests.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/OutputTests.java	Wed Jul 05 20:52:37 2017 +0200
@@ -156,7 +156,7 @@
         }
     }
 
-    protected static abstract class Context {
+    protected abstract static class Context {
         int size;
         Object output;
         int outputType;
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/text/TextMeasureTests.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/text/TextMeasureTests.java	Wed Jul 05 20:52:37 2017 +0200
@@ -232,7 +232,7 @@
         }
     }
 
-    public static abstract class GVMeasureTest extends TextMeasureTests {
+    public abstract static class GVMeasureTest extends TextMeasureTests {
         protected GVMeasureTest(Group parent, String nodeName, String description) {
             super(parent, nodeName, description);
         }
@@ -431,7 +431,7 @@
         }
     }
 
-    public static abstract class TLMeasureTest extends TextMeasureTests {
+    public abstract static class TLMeasureTest extends TextMeasureTests {
         protected TLMeasureTest(Group parent, String nodeName, String description) {
             super(parent, nodeName, description);
         }
@@ -506,7 +506,7 @@
         }
     }
 
-    public static abstract class TLExtendedMeasureTest extends TLMeasureTest {
+    public abstract static class TLExtendedMeasureTest extends TLMeasureTest {
         protected TLExtendedMeasureTest(Group parent, String nodeName, String description) {
             super(parent, nodeName, description);
         }
--- a/jdk/src/demo/share/jfc/FileChooserDemo/FileChooserDemo.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/demo/share/jfc/FileChooserDemo/FileChooserDemo.java	Wed Jul 05 20:52:37 2017 +0200
@@ -143,11 +143,11 @@
     private JTextField customField;
     private final ExampleFileView fileView;
     private final ExampleFileSystemView fileSystemView;
-    private final static Dimension hpad10 = new Dimension(10, 1);
-    private final static Dimension vpad20 = new Dimension(1, 20);
-    private final static Dimension vpad7 = new Dimension(1, 7);
-    private final static Dimension vpad4 = new Dimension(1, 4);
-    private final static Insets insets = new Insets(5, 10, 0, 10);
+    private static final Dimension hpad10 = new Dimension(10, 1);
+    private static final Dimension vpad20 = new Dimension(1, 20);
+    private static final Dimension vpad7 = new Dimension(1, 7);
+    private static final Dimension vpad4 = new Dimension(1, 4);
+    private static final Insets insets = new Insets(5, 10, 0, 10);
     private final FilePreviewer previewer;
     private final JFileChooser chooser;
 
--- a/jdk/src/demo/share/jfc/Notepad/Notepad.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/demo/share/jfc/Notepad/Notepad.java	Wed Jul 05 20:52:37 2017 +0200
@@ -64,7 +64,7 @@
 
     protected static Properties properties;
     private static ResourceBundle resources;
-    private final static String EXIT_AFTER_PAINT = "-exit";
+    private static final String EXIT_AFTER_PAINT = "-exit";
     private static boolean exitAfterFirstPaint;
 
     private static final String[] MENUBAR_KEYS = {"file", "edit", "debug"};
--- a/jdk/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,9 +65,23 @@
         long pipeFds = IOUtil.makePipe(false);
         fd0 = (int) (pipeFds >>> 32);
         fd1 = (int) pipeFds;
-        pollWrapper = new EPollArrayWrapper();
-        pollWrapper.initInterrupt(fd0, fd1);
-        fdToKey = new HashMap<>();
+        try {
+            pollWrapper = new EPollArrayWrapper();
+            pollWrapper.initInterrupt(fd0, fd1);
+            fdToKey = new HashMap<>();
+        } catch (Throwable t) {
+            try {
+                FileDispatcherImpl.closeIntFD(fd0);
+            } catch (IOException ioe0) {
+                t.addSuppressed(ioe0);
+            }
+            try {
+                FileDispatcherImpl.closeIntFD(fd1);
+            } catch (IOException ioe1) {
+                t.addSuppressed(ioe1);
+            }
+            throw t;
+        }
     }
 
     protected int doSelect(long timeout) throws IOException {
--- a/jdk/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -84,10 +84,24 @@
         long fds = IOUtil.makePipe(false);
         fd0 = (int)(fds >>> 32);
         fd1 = (int)fds;
-        kqueueWrapper = new KQueueArrayWrapper();
-        kqueueWrapper.initInterrupt(fd0, fd1);
-        fdMap = new HashMap<>();
-        totalChannels = 1;
+        try {
+            kqueueWrapper = new KQueueArrayWrapper();
+            kqueueWrapper.initInterrupt(fd0, fd1);
+            fdMap = new HashMap<>();
+            totalChannels = 1;
+        } catch (Throwable t) {
+            try {
+                FileDispatcherImpl.closeIntFD(fd0);
+            } catch (IOException ioe0) {
+                t.addSuppressed(ioe0);
+            }
+            try {
+                FileDispatcherImpl.closeIntFD(fd1);
+            } catch (IOException ioe1) {
+                t.addSuppressed(ioe1);
+            }
+            throw t;
+        }
     }
 
 
--- a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PackerImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PackerImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.time.ZoneOffset;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -41,7 +42,6 @@
 import java.util.ListIterator;
 import java.util.Map;
 import java.util.SortedMap;
-import java.util.TimeZone;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 import java.util.jar.JarInputStream;
@@ -84,13 +84,8 @@
      */
     public synchronized void pack(JarFile in, OutputStream out) throws IOException {
         assert(Utils.currentInstance.get() == null);
-        TimeZone tz = (props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE))
-                      ? null
-                      : TimeZone.getDefault();
         try {
             Utils.currentInstance.set(this);
-            if (tz != null) TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
-
             if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
                 Utils.copyJarFile(in, out);
             } else {
@@ -98,7 +93,6 @@
             }
         } finally {
             Utils.currentInstance.set(null);
-            if (tz != null) TimeZone.setDefault(tz);
             in.close();
         }
     }
@@ -119,11 +113,8 @@
      */
     public synchronized void pack(JarInputStream in, OutputStream out) throws IOException {
         assert(Utils.currentInstance.get() == null);
-        TimeZone tz = (props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE)) ? null :
-            TimeZone.getDefault();
         try {
             Utils.currentInstance.set(this);
-            if (tz != null) TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
             if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
                 Utils.copyJarFile(in, out);
             } else {
@@ -131,7 +122,6 @@
             }
         } finally {
             Utils.currentInstance.set(null);
-            if (tz != null) TimeZone.setDefault(tz);
             in.close();
         }
     }
@@ -327,7 +317,9 @@
                 this.f = null;
                 this.jf = jf;
                 this.je = je;
-                int timeSecs = getModtime(je.getTime());
+                int timeSecs = (int) je.getTimeLocal()
+                        .atOffset(ZoneOffset.UTC)
+                        .toEpochSecond();
                 if (keepModtime && timeSecs != Constants.NO_MODTIME) {
                      this.modtime = timeSecs;
                 } else if (latestModtime && timeSecs > pkg.default_modtime) {
--- a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PropMap.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PropMap.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -69,10 +69,6 @@
         props.put(Utils.DEBUG_VERBOSE,
                   String.valueOf(Integer.getInteger(Utils.DEBUG_VERBOSE,0)));
 
-        // Set the PACK_TIMEZONE_NO_UTC
-        props.put(Utils.PACK_DEFAULT_TIMEZONE,
-                  String.valueOf(Boolean.getBoolean(Utils.PACK_DEFAULT_TIMEZONE)));
-
         // The segment size is unlimited
         props.put(Pack200.Packer.SEGMENT_LIMIT, "-1");
 
--- a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,10 +32,11 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.time.LocalDateTime;
+import java.time.ZoneOffset;
 import java.util.HashSet;
 import java.util.Set;
 import java.util.SortedMap;
-import java.util.TimeZone;
 import java.util.jar.JarEntry;
 import java.util.jar.JarInputStream;
 import java.util.jar.JarOutputStream;
@@ -95,13 +96,9 @@
             throw new NullPointerException("null output");
         }
         assert(Utils.currentInstance.get() == null);
-        TimeZone tz = (props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE))
-                      ? null
-                      : TimeZone.getDefault();
 
         try {
             Utils.currentInstance.set(this);
-            if (tz != null) TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
             final int verbose = props.getInteger(Utils.DEBUG_VERBOSE);
             BufferedInputStream in0 = new BufferedInputStream(in);
             if (Utils.isJarMagic(Utils.readMagic(in0))) {
@@ -125,7 +122,6 @@
         } finally {
             _nunp = null;
             Utils.currentInstance.set(null);
-            if (tz != null) TimeZone.setDefault(tz);
         }
     }
 
@@ -246,9 +242,9 @@
                     je.setCrc(crc.getValue());
                 }
                 if (keepModtime) {
-                    je.setTime(file.modtime);
-                    // Convert back to milliseconds
-                    je.setTime((long)file.modtime * 1000);
+                    LocalDateTime ldt = LocalDateTime
+                            .ofEpochSecond(file.modtime, 0, ZoneOffset.UTC);
+                    je.setTimeLocal(ldt);
                 } else {
                     je.setTime((long)modtime * 1000);
                 }
--- a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/Utils.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/Utils.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,13 +62,6 @@
     static final String DEBUG_DISABLE_NATIVE = COM_PREFIX+"disable.native";
 
     /*
-     * Use the default working TimeZone instead of UTC.
-     * Note: This has installer unpacker implications.
-     * see: zip.cpp which uses gmtime vs. localtime.
-     */
-    static final String PACK_DEFAULT_TIMEZONE = COM_PREFIX+"default.timezone";
-
-    /*
      * Property indicating that the unpacker should
      * ignore the transmitted PACK_MODIFICATION_TIME,
      * replacing it by the given value. The value can
--- a/jdk/src/java.base/share/classes/com/sun/security/ntlm/NTLM.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/com/sun/security/ntlm/NTLM.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -56,7 +56,9 @@
     private final Mac hmac;
     private final MessageDigest md5;
     private static final boolean DEBUG =
-            System.getProperty("ntlm.debug") != null;
+            java.security.AccessController.doPrivileged(
+                    new sun.security.action.GetBooleanAction("ntlm.debug"))
+                        .booleanValue();
 
     final Version v;
 
--- a/jdk/src/java.base/share/classes/java/io/Console.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/io/Console.java	Wed Jul 05 20:52:37 2017 +0200
@@ -27,6 +27,8 @@
 
 import java.util.*;
 import java.nio.charset.Charset;
+import jdk.internal.misc.JavaIOAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.nio.cs.StreamDecoder;
 import sun.nio.cs.StreamEncoder;
 
@@ -519,7 +521,7 @@
         try {
             // Add a shutdown hook to restore console's echo state should
             // it be necessary.
-            sun.misc.SharedSecrets.getJavaLangAccess()
+            SharedSecrets.getJavaLangAccess()
                 .registerShutdownHook(0 /* shutdown hook invocation order */,
                     false /* only register if shutdown is not in progress */,
                     new Runnable() {
@@ -536,7 +538,7 @@
             // by a shutdown hook
         }
 
-        sun.misc.SharedSecrets.setJavaIOAccess(new sun.misc.JavaIOAccess() {
+        SharedSecrets.setJavaIOAccess(new JavaIOAccess() {
             public Console console() {
                 if (istty()) {
                     if (cons == null)
--- a/jdk/src/java.base/share/classes/java/io/DeleteOnExitHook.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/io/DeleteOnExitHook.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,6 +26,7 @@
 
 import java.util.*;
 import java.io.File;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * This class holds a set of filenames to be deleted on VM exit through a shutdown hook.
@@ -41,7 +42,7 @@
         // delete on exit list and cause the DeleteOnExitHook to be
         // registered during shutdown in progress. So set the
         // registerShutdownInProgress parameter to true.
-        sun.misc.SharedSecrets.getJavaLangAccess()
+        SharedSecrets.getJavaLangAccess()
             .registerShutdownHook(2 /* Shutdown hook invocation order */,
                 true /* register even if shutdown in progress */,
                 new Runnable() {
--- a/jdk/src/java.base/share/classes/java/io/FileOutputStream.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/io/FileOutputStream.java	Wed Jul 05 20:52:37 2017 +0200
@@ -27,8 +27,8 @@
 
 import java.nio.channels.FileChannel;
 import java.util.concurrent.atomic.AtomicBoolean;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 import sun.nio.ch.FileChannelImpl;
 
 
--- a/jdk/src/java.base/share/classes/java/lang/FdLibm.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/FdLibm.java	Wed Jul 05 20:52:37 2017 +0200
@@ -352,15 +352,15 @@
 
             double p_h, p_l, t1, t2;
             // |y| is huge
-            if (y_abs > 0x1.0p31) { // if |y| > 2**31
+            if (y_abs > 0x1.00000_ffff_ffffp31) { // if |y| > ~2**31
                 final double INV_LN2   =  0x1.7154_7652_b82fep0;   //  1.44269504088896338700e+00 = 1/ln2
                 final double INV_LN2_H =  0x1.715476p0;            //  1.44269502162933349609e+00 = 24 bits of 1/ln2
                 final double INV_LN2_L =  0x1.4ae0_bf85_ddf44p-26; //  1.92596299112661746887e-08 = 1/ln2 tail
 
                 // Over/underflow if x is not close to one
-                if (x_abs < 0x1.fffffp-1) // |x| < 0.9999995231628418
+                if (x_abs < 0x1.fffff_0000_0000p-1) // |x| < ~0.9999995231628418
                     return (y < 0.0) ? s * INFINITY : s * 0.0;
-                if (x_abs > 1.0)         // |x| > 1.0
+                if (x_abs > 0x1.00000_ffff_ffffp0)         // |x| > ~1.0
                     return (y > 0.0) ? s * INFINITY : s * 0.0;
                 /*
                  * now |1-x| is tiny <= 2**-20, sufficient to compute
--- a/jdk/src/java.base/share/classes/java/lang/System.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/System.java	Wed Jul 05 20:52:37 2017 +0200
@@ -43,6 +43,8 @@
 import sun.security.util.SecurityConstants;
 import sun.reflect.annotation.AnnotationType;
 import jdk.internal.HotSpotIntrinsicCandidate;
+import jdk.internal.misc.JavaLangAccess;;
+import jdk.internal.misc.SharedSecrets;;
 
 /**
  * The <code>System</code> class contains several useful class fields
@@ -212,7 +214,7 @@
      public static Console console() {
          if (cons == null) {
              synchronized (System.class) {
-                 cons = sun.misc.SharedSecrets.getJavaIOAccess().console();
+                 cons = SharedSecrets.getJavaIOAccess().console();
              }
          }
          return cons;
@@ -1216,7 +1218,7 @@
 
     private static void setJavaLangAccess() {
         // Allow privileged classes outside of java.lang
-        sun.misc.SharedSecrets.setJavaLangAccess(new sun.misc.JavaLangAccess(){
+        SharedSecrets.setJavaLangAccess(new JavaLangAccess(){
             public sun.reflect.ConstantPool getConstantPool(Class<?> klass) {
                 return klass.getConstantPool();
             }
--- a/jdk/src/java.base/share/classes/java/lang/Thread.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/Thread.java	Wed Jul 05 20:52:37 2017 +0200
@@ -233,7 +233,8 @@
     private volatile Interruptible blocker;
     private final Object blockerLock = new Object();
 
-    /* Set the blocker field; invoked via sun.misc.SharedSecrets from java.nio code
+    /* Set the blocker field; invoked via jdk.internal.misc.SharedSecrets
+     * from java.nio code
      */
     void blockedOn(Interruptible b) {
         synchronized (blockerLock) {
--- a/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -27,9 +27,9 @@
 
 import java.security.PrivilegedAction;
 import java.security.AccessController;
-import sun.misc.JavaLangAccess;
+import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.ManagedLocalsThread;
-import sun.misc.SharedSecrets;
 import sun.misc.VM;
 
 final class Finalizer extends FinalReference<Object> { /* Package-private; must be in
--- a/jdk/src/java.base/share/classes/java/lang/ref/Reference.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/ref/Reference.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,10 +26,10 @@
 package java.lang.ref;
 
 import sun.misc.Cleaner;
-import sun.misc.JavaLangRefAccess;
+import jdk.internal.HotSpotIntrinsicCandidate;
+import jdk.internal.misc.JavaLangRefAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.ManagedLocalsThread;
-import sun.misc.SharedSecrets;
-import jdk.internal.HotSpotIntrinsicCandidate;
 
 /**
  * Abstract base class for reference objects.  This class defines the
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -25,6 +25,7 @@
 
 package java.lang.reflect;
 
+import jdk.internal.misc.SharedSecrets;
 import sun.reflect.CallerSensitive;
 import sun.reflect.ConstructorAccessor;
 import sun.reflect.Reflection;
@@ -582,7 +583,7 @@
 
         // A Constructor for an inner class
         return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
-                sun.misc.SharedSecrets.getJavaLangAccess().
+                SharedSecrets.getJavaLangAccess().
                     getConstantPool(thisDeclClass),
                 this,
                 thisDeclClass,
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Executable.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Executable.java	Wed Jul 05 20:52:37 2017 +0200
@@ -28,6 +28,8 @@
 import java.lang.annotation.*;
 import java.util.Map;
 import java.util.Objects;
+
+import jdk.internal.misc.SharedSecrets;
 import sun.reflect.annotation.AnnotationParser;
 import sun.reflect.annotation.AnnotationSupport;
 import sun.reflect.annotation.TypeAnnotationParser;
@@ -79,7 +81,7 @@
     Annotation[][] parseParameterAnnotations(byte[] parameterAnnotations) {
         return AnnotationParser.parseParameterAnnotations(
                parameterAnnotations,
-               sun.misc.SharedSecrets.getJavaLangAccess().
+               SharedSecrets.getJavaLangAccess().
                getConstantPool(getDeclaringClass()),
                getDeclaringClass());
     }
@@ -601,7 +603,7 @@
                     } else {
                         declAnnos = AnnotationParser.parseAnnotations(
                                 getAnnotationBytes(),
-                                sun.misc.SharedSecrets.getJavaLangAccess().
+                                SharedSecrets.getJavaLangAccess().
                                         getConstantPool(getDeclaringClass()),
                                 getDeclaringClass()
                         );
@@ -638,7 +640,7 @@
      */
     AnnotatedType getAnnotatedReturnType0(Type returnType) {
         return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
-                sun.misc.SharedSecrets.getJavaLangAccess().
+                SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
                 getDeclaringClass(),
@@ -672,7 +674,7 @@
         if (Modifier.isStatic(this.getModifiers()))
             return null;
         return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
-                sun.misc.SharedSecrets.getJavaLangAccess().
+                SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
                 getDeclaringClass(),
@@ -696,7 +698,7 @@
      */
     public AnnotatedType[] getAnnotatedParameterTypes() {
         return TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes0(),
-                sun.misc.SharedSecrets.getJavaLangAccess().
+                SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
                 getDeclaringClass(),
@@ -720,7 +722,7 @@
      */
     public AnnotatedType[] getAnnotatedExceptionTypes() {
         return TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes0(),
-                sun.misc.SharedSecrets.getJavaLangAccess().
+                SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
                 getDeclaringClass(),
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Field.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Field.java	Wed Jul 05 20:52:37 2017 +0200
@@ -25,6 +25,7 @@
 
 package java.lang.reflect;
 
+import jdk.internal.misc.SharedSecrets;
 import sun.reflect.CallerSensitive;
 import sun.reflect.FieldAccessor;
 import sun.reflect.Reflection;
@@ -1152,7 +1153,7 @@
                     } else {
                         declAnnos = AnnotationParser.parseAnnotations(
                                 annotations,
-                                sun.misc.SharedSecrets.getJavaLangAccess()
+                                SharedSecrets.getJavaLangAccess()
                                         .getConstantPool(getDeclaringClass()),
                                 getDeclaringClass());
                     }
@@ -1175,7 +1176,7 @@
      */
     public AnnotatedType getAnnotatedType() {
         return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
-                                                       sun.misc.SharedSecrets.getJavaLangAccess().
+                                                       SharedSecrets.getJavaLangAccess().
                                                            getConstantPool(getDeclaringClass()),
                                                        this,
                                                        getDeclaringClass(),
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Method.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Method.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,6 +26,7 @@
 package java.lang.reflect;
 
 import jdk.internal.HotSpotIntrinsicCandidate;
+import jdk.internal.misc.SharedSecrets;
 import sun.reflect.CallerSensitive;
 import sun.reflect.MethodAccessor;
 import sun.reflect.Reflection;
@@ -626,7 +627,7 @@
             getReturnType());
         Object result = AnnotationParser.parseMemberValue(
             memberType, ByteBuffer.wrap(annotationDefault),
-            sun.misc.SharedSecrets.getJavaLangAccess().
+            SharedSecrets.getJavaLangAccess().
                 getConstantPool(getDeclaringClass()),
             getDeclaringClass());
         if (result instanceof sun.reflect.annotation.ExceptionProxy)
--- a/jdk/src/java.base/share/classes/java/net/HttpCookie.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/net/HttpCookie.java	Wed Jul 05 20:52:37 2017 +0200
@@ -35,6 +35,8 @@
 import java.util.Date;
 import java.util.Locale;
 import java.util.Objects;
+import jdk.internal.misc.JavaNetHttpCookieAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * An HttpCookie object represents an HTTP cookie, which carries state
@@ -971,8 +973,8 @@
     }
 
     static {
-        sun.misc.SharedSecrets.setJavaNetHttpCookieAccess(
-            new sun.misc.JavaNetHttpCookieAccess() {
+        SharedSecrets.setJavaNetHttpCookieAccess(
+            new JavaNetHttpCookieAccess() {
                 public List<HttpCookie> parse(String header) {
                     return HttpCookie.parse(header, true);
                 }
--- a/jdk/src/java.base/share/classes/java/net/InetAddress.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java	Wed Jul 05 20:52:37 2017 +0200
@@ -43,6 +43,8 @@
 import java.util.concurrent.ConcurrentSkipListSet;
 import java.util.concurrent.atomic.AtomicLong;
 
+import jdk.internal.misc.JavaNetInetAddressAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.security.action.*;
 import sun.net.InetAddressCachePolicy;
 import sun.net.util.IPAddressUtil;
@@ -215,7 +217,7 @@
          * DNS forging.
          *
          * Oracle JSSE provider is using this original hostname, via
-         * sun.misc.JavaNetAccess, for SSL/TLS endpoint identification.
+         * jdk.internal.misc.JavaNetAccess, for SSL/TLS endpoint identification.
          *
          * Note: May define a new public method in the future if necessary.
          */
@@ -297,8 +299,8 @@
                     return null;
                 }
             });
-        sun.misc.SharedSecrets.setJavaNetInetAddressAccess(
-                new sun.misc.JavaNetInetAddressAccess() {
+        SharedSecrets.setJavaNetInetAddressAccess(
+                new JavaNetInetAddressAccess() {
                     public String getOriginalHostName(InetAddress ia) {
                         return ia.holder.getOriginalHostName();
                     }
--- a/jdk/src/java.base/share/classes/java/net/URLClassLoader.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/net/URLClassLoader.java	Wed Jul 05 20:52:37 2017 +0200
@@ -49,6 +49,9 @@
 import java.util.jar.Attributes.Name;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
+
+import jdk.internal.misc.JavaNetAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.Resource;
 import sun.misc.URLClassPath;
 import sun.net.www.ParseUtil;
@@ -769,9 +772,9 @@
     }
 
     static {
-        sun.misc.SharedSecrets.setJavaNetAccess (
-            new sun.misc.JavaNetAccess() {
-                public URLClassPath getURLClassPath (URLClassLoader u) {
+        SharedSecrets.setJavaNetAccess(
+            new JavaNetAccess() {
+                public URLClassPath getURLClassPath(URLClassLoader u) {
                     return u.ucp;
                 }
             }
--- a/jdk/src/java.base/share/classes/java/nio/Bits.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/nio/Bits.java	Wed Jul 05 20:52:37 2017 +0200
@@ -29,8 +29,9 @@
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.LongAdder;
 
-import sun.misc.JavaLangRefAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaNioAccess;
+import jdk.internal.misc.JavaLangRefAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.Unsafe;
 import sun.misc.VM;
 
@@ -702,11 +703,11 @@
 
     static {
         // setup access to this package in SharedSecrets
-        sun.misc.SharedSecrets.setJavaNioAccess(
-            new sun.misc.JavaNioAccess() {
+        SharedSecrets.setJavaNioAccess(
+            new JavaNioAccess() {
                 @Override
-                public sun.misc.JavaNioAccess.BufferPool getDirectBufferPool() {
-                    return new sun.misc.JavaNioAccess.BufferPool() {
+                public JavaNioAccess.BufferPool getDirectBufferPool() {
+                    return new JavaNioAccess.BufferPool() {
                         @Override
                         public String getName() {
                             return "direct";
--- a/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,6 +34,7 @@
 import java.nio.channels.*;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import jdk.internal.misc.SharedSecrets;
 import sun.nio.ch.Interruptible;
 
 
@@ -206,9 +207,8 @@
     }
 
 
-    // -- sun.misc.SharedSecrets --
+    // -- jdk.internal.misc.SharedSecrets --
     static void blockedOn(Interruptible intr) {         // package-private
-        sun.misc.SharedSecrets.getJavaLangAccess().blockedOn(Thread.currentThread(),
-                                                             intr);
+        SharedSecrets.getJavaLangAccess().blockedOn(Thread.currentThread(), intr);
     }
 }
--- a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,10 +34,10 @@
 import java.util.Map;
 import java.util.WeakHashMap;
 import java.util.concurrent.ConcurrentHashMap;
-import sun.misc.JavaSecurityAccess;
-import sun.misc.JavaSecurityProtectionDomainAccess;
-import static sun.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaSecurityAccess;
+import jdk.internal.misc.JavaSecurityProtectionDomainAccess;
+import static jdk.internal.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
+import jdk.internal.misc.SharedSecrets;
 import sun.security.util.Debug;
 import sun.security.util.SecurityConstants;
 
--- a/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1722,7 +1722,7 @@
             }
             return (start + zoneNames[nameIndex].length());
         }
-        return 0;
+        return -start;
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/EnumMap.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/EnumMap.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,7 +26,7 @@
 package java.util;
 
 import java.util.Map.Entry;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * A specialized {@link Map} implementation for use with enum type keys.  All
--- a/jdk/src/java.base/share/classes/java/util/EnumSet.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/EnumSet.java	Wed Jul 05 20:52:37 2017 +0200
@@ -25,7 +25,7 @@
 
 package java.util;
 
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * A specialized {@link Set} implementation for use with enum types.  All of
--- a/jdk/src/java.base/share/classes/java/util/StringJoiner.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/StringJoiner.java	Wed Jul 05 20:52:37 2017 +0200
@@ -24,8 +24,8 @@
  */
 package java.util;
 
-import sun.misc.JavaLangAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * {@code StringJoiner} is used to construct a sequence of characters separated
--- a/jdk/src/java.base/share/classes/java/util/UUID.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/UUID.java	Wed Jul 05 20:52:37 2017 +0200
@@ -27,8 +27,8 @@
 
 import java.security.*;
 
-import sun.misc.JavaLangAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * A class that represents an immutable universally unique identifier (UUID).
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,7 +34,6 @@
  */
 
 package java.util.concurrent.atomic;
-import sun.misc.Unsafe;
 
 /**
  * A {@code boolean} value that may be updated atomically. See the
@@ -49,15 +48,17 @@
  */
 public class AtomicBoolean implements java.io.Serializable {
     private static final long serialVersionUID = 4654671469794556979L;
-    // setup to use Unsafe.compareAndSwapInt for updates
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final long valueOffset;
+
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long VALUE;
 
     static {
         try {
-            valueOffset = unsafe.objectFieldOffset
+            VALUE = U.objectFieldOffset
                 (AtomicBoolean.class.getDeclaredField("value"));
-        } catch (Exception ex) { throw new Error(ex); }
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
     }
 
     private volatile int value;
@@ -96,9 +97,9 @@
      * the actual value was not equal to the expected value.
      */
     public final boolean compareAndSet(boolean expect, boolean update) {
-        int e = expect ? 1 : 0;
-        int u = update ? 1 : 0;
-        return unsafe.compareAndSwapInt(this, valueOffset, e, u);
+        return U.compareAndSwapInt(this, VALUE,
+                                   (expect ? 1 : 0),
+                                   (update ? 1 : 0));
     }
 
     /**
@@ -114,9 +115,9 @@
      * @return {@code true} if successful
      */
     public boolean weakCompareAndSet(boolean expect, boolean update) {
-        int e = expect ? 1 : 0;
-        int u = update ? 1 : 0;
-        return unsafe.compareAndSwapInt(this, valueOffset, e, u);
+        return U.compareAndSwapInt(this, VALUE,
+                                   (expect ? 1 : 0),
+                                   (update ? 1 : 0));
     }
 
     /**
@@ -135,8 +136,7 @@
      * @since 1.6
      */
     public final void lazySet(boolean newValue) {
-        int v = newValue ? 1 : 0;
-        unsafe.putOrderedInt(this, valueOffset, v);
+        U.putOrderedInt(this, VALUE, (newValue ? 1 : 0));
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,9 +34,9 @@
  */
 
 package java.util.concurrent.atomic;
-import java.util.function.IntUnaryOperator;
+
 import java.util.function.IntBinaryOperator;
-import sun.misc.Unsafe;
+import java.util.function.IntUnaryOperator;
 
 /**
  * An {@code int} value that may be updated atomically.  See the
@@ -50,19 +50,20 @@
  *
  * @since 1.5
  * @author Doug Lea
-*/
+ */
 public class AtomicInteger extends Number implements java.io.Serializable {
     private static final long serialVersionUID = 6214790243416807050L;
 
-    // setup to use Unsafe.compareAndSwapInt for updates
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final long valueOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long VALUE;
 
     static {
         try {
-            valueOffset = unsafe.objectFieldOffset
+            VALUE = U.objectFieldOffset
                 (AtomicInteger.class.getDeclaredField("value"));
-        } catch (Exception ex) { throw new Error(ex); }
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
     }
 
     private volatile int value;
@@ -107,7 +108,7 @@
      * @since 1.6
      */
     public final void lazySet(int newValue) {
-        unsafe.putOrderedInt(this, valueOffset, newValue);
+        U.putOrderedInt(this, VALUE, newValue);
     }
 
     /**
@@ -117,7 +118,7 @@
      * @return the previous value
      */
     public final int getAndSet(int newValue) {
-        return unsafe.getAndSetInt(this, valueOffset, newValue);
+        return U.getAndSetInt(this, VALUE, newValue);
     }
 
     /**
@@ -130,7 +131,7 @@
      * the actual value was not equal to the expected value.
      */
     public final boolean compareAndSet(int expect, int update) {
-        return unsafe.compareAndSwapInt(this, valueOffset, expect, update);
+        return U.compareAndSwapInt(this, VALUE, expect, update);
     }
 
     /**
@@ -146,7 +147,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int expect, int update) {
-        return unsafe.compareAndSwapInt(this, valueOffset, expect, update);
+        return U.compareAndSwapInt(this, VALUE, expect, update);
     }
 
     /**
@@ -155,7 +156,7 @@
      * @return the previous value
      */
     public final int getAndIncrement() {
-        return unsafe.getAndAddInt(this, valueOffset, 1);
+        return U.getAndAddInt(this, VALUE, 1);
     }
 
     /**
@@ -164,7 +165,7 @@
      * @return the previous value
      */
     public final int getAndDecrement() {
-        return unsafe.getAndAddInt(this, valueOffset, -1);
+        return U.getAndAddInt(this, VALUE, -1);
     }
 
     /**
@@ -174,7 +175,7 @@
      * @return the previous value
      */
     public final int getAndAdd(int delta) {
-        return unsafe.getAndAddInt(this, valueOffset, delta);
+        return U.getAndAddInt(this, VALUE, delta);
     }
 
     /**
@@ -183,7 +184,7 @@
      * @return the updated value
      */
     public final int incrementAndGet() {
-        return unsafe.getAndAddInt(this, valueOffset, 1) + 1;
+        return U.getAndAddInt(this, VALUE, 1) + 1;
     }
 
     /**
@@ -192,7 +193,7 @@
      * @return the updated value
      */
     public final int decrementAndGet() {
-        return unsafe.getAndAddInt(this, valueOffset, -1) - 1;
+        return U.getAndAddInt(this, VALUE, -1) - 1;
     }
 
     /**
@@ -202,7 +203,7 @@
      * @return the updated value
      */
     public final int addAndGet(int delta) {
-        return unsafe.getAndAddInt(this, valueOffset, delta) + delta;
+        return U.getAndAddInt(this, VALUE, delta) + delta;
     }
 
     /**
@@ -301,6 +302,7 @@
 
     /**
      * Returns the value of this {@code AtomicInteger} as an {@code int}.
+     * Equivalent to {@link #get()}.
      */
     public int intValue() {
         return get();
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,9 +34,9 @@
  */
 
 package java.util.concurrent.atomic;
-import java.util.function.IntUnaryOperator;
+
 import java.util.function.IntBinaryOperator;
-import sun.misc.Unsafe;
+import java.util.function.IntUnaryOperator;
 
 /**
  * An {@code int} array in which elements may be updated atomically.
@@ -49,16 +49,17 @@
 public class AtomicIntegerArray implements java.io.Serializable {
     private static final long serialVersionUID = 2862133569453604235L;
 
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final int base = unsafe.arrayBaseOffset(int[].class);
-    private static final int shift;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final int ABASE;
+    private static final int ASHIFT;
     private final int[] array;
 
     static {
-        int scale = unsafe.arrayIndexScale(int[].class);
+        ABASE = U.arrayBaseOffset(int[].class);
+        int scale = U.arrayIndexScale(int[].class);
         if ((scale & (scale - 1)) != 0)
-            throw new Error("data type scale not a power of two");
-        shift = 31 - Integer.numberOfLeadingZeros(scale);
+            throw new Error("array index scale not a power of two");
+        ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
     }
 
     private long checkedByteOffset(int i) {
@@ -69,7 +70,7 @@
     }
 
     private static long byteOffset(int i) {
-        return ((long) i << shift) + base;
+        return ((long) i << ASHIFT) + ABASE;
     }
 
     /**
@@ -114,7 +115,7 @@
     }
 
     private int getRaw(long offset) {
-        return unsafe.getIntVolatile(array, offset);
+        return U.getIntVolatile(array, offset);
     }
 
     /**
@@ -124,7 +125,7 @@
      * @param newValue the new value
      */
     public final void set(int i, int newValue) {
-        unsafe.putIntVolatile(array, checkedByteOffset(i), newValue);
+        U.putIntVolatile(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -135,7 +136,7 @@
      * @since 1.6
      */
     public final void lazySet(int i, int newValue) {
-        unsafe.putOrderedInt(array, checkedByteOffset(i), newValue);
+        U.putOrderedInt(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -147,7 +148,7 @@
      * @return the previous value
      */
     public final int getAndSet(int i, int newValue) {
-        return unsafe.getAndSetInt(array, checkedByteOffset(i), newValue);
+        return U.getAndSetInt(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -165,7 +166,7 @@
     }
 
     private boolean compareAndSetRaw(long offset, int expect, int update) {
-        return unsafe.compareAndSwapInt(array, offset, expect, update);
+        return U.compareAndSwapInt(array, offset, expect, update);
     }
 
     /**
@@ -213,7 +214,7 @@
      * @return the previous value
      */
     public final int getAndAdd(int i, int delta) {
-        return unsafe.getAndAddInt(array, checkedByteOffset(i), delta);
+        return U.getAndAddInt(array, checkedByteOffset(i), delta);
     }
 
     /**
@@ -247,7 +248,6 @@
         return getAndAdd(i, delta) + delta;
     }
 
-
     /**
      * Atomically updates the element at index {@code i} with the results
      * of applying the given function, returning the previous value. The
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,14 +34,14 @@
  */
 
 package java.util.concurrent.atomic;
-import java.util.function.IntUnaryOperator;
-import java.util.function.IntBinaryOperator;
-import sun.misc.Unsafe;
+
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.security.AccessController;
+import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
+import java.util.function.IntBinaryOperator;
+import java.util.function.IntUnaryOperator;
 import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
 
@@ -363,11 +363,11 @@
     }
 
     /**
-     * Standard hotspot implementation using intrinsics
+     * Standard hotspot implementation using intrinsics.
      */
     private static class AtomicIntegerFieldUpdaterImpl<T>
             extends AtomicIntegerFieldUpdater<T> {
-        private static final Unsafe unsafe = Unsafe.getUnsafe();
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
         private final long offset;
         private final Class<T> tclass;
         private final Class<?> cclass;
@@ -391,7 +391,7 @@
                 ClassLoader ccl = caller.getClassLoader();
                 if ((ccl != null) && (ccl != cl) &&
                     ((cl == null) || !isAncestor(cl, ccl))) {
-                  sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
+                    sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
                 }
             } catch (PrivilegedActionException pae) {
                 throw new RuntimeException(pae.getException());
@@ -409,7 +409,7 @@
             this.cclass = (Modifier.isProtected(modifiers) &&
                            caller != tclass) ? caller : null;
             this.tclass = tclass;
-            offset = unsafe.objectFieldOffset(field);
+            offset = U.objectFieldOffset(field);
         }
 
         /**
@@ -437,32 +437,32 @@
 
         public boolean compareAndSet(T obj, int expect, int update) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.compareAndSwapInt(obj, offset, expect, update);
+            return U.compareAndSwapInt(obj, offset, expect, update);
         }
 
         public boolean weakCompareAndSet(T obj, int expect, int update) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.compareAndSwapInt(obj, offset, expect, update);
+            return U.compareAndSwapInt(obj, offset, expect, update);
         }
 
         public void set(T obj, int newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            unsafe.putIntVolatile(obj, offset, newValue);
+            U.putIntVolatile(obj, offset, newValue);
         }
 
         public void lazySet(T obj, int newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            unsafe.putOrderedInt(obj, offset, newValue);
+            U.putOrderedInt(obj, offset, newValue);
         }
 
         public final int get(T obj) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.getIntVolatile(obj, offset);
+            return U.getIntVolatile(obj, offset);
         }
 
         public int getAndSet(T obj, int newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.getAndSetInt(obj, offset, newValue);
+            return U.getAndSetInt(obj, offset, newValue);
         }
 
         public int getAndIncrement(T obj) {
@@ -475,7 +475,7 @@
 
         public int getAndAdd(T obj, int delta) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.getAndAddInt(obj, offset, delta);
+            return U.getAndAddInt(obj, offset, delta);
         }
 
         public int incrementAndGet(T obj) {
@@ -483,7 +483,7 @@
         }
 
         public int decrementAndGet(T obj) {
-             return getAndAdd(obj, -1) - 1;
+            return getAndAdd(obj, -1) - 1;
         }
 
         public int addAndGet(T obj, int delta) {
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,9 +34,9 @@
  */
 
 package java.util.concurrent.atomic;
-import java.util.function.LongUnaryOperator;
+
 import java.util.function.LongBinaryOperator;
-import sun.misc.Unsafe;
+import java.util.function.LongUnaryOperator;
 
 /**
  * A {@code long} value that may be updated atomically.  See the
@@ -54,9 +54,8 @@
 public class AtomicLong extends Number implements java.io.Serializable {
     private static final long serialVersionUID = 1927816293512124184L;
 
-    // setup to use Unsafe.compareAndSwapLong for updates
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final long valueOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long VALUE;
 
     /**
      * Records whether the underlying JVM supports lockless
@@ -74,9 +73,11 @@
 
     static {
         try {
-            valueOffset = unsafe.objectFieldOffset
+            VALUE = U.objectFieldOffset
                 (AtomicLong.class.getDeclaredField("value"));
-        } catch (Exception ex) { throw new Error(ex); }
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
     }
 
     private volatile long value;
@@ -111,7 +112,9 @@
      * @param newValue the new value
      */
     public final void set(long newValue) {
-        value = newValue;
+        // Use putLongVolatile instead of ordinary volatile store when
+        // using compareAndSwapLong, for sake of some 32bit systems.
+        U.putLongVolatile(this, VALUE, newValue);
     }
 
     /**
@@ -121,7 +124,7 @@
      * @since 1.6
      */
     public final void lazySet(long newValue) {
-        unsafe.putOrderedLong(this, valueOffset, newValue);
+        U.putOrderedLong(this, VALUE, newValue);
     }
 
     /**
@@ -131,7 +134,7 @@
      * @return the previous value
      */
     public final long getAndSet(long newValue) {
-        return unsafe.getAndSetLong(this, valueOffset, newValue);
+        return U.getAndSetLong(this, VALUE, newValue);
     }
 
     /**
@@ -144,7 +147,7 @@
      * the actual value was not equal to the expected value.
      */
     public final boolean compareAndSet(long expect, long update) {
-        return unsafe.compareAndSwapLong(this, valueOffset, expect, update);
+        return U.compareAndSwapLong(this, VALUE, expect, update);
     }
 
     /**
@@ -160,7 +163,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(long expect, long update) {
-        return unsafe.compareAndSwapLong(this, valueOffset, expect, update);
+        return U.compareAndSwapLong(this, VALUE, expect, update);
     }
 
     /**
@@ -169,7 +172,7 @@
      * @return the previous value
      */
     public final long getAndIncrement() {
-        return unsafe.getAndAddLong(this, valueOffset, 1L);
+        return U.getAndAddLong(this, VALUE, 1L);
     }
 
     /**
@@ -178,7 +181,7 @@
      * @return the previous value
      */
     public final long getAndDecrement() {
-        return unsafe.getAndAddLong(this, valueOffset, -1L);
+        return U.getAndAddLong(this, VALUE, -1L);
     }
 
     /**
@@ -188,7 +191,7 @@
      * @return the previous value
      */
     public final long getAndAdd(long delta) {
-        return unsafe.getAndAddLong(this, valueOffset, delta);
+        return U.getAndAddLong(this, VALUE, delta);
     }
 
     /**
@@ -197,7 +200,7 @@
      * @return the updated value
      */
     public final long incrementAndGet() {
-        return unsafe.getAndAddLong(this, valueOffset, 1L) + 1L;
+        return U.getAndAddLong(this, VALUE, 1L) + 1L;
     }
 
     /**
@@ -206,7 +209,7 @@
      * @return the updated value
      */
     public final long decrementAndGet() {
-        return unsafe.getAndAddLong(this, valueOffset, -1L) - 1L;
+        return U.getAndAddLong(this, VALUE, -1L) - 1L;
     }
 
     /**
@@ -216,7 +219,7 @@
      * @return the updated value
      */
     public final long addAndGet(long delta) {
-        return unsafe.getAndAddLong(this, valueOffset, delta) + delta;
+        return U.getAndAddLong(this, VALUE, delta) + delta;
     }
 
     /**
@@ -324,6 +327,7 @@
 
     /**
      * Returns the value of this {@code AtomicLong} as a {@code long}.
+     * Equivalent to {@link #get()}.
      */
     public long longValue() {
         return get();
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,9 +34,9 @@
  */
 
 package java.util.concurrent.atomic;
-import java.util.function.LongUnaryOperator;
+
 import java.util.function.LongBinaryOperator;
-import sun.misc.Unsafe;
+import java.util.function.LongUnaryOperator;
 
 /**
  * A {@code long} array in which elements may be updated atomically.
@@ -48,16 +48,17 @@
 public class AtomicLongArray implements java.io.Serializable {
     private static final long serialVersionUID = -2308431214976778248L;
 
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final int base = unsafe.arrayBaseOffset(long[].class);
-    private static final int shift;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final int ABASE;
+    private static final int ASHIFT;
     private final long[] array;
 
     static {
-        int scale = unsafe.arrayIndexScale(long[].class);
+        ABASE = U.arrayBaseOffset(long[].class);
+        int scale = U.arrayIndexScale(long[].class);
         if ((scale & (scale - 1)) != 0)
-            throw new Error("data type scale not a power of two");
-        shift = 31 - Integer.numberOfLeadingZeros(scale);
+            throw new Error("array index scale not a power of two");
+        ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
     }
 
     private long checkedByteOffset(int i) {
@@ -68,7 +69,7 @@
     }
 
     private static long byteOffset(int i) {
-        return ((long) i << shift) + base;
+        return ((long) i << ASHIFT) + ABASE;
     }
 
     /**
@@ -113,7 +114,7 @@
     }
 
     private long getRaw(long offset) {
-        return unsafe.getLongVolatile(array, offset);
+        return U.getLongVolatile(array, offset);
     }
 
     /**
@@ -123,7 +124,7 @@
      * @param newValue the new value
      */
     public final void set(int i, long newValue) {
-        unsafe.putLongVolatile(array, checkedByteOffset(i), newValue);
+        U.putLongVolatile(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -134,7 +135,7 @@
      * @since 1.6
      */
     public final void lazySet(int i, long newValue) {
-        unsafe.putOrderedLong(array, checkedByteOffset(i), newValue);
+        U.putOrderedLong(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -146,7 +147,7 @@
      * @return the previous value
      */
     public final long getAndSet(int i, long newValue) {
-        return unsafe.getAndSetLong(array, checkedByteOffset(i), newValue);
+        return U.getAndSetLong(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -164,7 +165,7 @@
     }
 
     private boolean compareAndSetRaw(long offset, long expect, long update) {
-        return unsafe.compareAndSwapLong(array, offset, expect, update);
+        return U.compareAndSwapLong(array, offset, expect, update);
     }
 
     /**
@@ -212,7 +213,7 @@
      * @return the previous value
      */
     public final long getAndAdd(int i, long delta) {
-        return unsafe.getAndAddLong(array, checkedByteOffset(i), delta);
+        return U.getAndAddLong(array, checkedByteOffset(i), delta);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,14 +34,14 @@
  */
 
 package java.util.concurrent.atomic;
-import java.util.function.LongUnaryOperator;
-import java.util.function.LongBinaryOperator;
-import sun.misc.Unsafe;
+
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.security.AccessController;
+import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
+import java.util.function.LongBinaryOperator;
+import java.util.function.LongUnaryOperator;
 import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
 
@@ -366,7 +366,7 @@
     }
 
     private static class CASUpdater<T> extends AtomicLongFieldUpdater<T> {
-        private static final Unsafe unsafe = Unsafe.getUnsafe();
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
         private final long offset;
         private final Class<T> tclass;
         private final Class<?> cclass;
@@ -389,7 +389,7 @@
                 ClassLoader ccl = caller.getClassLoader();
                 if ((ccl != null) && (ccl != cl) &&
                     ((cl == null) || !isAncestor(cl, ccl))) {
-                  sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
+                    sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
                 }
             } catch (PrivilegedActionException pae) {
                 throw new RuntimeException(pae.getException());
@@ -407,7 +407,7 @@
             this.cclass = (Modifier.isProtected(modifiers) &&
                            caller != tclass) ? caller : null;
             this.tclass = tclass;
-            offset = unsafe.objectFieldOffset(field);
+            offset = U.objectFieldOffset(field);
         }
 
         private void fullCheck(T obj) {
@@ -419,32 +419,32 @@
 
         public boolean compareAndSet(T obj, long expect, long update) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.compareAndSwapLong(obj, offset, expect, update);
+            return U.compareAndSwapLong(obj, offset, expect, update);
         }
 
         public boolean weakCompareAndSet(T obj, long expect, long update) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.compareAndSwapLong(obj, offset, expect, update);
+            return U.compareAndSwapLong(obj, offset, expect, update);
         }
 
         public void set(T obj, long newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            unsafe.putLongVolatile(obj, offset, newValue);
+            U.putLongVolatile(obj, offset, newValue);
         }
 
         public void lazySet(T obj, long newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            unsafe.putOrderedLong(obj, offset, newValue);
+            U.putOrderedLong(obj, offset, newValue);
         }
 
         public long get(T obj) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.getLongVolatile(obj, offset);
+            return U.getLongVolatile(obj, offset);
         }
 
         public long getAndSet(T obj, long newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.getAndSetLong(obj, offset, newValue);
+            return U.getAndSetLong(obj, offset, newValue);
         }
 
         public long getAndIncrement(T obj) {
@@ -457,7 +457,7 @@
 
         public long getAndAdd(T obj, long delta) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.getAndAddLong(obj, offset, delta);
+            return U.getAndAddLong(obj, offset, delta);
         }
 
         public long incrementAndGet(T obj) {
@@ -465,7 +465,7 @@
         }
 
         public long decrementAndGet(T obj) {
-             return getAndAdd(obj, -1) - 1;
+            return getAndAdd(obj, -1) - 1;
         }
 
         public long addAndGet(T obj, long delta) {
@@ -490,7 +490,7 @@
 
 
     private static class LockedUpdater<T> extends AtomicLongFieldUpdater<T> {
-        private static final Unsafe unsafe = Unsafe.getUnsafe();
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
         private final long offset;
         private final Class<T> tclass;
         private final Class<?> cclass;
@@ -513,7 +513,7 @@
                 ClassLoader ccl = caller.getClassLoader();
                 if ((ccl != null) && (ccl != cl) &&
                     ((cl == null) || !isAncestor(cl, ccl))) {
-                  sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
+                    sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
                 }
             } catch (PrivilegedActionException pae) {
                 throw new RuntimeException(pae.getException());
@@ -531,7 +531,7 @@
             this.cclass = (Modifier.isProtected(modifiers) &&
                            caller != tclass) ? caller : null;
             this.tclass = tclass;
-            offset = unsafe.objectFieldOffset(field);
+            offset = U.objectFieldOffset(field);
         }
 
         private void fullCheck(T obj) {
@@ -544,10 +544,10 @@
         public boolean compareAndSet(T obj, long expect, long update) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
             synchronized (this) {
-                long v = unsafe.getLong(obj, offset);
+                long v = U.getLong(obj, offset);
                 if (v != expect)
                     return false;
-                unsafe.putLong(obj, offset, update);
+                U.putLong(obj, offset, update);
                 return true;
             }
         }
@@ -559,7 +559,7 @@
         public void set(T obj, long newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
             synchronized (this) {
-                unsafe.putLong(obj, offset, newValue);
+                U.putLong(obj, offset, newValue);
             }
         }
 
@@ -570,7 +570,7 @@
         public long get(T obj) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
             synchronized (this) {
-                return unsafe.getLong(obj, offset);
+                return U.getLong(obj, offset);
             }
         }
 
@@ -595,7 +595,7 @@
      * classloader's delegation chain.
      * Equivalent to the inaccessible: first.isAncestor(second).
      */
-    private static boolean isAncestor(ClassLoader first, ClassLoader second) {
+    static boolean isAncestor(ClassLoader first, ClassLoader second) {
         ClassLoader acl = first;
         do {
             acl = acl.getParent();
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicMarkableReference.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicMarkableReference.java	Wed Jul 05 20:52:37 2017 +0200
@@ -97,7 +97,7 @@
      * Typical usage is {@code boolean[1] holder; ref = v.get(holder); }.
      *
      * @param markHolder an array of size of at least one. On return,
-     * {@code markholder[0]} will hold the value of the mark.
+     * {@code markHolder[0]} will hold the value of the mark.
      * @return the current value of the reference
      */
     public V get(boolean[] markHolder) {
@@ -190,23 +190,18 @@
 
     // Unsafe mechanics
 
-    private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-    private static final long pairOffset =
-        objectFieldOffset(UNSAFE, "pair", AtomicMarkableReference.class);
-
-    private boolean casPair(Pair<V> cmp, Pair<V> val) {
-        return UNSAFE.compareAndSwapObject(this, pairOffset, cmp, val);
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long PAIR;
+    static {
+        try {
+            PAIR = U.objectFieldOffset
+                (AtomicMarkableReference.class.getDeclaredField("pair"));
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
     }
 
-    static long objectFieldOffset(sun.misc.Unsafe UNSAFE,
-                                  String field, Class<?> klazz) {
-        try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
-        }
+    private boolean casPair(Pair<V> cmp, Pair<V> val) {
+        return U.compareAndSwapObject(this, PAIR, cmp, val);
     }
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,9 +34,9 @@
  */
 
 package java.util.concurrent.atomic;
-import java.util.function.UnaryOperator;
+
 import java.util.function.BinaryOperator;
-import sun.misc.Unsafe;
+import java.util.function.UnaryOperator;
 
 /**
  * An object reference that may be updated atomically. See the {@link
@@ -49,14 +49,16 @@
 public class AtomicReference<V> implements java.io.Serializable {
     private static final long serialVersionUID = -1848883965231344442L;
 
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final long valueOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long VALUE;
 
     static {
         try {
-            valueOffset = unsafe.objectFieldOffset
+            VALUE = U.objectFieldOffset
                 (AtomicReference.class.getDeclaredField("value"));
-        } catch (Exception ex) { throw new Error(ex); }
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
     }
 
     private volatile V value;
@@ -101,7 +103,7 @@
      * @since 1.6
      */
     public final void lazySet(V newValue) {
-        unsafe.putOrderedObject(this, valueOffset, newValue);
+        U.putOrderedObject(this, VALUE, newValue);
     }
 
     /**
@@ -113,7 +115,7 @@
      * the actual value was not equal to the expected value.
      */
     public final boolean compareAndSet(V expect, V update) {
-        return unsafe.compareAndSwapObject(this, valueOffset, expect, update);
+        return U.compareAndSwapObject(this, VALUE, expect, update);
     }
 
     /**
@@ -129,7 +131,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(V expect, V update) {
-        return unsafe.compareAndSwapObject(this, valueOffset, expect, update);
+        return U.compareAndSwapObject(this, VALUE, expect, update);
     }
 
     /**
@@ -140,7 +142,7 @@
      */
     @SuppressWarnings("unchecked")
     public final V getAndSet(V newValue) {
-        return (V)unsafe.getAndSetObject(this, valueOffset, newValue);
+        return (V)U.getAndSetObject(this, VALUE, newValue);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,11 +34,11 @@
  */
 
 package java.util.concurrent.atomic;
-import java.util.function.UnaryOperator;
-import java.util.function.BinaryOperator;
+
+import java.lang.reflect.Array;
 import java.util.Arrays;
-import java.lang.reflect.Array;
-import sun.misc.Unsafe;
+import java.util.function.BinaryOperator;
+import java.util.function.UnaryOperator;
 
 /**
  * An array of object references in which elements may be updated
@@ -52,23 +52,22 @@
 public class AtomicReferenceArray<E> implements java.io.Serializable {
     private static final long serialVersionUID = -6209656149925076980L;
 
-    private static final Unsafe unsafe;
-    private static final int base;
-    private static final int shift;
-    private static final long arrayFieldOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final int ABASE;
+    private static final int ASHIFT;
+    private static final long ARRAY;
     private final Object[] array; // must have exact type Object[]
 
     static {
         try {
-            unsafe = Unsafe.getUnsafe();
-            arrayFieldOffset = unsafe.objectFieldOffset
+            ARRAY = U.objectFieldOffset
                 (AtomicReferenceArray.class.getDeclaredField("array"));
-            base = unsafe.arrayBaseOffset(Object[].class);
-            int scale = unsafe.arrayIndexScale(Object[].class);
+            ABASE = U.arrayBaseOffset(Object[].class);
+            int scale = U.arrayIndexScale(Object[].class);
             if ((scale & (scale - 1)) != 0)
-                throw new Error("data type scale not a power of two");
-            shift = 31 - Integer.numberOfLeadingZeros(scale);
-        } catch (Exception e) {
+                throw new Error("array index scale not a power of two");
+            ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
@@ -81,7 +80,7 @@
     }
 
     private static long byteOffset(int i) {
-        return ((long) i << shift) + base;
+        return ((long) i << ASHIFT) + ABASE;
     }
 
     /**
@@ -127,7 +126,7 @@
 
     @SuppressWarnings("unchecked")
     private E getRaw(long offset) {
-        return (E) unsafe.getObjectVolatile(array, offset);
+        return (E) U.getObjectVolatile(array, offset);
     }
 
     /**
@@ -137,7 +136,7 @@
      * @param newValue the new value
      */
     public final void set(int i, E newValue) {
-        unsafe.putObjectVolatile(array, checkedByteOffset(i), newValue);
+        U.putObjectVolatile(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -148,7 +147,7 @@
      * @since 1.6
      */
     public final void lazySet(int i, E newValue) {
-        unsafe.putOrderedObject(array, checkedByteOffset(i), newValue);
+        U.putOrderedObject(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -161,7 +160,7 @@
      */
     @SuppressWarnings("unchecked")
     public final E getAndSet(int i, E newValue) {
-        return (E)unsafe.getAndSetObject(array, checkedByteOffset(i), newValue);
+        return (E)U.getAndSetObject(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -179,7 +178,7 @@
     }
 
     private boolean compareAndSetRaw(long offset, E expect, E update) {
-        return unsafe.compareAndSwapObject(array, offset, expect, update);
+        return U.compareAndSwapObject(array, offset, expect, update);
     }
 
     /**
@@ -314,17 +313,20 @@
 
     /**
      * Reconstitutes the instance from a stream (that is, deserializes it).
+     * @param s the stream
+     * @throws ClassNotFoundException if the class of a serialized object
+     *         could not be found
+     * @throws java.io.IOException if an I/O error occurs
      */
     private void readObject(java.io.ObjectInputStream s)
-        throws java.io.IOException, ClassNotFoundException,
-        java.io.InvalidObjectException {
+        throws java.io.IOException, ClassNotFoundException {
         // Note: This must be changed if any additional fields are defined
         Object a = s.readFields().get("array", null);
         if (a == null || !a.getClass().isArray())
             throw new java.io.InvalidObjectException("Not array type");
         if (a.getClass() != Object[].class)
             a = Arrays.copyOf((Object[])a, Array.getLength(a), Object[].class);
-        unsafe.putObjectVolatile(this, arrayFieldOffset, a);
+        U.putObjectVolatile(this, ARRAY, a);
     }
 
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,14 +34,14 @@
  */
 
 package java.util.concurrent.atomic;
-import java.util.function.UnaryOperator;
-import java.util.function.BinaryOperator;
-import sun.misc.Unsafe;
+
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.security.AccessController;
+import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
+import java.util.function.BinaryOperator;
+import java.util.function.UnaryOperator;
 import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
 
@@ -53,7 +53,7 @@
  * independently subject to atomic updates. For example, a tree node
  * might be declared as
  *
- *  <pre> {@code
+ * <pre> {@code
  * class Node {
  *   private volatile Node left, right;
  *
@@ -62,7 +62,7 @@
  *   private static AtomicReferenceFieldUpdater<Node, Node> rightUpdater =
  *     AtomicReferenceFieldUpdater.newUpdater(Node.class, Node.class, "right");
  *
- *   Node getLeft() { return left;  }
+ *   Node getLeft() { return left; }
  *   boolean compareAndSetLeft(Node expect, Node update) {
  *     return leftUpdater.compareAndSet(this, expect, update);
  *   }
@@ -284,7 +284,7 @@
 
     private static final class AtomicReferenceFieldUpdaterImpl<T,V>
         extends AtomicReferenceFieldUpdater<T,V> {
-        private static final Unsafe unsafe = Unsafe.getUnsafe();
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
         private final long offset;
         private final Class<T> tclass;
         private final Class<V> vclass;
@@ -323,7 +323,7 @@
                 ClassLoader ccl = caller.getClassLoader();
                 if ((ccl != null) && (ccl != cl) &&
                     ((cl == null) || !isAncestor(cl, ccl))) {
-                  sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
+                    sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
                 }
                 fieldClass = field.getType();
             } catch (PrivilegedActionException pae) {
@@ -347,7 +347,7 @@
                 this.vclass = null;
             else
                 this.vclass = vclass;
-            offset = unsafe.objectFieldOffset(field);
+            offset = U.objectFieldOffset(field);
         }
 
         /**
@@ -386,7 +386,7 @@
                 (update != null && vclass != null &&
                  vclass != update.getClass()))
                 updateCheck(obj, update);
-            return unsafe.compareAndSwapObject(obj, offset, expect, update);
+            return U.compareAndSwapObject(obj, offset, expect, update);
         }
 
         public boolean weakCompareAndSet(T obj, V expect, V update) {
@@ -395,7 +395,7 @@
                 (update != null && vclass != null &&
                  vclass != update.getClass()))
                 updateCheck(obj, update);
-            return unsafe.compareAndSwapObject(obj, offset, expect, update);
+            return U.compareAndSwapObject(obj, offset, expect, update);
         }
 
         public void set(T obj, V newValue) {
@@ -403,7 +403,7 @@
                 (newValue != null && vclass != null &&
                  vclass != newValue.getClass()))
                 updateCheck(obj, newValue);
-            unsafe.putObjectVolatile(obj, offset, newValue);
+            U.putObjectVolatile(obj, offset, newValue);
         }
 
         public void lazySet(T obj, V newValue) {
@@ -411,14 +411,14 @@
                 (newValue != null && vclass != null &&
                  vclass != newValue.getClass()))
                 updateCheck(obj, newValue);
-            unsafe.putOrderedObject(obj, offset, newValue);
+            U.putOrderedObject(obj, offset, newValue);
         }
 
         @SuppressWarnings("unchecked")
         public V get(T obj) {
             if (obj == null || obj.getClass() != tclass || cclass != null)
                 targetCheck(obj);
-            return (V)unsafe.getObjectVolatile(obj, offset);
+            return (V)U.getObjectVolatile(obj, offset);
         }
 
         @SuppressWarnings("unchecked")
@@ -427,7 +427,7 @@
                 (newValue != null && vclass != null &&
                  vclass != newValue.getClass()))
                 updateCheck(obj, newValue);
-            return (V)unsafe.getAndSetObject(obj, offset, newValue);
+            return (V)U.getAndSetObject(obj, offset, newValue);
         }
 
         private void ensureProtectedAccess(T obj) {
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicStampedReference.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicStampedReference.java	Wed Jul 05 20:52:37 2017 +0200
@@ -97,7 +97,7 @@
      * Typical usage is {@code int[1] holder; ref = v.get(holder); }.
      *
      * @param stampHolder an array of size of at least one.  On return,
-     * {@code stampholder[0]} will hold the value of the stamp.
+     * {@code stampHolder[0]} will hold the value of the stamp.
      * @return the current value of the reference
      */
     public V get(int[] stampHolder) {
@@ -190,23 +190,18 @@
 
     // Unsafe mechanics
 
-    private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-    private static final long pairOffset =
-        objectFieldOffset(UNSAFE, "pair", AtomicStampedReference.class);
-
-    private boolean casPair(Pair<V> cmp, Pair<V> val) {
-        return UNSAFE.compareAndSwapObject(this, pairOffset, cmp, val);
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long PAIR;
+    static {
+        try {
+            PAIR = U.objectFieldOffset
+                (AtomicStampedReference.class.getDeclaredField("pair"));
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
     }
 
-    static long objectFieldOffset(sun.misc.Unsafe UNSAFE,
-                                  String field, Class<?> klazz) {
-        try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
-        }
+    private boolean casPair(Pair<V> cmp, Pair<V> val) {
+        return U.compareAndSwapObject(this, PAIR, cmp, val);
     }
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/DoubleAccumulator.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/DoubleAccumulator.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent.atomic;
+
 import java.io.Serializable;
 import java.util.function.DoubleBinaryOperator;
 
@@ -126,14 +127,13 @@
      * @return the current value
      */
     public double get() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         double result = Double.longBitsToDouble(base);
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
+            for (Cell a : as)
+                if (a != null)
                     result = function.applyAsDouble
                         (result, Double.longBitsToDouble(a.value));
-            }
         }
         return result;
     }
@@ -147,13 +147,12 @@
      * updating.
      */
     public void reset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         base = identity;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
-                    a.value = identity;
-            }
+            for (Cell a : as)
+                if (a != null)
+                    a.reset(identity);
         }
     }
 
@@ -168,14 +167,14 @@
      * @return the value before reset
      */
     public double getThenReset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         double result = Double.longBitsToDouble(base);
         base = identity;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null) {
+            for (Cell a : as) {
+                if (a != null) {
                     double v = Double.longBitsToDouble(a.value);
-                    a.value = identity;
+                    a.reset(identity);
                     result = function.applyAsDouble(result, v);
                 }
             }
@@ -237,21 +236,27 @@
          * @serial
          */
         private final double value;
+
         /**
          * The function used for updates.
          * @serial
          */
         private final DoubleBinaryOperator function;
+
         /**
-         * The identity value
+         * The identity value, represented as a long, as converted by
+         * {@link Double#doubleToRawLongBits}.  The original identity
+         * can be recovered using {@link Double#longBitsToDouble}.
          * @serial
          */
         private final long identity;
 
-        SerializationProxy(DoubleAccumulator a) {
-            function = a.function;
-            identity = a.identity;
-            value = a.get();
+        SerializationProxy(double value,
+                           DoubleBinaryOperator function,
+                           long identity) {
+            this.value = value;
+            this.function = function;
+            this.identity = identity;
         }
 
         /**
@@ -259,7 +264,7 @@
          * held by this proxy.
          *
          * @return a {@code DoubleAccumulator} object with initial state
-         * held by this proxy.
+         * held by this proxy
          */
         private Object readResolve() {
             double d = Double.longBitsToDouble(identity);
@@ -279,7 +284,7 @@
      * representing the state of this instance
      */
     private Object writeReplace() {
-        return new SerializationProxy(this);
+        return new SerializationProxy(get(), function, identity);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/DoubleAdder.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/DoubleAdder.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent.atomic;
+
 import java.io.Serializable;
 
 /**
@@ -114,13 +115,12 @@
      * @return the sum
      */
     public double sum() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         double sum = Double.longBitsToDouble(base);
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
+            for (Cell a : as)
+                if (a != null)
                     sum += Double.longBitsToDouble(a.value);
-            }
         }
         return sum;
     }
@@ -133,13 +133,12 @@
      * known that no threads are concurrently updating.
      */
     public void reset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         base = 0L; // relies on fact that double 0 must have same rep as long
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
-                    a.value = 0L;
-            }
+            for (Cell a : as)
+                if (a != null)
+                    a.reset();
         }
     }
 
@@ -154,14 +153,14 @@
      * @return the sum
      */
     public double sumThenReset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         double sum = Double.longBitsToDouble(base);
         base = 0L;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null) {
+            for (Cell a : as) {
+                if (a != null) {
                     long v = a.value;
-                    a.value = 0L;
+                    a.reset();
                     sum += Double.longBitsToDouble(v);
                 }
             }
@@ -233,7 +232,7 @@
          * held by this proxy.
          *
          * @return a {@code DoubleAdder} object with initial state
-         * held by this proxy.
+         * held by this proxy
          */
         private Object readResolve() {
             DoubleAdder a = new DoubleAdder();
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/LongAccumulator.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/LongAccumulator.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent.atomic;
+
 import java.io.Serializable;
 import java.util.function.LongBinaryOperator;
 
@@ -124,13 +125,12 @@
      * @return the current value
      */
     public long get() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         long result = base;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
+            for (Cell a : as)
+                if (a != null)
                     result = function.applyAsLong(result, a.value);
-            }
         }
         return result;
     }
@@ -144,13 +144,12 @@
      * updating.
      */
     public void reset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         base = identity;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
-                    a.value = identity;
-            }
+            for (Cell a : as)
+                if (a != null)
+                    a.reset(identity);
         }
     }
 
@@ -165,14 +164,14 @@
      * @return the value before reset
      */
     public long getThenReset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         long result = base;
         base = identity;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null) {
+            for (Cell a : as) {
+                if (a != null) {
                     long v = a.value;
-                    a.value = identity;
+                    a.reset(identity);
                     result = function.applyAsLong(result, v);
                 }
             }
@@ -234,21 +233,25 @@
          * @serial
          */
         private final long value;
+
         /**
          * The function used for updates.
          * @serial
          */
         private final LongBinaryOperator function;
+
         /**
-         * The identity value
+         * The identity value.
          * @serial
          */
         private final long identity;
 
-        SerializationProxy(LongAccumulator a) {
-            function = a.function;
-            identity = a.identity;
-            value = a.get();
+        SerializationProxy(long value,
+                           LongBinaryOperator function,
+                           long identity) {
+            this.value = value;
+            this.function = function;
+            this.identity = identity;
         }
 
         /**
@@ -256,7 +259,7 @@
          * held by this proxy.
          *
          * @return a {@code LongAccumulator} object with initial state
-         * held by this proxy.
+         * held by this proxy
          */
         private Object readResolve() {
             LongAccumulator a = new LongAccumulator(function, identity);
@@ -275,7 +278,7 @@
      * representing the state of this instance
      */
     private Object writeReplace() {
-        return new SerializationProxy(this);
+        return new SerializationProxy(get(), function, identity);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/LongAdder.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/LongAdder.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent.atomic;
+
 import java.io.Serializable;
 
 /**
@@ -116,13 +117,12 @@
      * @return the sum
      */
     public long sum() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         long sum = base;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
+            for (Cell a : as)
+                if (a != null)
                     sum += a.value;
-            }
         }
         return sum;
     }
@@ -135,13 +135,12 @@
      * known that no threads are concurrently updating.
      */
     public void reset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         base = 0L;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
-                    a.value = 0L;
-            }
+            for (Cell a : as)
+                if (a != null)
+                    a.reset();
         }
     }
 
@@ -156,14 +155,14 @@
      * @return the sum
      */
     public long sumThenReset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         long sum = base;
         base = 0L;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null) {
+            for (Cell a : as) {
+                if (a != null) {
                     sum += a.value;
-                    a.value = 0L;
+                    a.reset();
                 }
             }
         }
@@ -230,11 +229,11 @@
         }
 
         /**
-         * Return a {@code LongAdder} object with initial state
+         * Returns a {@code LongAdder} object with initial state
          * held by this proxy.
          *
          * @return a {@code LongAdder} object with initial state
-         * held by this proxy.
+         * held by this proxy
          */
         private Object readResolve() {
             LongAdder a = new LongAdder();
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/Striped64.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/Striped64.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,9 +34,11 @@
  */
 
 package java.util.concurrent.atomic;
-import java.util.function.LongBinaryOperator;
+
+import java.util.Arrays;
+import java.util.concurrent.ThreadLocalRandom;
 import java.util.function.DoubleBinaryOperator;
-import java.util.concurrent.ThreadLocalRandom;
+import java.util.function.LongBinaryOperator;
 
 /**
  * A package-local class holding common representation and mechanics
@@ -121,19 +123,23 @@
         volatile long value;
         Cell(long x) { value = x; }
         final boolean cas(long cmp, long val) {
-            return UNSAFE.compareAndSwapLong(this, valueOffset, cmp, val);
+            return U.compareAndSwapLong(this, VALUE, cmp, val);
+        }
+        final void reset() {
+            U.putLongVolatile(this, VALUE, 0L);
+        }
+        final void reset(long identity) {
+            U.putLongVolatile(this, VALUE, identity);
         }
 
         // Unsafe mechanics
-        private static final sun.misc.Unsafe UNSAFE;
-        private static final long valueOffset;
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+        private static final long VALUE;
         static {
             try {
-                UNSAFE = sun.misc.Unsafe.getUnsafe();
-                Class<?> ak = Cell.class;
-                valueOffset = UNSAFE.objectFieldOffset
-                    (ak.getDeclaredField("value"));
-            } catch (Exception e) {
+                VALUE = U.objectFieldOffset
+                    (Cell.class.getDeclaredField("value"));
+            } catch (ReflectiveOperationException e) {
                 throw new Error(e);
             }
         }
@@ -159,7 +165,7 @@
     transient volatile int cellsBusy;
 
     /**
-     * Package-private default constructor
+     * Package-private default constructor.
      */
     Striped64() {
     }
@@ -168,14 +174,14 @@
      * CASes the base field.
      */
     final boolean casBase(long cmp, long val) {
-        return UNSAFE.compareAndSwapLong(this, BASE, cmp, val);
+        return U.compareAndSwapLong(this, BASE, cmp, val);
     }
 
     /**
      * CASes the cellsBusy field from 0 to 1 to acquire lock.
      */
     final boolean casCellsBusy() {
-        return UNSAFE.compareAndSwapInt(this, CELLSBUSY, 0, 1);
+        return U.compareAndSwapInt(this, CELLSBUSY, 0, 1);
     }
 
     /**
@@ -183,7 +189,7 @@
      * Duplicated from ThreadLocalRandom because of packaging restrictions.
      */
     static final int getProbe() {
-        return UNSAFE.getInt(Thread.currentThread(), PROBE);
+        return U.getInt(Thread.currentThread(), PROBE);
     }
 
     /**
@@ -195,7 +201,7 @@
         probe ^= probe << 13;   // xorshift
         probe ^= probe >>> 17;
         probe ^= probe << 5;
-        UNSAFE.putInt(Thread.currentThread(), PROBE, probe);
+        U.putInt(Thread.currentThread(), PROBE, probe);
         return probe;
     }
 
@@ -220,27 +226,24 @@
             wasUncontended = true;
         }
         boolean collide = false;                // True if last slot nonempty
-        for (;;) {
+        done: for (;;) {
             Cell[] as; Cell a; int n; long v;
             if ((as = cells) != null && (n = as.length) > 0) {
                 if ((a = as[(n - 1) & h]) == null) {
                     if (cellsBusy == 0) {       // Try to attach new Cell
                         Cell r = new Cell(x);   // Optimistically create
                         if (cellsBusy == 0 && casCellsBusy()) {
-                            boolean created = false;
                             try {               // Recheck under lock
                                 Cell[] rs; int m, j;
                                 if ((rs = cells) != null &&
                                     (m = rs.length) > 0 &&
                                     rs[j = (m - 1) & h] == null) {
                                     rs[j] = r;
-                                    created = true;
+                                    break done;
                                 }
                             } finally {
                                 cellsBusy = 0;
                             }
-                            if (created)
-                                break;
                             continue;           // Slot is now non-empty
                         }
                     }
@@ -248,8 +251,8 @@
                 }
                 else if (!wasUncontended)       // CAS already known to fail
                     wasUncontended = true;      // Continue after rehash
-                else if (a.cas(v = a.value, ((fn == null) ? v + x :
-                                             fn.applyAsLong(v, x))))
+                else if (a.cas(v = a.value,
+                               (fn == null) ? v + x : fn.applyAsLong(v, x)))
                     break;
                 else if (n >= NCPU || cells != as)
                     collide = false;            // At max size or stale
@@ -257,12 +260,8 @@
                     collide = true;
                 else if (cellsBusy == 0 && casCellsBusy()) {
                     try {
-                        if (cells == as) {      // Expand table unless stale
-                            Cell[] rs = new Cell[n << 1];
-                            for (int i = 0; i < n; ++i)
-                                rs[i] = as[i];
-                            cells = rs;
-                        }
+                        if (cells == as)        // Expand table unless stale
+                            cells = Arrays.copyOf(as, n << 1);
                     } finally {
                         cellsBusy = 0;
                     }
@@ -272,26 +271,30 @@
                 h = advanceProbe(h);
             }
             else if (cellsBusy == 0 && cells == as && casCellsBusy()) {
-                boolean init = false;
                 try {                           // Initialize table
                     if (cells == as) {
                         Cell[] rs = new Cell[2];
                         rs[h & 1] = new Cell(x);
                         cells = rs;
-                        init = true;
+                        break done;
                     }
                 } finally {
                     cellsBusy = 0;
                 }
-                if (init)
-                    break;
             }
-            else if (casBase(v = base, ((fn == null) ? v + x :
-                                        fn.applyAsLong(v, x))))
-                break;                          // Fall back on using base
+            // Fall back on using base
+            else if (casBase(v = base,
+                             (fn == null) ? v + x : fn.applyAsLong(v, x)))
+                break done;
         }
     }
 
+    private static long apply(DoubleBinaryOperator fn, long v, double x) {
+        double d = Double.longBitsToDouble(v);
+        d = (fn == null) ? d + x : fn.applyAsDouble(d, x);
+        return Double.doubleToRawLongBits(d);
+    }
+
     /**
      * Same as longAccumulate, but injecting long/double conversions
      * in too many places to sensibly merge with long version, given
@@ -307,27 +310,24 @@
             wasUncontended = true;
         }
         boolean collide = false;                // True if last slot nonempty
-        for (;;) {
+        done: for (;;) {
             Cell[] as; Cell a; int n; long v;
             if ((as = cells) != null && (n = as.length) > 0) {
                 if ((a = as[(n - 1) & h]) == null) {
                     if (cellsBusy == 0) {       // Try to attach new Cell
                         Cell r = new Cell(Double.doubleToRawLongBits(x));
                         if (cellsBusy == 0 && casCellsBusy()) {
-                            boolean created = false;
                             try {               // Recheck under lock
                                 Cell[] rs; int m, j;
                                 if ((rs = cells) != null &&
                                     (m = rs.length) > 0 &&
                                     rs[j = (m - 1) & h] == null) {
                                     rs[j] = r;
-                                    created = true;
+                                    break done;
                                 }
                             } finally {
                                 cellsBusy = 0;
                             }
-                            if (created)
-                                break;
                             continue;           // Slot is now non-empty
                         }
                     }
@@ -335,13 +335,7 @@
                 }
                 else if (!wasUncontended)       // CAS already known to fail
                     wasUncontended = true;      // Continue after rehash
-                else if (a.cas(v = a.value,
-                               ((fn == null) ?
-                                Double.doubleToRawLongBits
-                                (Double.longBitsToDouble(v) + x) :
-                                Double.doubleToRawLongBits
-                                (fn.applyAsDouble
-                                 (Double.longBitsToDouble(v), x)))))
+                else if (a.cas(v = a.value, apply(fn, v, x)))
                     break;
                 else if (n >= NCPU || cells != as)
                     collide = false;            // At max size or stale
@@ -349,12 +343,8 @@
                     collide = true;
                 else if (cellsBusy == 0 && casCellsBusy()) {
                     try {
-                        if (cells == as) {      // Expand table unless stale
-                            Cell[] rs = new Cell[n << 1];
-                            for (int i = 0; i < n; ++i)
-                                rs[i] = as[i];
-                            cells = rs;
-                        }
+                        if (cells == as)        // Expand table unless stale
+                            cells = Arrays.copyOf(as, n << 1);
                     } finally {
                         cellsBusy = 0;
                     }
@@ -364,48 +354,38 @@
                 h = advanceProbe(h);
             }
             else if (cellsBusy == 0 && cells == as && casCellsBusy()) {
-                boolean init = false;
                 try {                           // Initialize table
                     if (cells == as) {
                         Cell[] rs = new Cell[2];
                         rs[h & 1] = new Cell(Double.doubleToRawLongBits(x));
                         cells = rs;
-                        init = true;
+                        break done;
                     }
                 } finally {
                     cellsBusy = 0;
                 }
-                if (init)
-                    break;
             }
-            else if (casBase(v = base,
-                             ((fn == null) ?
-                              Double.doubleToRawLongBits
-                              (Double.longBitsToDouble(v) + x) :
-                              Double.doubleToRawLongBits
-                              (fn.applyAsDouble
-                               (Double.longBitsToDouble(v), x)))))
-                break;                          // Fall back on using base
+            // Fall back on using base
+            else if (casBase(v = base, apply(fn, v, x)))
+                break done;
         }
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe UNSAFE;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
     private static final long BASE;
     private static final long CELLSBUSY;
     private static final long PROBE;
     static {
         try {
-            UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class<?> sk = Striped64.class;
-            BASE = UNSAFE.objectFieldOffset
-                (sk.getDeclaredField("base"));
-            CELLSBUSY = UNSAFE.objectFieldOffset
-                (sk.getDeclaredField("cellsBusy"));
-            Class<?> tk = Thread.class;
-            PROBE = UNSAFE.objectFieldOffset
-                (tk.getDeclaredField("threadLocalRandomProbe"));
-        } catch (Exception e) {
+            BASE = U.objectFieldOffset
+                (Striped64.class.getDeclaredField("base"));
+            CELLSBUSY = U.objectFieldOffset
+                (Striped64.class.getDeclaredField("cellsBusy"));
+
+            PROBE = U.objectFieldOffset
+                (Thread.class.getDeclaredField("threadLocalRandomProbe"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/package-info.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/package-info.java	Wed Jul 05 20:52:37 2017 +0200
@@ -40,7 +40,7 @@
  * array elements to those that also provide an atomic conditional update
  * operation of the form:
  *
- *  <pre> {@code boolean compareAndSet(expectedValue, updateValue);}</pre>
+ * <pre> {@code boolean compareAndSet(expectedValue, updateValue);}</pre>
  *
  * <p>This method (which varies in argument types across different
  * classes) atomically sets a variable to the {@code updateValue} if it
@@ -67,7 +67,7 @@
  * {@code AtomicInteger} provide atomic increment methods.  One
  * application is to generate sequence numbers, as in:
  *
- *  <pre> {@code
+ * <pre> {@code
  * class Sequencer {
  *   private final AtomicLong sequenceNumber
  *     = new AtomicLong(0);
@@ -82,7 +82,7 @@
  * <pre> {@code long transform(long input)}</pre>
  *
  * write your utility method as follows:
- *  <pre> {@code
+ * <pre> {@code
  * long getAndTransform(AtomicLong var) {
  *   long prev, next;
  *   do {
@@ -94,18 +94,19 @@
  *
  * <p>The memory effects for accesses and updates of atomics generally
  * follow the rules for volatiles, as stated in
- * <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.4">
- * The Java Language Specification (17.4 Memory Model)</a>:
+ * <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-17.html#jls-17.4">
+ * Chapter 17 of
+ * <cite>The Java&trade; Language Specification</cite></a>:
  *
  * <ul>
  *
- *   <li> {@code get} has the memory effects of reading a
+ *   <li>{@code get} has the memory effects of reading a
  * {@code volatile} variable.
  *
- *   <li> {@code set} has the memory effects of writing (assigning) a
+ *   <li>{@code set} has the memory effects of writing (assigning) a
  * {@code volatile} variable.
  *
- *   <li> {@code lazySet} has the memory effects of writing (assigning)
+ *   <li>{@code lazySet} has the memory effects of writing (assigning)
  *   a {@code volatile} variable except that it permits reorderings with
  *   subsequent (but not previous) memory actions that do not themselves
  *   impose reordering constraints with ordinary non-{@code volatile}
@@ -119,7 +120,7 @@
  *   with respect to previous or subsequent reads and writes of any
  *   variables other than the target of the {@code weakCompareAndSet}.
  *
- *   <li> {@code compareAndSet}
+ *   <li>{@code compareAndSet}
  *   and all other read-and-update operations such as {@code getAndIncrement}
  *   have the memory effects of both reading and
  *   writing {@code volatile} variables.
--- a/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Wed Jul 05 20:52:37 2017 +0200
@@ -36,10 +36,10 @@
 import java.security.cert.Certificate;
 import java.security.AccessController;
 import java.security.CodeSource;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.IOUtils;
 import sun.security.action.GetPropertyAction;
 import sun.security.util.ManifestEntryVerifier;
-import sun.misc.SharedSecrets;
 import sun.security.util.SignatureFileVerifier;
 
 /**
--- a/jdk/src/java.base/share/classes/java/util/jar/JavaUtilJarAccessImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/jar/JavaUtilJarAccessImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -30,7 +30,7 @@
 import java.security.CodeSource;
 import java.util.Enumeration;
 import java.util.List;
-import sun.misc.JavaUtilJarAccess;
+import jdk.internal.misc.JavaUtilJarAccess;
 
 class JavaUtilJarAccessImpl implements JavaUtilJarAccess {
     public boolean jarFileHasClassPathAttribute(JarFile jar) throws IOException {
--- a/jdk/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java	Wed Jul 05 20:52:37 2017 +0200
@@ -140,8 +140,10 @@
  * desired locale sensitive service is not available, then the runtime looks for CLDR,
  * JRE in that order.
  * <p>
- * The default order for looking up the preferred locale providers is "CLDR,JRE,SPI",
- * so specifying "CLDR,JRE,SPI" is identical to the default behavior.
+ * The default order for looking up the preferred locale providers is "CLDR,JRE",
+ * so specifying "CLDR,JRE" is identical to the default behavior. Applications which
+ * require implementations of the locale sensitive services must explicitly specify
+ * "SPI" in order for the Java runtime to load them from the classpath.
  *
  * @since        1.6
  */
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java	Wed Jul 05 20:52:37 2017 +0200
@@ -44,6 +44,8 @@
 import java.util.WeakHashMap;
 import java.util.stream.Stream;
 import java.util.stream.StreamSupport;
+import jdk.internal.misc.JavaUtilZipFileAccess;
+import jdk.internal.misc.SharedSecrets;
 
 import static java.util.zip.ZipConstants64.*;
 
@@ -781,12 +783,12 @@
     }
 
     static {
-        sun.misc.SharedSecrets.setJavaUtilZipFileAccess(
-            new sun.misc.JavaUtilZipFileAccess() {
+        SharedSecrets.setJavaUtilZipFileAccess(
+            new JavaUtilZipFileAccess() {
                 public boolean startsWithLocHeader(ZipFile zip) {
                     return zip.startsWithLocHeader();
                 }
-             }
+            }
         );
     }
 
--- a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageFileCreator.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageFileCreator.java	Wed Jul 05 20:52:37 2017 +0200
@@ -261,6 +261,7 @@
             Map<String, List<Entry>> entriesForModule,
             ByteOrder byteOrder) throws IOException {
         ResourcePoolImpl resources = new ResourcePoolImpl(byteOrder);
+        // Doesn't contain META-INF
         Set<String> mods = modulePackagesMap.keySet();
         for (String mn : mods) {
             for (Entry entry : entriesForModule.get(mn)) {
@@ -286,6 +287,31 @@
             Archive archive = nameToArchive.get(mn);
             archive.close();
         }
+        // Fix for 8136365. Do we have an archive with module name "META-INF"?
+        // If yes, we are recreating a jimage.
+        // This is a workaround for META-INF being at the top level of resource path
+        String mn = "META-INF";
+        Archive archive = nameToArchive.get(mn);
+        if (archive != null) {
+            try {
+                for (Entry entry : entriesForModule.get(mn)) {
+                    String path = entry.name();
+                    try (InputStream stream = entry.stream()) {
+                        byte[] bytes = readAllBytes(stream);
+                        path = mn + "/" + path;
+                        try {
+                            resources.addResource(new ResourcePool.Resource(path,
+                                    ByteBuffer.wrap(bytes)));
+                        } catch (Exception ex) {
+                            throw new IOException(ex);
+                        }
+                    }
+                }
+            } finally {
+                // Done with this archive, close it.
+                archive.close();
+            }
+        }
         return resources;
     }
 
--- a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageNativeSubstrate.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageNativeSubstrate.java	Wed Jul 05 20:52:37 2017 +0200
@@ -27,8 +27,6 @@
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
-import sun.misc.JavaNioAccess;
-import sun.misc.SharedSecrets;
 
 public final class ImageNativeSubstrate implements ImageSubstrate {
     static {
@@ -42,8 +40,10 @@
             });
      }
 
-    private static final JavaNioAccess NIOACCESS =
-            SharedSecrets.getJavaNioAccess();
+    // TODO: Reinstate when the class below, NIOACCESS, is removed.
+    //private static final JavaNioAccess NIOACCESS =
+    //        SharedSecrets.getJavaNioAccess();
+
 
     private final long id;
     private final long indexAddress;
@@ -161,4 +161,59 @@
     public int[] attributeOffsets() {
         return attributeOffsets(id);
     }
+
+    // TODO: Remove when JRT-FS no longer indirectly depends on ImageNativeSubstrate
+    /**
+     * Reflective wrapper around ShareSecrets JavaNioAccess.
+     *
+     * SharedSecrets and friend interfaces moved from 'sun.misc' to 'jdk.internal.misc'
+     * in 1.9. This class provides the runtime with access to the appropriate
+     * JavaNioAccess methods whether running on 1.9, or lower.
+     */
+    static class NIOACCESS {
+
+        private static final String PKG_PREFIX = "jdk.internal.misc";
+        private static final String LEGACY_PKG_PREFIX = "sun.misc";
+
+        private static final Object javaNioAccess;
+        private static final java.lang.reflect.Method newDirectByteBufferMethod;
+
+        static {
+            try {
+                Class<?> c = getJDKClass("JavaNioAccess");
+
+                java.lang.reflect.Method m =
+                        getJDKClass("SharedSecrets").getDeclaredMethod("getJavaNioAccess");
+                javaNioAccess = m.invoke(null);
+
+                newDirectByteBufferMethod = c.getDeclaredMethod("newDirectByteBuffer",
+                                                                long.class,
+                                                                int.class,
+                                                                Object.class);
+            } catch (ReflectiveOperationException x) {
+                throw new InternalError(x);
+            }
+        }
+
+        private static Class<?> getJDKClass(String name) throws ClassNotFoundException {
+            try {
+                return Class.forName(PKG_PREFIX + "." + name);
+            } catch (ClassNotFoundException x) {
+                try {
+                    return Class.forName(LEGACY_PKG_PREFIX + "." + name);
+                } catch (ClassNotFoundException ex) {
+                    x.addSuppressed(ex);
+                    throw x;
+                }
+            }
+        }
+
+        static ByteBuffer newDirectByteBuffer(long addr, int cap, Object ob) {
+            try {
+                return (ByteBuffer) newDirectByteBufferMethod.invoke(javaNioAccess, addr, cap, ob);
+            } catch (ReflectiveOperationException x) {
+                throw new InternalError(x);
+            }
+        }
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaAWTAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+package jdk.internal.misc;
+
+public interface JavaAWTAccess {
+
+    // Returns the AppContext used for applet logging isolation, or null if
+    // no isolation is required.
+    // If there's no applet, or if the caller is a stand alone application,
+    // or running in the main app context, returns null.
+    // Otherwise, returns the AppContext of the calling applet.
+    public Object getAppletContext();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaAWTFontAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * 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.
+ */
+
+/**
+ * SharedSecrets interface used for the access from java.text.Bidi
+ */
+
+package jdk.internal.misc;
+
+public interface JavaAWTFontAccess {
+
+    // java.awt.font.TextAttribute constants
+    public Object getTextAttributeConstant(String name);
+
+    // java.awt.font.NumericShaper
+    public void shape(Object shaper, char[] text, int start, int count);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaBeansAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+public interface JavaBeansAccess {
+    /**
+     * Returns the getter method for a property of the given name
+     * @param clazz The JavaBeans class
+     * @param property The property name
+     * @return The resolved property getter method
+     * @throws Exception
+     */
+    Method getReadMethod(Class<?> clazz, String property) throws Exception;
+
+    /**
+     * Return the <b>value</b> attribute of the associated
+     * <code>@ConstructorProperties</code> annotation if that is present.
+     * @param ctr The constructor to extract the annotation value from
+     * @return The {@code value} attribute of the <code>@ConstructorProperties</code>
+     *         annotation or {@code null} if the constructor is not annotated by
+     *         this annotation or the annotation is not accessible.
+     */
+    String[] getConstructorPropertiesValue(Constructor<?> ctr);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaIOAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.io.Console;
+import java.nio.charset.Charset;
+
+public interface JavaIOAccess {
+    public Console console();
+    public Charset charset();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaIOFileDescriptorAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.internal.misc;
+
+import java.io.FileDescriptor;
+
+/*
+ * @author Chris Hegarty
+ */
+
+public interface JavaIOFileDescriptorAccess {
+    public void set(FileDescriptor obj, int fd);
+    public int get(FileDescriptor fd);
+    public void setAppend(FileDescriptor obj, boolean append);
+    public boolean getAppend(FileDescriptor obj);
+
+    // Only valid on Windows
+    public void setHandle(FileDescriptor obj, long handle);
+    public long getHandle(FileDescriptor obj);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Executable;
+import java.security.AccessControlContext;
+import java.util.Map;
+
+import sun.reflect.ConstantPool;
+import sun.reflect.annotation.AnnotationType;
+import sun.nio.ch.Interruptible;
+
+public interface JavaLangAccess {
+    /** Return the constant pool for a class. */
+    ConstantPool getConstantPool(Class<?> klass);
+
+    /**
+     * Compare-And-Swap the AnnotationType instance corresponding to this class.
+     * (This method only applies to annotation types.)
+     */
+    boolean casAnnotationType(Class<?> klass, AnnotationType oldType, AnnotationType newType);
+
+    /**
+     * Get the AnnotationType instance corresponding to this class.
+     * (This method only applies to annotation types.)
+     */
+    AnnotationType getAnnotationType(Class<?> klass);
+
+    /**
+     * Get the declared annotations for a given class, indexed by their types.
+     */
+    Map<Class<? extends Annotation>, Annotation> getDeclaredAnnotationMap(Class<?> klass);
+
+    /**
+     * Get the array of bytes that is the class-file representation
+     * of this Class' annotations.
+     */
+    byte[] getRawClassAnnotations(Class<?> klass);
+
+    /**
+     * Get the array of bytes that is the class-file representation
+     * of this Class' type annotations.
+     */
+    byte[] getRawClassTypeAnnotations(Class<?> klass);
+
+    /**
+     * Get the array of bytes that is the class-file representation
+     * of this Executable's type annotations.
+     */
+    byte[] getRawExecutableTypeAnnotations(Executable executable);
+
+    /**
+     * Returns the elements of an enum class or null if the
+     * Class object does not represent an enum type;
+     * the result is uncloned, cached, and shared by all callers.
+     */
+    <E extends Enum<E>> E[] getEnumConstantsShared(Class<E> klass);
+
+    /** Set thread's blocker field. */
+    void blockedOn(Thread t, Interruptible b);
+
+    /**
+     * Registers a shutdown hook.
+     *
+     * It is expected that this method with registerShutdownInProgress=true
+     * is only used to register DeleteOnExitHook since the first file
+     * may be added to the delete on exit list by the application shutdown
+     * hooks.
+     *
+     * @param slot  the slot in the shutdown hook array, whose element
+     *              will be invoked in order during shutdown
+     * @param registerShutdownInProgress true to allow the hook
+     *        to be registered even if the shutdown is in progress.
+     * @param hook  the hook to be registered
+     *
+     * @throws IllegalStateException if shutdown is in progress and
+     *         the slot is not valid to register.
+     */
+    void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook);
+
+    /**
+     * Returns the number of stack frames represented by the given throwable.
+     */
+    int getStackTraceDepth(Throwable t);
+
+    /**
+     * Returns the ith StackTraceElement for the given throwable.
+     */
+    StackTraceElement getStackTraceElement(Throwable t, int i);
+
+    /**
+     * Returns a new string backed by the provided character array. The
+     * character array is not copied and must never be modified after the
+     * String is created, in order to fulfill String's contract.
+     *
+     * @param chars the character array to back the string
+     * @return a newly created string whose content is the character array
+     */
+    String newStringUnsafe(char[] chars);
+
+    /**
+     * Returns a new Thread with the given Runnable and an
+     * inherited AccessControlContext.
+     */
+    Thread newThreadWithAcc(Runnable target, AccessControlContext acc);
+
+    /**
+     * Invokes the finalize method of the given object.
+     */
+    void invokeFinalize(Object o) throws Throwable;
+
+    /**
+     * Invokes Long.formatUnsignedLong(long val, int shift, char[] buf, int offset, int len)
+     */
+    void formatUnsignedLong(long val, int shift, char[] buf, int offset, int len);
+
+    /**
+     * Invokes Integer.formatUnsignedInt(long val, int shift, char[] buf, int offset, int len)
+     */
+    void formatUnsignedInt(int val, int shift, char[] buf, int offset, int len);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangRefAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+public interface JavaLangRefAccess {
+
+    /**
+     * Help ReferenceHandler thread process next pending
+     * {@link java.lang.ref.Reference}
+     *
+     * @return {@code true} if there was a pending reference and it
+     *         was enqueue-ed or {@code false} if there was no
+     *         pending reference
+     */
+    boolean tryHandlePendingReference();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.net.URLClassLoader;
+import sun.misc.URLClassPath;
+
+public interface JavaNetAccess {
+    /**
+     * return the URLClassPath belonging to the given loader
+     */
+    URLClassPath getURLClassPath (URLClassLoader u);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetHttpCookieAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.net.HttpCookie;
+import java.util.List;
+
+public interface JavaNetHttpCookieAccess {
+    /*
+     * Constructs cookies from Set-Cookie or Set-Cookie2 header string,
+     * retaining the original header String in the cookie itself.
+     */
+    public List<HttpCookie> parse(String header);
+
+    /*
+     * Returns the original header this cookie was constructed from, if it was
+     * constructed by parsing a header, otherwise null.
+     */
+    public String header(HttpCookie cookie);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetInetAddressAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.net.InetAddress;
+
+public interface JavaNetInetAddressAccess {
+    /**
+     * Return the original application specified hostname of
+     * the given InetAddress object.
+     */
+    String getOriginalHostName(InetAddress ia);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNioAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.nio.Buffer;
+import java.nio.ByteBuffer;
+
+public interface JavaNioAccess {
+    /**
+     * Provides access to information on buffer usage.
+     */
+    interface BufferPool {
+        String getName();
+        long getCount();
+        long getTotalCapacity();
+        long getMemoryUsed();
+    }
+    BufferPool getDirectBufferPool();
+
+    /**
+     * Constructs a direct ByteBuffer referring to the block of memory starting
+     * at the given memory address and extending {@code cap} bytes.
+     * The {@code ob} parameter is an arbitrary object that is attached
+     * to the resulting buffer.
+     */
+    ByteBuffer newDirectByteBuffer(long addr, int cap, Object ob);
+
+    /**
+     * Truncates a buffer by changing its capacity to 0.
+     */
+    void truncate(Buffer buf);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaSecurityAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.security.AccessControlContext;
+import java.security.PrivilegedAction;
+
+public interface JavaSecurityAccess {
+
+    <T> T doIntersectionPrivilege(PrivilegedAction<T> action,
+                                  AccessControlContext stack,
+                                  AccessControlContext context);
+
+    <T> T doIntersectionPrivilege(PrivilegedAction<T> action,
+                                  AccessControlContext context);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaSecurityProtectionDomainAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.internal.misc;
+
+import java.security.PermissionCollection;
+import java.security.ProtectionDomain;
+
+public interface JavaSecurityProtectionDomainAccess {
+    interface ProtectionDomainCache {
+        void put(ProtectionDomain pd, PermissionCollection pc);
+        PermissionCollection get(ProtectionDomain pd);
+    }
+    /**
+     * Returns the ProtectionDomainCache.
+     */
+    ProtectionDomainCache getProtectionDomainCache();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaUtilJarAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.io.IOException;
+import java.net.URL;
+import java.security.CodeSource;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+public interface JavaUtilJarAccess {
+    public boolean jarFileHasClassPathAttribute(JarFile jar) throws IOException;
+    public CodeSource[] getCodeSources(JarFile jar, URL url);
+    public CodeSource getCodeSource(JarFile jar, URL url, String name);
+    public Enumeration<String> entryNames(JarFile jar, CodeSource[] cs);
+    public Enumeration<JarEntry> entries2(JarFile jar);
+    public void setEagerValidation(JarFile jar, boolean eager);
+    public List<Object> getManifestDigests(JarFile jar);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaUtilZipFileAccess.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.util.zip.ZipFile;
+
+public interface JavaUtilZipFileAccess {
+    public boolean startsWithLocHeader(ZipFile zip);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.util.jar.JarFile;
+import java.io.Console;
+import java.io.FileDescriptor;
+import java.security.ProtectionDomain;
+import java.security.AccessController;
+import sun.misc.Unsafe;
+
+/** A repository of "shared secrets", which are a mechanism for
+    calling implementation-private methods in another package without
+    using reflection. A package-private class implements a public
+    interface and provides the ability to call package-private methods
+    within that package; the object implementing that interface is
+    provided through a third package to which access is restricted.
+    This framework avoids the primary disadvantage of using reflection
+    for this purpose, namely the loss of compile-time checking. */
+
+public class SharedSecrets {
+    private static final Unsafe unsafe = Unsafe.getUnsafe();
+    private static JavaUtilJarAccess javaUtilJarAccess;
+    private static JavaLangAccess javaLangAccess;
+    private static JavaLangRefAccess javaLangRefAccess;
+    private static JavaIOAccess javaIOAccess;
+    private static JavaNetAccess javaNetAccess;
+    private static JavaNetInetAddressAccess javaNetInetAddressAccess;
+    private static JavaNetHttpCookieAccess javaNetHttpCookieAccess;
+    private static JavaNioAccess javaNioAccess;
+    private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
+    private static JavaSecurityProtectionDomainAccess javaSecurityProtectionDomainAccess;
+    private static JavaSecurityAccess javaSecurityAccess;
+    private static JavaUtilZipFileAccess javaUtilZipFileAccess;
+    private static JavaAWTAccess javaAWTAccess;
+    private static JavaAWTFontAccess javaAWTFontAccess;
+    private static JavaBeansAccess javaBeansAccess;
+
+    public static JavaUtilJarAccess javaUtilJarAccess() {
+        if (javaUtilJarAccess == null) {
+            // Ensure JarFile is initialized; we know that that class
+            // provides the shared secret
+            unsafe.ensureClassInitialized(JarFile.class);
+        }
+        return javaUtilJarAccess;
+    }
+
+    public static void setJavaUtilJarAccess(JavaUtilJarAccess access) {
+        javaUtilJarAccess = access;
+    }
+
+    public static void setJavaLangAccess(JavaLangAccess jla) {
+        javaLangAccess = jla;
+    }
+
+    public static JavaLangAccess getJavaLangAccess() {
+        return javaLangAccess;
+    }
+
+    public static void setJavaLangRefAccess(JavaLangRefAccess jlra) {
+        javaLangRefAccess = jlra;
+    }
+
+    public static JavaLangRefAccess getJavaLangRefAccess() {
+        return javaLangRefAccess;
+    }
+
+    public static void setJavaNetAccess(JavaNetAccess jna) {
+        javaNetAccess = jna;
+    }
+
+    public static JavaNetAccess getJavaNetAccess() {
+        if (javaNetAccess == null)
+            unsafe.ensureClassInitialized(java.net.URLClassLoader.class);
+        return javaNetAccess;
+    }
+
+    public static void setJavaNetInetAddressAccess(JavaNetInetAddressAccess jna) {
+        javaNetInetAddressAccess = jna;
+    }
+
+    public static JavaNetInetAddressAccess getJavaNetInetAddressAccess() {
+        return javaNetInetAddressAccess;
+    }
+
+    public static void setJavaNetHttpCookieAccess(JavaNetHttpCookieAccess a) {
+        javaNetHttpCookieAccess = a;
+    }
+
+    public static JavaNetHttpCookieAccess getJavaNetHttpCookieAccess() {
+        if (javaNetHttpCookieAccess == null)
+            unsafe.ensureClassInitialized(java.net.HttpCookie.class);
+        return javaNetHttpCookieAccess;
+    }
+
+    public static void setJavaNioAccess(JavaNioAccess jna) {
+        javaNioAccess = jna;
+    }
+
+    public static JavaNioAccess getJavaNioAccess() {
+        if (javaNioAccess == null) {
+            // Ensure java.nio.ByteOrder is initialized; we know that
+            // this class initializes java.nio.Bits that provides the
+            // shared secret.
+            unsafe.ensureClassInitialized(java.nio.ByteOrder.class);
+        }
+        return javaNioAccess;
+    }
+
+    public static void setJavaIOAccess(JavaIOAccess jia) {
+        javaIOAccess = jia;
+    }
+
+    public static JavaIOAccess getJavaIOAccess() {
+        if (javaIOAccess == null) {
+            unsafe.ensureClassInitialized(Console.class);
+        }
+        return javaIOAccess;
+    }
+
+    public static void setJavaIOFileDescriptorAccess(JavaIOFileDescriptorAccess jiofda) {
+        javaIOFileDescriptorAccess = jiofda;
+    }
+
+    public static JavaIOFileDescriptorAccess getJavaIOFileDescriptorAccess() {
+        if (javaIOFileDescriptorAccess == null)
+            unsafe.ensureClassInitialized(FileDescriptor.class);
+
+        return javaIOFileDescriptorAccess;
+    }
+
+    public static void setJavaSecurityProtectionDomainAccess
+        (JavaSecurityProtectionDomainAccess jspda) {
+            javaSecurityProtectionDomainAccess = jspda;
+    }
+
+    public static JavaSecurityProtectionDomainAccess
+        getJavaSecurityProtectionDomainAccess() {
+            if (javaSecurityProtectionDomainAccess == null)
+                unsafe.ensureClassInitialized(ProtectionDomain.class);
+            return javaSecurityProtectionDomainAccess;
+    }
+
+    public static void setJavaSecurityAccess(JavaSecurityAccess jsa) {
+        javaSecurityAccess = jsa;
+    }
+
+    public static JavaSecurityAccess getJavaSecurityAccess() {
+        if (javaSecurityAccess == null) {
+            unsafe.ensureClassInitialized(AccessController.class);
+        }
+        return javaSecurityAccess;
+    }
+
+    public static JavaUtilZipFileAccess getJavaUtilZipFileAccess() {
+        if (javaUtilZipFileAccess == null)
+            unsafe.ensureClassInitialized(java.util.zip.ZipFile.class);
+        return javaUtilZipFileAccess;
+    }
+
+    public static void setJavaUtilZipFileAccess(JavaUtilZipFileAccess access) {
+        javaUtilZipFileAccess = access;
+    }
+
+    public static void setJavaAWTAccess(JavaAWTAccess jaa) {
+        javaAWTAccess = jaa;
+    }
+
+    public static JavaAWTAccess getJavaAWTAccess() {
+        // this may return null in which case calling code needs to
+        // provision for.
+        return javaAWTAccess;
+    }
+
+    public static void setJavaAWTFontAccess(JavaAWTFontAccess jafa) {
+        javaAWTFontAccess = jafa;
+    }
+
+    public static JavaAWTFontAccess getJavaAWTFontAccess() {
+        // this may return null in which case calling code needs to
+        // provision for.
+        return javaAWTFontAccess;
+    }
+
+    public static JavaBeansAccess getJavaBeansAccess() {
+        return javaBeansAccess;
+    }
+
+    public static void setJavaBeansAccess(JavaBeansAccess access) {
+        javaBeansAccess = access;
+    }
+}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaAWTAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +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.
- */
-
-package sun.misc;
-
-public interface JavaAWTAccess {
-
-    // Returns the AppContext used for applet logging isolation, or null if
-    // no isolation is required.
-    // If there's no applet, or if the caller is a stand alone application,
-    // or running in the main app context, returns null.
-    // Otherwise, returns the AppContext of the calling applet.
-    public Object getAppletContext();
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaAWTFontAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-/**
- * SharedSecrets interface used for the access from java.text.Bidi
- */
-
-package sun.misc;
-
-public interface JavaAWTFontAccess {
-
-    // java.awt.font.TextAttribute constants
-    public Object getTextAttributeConstant(String name);
-
-    // java.awt.font.NumericShaper
-    public void shape(Object shaper, char[] text, int start, int count);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaBeansAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-
-public interface JavaBeansAccess {
-    /**
-     * Returns the getter method for a property of the given name
-     * @param clazz The JavaBeans class
-     * @param property The property name
-     * @return The resolved property getter method
-     * @throws Exception
-     */
-    Method getReadMethod(Class<?> clazz, String property) throws Exception;
-
-    /**
-     * Return the <b>value</b> attribute of the associated
-     * <code>@ConstructorProperties</code> annotation if that is present.
-     * @param ctr The constructor to extract the annotation value from
-     * @return The {@code value} attribute of the <code>@ConstructorProperties</code>
-     *         annotation or {@code null} if the constructor is not annotated by
-     *         this annotation or the annotation is not accessible.
-     */
-    String[] getConstructorPropertiesValue(Constructor<?> ctr);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaIOAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-import java.io.Console;
-import java.nio.charset.Charset;
-
-public interface JavaIOAccess {
-    public Console console();
-    public Charset charset();
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaIOFileDescriptorAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.misc;
-
-import java.io.FileDescriptor;
-
-/*
- * @author Chris Hegarty
- */
-
-public interface JavaIOFileDescriptorAccess {
-    public void set(FileDescriptor obj, int fd);
-    public int get(FileDescriptor fd);
-    public void setAppend(FileDescriptor obj, boolean append);
-    public boolean getAppend(FileDescriptor obj);
-
-    // Only valid on Windows
-    public void setHandle(FileDescriptor obj, long handle);
-    public long getHandle(FileDescriptor obj);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaLangAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Executable;
-import java.security.AccessControlContext;
-import java.util.Map;
-
-import sun.reflect.ConstantPool;
-import sun.reflect.annotation.AnnotationType;
-import sun.nio.ch.Interruptible;
-
-public interface JavaLangAccess {
-    /** Return the constant pool for a class. */
-    ConstantPool getConstantPool(Class<?> klass);
-
-    /**
-     * Compare-And-Swap the AnnotationType instance corresponding to this class.
-     * (This method only applies to annotation types.)
-     */
-    boolean casAnnotationType(Class<?> klass, AnnotationType oldType, AnnotationType newType);
-
-    /**
-     * Get the AnnotationType instance corresponding to this class.
-     * (This method only applies to annotation types.)
-     */
-    AnnotationType getAnnotationType(Class<?> klass);
-
-    /**
-     * Get the declared annotations for a given class, indexed by their types.
-     */
-    Map<Class<? extends Annotation>, Annotation> getDeclaredAnnotationMap(Class<?> klass);
-
-    /**
-     * Get the array of bytes that is the class-file representation
-     * of this Class' annotations.
-     */
-    byte[] getRawClassAnnotations(Class<?> klass);
-
-    /**
-     * Get the array of bytes that is the class-file representation
-     * of this Class' type annotations.
-     */
-    byte[] getRawClassTypeAnnotations(Class<?> klass);
-
-    /**
-     * Get the array of bytes that is the class-file representation
-     * of this Executable's type annotations.
-     */
-    byte[] getRawExecutableTypeAnnotations(Executable executable);
-
-    /**
-     * Returns the elements of an enum class or null if the
-     * Class object does not represent an enum type;
-     * the result is uncloned, cached, and shared by all callers.
-     */
-    <E extends Enum<E>> E[] getEnumConstantsShared(Class<E> klass);
-
-    /** Set thread's blocker field. */
-    void blockedOn(Thread t, Interruptible b);
-
-    /**
-     * Registers a shutdown hook.
-     *
-     * It is expected that this method with registerShutdownInProgress=true
-     * is only used to register DeleteOnExitHook since the first file
-     * may be added to the delete on exit list by the application shutdown
-     * hooks.
-     *
-     * @param slot  the slot in the shutdown hook array, whose element
-     *              will be invoked in order during shutdown
-     * @param registerShutdownInProgress true to allow the hook
-     *        to be registered even if the shutdown is in progress.
-     * @param hook  the hook to be registered
-     *
-     * @throws IllegalStateException if shutdown is in progress and
-     *         the slot is not valid to register.
-     */
-    void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook);
-
-    /**
-     * Returns the number of stack frames represented by the given throwable.
-     */
-    int getStackTraceDepth(Throwable t);
-
-    /**
-     * Returns the ith StackTraceElement for the given throwable.
-     */
-    StackTraceElement getStackTraceElement(Throwable t, int i);
-
-    /**
-     * Returns a new string backed by the provided character array. The
-     * character array is not copied and must never be modified after the
-     * String is created, in order to fulfill String's contract.
-     *
-     * @param chars the character array to back the string
-     * @return a newly created string whose content is the character array
-     */
-    String newStringUnsafe(char[] chars);
-
-    /**
-     * Returns a new Thread with the given Runnable and an
-     * inherited AccessControlContext.
-     */
-    Thread newThreadWithAcc(Runnable target, AccessControlContext acc);
-
-    /**
-     * Invokes the finalize method of the given object.
-     */
-    void invokeFinalize(Object o) throws Throwable;
-
-    /**
-     * Invokes Long.formatUnsignedLong(long val, int shift, char[] buf, int offset, int len)
-     */
-    void formatUnsignedLong(long val, int shift, char[] buf, int offset, int len);
-
-    /**
-     * Invokes Integer.formatUnsignedInt(long val, int shift, char[] buf, int offset, int len)
-     */
-    void formatUnsignedInt(int val, int shift, char[] buf, int offset, int len);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaLangRefAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-public interface JavaLangRefAccess {
-
-    /**
-     * Help ReferenceHandler thread process next pending
-     * {@link java.lang.ref.Reference}
-     *
-     * @return {@code true} if there was a pending reference and it
-     *         was enqueue-ed or {@code false} if there was no
-     *         pending reference
-     */
-    boolean tryHandlePendingReference();
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaNetAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-import java.net.URLClassLoader;
-
-public interface JavaNetAccess {
-    /**
-     * return the URLClassPath belonging to the given loader
-     */
-    URLClassPath getURLClassPath (URLClassLoader u);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaNetHttpCookieAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-import java.net.HttpCookie;
-import java.util.List;
-
-public interface JavaNetHttpCookieAccess {
-    /*
-     * Constructs cookies from Set-Cookie or Set-Cookie2 header string,
-     * retaining the original header String in the cookie itself.
-     */
-    public List<HttpCookie> parse(String header);
-
-    /*
-     * Returns the original header this cookie was constructed from, if it was
-     * constructed by parsing a header, otherwise null.
-     */
-    public String header(HttpCookie cookie);
-}
-
--- a/jdk/src/java.base/share/classes/sun/misc/JavaNetInetAddressAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-import java.net.InetAddress;
-
-public interface JavaNetInetAddressAccess {
-    /**
-     * Return the original application specified hostname of
-     * the given InetAddress object.
-     */
-    String getOriginalHostName(InetAddress ia);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaNioAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-import java.nio.Buffer;
-import java.nio.ByteBuffer;
-
-public interface JavaNioAccess {
-    /**
-     * Provides access to information on buffer usage.
-     */
-    interface BufferPool {
-        String getName();
-        long getCount();
-        long getTotalCapacity();
-        long getMemoryUsed();
-    }
-    BufferPool getDirectBufferPool();
-
-    /**
-     * Constructs a direct ByteBuffer referring to the block of memory starting
-     * at the given memory address and extending {@code cap} bytes.
-     * The {@code ob} parameter is an arbitrary object that is attached
-     * to the resulting buffer.
-     */
-    ByteBuffer newDirectByteBuffer(long addr, int cap, Object ob);
-
-    /**
-     * Truncates a buffer by changing its capacity to 0.
-     */
-    void truncate(Buffer buf);
-
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaSecurityAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-import java.security.AccessControlContext;
-import java.security.PrivilegedAction;
-
-public interface JavaSecurityAccess {
-
-    <T> T doIntersectionPrivilege(PrivilegedAction<T> action,
-                                  AccessControlContext stack,
-                                  AccessControlContext context);
-
-    <T> T doIntersectionPrivilege(PrivilegedAction<T> action,
-                                  AccessControlContext context);
-
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaSecurityProtectionDomainAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.misc;
-
-import java.security.PermissionCollection;
-import java.security.ProtectionDomain;
-
-public interface JavaSecurityProtectionDomainAccess {
-    interface ProtectionDomainCache {
-        void put(ProtectionDomain pd, PermissionCollection pc);
-        PermissionCollection get(ProtectionDomain pd);
-    }
-    /**
-     * Returns the ProtectionDomainCache.
-     */
-    ProtectionDomainCache getProtectionDomainCache();
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaUtilJarAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-import java.io.IOException;
-import java.net.URL;
-import java.security.CodeSource;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-
-public interface JavaUtilJarAccess {
-    public boolean jarFileHasClassPathAttribute(JarFile jar) throws IOException;
-    public CodeSource[] getCodeSources(JarFile jar, URL url);
-    public CodeSource getCodeSource(JarFile jar, URL url, String name);
-    public Enumeration<String> entryNames(JarFile jar, CodeSource[] cs);
-    public Enumeration<JarEntry> entries2(JarFile jar);
-    public void setEagerValidation(JarFile jar, boolean eager);
-    public List<Object> getManifestDigests(JarFile jar);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaUtilZipFileAccess.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-import java.util.zip.ZipFile;
-
-public interface JavaUtilZipFileAccess {
-    public boolean startsWithLocHeader(ZipFile zip);
-}
-
--- a/jdk/src/java.base/share/classes/sun/misc/SharedSecrets.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-import java.util.jar.JarFile;
-import java.io.Console;
-import java.io.FileDescriptor;
-import java.security.ProtectionDomain;
-
-import java.security.AccessController;
-
-/** A repository of "shared secrets", which are a mechanism for
-    calling implementation-private methods in another package without
-    using reflection. A package-private class implements a public
-    interface and provides the ability to call package-private methods
-    within that package; the object implementing that interface is
-    provided through a third package to which access is restricted.
-    This framework avoids the primary disadvantage of using reflection
-    for this purpose, namely the loss of compile-time checking. */
-
-public class SharedSecrets {
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static JavaUtilJarAccess javaUtilJarAccess;
-    private static JavaLangAccess javaLangAccess;
-    private static JavaLangRefAccess javaLangRefAccess;
-    private static JavaIOAccess javaIOAccess;
-    private static JavaNetAccess javaNetAccess;
-    private static JavaNetInetAddressAccess javaNetInetAddressAccess;
-    private static JavaNetHttpCookieAccess javaNetHttpCookieAccess;
-    private static JavaNioAccess javaNioAccess;
-    private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
-    private static JavaSecurityProtectionDomainAccess javaSecurityProtectionDomainAccess;
-    private static JavaSecurityAccess javaSecurityAccess;
-    private static JavaUtilZipFileAccess javaUtilZipFileAccess;
-    private static JavaAWTAccess javaAWTAccess;
-    private static JavaAWTFontAccess javaAWTFontAccess;
-    private static JavaBeansAccess javaBeansAccess;
-
-    public static JavaUtilJarAccess javaUtilJarAccess() {
-        if (javaUtilJarAccess == null) {
-            // Ensure JarFile is initialized; we know that that class
-            // provides the shared secret
-            unsafe.ensureClassInitialized(JarFile.class);
-        }
-        return javaUtilJarAccess;
-    }
-
-    public static void setJavaUtilJarAccess(JavaUtilJarAccess access) {
-        javaUtilJarAccess = access;
-    }
-
-    public static void setJavaLangAccess(JavaLangAccess jla) {
-        javaLangAccess = jla;
-    }
-
-    public static JavaLangAccess getJavaLangAccess() {
-        return javaLangAccess;
-    }
-
-    public static void setJavaLangRefAccess(JavaLangRefAccess jlra) {
-        javaLangRefAccess = jlra;
-    }
-
-    public static JavaLangRefAccess getJavaLangRefAccess() {
-        return javaLangRefAccess;
-    }
-
-    public static void setJavaNetAccess(JavaNetAccess jna) {
-        javaNetAccess = jna;
-    }
-
-    public static JavaNetAccess getJavaNetAccess() {
-        if (javaNetAccess == null)
-            unsafe.ensureClassInitialized(java.net.URLClassLoader.class);
-        return javaNetAccess;
-    }
-
-    public static void setJavaNetInetAddressAccess(JavaNetInetAddressAccess jna) {
-        javaNetInetAddressAccess = jna;
-    }
-
-    public static JavaNetInetAddressAccess getJavaNetInetAddressAccess() {
-        return javaNetInetAddressAccess;
-    }
-
-    public static void setJavaNetHttpCookieAccess(JavaNetHttpCookieAccess a) {
-        javaNetHttpCookieAccess = a;
-    }
-
-    public static JavaNetHttpCookieAccess getJavaNetHttpCookieAccess() {
-        if (javaNetHttpCookieAccess == null)
-            unsafe.ensureClassInitialized(java.net.HttpCookie.class);
-        return javaNetHttpCookieAccess;
-    }
-
-    public static void setJavaNioAccess(JavaNioAccess jna) {
-        javaNioAccess = jna;
-    }
-
-    public static JavaNioAccess getJavaNioAccess() {
-        if (javaNioAccess == null) {
-            // Ensure java.nio.ByteOrder is initialized; we know that
-            // this class initializes java.nio.Bits that provides the
-            // shared secret.
-            unsafe.ensureClassInitialized(java.nio.ByteOrder.class);
-        }
-        return javaNioAccess;
-    }
-
-    public static void setJavaIOAccess(JavaIOAccess jia) {
-        javaIOAccess = jia;
-    }
-
-    public static JavaIOAccess getJavaIOAccess() {
-        if (javaIOAccess == null) {
-            unsafe.ensureClassInitialized(Console.class);
-        }
-        return javaIOAccess;
-    }
-
-    public static void setJavaIOFileDescriptorAccess(JavaIOFileDescriptorAccess jiofda) {
-        javaIOFileDescriptorAccess = jiofda;
-    }
-
-    public static JavaIOFileDescriptorAccess getJavaIOFileDescriptorAccess() {
-        if (javaIOFileDescriptorAccess == null)
-            unsafe.ensureClassInitialized(FileDescriptor.class);
-
-        return javaIOFileDescriptorAccess;
-    }
-
-    public static void setJavaSecurityProtectionDomainAccess
-        (JavaSecurityProtectionDomainAccess jspda) {
-            javaSecurityProtectionDomainAccess = jspda;
-    }
-
-    public static JavaSecurityProtectionDomainAccess
-        getJavaSecurityProtectionDomainAccess() {
-            if (javaSecurityProtectionDomainAccess == null)
-                unsafe.ensureClassInitialized(ProtectionDomain.class);
-            return javaSecurityProtectionDomainAccess;
-    }
-
-    public static void setJavaSecurityAccess(JavaSecurityAccess jsa) {
-        javaSecurityAccess = jsa;
-    }
-
-    public static JavaSecurityAccess getJavaSecurityAccess() {
-        if (javaSecurityAccess == null) {
-            unsafe.ensureClassInitialized(AccessController.class);
-        }
-        return javaSecurityAccess;
-    }
-
-    public static JavaUtilZipFileAccess getJavaUtilZipFileAccess() {
-        if (javaUtilZipFileAccess == null)
-            unsafe.ensureClassInitialized(java.util.zip.ZipFile.class);
-        return javaUtilZipFileAccess;
-    }
-
-    public static void setJavaUtilZipFileAccess(JavaUtilZipFileAccess access) {
-        javaUtilZipFileAccess = access;
-    }
-
-    public static void setJavaAWTAccess(JavaAWTAccess jaa) {
-        javaAWTAccess = jaa;
-    }
-
-    public static JavaAWTAccess getJavaAWTAccess() {
-        // this may return null in which case calling code needs to
-        // provision for.
-        return javaAWTAccess;
-    }
-
-    public static void setJavaAWTFontAccess(JavaAWTFontAccess jafa) {
-        javaAWTFontAccess = jafa;
-    }
-
-    public static JavaAWTFontAccess getJavaAWTFontAccess() {
-        // this may return null in which case calling code needs to
-        // provision for.
-        return javaAWTFontAccess;
-    }
-
-    public static JavaBeansAccess getJavaBeansAccess() {
-        return javaBeansAccess;
-    }
-
-    public static void setJavaBeansAccess(JavaBeansAccess access) {
-        javaBeansAccess = access;
-    }
-}
--- a/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java	Wed Jul 05 20:52:37 2017 +0200
@@ -66,6 +66,8 @@
 
 import jdk.internal.jimage.ImageLocation;
 import jdk.internal.jimage.ImageReader;
+import jdk.internal.misc.JavaUtilZipFileAccess;
+import jdk.internal.misc.SharedSecrets;
 
 import sun.net.util.URLUtil;
 import sun.net.www.ParseUtil;
@@ -622,8 +624,8 @@
         private URLStreamHandler handler;
         private HashMap<String, Loader> lmap;
         private boolean closed = false;
-        private static final sun.misc.JavaUtilZipFileAccess zipAccess =
-                sun.misc.SharedSecrets.getJavaUtilZipFileAccess();
+        private static final JavaUtilZipFileAccess zipAccess =
+                SharedSecrets.getJavaUtilZipFileAccess();
 
         /*
          * Creates a new JarLoader for the specified URL referring to
--- a/jdk/src/java.base/share/classes/sun/net/sdp/SdpSupport.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/net/sdp/SdpSupport.java	Wed Jul 05 20:52:37 2017 +0200
@@ -29,8 +29,8 @@
 import java.io.FileDescriptor;
 import java.security.AccessController;
 
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 
 
 /**
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Wed Jul 05 20:52:37 2017 +0200
@@ -65,6 +65,8 @@
 import java.util.HashMap;
 import java.util.Set;
 import java.util.StringJoiner;
+import jdk.internal.misc.JavaNetHttpCookieAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.net.*;
 import sun.net.www.*;
 import sun.net.www.http.HttpClient;
@@ -2878,8 +2880,8 @@
             if (cookieHandler == null || value.length() == 0)
                 return value;
 
-            sun.misc.JavaNetHttpCookieAccess access =
-                    sun.misc.SharedSecrets.getJavaNetHttpCookieAccess();
+            JavaNetHttpCookieAccess access =
+                    SharedSecrets.getJavaNetHttpCookieAccess();
             StringJoiner retValue = new StringJoiner(",");  // RFC 2965, comma separated
             List<HttpCookie> cookies = access.parse(value);
             for (HttpCookie cookie : cookies) {
--- a/jdk/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -44,9 +44,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.JavaNioAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.Cleaner;
-import sun.misc.JavaIOFileDescriptorAccess;
-import sun.misc.SharedSecrets;
 import sun.security.action.GetPropertyAction;
 
 public class FileChannelImpl
@@ -976,8 +977,8 @@
      * Invoked by sun.management.ManagementFactoryHelper to create the management
      * interface for mapped buffers.
      */
-    public static sun.misc.JavaNioAccess.BufferPool getMappedBufferPool() {
-        return new sun.misc.JavaNioAccess.BufferPool() {
+    public static JavaNioAccess.BufferPool getMappedBufferPool() {
+        return new JavaNioAccess.BufferPool() {
             @Override
             public String getName() {
                 return "mapped";
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationSupport.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationSupport.java	Wed Jul 05 20:52:37 2017 +0200
@@ -35,12 +35,12 @@
 import java.util.Map;
 import java.util.Objects;
 
-import sun.misc.JavaLangAccess;
-import sun.reflect.LangReflectAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
 import sun.reflect.ReflectionFactory;
 
 public final class AnnotationSupport {
-    private static final JavaLangAccess LANG_ACCESS = sun.misc.SharedSecrets.getJavaLangAccess();
+    private static final JavaLangAccess LANG_ACCESS = SharedSecrets.getJavaLangAccess();
 
     /**
      * Finds and returns all annotations in {@code annotations} matching
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Wed Jul 05 20:52:37 2017 +0200
@@ -25,13 +25,13 @@
 
 package sun.reflect.annotation;
 
-import sun.misc.JavaLangAccess;
-
 import java.lang.annotation.*;
 import java.lang.reflect.*;
 import java.util.*;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
 
 /**
  * Represents an annotation type at run time.  Used to type-check annotations
@@ -79,7 +79,7 @@
     public static AnnotationType getInstance(
         Class<? extends Annotation> annotationClass)
     {
-        JavaLangAccess jla = sun.misc.SharedSecrets.getJavaLangAccess();
+        JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
         AnnotationType result = jla.getAnnotationType(annotationClass); // volatile read
         if (result == null) {
             result = new AnnotationType(annotationClass);
@@ -134,7 +134,7 @@
         // of the corresponding annotation types breaks infinite recursion.
         if (annotationClass != Retention.class &&
             annotationClass != Inherited.class) {
-            JavaLangAccess jla = sun.misc.SharedSecrets.getJavaLangAccess();
+            JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
             Map<Class<? extends Annotation>, Annotation> metaAnnotations =
                 AnnotationParser.parseSelectAnnotations(
                     jla.getRawClassAnnotations(annotationClass),
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Wed Jul 05 20:52:37 2017 +0200
@@ -35,7 +35,8 @@
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
-import sun.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
 import sun.reflect.ConstantPool;
 import static sun.reflect.annotation.TypeAnnotation.*;
 
@@ -309,7 +310,7 @@
     static TypeAnnotation[] parseAllTypeAnnotations(AnnotatedElement decl) {
         Class<?> container;
         byte[] rawBytes;
-        JavaLangAccess javaLangAccess = sun.misc.SharedSecrets.getJavaLangAccess();
+        JavaLangAccess javaLangAccess = SharedSecrets.getJavaLangAccess();
         if (decl instanceof Class) {
             container = (Class<?>)decl;
             rawBytes = javaLangAccess.getRawClassTypeAnnotations(container);
--- a/jdk/src/java.base/share/classes/sun/security/provider/PolicyFile.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/provider/PolicyFile.java	Wed Jul 05 20:52:37 2017 +0200
@@ -41,9 +41,9 @@
 import java.net.SocketPermission;
 import java.net.NetPermission;
 import java.util.concurrent.atomic.AtomicReference;
-import sun.misc.JavaSecurityProtectionDomainAccess;
-import static sun.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaSecurityProtectionDomainAccess;
+import static jdk.internal.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
+import jdk.internal.misc.SharedSecrets;
 import sun.security.util.PolicyUtil;
 import sun.security.util.PropertyExpander;
 import sun.security.util.Debug;
--- a/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqItemV2.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqItemV2.java	Wed Jul 05 20:52:37 2017 +0200
@@ -49,7 +49,7 @@
  *      enum { ocsp(1), ocsp_multi(2), (255) } CertificateStatusType;
  */
 
-final class CertStatusReqItemV2 implements StatusRequest {
+final class CertStatusReqItemV2 {
 
     private final StatusRequestType statReqType;
     private final StatusRequest request;
@@ -144,8 +144,7 @@
      *
      * @return the encoded length of this {@code CertStatusReqItemV2}
      */
-    @Override
-    public int length() {
+    int length() {
         // The length is the the status type (1 byte) + the request length
         // field (2 bytes) + the StatusRequest data length.
         return request.length() + 3;
@@ -159,8 +158,7 @@
      *
      * @throws IOException if any errors occur during the encoding process
      */
-    @Override
-    public void send(HandshakeOutStream s) throws IOException {
+    void send(HandshakeOutStream s) throws IOException {
         s.putInt8(statReqType.id);
         s.putInt16(request.length());
         request.send(s);
--- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -42,8 +42,8 @@
 import javax.net.ssl.*;
 import sun.misc.ManagedLocalsThread;
 
-import sun.misc.JavaNetInetAddressAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaNetInetAddressAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * Implementation of an SSL socket.  This is a normal connection type
@@ -2094,7 +2094,7 @@
      */
     private static String getOriginalHostname(InetAddress inetAddress) {
         /*
-         * Get the original hostname via sun.misc.SharedSecrets.
+         * Get the original hostname via jdk.internal.misc.SharedSecrets.
          */
         JavaNetInetAddressAccess jna = SharedSecrets.getJavaNetInetAddressAccess();
         String originalHostname = jna.getOriginalHostName(inetAddress);
--- a/jdk/src/java.base/share/classes/sun/security/util/Password.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/util/Password.java	Wed Jul 05 20:52:37 2017 +0200
@@ -29,6 +29,7 @@
 import java.nio.*;
 import java.nio.charset.*;
 import java.util.Arrays;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * A utility class for reading passwords
@@ -139,7 +140,7 @@
     private static byte[] convertToBytes(char[] pass) {
         if (enc == null) {
             synchronized (Password.class) {
-                enc = sun.misc.SharedSecrets.getJavaIOAccess()
+                enc = SharedSecrets.getJavaIOAccess()
                         .charset()
                         .newEncoder()
                         .onMalformedInput(CodingErrorAction.REPLACE)
--- a/jdk/src/java.base/share/classes/sun/text/bidi/BidiBase.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/bidi/BidiBase.java	Wed Jul 05 20:52:37 2017 +0200
@@ -52,8 +52,8 @@
 import java.text.AttributedCharacterIterator;
 import java.text.Bidi;
 import java.util.Arrays;
-import sun.misc.JavaAWTFontAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaAWTFontAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.text.normalizer.UBiDiProps;
 import sun.text.normalizer.UCharacter;
 import sun.text.normalizer.UTF16;
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -185,7 +185,6 @@
                 LocaleServiceProviderPool.config(LocaleProviderAdapter.class, e.toString());
             }
             typeList.add(Type.JRE);
-            typeList.add(Type.SPI);
             defaultLocaleProviderAdapter = Type.JRE;
         }
 
--- a/jdk/src/java.base/share/classes/sun/util/logging/PlatformLogger.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/util/logging/PlatformLogger.java	Wed Jul 05 20:52:37 2017 +0200
@@ -39,8 +39,8 @@
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
-import sun.misc.JavaLangAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * Platform logger provides an API for the JRE components to log
--- a/jdk/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java	Wed Jul 05 20:52:37 2017 +0200
@@ -430,6 +430,7 @@
             {"America/Eirunepe", ACT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
+            {"America/Fort_Nelson", MST},
             {"America/Fort_Wayne", EST},
             {"America/Fortaleza", BRT},
             {"America/Glace_Bay", AST},
--- a/jdk/src/java.base/share/native/libjava/VMSupport.c	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/native/libjava/VMSupport.c	Wed Jul 05 20:52:37 2017 +0200
@@ -42,6 +42,7 @@
         if (!JDK_InitJvmHandle()) {
             JNU_ThrowInternalError(env,
                  "Handle for JVM not found for symbol lookup");
+            return NULL;
         }
         InitAgentProperties_fp = (INIT_AGENT_PROPERTIES_FN)
             JDK_FindJvmEntry("JVM_InitAgentProperties");
--- a/jdk/src/java.base/share/native/libjava/jni_util.h	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/native/libjava/jni_util.h	Wed Jul 05 20:52:37 2017 +0200
@@ -388,6 +388,7 @@
                           char *jniEntryName);
 
 extern size_t getLastErrorString(char *buf, size_t len);
+extern int getErrorString(int err, char *buf, size_t len);
 #ifdef __cplusplus
 } /* extern "C" */
 #endif /* __cplusplus */
--- a/jdk/src/java.base/share/native/libjimage/jimage.cpp	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/native/libjimage/jimage.cpp	Wed Jul 05 20:52:37 2017 +0200
@@ -29,8 +29,6 @@
 
 #include "imageFile.hpp"
 
-#define BOOT_VERSION "9.0"
-
 /*
  * JImageOpen - Given the supplied full path file name, open an image file. This
  * function will also initialize tables and retrieve meta-data necessary to
@@ -104,10 +102,6 @@
 extern "C" JImageLocationRef JIMAGE_FindResource(JImageFile* image,
         const char* module_name, const char* version, const char* name,
         jlong* size) {
-    if (strcmp(version, BOOT_VERSION) != 0) {
-        return (JImageLocationRef) 0;
-    }
-
     ImageLocation location;
     char fullpath[IMAGE_MAX_PATH];
 
--- a/jdk/src/java.base/share/native/libzip/zip_util.c	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/share/native/libzip/zip_util.c	Wed Jul 05 20:52:37 2017 +0200
@@ -1438,6 +1438,7 @@
 ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entryname)
 {
     char *msg;
+    char tmpbuf[1024];
 
     strcpy(entryname, entry->name);
     if (entry->csize == 0) {
@@ -1456,8 +1457,11 @@
             msg = zip->msg;
             ZIP_Unlock(zip);
             if (n == -1) {
-                jio_fprintf(stderr, "%s: %s\n", zip->name,
-                            msg != 0 ? msg : strerror(errno));
+                if (msg == 0) {
+                    getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+                    msg = tmpbuf;
+                }
+                jio_fprintf(stderr, "%s: %s\n", zip->name, msg);
                 return JNI_FALSE;
             }
             buf += n;
@@ -1470,8 +1474,11 @@
             if ((msg == NULL) || (*msg == 0)) {
                 msg = zip->msg;
             }
-            jio_fprintf(stderr, "%s: %s\n", zip->name,
-                        msg != 0 ? msg : strerror(errno));
+            if (msg == 0) {
+                getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+                msg = tmpbuf;
+            }
+            jio_fprintf(stderr, "%s: %s\n", zip->name, msg);
             return JNI_FALSE;
         }
     }
--- a/jdk/src/java.base/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -68,9 +68,23 @@
         long pipeFds = IOUtil.makePipe(false);
         fd0 = (int) (pipeFds >>> 32);
         fd1 = (int) pipeFds;
-        pollWrapper = new DevPollArrayWrapper();
-        pollWrapper.initInterrupt(fd0, fd1);
-        fdToKey = new HashMap<Integer,SelectionKeyImpl>();
+        try {
+            pollWrapper = new DevPollArrayWrapper();
+            pollWrapper.initInterrupt(fd0, fd1);
+            fdToKey = new HashMap<>();
+        } catch (Throwable t) {
+            try {
+                FileDispatcherImpl.closeIntFD(fd0);
+            } catch (IOException ioe0) {
+                t.addSuppressed(ioe0);
+            }
+            try {
+                FileDispatcherImpl.closeIntFD(fd1);
+            } catch (IOException ioe1) {
+                t.addSuppressed(ioe1);
+            }
+            throw t;
+        }
     }
 
     protected int doSelect(long timeout)
--- a/jdk/src/java.base/unix/classes/java/io/FileDescriptor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/unix/classes/java/io/FileDescriptor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -27,6 +27,8 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * Instances of the file descriptor class serve as an opaque handle
@@ -145,8 +147,8 @@
 
     // Set up JavaIOFileDescriptorAccess in SharedSecrets
     static {
-        sun.misc.SharedSecrets.setJavaIOFileDescriptorAccess(
-            new sun.misc.JavaIOFileDescriptorAccess() {
+        SharedSecrets.setJavaIOFileDescriptorAccess(
+            new JavaIOFileDescriptorAccess() {
                 public void set(FileDescriptor obj, int fd) {
                     obj.fd = fd;
                 }
--- a/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -46,6 +46,8 @@
 import java.security.PrivilegedAction;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * java.lang.Process subclass in the UNIX environment.
@@ -57,8 +59,8 @@
  * @since   1.5
  */
 final class ProcessImpl extends Process {
-    private static final sun.misc.JavaIOFileDescriptorAccess fdAccess
-        = sun.misc.SharedSecrets.getJavaIOFileDescriptorAccess();
+    private static final JavaIOFileDescriptorAccess fdAccess
+        = SharedSecrets.getJavaIOFileDescriptorAccess();
 
     // Linux platforms support a normal (non-forcible) kill signal.
     static final boolean SUPPORTS_NORMAL_TERMINATION = true;
--- a/jdk/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -143,8 +143,9 @@
         password = pw.getPassword();
         init0();
         try {
-            client = new Client(System.getProperty("ntlm.version"), hostname,
-                    username, ntdomain, password);
+            String version = java.security.AccessController.doPrivileged(
+                    new sun.security.action.GetPropertyAction("ntlm.version"));
+            client = new Client(version, hostname, username, ntdomain, password);
         } catch (NTLMException ne) {
             try {
                 client = new Client(null, hostname, username, ntdomain, password);
--- a/jdk/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,9 +57,23 @@
         long pipeFds = IOUtil.makePipe(false);
         fd0 = (int) (pipeFds >>> 32);
         fd1 = (int) pipeFds;
-        pollWrapper = new PollArrayWrapper(INIT_CAP);
-        pollWrapper.initInterrupt(fd0, fd1);
-        channelArray = new SelectionKeyImpl[INIT_CAP];
+        try {
+            pollWrapper = new PollArrayWrapper(INIT_CAP);
+            pollWrapper.initInterrupt(fd0, fd1);
+            channelArray = new SelectionKeyImpl[INIT_CAP];
+        } catch (Throwable t) {
+            try {
+                FileDispatcherImpl.closeIntFD(fd0);
+            } catch (IOException ioe0) {
+                t.addSuppressed(ioe0);
+            }
+            try {
+                FileDispatcherImpl.closeIntFD(fd1);
+            } catch (IOException ioe1) {
+                t.addSuppressed(ioe1);
+            }
+            throw t;
+        }
     }
 
     protected int doSelect(long timeout)
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java	Wed Jul 05 20:52:37 2017 +0200
@@ -30,11 +30,11 @@
 import java.io.FileDescriptor;
 import java.util.Set;
 
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 import sun.nio.ch.FileChannelImpl;
 import sun.nio.ch.ThreadPool;
 import sun.nio.ch.SimpleAsynchronousFileChannelImpl;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
 
 import static sun.nio.fs.UnixNativeDispatcher.*;
 import static sun.nio.fs.UnixConstants.*;
--- a/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c	Wed Jul 05 20:52:37 2017 +0200
@@ -248,12 +248,13 @@
     const char *detail = defaultDetail;
     char *errmsg;
     size_t fmtsize;
+    char tmpbuf[1024];
     jstring s;
 
     if (errnum != 0) {
-        const char *s = strerror(errnum);
-        if (strcmp(s, "Unknown error") != 0)
-            detail = s;
+        int ret = getErrorString(errnum, tmpbuf, sizeof(tmpbuf));
+        if (ret != EINVAL)
+            detail = tmpbuf;
     }
     /* ASCII Decimal representation uses 2.4 times as many bits as binary. */
     fmtsize = sizeof(IOE_FORMAT) + strlen(detail) + 3 * sizeof(errnum);
--- a/jdk/src/java.base/unix/native/libjava/jni_util_md.c	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/unix/native/libjava/jni_util_md.c	Wed Jul 05 20:52:37 2017 +0200
@@ -30,6 +30,13 @@
 #include "jni_util.h"
 #include "dlfcn.h"
 
+#if defined(LINUX) && (defined(_GNU_SOURCE) || \
+         (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE < 200112L \
+             && defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 600))
+extern int __xpg_strerror_r(int, char *, size_t);
+#define strerror_r(a, b, c) __xpg_strerror_r((a), (b), (c))
+#endif
+
 void* getProcessHandle() {
     static void *procHandle = NULL;
     if (procHandle != NULL) {
@@ -55,16 +62,14 @@
 size_t
 getLastErrorString(char *buf, size_t len)
 {
-    char *err;
-    size_t n;
     if (errno == 0 || len < 1) return 0;
+    getErrorString(errno, buf, len);
+    return strlen(buf);
+}
 
-    err = strerror(errno);
-    n = strlen(err);
-    if (n >= len)
-        n = len - 1;
-
-    strncpy(buf, err, n);
-    buf[n] = '\0';
-    return n;
+int
+getErrorString(int err, char *buf, size_t len)
+{
+    if (err == 0 || len < 1) return 0;
+    return strerror_r(err, buf, len);
 }
--- a/jdk/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c	Wed Jul 05 20:52:37 2017 +0200
@@ -918,6 +918,7 @@
                                                            jobject this) {
     jobject fdObj = (*env)->GetObjectField(env, this, pdsi_fdID);
     int arg, fd, t = 1;
+    char tmpbuf[1024];
 #ifdef AF_INET6
     int domain = ipv6_available() ? AF_INET6 : AF_INET;
 #else
@@ -953,22 +954,23 @@
     arg = 65507;
     if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF,
                    (char *)&arg, sizeof(arg)) < 0) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                        strerror(errno));
+        getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", tmpbuf);
         close(fd);
         return;
     }
     if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
                    (char *)&arg, sizeof(arg)) < 0) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                        strerror(errno));
+        getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", tmpbuf);
         close(fd);
         return;
     }
 #endif /* __APPLE__ */
 
     if (setsockopt(fd, SOL_SOCKET, SO_BROADCAST, (char*) &t, sizeof (int)) < 0) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", strerror(errno));
+        getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", tmpbuf);
         close(fd);
         return;
     }
@@ -977,9 +979,10 @@
      arg = 0;
      int level = (domain == AF_INET6) ? IPPROTO_IPV6 : IPPROTO_IP;
      if ((setsockopt(fd, level, IP_MULTICAST_ALL, (char*)&arg, sizeof(arg)) < 0) &&
-         (errno != ENOPROTOOPT)) {
-         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                         strerror(errno));
+           (errno != ENOPROTOOPT))
+    {
+        getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", tmpbuf);
          close(fd);
          return;
      }
@@ -994,7 +997,8 @@
         int ttl = 1;
         if (setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, (char *) &ttl,
                 sizeof (ttl)) < 0) {
-            JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", strerror(errno));
+            getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+            JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", tmpbuf);
             close(fd);
             return;
         }
--- a/jdk/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c	Wed Jul 05 20:52:37 2017 +0200
@@ -315,21 +315,15 @@
 JNIEXPORT jbyteArray
 Java_sun_nio_fs_UnixNativeDispatcher_strerror(JNIEnv* env, jclass this, jint error)
 {
-    char* msg;
+    char tmpbuf[1024];
     jsize len;
     jbyteArray bytes;
 
-#ifdef _AIX
-    /* strerror() is not thread-safe on AIX so we have to use strerror_r() */
-    char buffer[256];
-    msg = (strerror_r((int)error, buffer, 256) == 0) ? buffer : "Error while calling strerror_r";
-#else
-    msg = strerror((int)error);
-#endif
-    len = strlen(msg);
+    getErrorString((int)errno, tmpbuf, sizeof(tmpbuf));
+    len = strlen(tmpbuf);
     bytes = (*env)->NewByteArray(env, len);
     if (bytes != NULL) {
-        (*env)->SetByteArrayRegion(env, bytes, 0, len, (jbyte*)msg);
+        (*env)->SetByteArrayRegion(env, bytes, 0, len, (jbyte*)tmpbuf);
     }
     return bytes;
 }
--- a/jdk/src/java.base/windows/classes/java/io/FileDescriptor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/windows/classes/java/io/FileDescriptor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -27,6 +27,8 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * Instances of the file descriptor class serve as an opaque handle
@@ -70,8 +72,8 @@
 
     // Set up JavaIOFileDescriptorAccess in SharedSecrets
     static {
-        sun.misc.SharedSecrets.setJavaIOFileDescriptorAccess(
-            new sun.misc.JavaIOFileDescriptorAccess() {
+        SharedSecrets.setJavaIOFileDescriptorAccess(
+            new JavaIOFileDescriptorAccess() {
                 public void set(FileDescriptor obj, int fd) {
                     obj.fd = fd;
                 }
--- a/jdk/src/java.base/windows/classes/java/lang/ProcessImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/windows/classes/java/lang/ProcessImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -42,6 +42,8 @@
 import java.util.concurrent.TimeUnit;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /* This class is for the exclusive use of ProcessBuilder.start() to
  * create new processes.
@@ -51,8 +53,8 @@
  */
 
 final class ProcessImpl extends Process {
-    private static final sun.misc.JavaIOFileDescriptorAccess fdAccess
-        = sun.misc.SharedSecrets.getJavaIOFileDescriptorAccess();
+    private static final JavaIOFileDescriptorAccess fdAccess
+        = SharedSecrets.getJavaIOFileDescriptorAccess();
 
     // Windows platforms support a forcible kill signal.
     static final boolean SUPPORTS_NORMAL_TERMINATION = false;
--- a/jdk/src/java.base/windows/classes/java/net/DualStackPlainDatagramSocketImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/windows/classes/java/net/DualStackPlainDatagramSocketImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -25,8 +25,8 @@
 package java.net;
 
 import java.io.IOException;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 
 /**
  * This class defines the plain DatagramSocketImpl that is used on
--- a/jdk/src/java.base/windows/classes/java/net/DualStackPlainSocketImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/windows/classes/java/net/DualStackPlainSocketImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,8 +26,8 @@
 
 import java.io.IOException;
 import java.io.FileDescriptor;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 
 /**
  * This class defines the plain SocketImpl that is used on Windows platforms
--- a/jdk/src/java.base/windows/classes/sun/nio/ch/FileDispatcherImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/windows/classes/sun/nio/ch/FileDispatcherImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -28,8 +28,8 @@
 import java.io.FileDescriptor;
 import java.io.IOException;
 import java.security.PrivilegedAction;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 
 class FileDispatcherImpl extends FileDispatcher {
 
--- a/jdk/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -31,8 +31,8 @@
 import java.nio.BufferOverflowException;
 import java.io.IOException;
 import java.io.FileDescriptor;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 
 /**
  * Windows implementation of AsynchronousFileChannel using overlapped I/O.
--- a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsChannelFactory.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsChannelFactory.java	Wed Jul 05 20:52:37 2017 +0200
@@ -36,8 +36,8 @@
 
 import com.sun.nio.file.ExtendedOpenOption;
 
-import sun.misc.JavaIOFileDescriptorAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.nio.ch.FileChannelImpl;
 import sun.nio.ch.ThreadPool;
 import sun.nio.ch.WindowsAsynchronousFileChannelImpl;
--- a/jdk/src/java.base/windows/native/libjava/jni_util_md.c	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/windows/native/libjava/jni_util_md.c	Wed Jul 05 20:52:37 2017 +0200
@@ -108,13 +108,9 @@
                 }
             } else if (errno != 0) {
                 // C runtime error that has no corresponding WIN32 error code
-                const WCHAR *rtError = _wcserror(errno);
-                if (rtError != NULL) {
-                    wcsncpy(utf16_osErrorMsg, rtError, cbErrorMsg);
-                    // truncate if too long
-                    utf16_osErrorMsg[cbErrorMsg - 1] = L'\0';
+                int ret = _wcserror_s(utf16_osErrorMsg, cbErrorMsg, errno);
+                if (ret == 0)
                     n = wcslen(utf16_osErrorMsg);
-                }
             } else
                 noError = TRUE; //OS has no error to report
 
@@ -147,3 +143,12 @@
     }
     return n;
 }
+
+int
+getErrorString(int err, char *buf, size_t len)
+{
+    int ret = 0;
+    if (err == 0 || len < 1) return 0;
+    ret = strerror_s(buf, len, err);
+    return ret;
+}
--- a/jdk/src/java.base/windows/native/libnet/Inet4AddressImpl.c	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/windows/native/libnet/Inet4AddressImpl.c	Wed Jul 05 20:52:37 2017 +0200
@@ -283,8 +283,11 @@
  * Returns true is an ECHO_REPLY is received, otherwise, false.
  */
 static jboolean
-ping4(JNIEnv *env, unsigned long ipaddr, jint timeout) {
-
+ping4(JNIEnv *env,
+      unsigned long src_addr,
+      unsigned long dest_addr,
+      jint timeout)
+{
     // See https://msdn.microsoft.com/en-us/library/aa366050%28VS.85%29.aspx
 
     HANDLE hIcmpFile;
@@ -307,14 +310,29 @@
         return JNI_FALSE;
     }
 
-    dwRetVal = IcmpSendEcho(hIcmpFile,  // HANDLE IcmpHandle,
-                            ipaddr,     // IPAddr DestinationAddress,
-                            SendData,   // LPVOID RequestData,
-                            sizeof(SendData),   // WORD RequestSize,
-                            NULL,       // PIP_OPTION_INFORMATION RequestOptions,
-                            ReplyBuffer,// LPVOID ReplyBuffer,
-                            ReplySize,  // DWORD ReplySize,
-                            timeout);   // DWORD Timeout
+    if (src_addr == 0) {
+        dwRetVal = IcmpSendEcho(hIcmpFile,  // HANDLE IcmpHandle,
+                                dest_addr,  // IPAddr DestinationAddress,
+                                SendData,   // LPVOID RequestData,
+                                sizeof(SendData),   // WORD RequestSize,
+                                NULL,       // PIP_OPTION_INFORMATION RequestOptions,
+                                ReplyBuffer,// LPVOID ReplyBuffer,
+                                ReplySize,  // DWORD ReplySize,
+                                timeout);   // DWORD Timeout
+    } else {
+        dwRetVal = IcmpSendEcho2Ex(hIcmpFile,  // HANDLE IcmpHandle,
+                                   NULL,       // HANDLE Event
+                                   NULL,       // PIO_APC_ROUTINE ApcRoutine
+                                   NULL,       // ApcContext
+                                   src_addr,   // IPAddr SourceAddress,
+                                   dest_addr,  // IPAddr DestinationAddress,
+                                   SendData,   // LPVOID RequestData,
+                                   sizeof(SendData),   // WORD RequestSize,
+                                   NULL,       // PIP_OPTION_INFORMATION RequestOptions,
+                                   ReplyBuffer,// LPVOID ReplyBuffer,
+                                   ReplySize,  // DWORD ReplySize,
+                                   timeout);   // DWORD Timeout
+    }
 
     free(ReplyBuffer);
     IcmpCloseHandle(hIcmpFile);
@@ -337,9 +355,9 @@
                                            jint timeout,
                                            jbyteArray ifArray,
                                            jint ttl) {
-    jint addr;
+    jint src_addr = 0;
+    jint dest_addr = 0;
     jbyte caddr[4];
-    struct sockaddr_in him;
     int sz;
 
     /**
@@ -349,14 +367,28 @@
     if (sz != 4) {
       return JNI_FALSE;
     }
-    memset((char *) &him, 0, sizeof(him));
     memset((char *) caddr, 0, sizeof(caddr));
     (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr);
-    addr = ((caddr[0]<<24) & 0xff000000);
-    addr |= ((caddr[1] <<16) & 0xff0000);
-    addr |= ((caddr[2] <<8) & 0xff00);
-    addr |= (caddr[3] & 0xff);
-    addr = htonl(addr);
+    dest_addr = ((caddr[0]<<24) & 0xff000000);
+    dest_addr |= ((caddr[1] <<16) & 0xff0000);
+    dest_addr |= ((caddr[2] <<8) & 0xff00);
+    dest_addr |= (caddr[3] & 0xff);
+    dest_addr = htonl(dest_addr);
 
-    return ping4(env, addr, timeout);
+    /**
+     * If a network interface was specified, let's convert its address
+     * as well.
+     */
+    if (!(IS_NULL(ifArray))) {
+        memset((char *) caddr, 0, sizeof(caddr));
+        (*env)->GetByteArrayRegion(env, ifArray, 0, 4, caddr);
+        src_addr = ((caddr[0]<<24) & 0xff000000);
+        src_addr |= ((caddr[1] <<16) & 0xff0000);
+        src_addr |= ((caddr[2] <<8) & 0xff00);
+        src_addr |= (caddr[3] & 0xff);
+        src_addr = htonl(src_addr);
+    }
+
+    return ping4(env, src_addr, dest_addr, timeout);
 }
+
--- a/jdk/src/java.base/windows/native/libnet/TwoStacksPlainDatagramSocketImpl.c	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.base/windows/native/libnet/TwoStacksPlainDatagramSocketImpl.c	Wed Jul 05 20:52:37 2017 +0200
@@ -2211,8 +2211,11 @@
 
     optlen = sizeof(optval.i);
     if (NET_GetSockOpt(fd, level, optname, (void *)&optval, &optlen) < 0) {
-        char errmsg[255];
-        sprintf(errmsg, "error getting socket option: %s\n", strerror(errno));
+        char tmpbuf[255];
+        int size = 0;
+        char errmsg[255 + 31];
+        getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+        sprintf(errmsg, "error getting socket option: %s", tmpbuf);
         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", errmsg);
         return NULL;
     }
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -127,7 +127,7 @@
      * @return the class loaded
      * @exception ClassNotFoundException if class is not found
      */
-    protected final static Class<?> tryToLoadClass(String className,
+    protected static final Class<?> tryToLoadClass(String className,
                                                    ClassLoader fallback)
         throws ClassNotFoundException
     {
@@ -163,7 +163,7 @@
     /*
      * private initializer
      */
-    static private DataFlavor createConstant(Class<?> rc, String prn) {
+    private static DataFlavor createConstant(Class<?> rc, String prn) {
         try {
             return new DataFlavor(rc, prn);
         } catch (Exception e) {
@@ -174,7 +174,7 @@
     /*
      * private initializer
      */
-    static private DataFlavor createConstant(String mt, String prn) {
+    private static DataFlavor createConstant(String mt, String prn) {
         try {
             return new DataFlavor(mt, prn);
         } catch (Exception e) {
@@ -185,7 +185,7 @@
     /*
      * private initializer
      */
-    static private DataFlavor initHtmlDataFlavor(String htmlFlavorType) {
+    private static DataFlavor initHtmlDataFlavor(String htmlFlavorType) {
         try {
             return new DataFlavor ("text/html; class=java.lang.String;document=" +
                                        htmlFlavorType + ";charset=Unicode");
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppEventHandler.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppEventHandler.java	Wed Jul 05 20:52:37 2017 +0200
@@ -62,7 +62,7 @@
     private static native void nativeReplyToAppShouldTerminate(final boolean shouldTerminate);
     private static native void nativeRegisterForNotification(final int notification);
 
-    final static _AppEventHandler instance = new _AppEventHandler();
+    static final _AppEventHandler instance = new _AppEventHandler();
     static _AppEventHandler getInstance() {
         return instance;
     }
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eio/FileManager.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eio/FileManager.java	Wed Jul 05 20:52:37 2017 +0200
@@ -69,31 +69,31 @@
      * @since Java for Mac OS X 10.5 - 1.5
          * @since Java for Mac OS X 10.5 Update 1 - 1.6
      */
-    public final static short kOnAppropriateDisk = -32767;
+    public static final short kOnAppropriateDisk = -32767;
     /**
      * Read-only system hierarchy.
      * @since Java for Mac OS X 10.5 - 1.5
          * @since Java for Mac OS X 10.5 Update 1 - 1.6
      */
-    public final static short kSystemDomain = -32766;
+    public static final short kSystemDomain = -32766;
     /**
      * All users of a single machine have access to these resources.
      * @since Java for Mac OS X 10.5 - 1.5
          * @since Java for Mac OS X 10.5 Update 1 - 1.6
      */
-    public final static short kLocalDomain = -32765;
+    public static final short kLocalDomain = -32765;
     /**
      * All users configured to use a common network server has access to these resources.
      * @since Java for Mac OS X 10.5 - 1.5
          * @since Java for Mac OS X 10.5 Update 1 - 1.6
      */
-    public final static short kNetworkDomain = -32764;
+    public static final short kNetworkDomain = -32764;
     /**
      * Read/write. Resources that are private to the user.
      * @since Java for Mac OS X 10.5 - 1.5
          * @since Java for Mac OS X 10.5 Update 1 - 1.6
      */
-    public final static short kUserDomain = -32763;
+    public static final short kUserDomain = -32763;
 
 
         /**
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonBorder.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonBorder.java	Wed Jul 05 20:52:37 2017 +0200
@@ -38,17 +38,17 @@
 
 public abstract class AquaButtonBorder extends AquaBorder implements Border, UIResource {
     public static final RecyclableSingleton<Dynamic> fDynamic = new RecyclableSingletonFromDefaultConstructor<Dynamic>(Dynamic.class);
-    static public AquaButtonBorder getDynamicButtonBorder() {
+    public static AquaButtonBorder getDynamicButtonBorder() {
         return fDynamic.get();
     }
 
     private static final RecyclableSingleton<Toggle> fToggle = new RecyclableSingletonFromDefaultConstructor<Toggle>(Toggle.class);
-    static public AquaButtonBorder getToggleButtonBorder() {
+    public static AquaButtonBorder getToggleButtonBorder() {
         return fToggle.get();
     }
 
     public static final RecyclableSingleton<Toolbar> fToolBar = new RecyclableSingletonFromDefaultConstructor<Toolbar>(Toolbar.class);
-    static public Border getToolBarButtonBorder() {
+    public static Border getToolBarButtonBorder() {
         return fToolBar.get();
     }
 
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonExtendedTypes.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonExtendedTypes.java	Wed Jul 05 20:52:37 2017 +0200
@@ -63,7 +63,7 @@
         return logicalPosition;
     }
 
-    static abstract class TypeSpecifier {
+    abstract static class TypeSpecifier {
         final String name;
         final boolean setIconFont;
 
@@ -138,7 +138,7 @@
         return typeDefinitions.get().get(name);
     }
 
-    protected final static RecyclableSingleton<Map<String, TypeSpecifier>> typeDefinitions = new RecyclableSingleton<Map<String, TypeSpecifier>>() {
+    protected static final RecyclableSingleton<Map<String, TypeSpecifier>> typeDefinitions = new RecyclableSingleton<Map<String, TypeSpecifier>>() {
         protected Map<String, TypeSpecifier> getInstance() {
             return getAllTypes();
         }
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonLabeledUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonLabeledUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -221,7 +221,7 @@
         return new Dimension(width, height);
     }
 
-    public static abstract class LabeledButtonBorder extends AquaButtonBorder {
+    public abstract static class LabeledButtonBorder extends AquaButtonBorder {
         public LabeledButtonBorder(final SizeDescriptor sizeDescriptor) {
             super(sizeDescriptor);
         }
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -462,7 +462,7 @@
         return d;
     }
 
-    final static RecyclableSingleton<AquaHierarchyButtonListener> fHierListener = new RecyclableSingletonFromDefaultConstructor<AquaHierarchyButtonListener>(AquaHierarchyButtonListener.class);
+    static final RecyclableSingleton<AquaHierarchyButtonListener> fHierListener = new RecyclableSingletonFromDefaultConstructor<AquaHierarchyButtonListener>(AquaHierarchyButtonListener.class);
     static AquaHierarchyButtonListener getAquaHierarchyButtonListener() {
         return fHierListener.get();
     }
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java	Wed Jul 05 20:52:37 2017 +0200
@@ -35,10 +35,10 @@
 
 @SuppressWarnings("serial") // Superclass is not serializable across versions
 class AquaComboBoxButton extends JButton {
-    final protected JComboBox<Object> comboBox;
-    final protected JList<?> list;
-    final protected CellRendererPane rendererPane;
-    final protected AquaComboBoxUI ui;
+    protected final JComboBox<Object> comboBox;
+    protected final JList<?> list;
+    protected final CellRendererPane rendererPane;
+    protected final AquaComboBoxUI ui;
 
     protected final AquaPainter<JRSUIState> painter = AquaPainter.create(JRSUIState.getInstance());
     boolean isPopDown;
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,6 +26,8 @@
 package com.apple.laf;
 
 import java.awt.*;
+import java.awt.Insets;
+import java.awt.Rectangle;
 import java.awt.event.*;
 
 import javax.swing.*;
@@ -195,24 +197,14 @@
         final GraphicsDevice[] gs = ge.getScreenDevices();
         //System.err.println("  gs.length = " + gs.length);
         final Rectangle comboBoxBounds = comboBox.getBounds();
-        if (gs.length == 1) {
-            final Dimension scrSize = Toolkit.getDefaultToolkit().getScreenSize();
-
-            //System.err.println("  scrSize: "+ scrSize);
-
-            // If the combo box is totally off screen, don't show a popup
-            if ((p.x + comboBoxBounds.width < 0) || (p.y + comboBoxBounds.height < 0) || (p.x > scrSize.width) || (p.y > scrSize.height)) {
-                return null;
-            }
-            Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(comboBox.getGraphicsConfiguration());
-            return new Rectangle(0, insets.top, scrSize.width, scrSize.height - insets.top - insets.bottom);
-        }
 
         for (final GraphicsDevice gd : gs) {
             final GraphicsConfiguration[] gc = gd.getConfigurations();
             for (final GraphicsConfiguration element0 : gc) {
                 final Rectangle gcBounds = element0.getBounds();
-                if (gcBounds.contains(p)) return gcBounds;
+                if (gcBounds.contains(p)) {
+                    return getAvailableScreenArea(gcBounds, element0);
+                }
             }
         }
 
@@ -222,13 +214,24 @@
             final GraphicsConfiguration[] gc = gd.getConfigurations();
             for (final GraphicsConfiguration element0 : gc) {
                 final Rectangle gcBounds = element0.getBounds();
-                if (gcBounds.intersects(comboBoxBounds)) return gcBounds;
+                if (gcBounds.intersects(comboBoxBounds)) {
+                    if (gcBounds.contains(p)) {
+                        return getAvailableScreenArea(gcBounds, element0);
+                    }
+                }
             }
         }
 
         return null;
     }
 
+    private Rectangle getAvailableScreenArea(Rectangle bounds,
+                                             GraphicsConfiguration gc) {
+        Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(gc);
+        return new Rectangle(0, insets.top, bounds.width,
+                bounds.height - insets.top);
+    }
+
     @Override
     protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
         final int itemCount = comboBox.getModel().getSize();
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaFileSystemModel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaFileSystemModel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -57,8 +57,8 @@
     // private boolean fSortAscending = true;
     private boolean fSortNames = true;
     private final String[] fColumnNames;
-    public final static String SORT_BY_CHANGED = "sortByChanged";
-    public final static String SORT_ASCENDING_CHANGED = "sortAscendingChanged";
+    public static final String SORT_BY_CHANGED = "sortByChanged";
+    public static final String SORT_ASCENDING_CHANGED = "sortAscendingChanged";
 
     public AquaFileSystemModel(final JFileChooser filechooser, final JTable filelist, final String[] colNames) {
         fileCacheLock = new Object();
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaIcon.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaIcon.java	Wed Jul 05 20:52:37 2017 +0200
@@ -73,7 +73,7 @@
         public void initIconPainter(final AquaPainter<? extends JRSUIState> painter);
     }
 
-    static abstract class JRSUIIcon implements Icon, UIResource {
+    abstract static class JRSUIIcon implements Icon, UIResource {
         protected final AquaPainter<JRSUIState> painter = AquaPainter.create(JRSUIState.getInstance());
 
         public void paintIcon(final Component c, final Graphics g, final int x, final int y) {
@@ -81,7 +81,7 @@
         }
     }
 
-    static abstract class DynamicallySizingJRSUIIcon extends JRSUIIcon {
+    abstract static class DynamicallySizingJRSUIIcon extends JRSUIIcon {
         protected final SizeDescriptor sizeDescriptor;
         protected SizeVariant sizeVariant;
 
@@ -109,7 +109,7 @@
         }
     }
 
-    static abstract class CachingScalingIcon implements Icon, UIResource {
+    abstract static class CachingScalingIcon implements Icon, UIResource {
         int width;
         int height;
         Image image;
@@ -167,7 +167,7 @@
 
     }
 
-    static abstract class ScalingJRSUIIcon implements Icon, UIResource {
+    abstract static class ScalingJRSUIIcon implements Icon, UIResource {
         final int width;
         final int height;
 
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -229,9 +229,9 @@
 
     @SuppressWarnings("serial") // Superclass is not serializable across versions
     class DockLabel extends JLabel {
-        final static int NUB_HEIGHT = 7;
-        final static int ROUND_ADDITIONAL_HEIGHT = 8;
-        final static int ROUND_ADDITIONAL_WIDTH = 12;
+        static final int NUB_HEIGHT = 7;
+        static final int ROUND_ADDITIONAL_HEIGHT = 8;
+        static final int ROUND_ADDITIONAL_WIDTH = 12;
 
         DockLabel(final String text) {
             super(text);
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java	Wed Jul 05 20:52:37 2017 +0200
@@ -529,7 +529,7 @@
 
     // extracted and adapted from DefaultEditorKit in 1.6
     @SuppressWarnings("serial") // Superclass is not serializable across versions
-    static abstract class DeleteWordAction extends TextAction {
+    abstract static class DeleteWordAction extends TextAction {
         public DeleteWordAction(final String name) { super(name); }
 
         public void actionPerformed(final ActionEvent e) {
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaRootPaneUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaRootPaneUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -48,7 +48,7 @@
 public class AquaRootPaneUI extends BasicRootPaneUI implements AncestorListener, WindowListener, ContainerListener {
     private static final RecyclableSingleton<AquaRootPaneUI> sRootPaneUI = new RecyclableSingletonFromDefaultConstructor<AquaRootPaneUI>(AquaRootPaneUI.class);
 
-    final static int kDefaultButtonPaintDelayBetweenFrames = 50;
+    static final int kDefaultButtonPaintDelayBetweenFrames = 50;
     JButton fCurrentDefaultButton = null;
     Timer fTimer = null;
     static final boolean sUseScreenMenuBar = AquaMenuBarUI.getScreenMenuBarProperty();
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -2011,20 +2011,20 @@
     }
 
     private static class Actions extends UIAction {
-        final static String NEXT = "navigateNext";
-        final static String PREVIOUS = "navigatePrevious";
-        final static String RIGHT = "navigateRight";
-        final static String LEFT = "navigateLeft";
-        final static String UP = "navigateUp";
-        final static String DOWN = "navigateDown";
-        final static String PAGE_UP = "navigatePageUp";
-        final static String PAGE_DOWN = "navigatePageDown";
-        final static String REQUEST_FOCUS = "requestFocus";
-        final static String REQUEST_FOCUS_FOR_VISIBLE = "requestFocusForVisibleComponent";
-        final static String SET_SELECTED = "setSelectedIndex";
-        final static String SELECT_FOCUSED = "selectTabWithFocus";
-        final static String SCROLL_FORWARD = "scrollTabsForwardAction";
-        final static String SCROLL_BACKWARD = "scrollTabsBackwardAction";
+        static final String NEXT = "navigateNext";
+        static final String PREVIOUS = "navigatePrevious";
+        static final String RIGHT = "navigateRight";
+        static final String LEFT = "navigateLeft";
+        static final String UP = "navigateUp";
+        static final String DOWN = "navigateDown";
+        static final String PAGE_UP = "navigatePageUp";
+        static final String PAGE_DOWN = "navigatePageDown";
+        static final String REQUEST_FOCUS = "requestFocus";
+        static final String REQUEST_FOCUS_FOR_VISIBLE = "requestFocusForVisibleComponent";
+        static final String SET_SELECTED = "setSelectedIndex";
+        static final String SELECT_FOCUSED = "selectTabWithFocus";
+        static final String SCROLL_FORWARD = "scrollTabsForwardAction";
+        static final String SCROLL_BACKWARD = "scrollTabsBackwardAction";
 
         Actions(final String key) {
             super(key);
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -67,7 +67,7 @@
         super.uninstallDefaults();
     }
 
-    final static RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>> TABLE_HEADER_APPLICATORS = new RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>>() {
+    static final RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>> TABLE_HEADER_APPLICATORS = new RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>>() {
         @Override
         @SuppressWarnings("unchecked")
         protected ClientPropertyApplicator<JTableHeader, JTableHeader> getInstance() {
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtilControlSize.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtilControlSize.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,6 @@
 
 import java.awt.*;
 import java.beans.*;
-import java.lang.reflect.Method;
 
 import javax.swing.*;
 import javax.swing.border.Border;
@@ -38,16 +37,20 @@
 
 import com.apple.laf.AquaUtils.RecyclableSingleton;
 import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor;
+import sun.security.action.GetPropertyAction;
+
+import static java.security.AccessController.*;
 
 public class AquaUtilControlSize {
-    protected final static String CLIENT_PROPERTY_KEY = "JComponent.sizeVariant";
-    protected final static String SYSTEM_PROPERTY_KEY = "swing.component.sizevariant";
+    protected static final String CLIENT_PROPERTY_KEY = "JComponent.sizeVariant";
+    protected static final String SYSTEM_PROPERTY_KEY = "swing.component.sizevariant";
 
     interface Sizeable {
         void applySizeFor(final JComponent c, final Size size);
     }
 
-    protected static final RecyclableSingleton<PropertySizeListener> sizeListener = new RecyclableSingletonFromDefaultConstructor<PropertySizeListener>(PropertySizeListener.class);
+    protected static final RecyclableSingleton<PropertySizeListener> sizeListener
+            = new RecyclableSingletonFromDefaultConstructor<>(PropertySizeListener.class);
     protected static PropertySizeListener getSizeListener() {
         return sizeListener.get();
     }
@@ -70,13 +73,13 @@
     }
 
     private static Size getDefaultSize() {
-        final String sizeProperty = java.security.AccessController.doPrivileged(new sun.security.action.GetPropertyAction(SYSTEM_PROPERTY_KEY));
+        final String sizeProperty = doPrivileged(new GetPropertyAction(SYSTEM_PROPERTY_KEY));
         final JRSUIConstants.Size size = getSizeFromString(sizeProperty);
         if (size != null) return size;
         return JRSUIConstants.Size.REGULAR;
     }
 
-    protected final static JRSUIConstants.Size defaultSize = getDefaultSize();
+    protected static final JRSUIConstants.Size defaultSize = getDefaultSize();
     protected static JRSUIConstants.Size getUserSizeFrom(final JComponent c) {
         final Object sizeProp = c.getClientProperty(CLIENT_PROPERTY_KEY);
         if (sizeProp == null) return defaultSize;
@@ -85,20 +88,32 @@
         return size;
     }
 
-    protected static JRSUIConstants.Size applySizeForControl(final JComponent c, final AquaPainter<? extends JRSUIState> painter) {
+    protected static JRSUIConstants.Size applySizeForControl(final JComponent c,
+                                                             final AquaPainter<? extends JRSUIState> painter) {
         final JRSUIConstants.Size sizeFromUser = getUserSizeFrom(c);
-        final JRSUIConstants.Size size = sizeFromUser == null ? JRSUIConstants.Size.REGULAR : sizeFromUser;
+        final JRSUIConstants.Size size = sizeFromUser == null
+                                         ? JRSUIConstants.Size.REGULAR
+                                         : sizeFromUser;
         painter.state.set(size);
         return size;
     }
 
-    protected static Font getFontForSize(final Component c, final JRSUIConstants.Size size) {
+    protected static Font getFontForSize(final Component c,
+                                         final JRSUIConstants.Size size) {
         final Font initialFont = c.getFont();
 
-        if (size == null || !(initialFont instanceof UIResource)) return initialFont;
+        if (size == null || !(initialFont instanceof UIResource)) {
+            return initialFont;
+        }
 
-        if (size == JRSUIConstants.Size.MINI) return initialFont.deriveFont(AquaFonts.getMiniControlTextFont().getSize2D());
-        if (size == JRSUIConstants.Size.SMALL) return initialFont.deriveFont(AquaFonts.getSmallControlTextFont().getSize2D());
+        if (size == JRSUIConstants.Size.MINI) {
+            return initialFont.deriveFont(
+                    AquaFonts.getMiniControlTextFont().getSize2D());
+        }
+        if (size == JRSUIConstants.Size.SMALL) {
+            return initialFont.deriveFont(
+                    AquaFonts.getSmallControlTextFont().getSize2D());
+        }
 
         return initialFont.deriveFont(AquaFonts.getControlTextFont().getSize2D());
     }
@@ -115,25 +130,8 @@
         c.setBorder(derivedBorder);
     }
 
-    // call JComponent.getUI() if it exists, then call Sizeable.applySizeFor() if the UI is "Sizeable"
-    // next best thing to -respondsToSelector: :-P
-    private static void applyUISizing(final JComponent c, final Size size) {
-        try {
-            // see if this component has a "getUI" method
-            final Class<? extends JComponent> clazz = c.getClass();
-            final Method getUIMethod = clazz.getMethod("getUI", new Class<?>[0]);
-
-            // see if that UI is one of ours that understands sizing
-            final Object ui = getUIMethod.invoke(c, new Object[0]);
-            if (!(ui instanceof Sizeable)) return;
-
-            // size it!
-            final Sizeable sizeable = (Sizeable)ui;
-            sizeable.applySizeFor(c, size);
-        } catch (final Throwable e) { return; }
-    }
-
     protected static class PropertySizeListener implements PropertyChangeListener {
+        @Override
         public void propertyChange(final PropertyChangeEvent evt) {
             final String key = evt.getPropertyName();
             if (!CLIENT_PROPERTY_KEY.equalsIgnoreCase(key)) return;
@@ -154,7 +152,10 @@
 
             applyBorderForSize(c, size);
 
-            applyUISizing(c, size);
+            final Object ui = c.getUI();
+            if (ui instanceof Sizeable) {
+                ((Sizeable) ui).applySizeFor(c, size);
+            }
 
             final Font priorFont = c.getFont();
             if (!(priorFont instanceof FontUIResource)) return;
@@ -200,6 +201,7 @@
             return regular;
         }
 
+        @Override
         public String toString() {
             return "regular[" + regular + "] small[" + small + "] mini[" + mini + "]";
         }
@@ -223,8 +225,14 @@
 
         public SizeVariant(final SizeVariant desc){
             this.size = desc.size;
-            this.insets = new InsetsUIResource(desc.insets.top, desc.insets.left, desc.insets.bottom, desc.insets.right);
-            this.margins = new InsetsUIResource(desc.margins.top, desc.margins.left, desc.margins.bottom, desc.margins.right);
+            this.insets = new InsetsUIResource(desc.insets.top,
+                                               desc.insets.left,
+                                               desc.insets.bottom,
+                                               desc.insets.right);
+            this.margins = new InsetsUIResource(desc.margins.top,
+                                                desc.margins.left,
+                                                desc.margins.bottom,
+                                                desc.margins.right);
             this.fontSize = desc.fontSize;
             this.w = desc.w;
             this.h = desc.h;
@@ -241,7 +249,8 @@
             return this;
         }
 
-        public SizeVariant alterInsets(final int top, final int left, final int bottom, final int right) {
+        public SizeVariant alterInsets(final int top, final int left,
+                                       final int bottom, final int right) {
             insets = generateInsets(insets, top, left, bottom, right);
             return this;
         }
@@ -251,7 +260,8 @@
             return this;
         }
 
-        public SizeVariant alterMargins(final int top, final int left, final int bottom, final int right) {
+        public SizeVariant alterMargins(final int top, final int left,
+                                        final int bottom, final int right) {
             margins = generateInsets(margins, top, left, bottom, right);
             return this;
         }
@@ -273,8 +283,12 @@
 //            return this;
 //        }
 
-        static Insets generateInsets(final Insets i, final int top, final int left, final int bottom, final int right) {
-            if (i == null) return new InsetsUIResource(top, left, bottom, right);
+        static Insets generateInsets(final Insets i, final int top,
+                                     final int left, final int bottom,
+                                     final int right) {
+            if (i == null) {
+                return new InsetsUIResource(top, left, bottom, right);
+            }
             i.top += top;
             i.left += left;
             i.bottom += bottom;
@@ -282,8 +296,10 @@
             return i;
         }
 
+        @Override
         public String toString() {
-            return "insets:" + insets + ", margins:" + margins + ", fontSize:" + fontSize;// + ", textBaseline:" + textBaseline;
+            return "insets:" + insets + ", margins:" + margins + ", fontSize:"
+                    + fontSize;// + ", textBaseline:" + textBaseline;
         }
     }
 }
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/CRenderer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/CRenderer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -36,7 +36,7 @@
 import sun.lwawt.macosx.*;
 
 public class CRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe, DrawImagePipe {
-    native static void init();
+    static native void init();
 
     // cache of the runtime options
     static {
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/CompositeCRenderer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/CompositeCRenderer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -35,8 +35,8 @@
 import sun.java2d.pipe.*;
 
 public class CompositeCRenderer extends CRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe, DrawImagePipe, TextPipe {
-    final static int fPadding = 4;
-    final static int fPaddingHalf = fPadding / 2;
+    static final int fPadding = 4;
+    static final int fPaddingHalf = fPadding / 2;
 
     private static AffineTransform sIdentityMatrix = new AffineTransform();
 
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java	Wed Jul 05 20:52:37 2017 +0200
@@ -43,8 +43,8 @@
  * This is the SurfaceData for a CGContextRef.
  */
 public abstract class OSXSurfaceData extends BufImgSurfaceData {
-    final static float UPPER_BND = Float.MAX_VALUE / 2.0f;
-    final static float LOWER_BND = -UPPER_BND;
+    static final float UPPER_BND = Float.MAX_VALUE / 2.0f;
+    static final float LOWER_BND = -UPPER_BND;
 
     protected static CRenderer sQuartzPipe = null;
     protected static CTextPipe sCocoaTextPipe = null;
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLSurfaceData.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLSurfaceData.java	Wed Jul 05 20:52:37 2017 +0200
@@ -365,7 +365,7 @@
     // Mac OS X specific APIs for JOGL/Java2D bridge...
 
     // given a surface create and attach GL context, then return it
-    private native static long createCGLContextOnSurface(CGLSurfaceData sd,
+    private static native long createCGLContextOnSurface(CGLSurfaceData sd,
             long sharedContext);
 
     public static long createOGLContextOnSurface(Graphics g, long sharedContext) {
@@ -379,7 +379,7 @@
     }
 
     // returns whether or not the makeCurrent operation succeeded
-    native static boolean makeCGLContextCurrentOnSurface(CGLSurfaceData sd,
+    static native boolean makeCGLContextCurrentOnSurface(CGLSurfaceData sd,
             long ctx);
 
     public static boolean makeOGLContextCurrentOnSurface(Graphics g, long ctx) {
@@ -393,7 +393,7 @@
     }
 
     // additional cleanup
-    private native static void destroyCGLContext(long ctx);
+    private static native void destroyCGLContext(long ctx);
 
     public static void destroyOGLContext(long ctx) {
         if (ctx != 0L) {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java	Wed Jul 05 20:52:37 2017 +0200
@@ -43,12 +43,12 @@
 
 public abstract class LWToolkit extends SunToolkit implements Runnable {
 
-    private final static int STATE_NONE = 0;
-    private final static int STATE_INIT = 1;
-    private final static int STATE_MESSAGELOOP = 2;
-    private final static int STATE_SHUTDOWN = 3;
-    private final static int STATE_CLEANUP = 4;
-    private final static int STATE_DONE = 5;
+    private static final int STATE_NONE = 0;
+    private static final int STATE_INIT = 1;
+    private static final int STATE_MESSAGELOOP = 2;
+    private static final int STATE_SHUTDOWN = 3;
+    private static final int STATE_CLEANUP = 4;
+    private static final int STATE_DONE = 5;
 
     private int runState = STATE_NONE;
 
@@ -454,14 +454,14 @@
     /*
      * Expose non-public targetToPeer() method.
      */
-    public final static Object targetToPeer(Object target) {
+    public static final Object targetToPeer(Object target) {
         return SunToolkit.targetToPeer(target);
     }
 
     /*
      * Expose non-public targetDisposedPeer() method.
      */
-    public final static void targetDisposedPeer(Object target, Object peer) {
+    public static final void targetDisposedPeer(Object target, Object peer) {
         SunToolkit.targetDisposedPeer(target, peer);
     }
 
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java	Wed Jul 05 20:52:37 2017 +0200
@@ -558,9 +558,9 @@
 
     // Duplicated from JavaComponentAccessibility
     // Note that values >=0 are indexes into the child array
-    final static int JAVA_AX_ALL_CHILDREN = -1;
-    final static int JAVA_AX_SELECTED_CHILDREN = -2;
-    final static int JAVA_AX_VISIBLE_CHILDREN = -3;
+    static final int JAVA_AX_ALL_CHILDREN = -1;
+    static final int JAVA_AX_SELECTED_CHILDREN = -2;
+    static final int JAVA_AX_VISIBLE_CHILDREN = -3;
 
     // Each child takes up two entries in the array: one for itself and one for its role
     public static Object[] getChildrenAndRoles(final Accessible a, final Component c, final int whichChildren, final boolean allowIgnored) {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -171,7 +171,7 @@
     }
 
     @Override
-    synchronized protected Long getFormatForNativeAsLong(String str) {
+    protected synchronized Long getFormatForNativeAsLong(String str) {
         Long format = predefinedClipboardNameMap.get(str);
 
         if (format == null) {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java	Wed Jul 05 20:52:37 2017 +0200
@@ -422,7 +422,7 @@
      * Tell the component to commit all of the characters in the string to the current
      * text view. This effectively wipes out any text in progress.
      */
-    synchronized private void insertText(String aString) {
+    private synchronized void insertText(String aString) {
         AttributedString attribString = new AttributedString(aString);
 
         // Set locale information on the new string.
@@ -447,11 +447,11 @@
         fCurrentTextLength = rawText.length();
     }
 
-    static private final int kCaretPosition = 0;
-    static private final int kRawText = 1;
-    static private final int kSelectedRawText = 2;
-    static private final int kConvertedText = 3;
-    static private final int kSelectedConvertedText = 4;
+    private static final int kCaretPosition = 0;
+    private static final int kRawText = 1;
+    private static final int kSelectedRawText = 2;
+    private static final int kConvertedText = 3;
+    private static final int kSelectedConvertedText = 4;
 
     /**
      * Convert Cocoa text highlight attributes into Java input method highlighting.
@@ -556,7 +556,7 @@
     /**
      * Frequent callbacks from NSTextInput.  I think we're supposed to commit it here?
      */
-    synchronized private void unmarkText() {
+    private synchronized void unmarkText() {
         if (fCurrentText == null)
             return;
 
@@ -574,7 +574,7 @@
         fCurrentTextLength = 0;
     }
 
-    synchronized private boolean hasMarkedText() {
+    private synchronized boolean hasMarkedText() {
         return fCurrentText != null;
     }
 
@@ -583,7 +583,7 @@
      * Java does not.  So, we have to see where the request is and based on that return the right
      * substring.
      */
-    synchronized private String attributedSubstringFromRange(final int locationIn, final int lengthIn) {
+    private synchronized String attributedSubstringFromRange(final int locationIn, final int lengthIn) {
         final String[] retString = new String[1];
 
         try {
@@ -635,7 +635,7 @@
      * for the fact that the insert point in Swing can come AFTER the selected text, making this
      * potentially incorrect.
      */
-    synchronized private int[] selectedRange() {
+    private synchronized int[] selectedRange() {
         final int[] returnValue = new int[2];
 
         try {
@@ -683,7 +683,7 @@
      * inserted, so we can return that position, and the length of the text in progress.  If there is no marked text
      * return null.
      */
-    synchronized private int[] markedRange() {
+    private synchronized int[] markedRange() {
         if (fCurrentText == null)
             return null;
 
@@ -710,7 +710,7 @@
      * which is always in front of the in-progress text, we get the offset into the composed text, and we get
      * that location from the input method context.
      */
-    synchronized private int[] firstRectForCharacterRange(final int absoluteTextOffset) {
+    private synchronized int[] firstRectForCharacterRange(final int absoluteTextOffset) {
         final int[] rect = new int[4];
 
         try {
@@ -753,7 +753,7 @@
      * The coordinates are in Java screen coordinates.  If no character in the composed text was hit, we return -1, indicating
      * not found.
      */
-    synchronized private int characterIndexForPoint(final int screenX, final int screenY) {
+    private synchronized int characterIndexForPoint(final int screenX, final int screenY) {
         final TextHitInfo[] offsetInfo = new TextHitInfo[1];
         final int[] insertPositionOffset = new int[1];
 
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java	Wed Jul 05 20:52:37 2017 +0200
@@ -45,8 +45,8 @@
     private static class Lock {}
     private final Lock lock = new Lock();
 
-    private final static int SHOWING_DELAY = 300;
-    private final static int HIDING_DELAY = 2000;
+    private static final int SHOWING_DELAY = 300;
+    private static final int HIDING_DELAY = 2000;
 
     private Rectangle bounds = new Rectangle();
     private final WeakReference<LWWindowPeer> ownerPeer;
@@ -406,7 +406,7 @@
     private final Lock taskLock = new Lock();
     private CancelableRunnable showHideTask;
 
-    private static abstract class CancelableRunnable implements Runnable {
+    private abstract static class CancelableRunnable implements Runnable {
         private volatile boolean perform = true;
 
         public final void cancel() {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CocoaConstants.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CocoaConstants.java	Wed Jul 05 20:52:37 2017 +0200
@@ -30,35 +30,35 @@
     private CocoaConstants(){}
 
     //from the NSEvent class reference:
-    public final static int NSLeftMouseDown      = 1;
-    public final static int NSLeftMouseUp        = 2;
-    public final static int NSRightMouseDown     = 3;
-    public final static int NSRightMouseUp       = 4;
-    public final static int NSMouseMoved         = 5;
-    public final static int NSLeftMouseDragged   = 6;
-    public final static int NSRightMouseDragged  = 7;
-    public final static int NSMouseEntered       = 8;
-    public final static int NSMouseExited        = 9;
-    public final static int NSKeyDown            = 10;
-    public final static int NSKeyUp              = 11;
-    public final static int NSFlagsChanged       = 12;
+    public static final int NSLeftMouseDown      = 1;
+    public static final int NSLeftMouseUp        = 2;
+    public static final int NSRightMouseDown     = 3;
+    public static final int NSRightMouseUp       = 4;
+    public static final int NSMouseMoved         = 5;
+    public static final int NSLeftMouseDragged   = 6;
+    public static final int NSRightMouseDragged  = 7;
+    public static final int NSMouseEntered       = 8;
+    public static final int NSMouseExited        = 9;
+    public static final int NSKeyDown            = 10;
+    public static final int NSKeyUp              = 11;
+    public static final int NSFlagsChanged       = 12;
 
-    public final static int NSScrollWheel        = 22;
-    public final static int NSOtherMouseDown     = 25;
-    public final static int NSOtherMouseUp       = 26;
-    public final static int NSOtherMouseDragged  = 27;
+    public static final int NSScrollWheel        = 22;
+    public static final int NSOtherMouseDown     = 25;
+    public static final int NSOtherMouseUp       = 26;
+    public static final int NSOtherMouseDragged  = 27;
 
-    public final static int AllLeftMouseEventsMask =
+    public static final int AllLeftMouseEventsMask =
         1 << NSLeftMouseDown |
         1 << NSLeftMouseUp |
         1 << NSLeftMouseDragged;
 
-    public final static int AllRightMouseEventsMask =
+    public static final int AllRightMouseEventsMask =
         1 << NSRightMouseDown |
         1 << NSRightMouseUp |
         1 << NSRightMouseDragged;
 
-    public final static int AllOtherMouseEventsMask =
+    public static final int AllOtherMouseEventsMask =
         1 << NSOtherMouseDown |
         1 << NSOtherMouseUp |
         1 << NSOtherMouseDragged;
@@ -82,24 +82,24 @@
 
     // See http://developer.apple.com/library/mac/#documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html
 
-    public final static int kCGMouseButtonLeft   = 0;
-    public final static int kCGMouseButtonRight  = 1;
-    public final static int kCGMouseButtonCenter = 2;
+    public static final int kCGMouseButtonLeft   = 0;
+    public static final int kCGMouseButtonRight  = 1;
+    public static final int kCGMouseButtonCenter = 2;
 
     // See https://wiki.mozilla.org/NPAPI:CocoaEventModel
 
-    public final static int NPCocoaEventDrawRect           = 1;
-    public final static int NPCocoaEventMouseDown          = 2;
-    public final static int NPCocoaEventMouseUp            = 3;
-    public final static int NPCocoaEventMouseMoved         = 4;
-    public final static int NPCocoaEventMouseEntered       = 5;
-    public final static int NPCocoaEventMouseExited        = 6;
-    public final static int NPCocoaEventMouseDragged       = 7;
-    public final static int NPCocoaEventKeyDown            = 8;
-    public final static int NPCocoaEventKeyUp              = 9;
-    public final static int NPCocoaEventFlagsChanged       = 10;
-    public final static int NPCocoaEventFocusChanged       = 11;
-    public final static int NPCocoaEventWindowFocusChanged = 12;
-    public final static int NPCocoaEventScrollWheel        = 13;
-    public final static int NPCocoaEventTextInput          = 14;
+    public static final int NPCocoaEventDrawRect           = 1;
+    public static final int NPCocoaEventMouseDown          = 2;
+    public static final int NPCocoaEventMouseUp            = 3;
+    public static final int NPCocoaEventMouseMoved         = 4;
+    public static final int NPCocoaEventMouseEntered       = 5;
+    public static final int NPCocoaEventMouseExited        = 6;
+    public static final int NPCocoaEventMouseDragged       = 7;
+    public static final int NPCocoaEventKeyDown            = 8;
+    public static final int NPCocoaEventKeyUp              = 9;
+    public static final int NPCocoaEventFlagsChanged       = 10;
+    public static final int NPCocoaEventFocusChanged       = 11;
+    public static final int NPCocoaEventWindowFocusChanged = 12;
+    public static final int NPCocoaEventScrollWheel        = 13;
+    public static final int NPCocoaEventTextInput          = 14;
 }
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Wed Jul 05 20:52:37 2017 +0200
@@ -127,10 +127,10 @@
     /*
      * System colors with default initial values, overwritten by toolkit if system values differ and are available.
      */
-    private final static int NUM_APPLE_COLORS = 3;
-    public final static int KEYBOARD_FOCUS_COLOR = 0;
-    public final static int INACTIVE_SELECTION_BACKGROUND_COLOR = 1;
-    public final static int INACTIVE_SELECTION_FOREGROUND_COLOR = 2;
+    private static final int NUM_APPLE_COLORS = 3;
+    public static final int KEYBOARD_FOCUS_COLOR = 0;
+    public static final int INACTIVE_SELECTION_BACKGROUND_COLOR = 1;
+    public static final int INACTIVE_SELECTION_FOREGROUND_COLOR = 2;
     private static int[] appleColors = {
         0xFF808080, // keyboardFocusColor = Color.gray;
         0xFFC0C0C0, // secondarySelectedControlColor
@@ -681,7 +681,7 @@
      * @param r a {@code Runnable} to execute
      * @param delay a delay in milliseconds
      */
-    native static void performOnMainThreadAfterDelay(Runnable r, long delay);
+    static native void performOnMainThreadAfterDelay(Runnable r, long delay);
 
 // DnD support
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.h	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.h	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,8 +26,6 @@
 #ifndef __AWTEVENT_H
 #define __AWTEVENT_H
 
-#import "LWCToolkit.h"
-
 jlong UTC(NSEvent *event);
 void DeliverJavaKeyEvent(JNIEnv *env, NSEvent *event, jobject peer);
 void DeliverJavaMouseEvent(JNIEnv *env, NSEvent *event, jobject peer);
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m	Wed Jul 05 20:52:37 2017 +0200
@@ -23,18 +23,15 @@
  * questions.
  */
 
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
-#import <sys/time.h>
-#include <Carbon/Carbon.h>
-
-#import "jni_util.h" 
-#import "LWCToolkit.h"
-#import "ThreadUtilities.h"
-
 #import "java_awt_event_InputEvent.h"
 #import "java_awt_event_KeyEvent.h"
-#import "java_awt_event_MouseEvent.h"
+#import "LWCToolkit.h"
+
+#import "jni_util.h"
+
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
+#import <sys/time.h>
+#import <Carbon/Carbon.h>
 
 /*
  * Table to map typed characters to their Java virtual key equivalent and back.
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.h	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.h	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,6 @@
  */
 
 #import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 #import "CDragSource.h"
 #import "CDropTarget.h"
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,22 +23,17 @@
  * questions.
  */
 
+#import "jni_util.h"
 #import "CGLGraphicsConfig.h"
-
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
-#import "jni_util.h"
-
-#import "ThreadUtilities.h"
 #import "AWTView.h"
-#import "AWTEvent.h"
 #import "AWTWindow.h"
-#import "LWCToolkit.h"
 #import "JavaComponentAccessibility.h"
 #import "JavaTextAccessibility.h"
 #import "GeomUtilities.h"
 #import "OSVersion.h"
-#import "CGLLayer.h"
+#import "ThreadUtilities.h"
+
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 @interface AWTView()
 @property (retain) CDropTarget *_dropTarget;
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.h	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.h	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,13 +27,12 @@
 #define _AWTWINDOW_H
 
 #import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 #import "CMenuBar.h"
 #import "LWCToolkit.h"
 
-
 @class AWTView;
+@class JNFWeakJObjectWrapper;
 
 @interface AWTWindow : NSObject <NSWindowDelegate> {
 @private
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m	Wed Jul 05 20:52:37 2017 +0200
@@ -25,7 +25,6 @@
 
 #import <Cocoa/Cocoa.h>
 #import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
 
 #import "sun_lwawt_macosx_CPlatformWindow.h"
 #import "com_apple_eawt_event_GestureHandler.h"
@@ -34,12 +33,8 @@
 
 #import "AWTWindow.h"
 #import "AWTView.h"
-#import "CMenu.h"
-#import "CMenuBar.h"
-#import "LWCToolkit.h"
 #import "GeomUtilities.h"
 #import "ThreadUtilities.h"
-#import "OSVersion.h"
 
 #define MASK(KEY) \
     (sun_lwawt_macosx_CPlatformWindow_ ## KEY)
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CDataTransferer.m	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CDataTransferer.m	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,9 @@
 #import "CDataTransferer.h"
 #include "sun_lwawt_macosx_CDataTransferer.h"
 
-#import <AppKit/AppKit.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
 #import "jni_util.h"
 
-#include "ThreadUtilities.h"
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 
 // ***** NOTE ***** This dictionary corresponds to the static array predefinedClipboardNames
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsConfig.m	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsConfig.m	Wed Jul 05 20:52:37 2017 +0200
@@ -27,7 +27,7 @@
 #include "GeomUtilities.h"
 
 #include "sun_awt_CGraphicsConfig.h"
-
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 /*
  * Class:     sun_awt_CGraphicsConfig
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m	Wed Jul 05 20:52:37 2017 +0200
@@ -26,6 +26,8 @@
 #import "LWCToolkit.h"
 #import "ThreadUtilities.h"
 
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
+
 /*
  * Convert the mode string to the more convinient bits per pixel value
  */
@@ -200,7 +202,7 @@
         for (NSScreen *screen in screens) {
             NSDictionary *screenInfo = [screen deviceDescription];
             NSNumber *screenID = [screenInfo objectForKey:@"NSScreenNumber"];
-            if ([screenID pointerValue] == displayID){
+            if ([screenID unsignedIntValue] == displayID){
                 frame = [screen frame];
                 visibleFrame = [screen visibleFrame];
                 break;
@@ -333,7 +335,7 @@
         for (NSScreen *screen in screens) {
             NSDictionary *screenInfo = [screen deviceDescription];
             NSNumber *screenID = [screenInfo objectForKey:@"NSScreenNumber"];
-            if ([screenID pointerValue] == displayID){
+            if ([screenID unsignedIntValue] == displayID){
                 if ([screen respondsToSelector:@selector(backingScaleFactor)]) {
                     ret = [screen backingScaleFactor];
                 }
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsEnv.m	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsEnv.m	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,12 +23,11 @@
  * questions.
  */
 
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
+#import "AWT_debug.h"
 
 #import "jni_util.h"
-#import "LWCToolkit.h"
-#import "AWT_debug.h"
 
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 #define MAX_DISPLAYS 64
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,6 +58,14 @@
 static void javaPrinterJobToNSPrintInfo(JNIEnv* env, jobject srcPrinterJob, jobject srcPageable, NSPrintInfo* dst);
 
 
+#ifdef __MAC_10_9 // code for SDK 10.9 or newer
+#define NS_PORTRAIT NSPaperOrientationPortrait
+#define NS_LANDSCAPE NSPaperOrientationLandscape
+#else // code for SDK 10.8 or older
+#define NS_PORTRAIT NSPortraitOrientation
+#define NS_LANDSCAPE NSLandscapeOrientation
+#endif
+
 static NSPrintInfo* createDefaultNSPrintInfo(JNIEnv* env, jstring printer)
 {
     NSPrintInfo* defaultPrintInfo = [[NSPrintInfo sharedPrintInfo] copy];
@@ -143,12 +151,12 @@
 
     NSSize paperSize = [src paperSize];
     switch ([src orientation]) {
-        case NSPortraitOrientation:
+        case NS_PORTRAIT:
             jPaperW = paperSize.width;
             jPaperH = paperSize.height;
             break;
 
-        case NSLandscapeOrientation:
+        case NS_LANDSCAPE:
             jPaperW = paperSize.height;
             jPaperH = paperSize.width;
             break;
@@ -217,13 +225,12 @@
     static JNF_CTOR_CACHE(jm_Paper_ctor, sjc_Paper, "()V");
 
     jint jOrientation;
-    NSPrintingOrientation nsOrientation = [src orientation];
-    switch (nsOrientation) {
-        case NSPortraitOrientation:
+    switch ([src orientation]) {
+        case NS_PORTRAIT:
             jOrientation = java_awt_print_PageFormat_PORTRAIT;
             break;
 
-        case NSLandscapeOrientation:
+        case NS_LANDSCAPE:
             jOrientation = java_awt_print_PageFormat_LANDSCAPE; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
             break;
 
@@ -273,20 +280,20 @@
 
     switch (JNFCallIntMethod(env, srcPageFormat, jm_getOrientation)) { // AWT_THREADING Safe (!appKit)
         case java_awt_print_PageFormat_PORTRAIT:
-            [dstPrintInfo setOrientation:NSPortraitOrientation];
+            [dstPrintInfo setOrientation:NS_PORTRAIT];
             break;
 
         case java_awt_print_PageFormat_LANDSCAPE:
-            [dstPrintInfo setOrientation:NSLandscapeOrientation]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
+            [dstPrintInfo setOrientation:NS_LANDSCAPE]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
             break;
 
         // AppKit printing doesn't support REVERSE_LANDSCAPE. Radar 2960295.
         case java_awt_print_PageFormat_REVERSE_LANDSCAPE:
-            [dstPrintInfo setOrientation:NSLandscapeOrientation]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
+            [dstPrintInfo setOrientation:NS_LANDSCAPE]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
             break;
 
         default:
-            [dstPrintInfo setOrientation:NSPortraitOrientation];
+            [dstPrintInfo setOrientation:NS_PORTRAIT];
             break;
     }
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,9 +23,10 @@
  * questions.
  */
 
+#import "jni_util.h"
+
 #import <AppKit/AppKit.h>
 #import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import "jni_util.h"
 
 #import "CTrayIcon.h"
 #import "ThreadUtilities.h"
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/GeomUtilities.h	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/GeomUtilities.h	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,7 @@
  */
 
 #import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-
+#include "jni.h"
 
 jobject CGToJavaRect(JNIEnv *env, CGRect rect);
 CGRect JavaToCGRect(JNIEnv *env, jobject rect);
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/GeomUtilities.m	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/GeomUtilities.m	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
  */
 
 #import "GeomUtilities.h"
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 static JNF_CLASS_CACHE(sjc_Point2D, "java/awt/geom/Point2D");
 static JNF_MEMBER_CACHE(jm_pt_getX, sjc_Point2D, "getX", "()D");
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.h	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.h	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,9 +23,9 @@
  * questions.
  */
 
+#include "jni.h"
+
 #import <AppKit/AppKit.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-
 
 //#define JAVA_AX_DEBUG 1
 //#define JAVA_AX_NO_IGNORES 1
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h	Wed Jul 05 20:52:37 2017 +0200
@@ -23,11 +23,12 @@
  * questions.
  */
 
+#include "jni.h"
+
 #import <pthread.h>
 #import <assert.h>
 
 #import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 #define DEBUG 1
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m	Wed Jul 05 20:52:37 2017 +0200
@@ -28,15 +28,10 @@
 #import <objc/runtime.h>
 #import <Cocoa/Cocoa.h>
 #import <Security/AuthSession.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
 
 #include "jni_util.h"
-#import "CMenuBar.h"
-#import "InitIDs.h"
 #import "LWCToolkit.h"
 #import "ThreadUtilities.h"
-#import "AWT_debug.h"
 #import "CSystemColors.h"
 #import  "NSApplicationAWT.h"
 #import "PropertiesUtilities.h"
@@ -46,6 +41,8 @@
 
 #import "sizecalc.h"
 
+#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
+
 int gNumberOfButtons;
 jint* gButtonDownMasks;
 
@@ -529,7 +526,7 @@
             // Processing all events excluding NSApplicationDefined which need to be processed
             // on the main loop only (those events are intended for disposing resources)
             NSEvent *event;
-            if ((event = [NSApp nextEventMatchingMask:(NSAnyEventMask & ~NSApplicationDefined)
+            if ((event = [NSApp nextEventMatchingMask:(NSAnyEventMask & ~NSApplicationDefinedMask)
                                            untilDate:nil
                                               inMode:NSDefaultRunLoopMode
                                              dequeue:YES]) != nil) {
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLGraphicsConfig.m	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLGraphicsConfig.m	Wed Jul 05 20:52:37 2017 +0200
@@ -23,20 +23,17 @@
  * questions.
  */
 
+#import "sun_java2d_opengl_CGLGraphicsConfig.h"
+
+#import "CGLGraphicsConfig.h"
+#import "CGLSurfaceData.h"
+#import "ThreadUtilities.h"
+
 #import <stdlib.h>
 #import <string.h>
 #import <ApplicationServices/ApplicationServices.h>
 #import <JavaNativeFoundation/JavaNativeFoundation.h>
 
-#import "sun_java2d_opengl_CGLGraphicsConfig.h"
-
-#import "jni.h"
-#import "jni_util.h"
-#import "CGLGraphicsConfig.h"
-#import "CGLSurfaceData.h"
-#import "LWCToolkit.h"
-#import "ThreadUtilities.h"
-
 #pragma mark -
 #pragma mark "--- Mac OS X specific methods for GL pipeline ---"
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLLayer.h	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLLayer.h	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 #ifndef CGLLayer_h_Included
 #define CGLLayer_h_Included
 
-#import "AWTView.h"
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 @interface CGLLayer : CAOpenGLLayer
 {
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLSurfaceData.m	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLSurfaceData.m	Wed Jul 05 20:52:37 2017 +0200
@@ -24,16 +24,13 @@
  */
 
 #import <stdlib.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 #import "sun_java2d_opengl_CGLSurfaceData.h"
 
-#import "jni.h"
 #import "jni_util.h"
 #import "OGLRenderQueue.h"
 #import "CGLGraphicsConfig.h"
 #import "CGLSurfaceData.h"
-#import "CGLLayer.h"
 #import "ThreadUtilities.h"
 
 /* JDK's glext.h is already included and will prevent the Apple glext.h
--- a/jdk/src/java.desktop/share/classes/com/sun/beans/decoder/DocumentHandler.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/beans/decoder/DocumentHandler.java	Wed Jul 05 20:52:37 2017 +0200
@@ -50,7 +50,7 @@
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;
 
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * The main class to parse JavaBeans XML archive.
--- a/jdk/src/java.desktop/share/classes/com/sun/beans/editors/NumberEditor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/beans/editors/NumberEditor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -32,7 +32,7 @@
 
 import java.beans.*;
 
-abstract public class NumberEditor extends PropertyEditorSupport {
+public abstract class NumberEditor extends PropertyEditorSupport {
 
     public String getJavaInitializationString() {
         Object value = getValue();
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/I18N.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/I18N.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,7 +26,7 @@
 package com.sun.imageio.plugins.common;
 
 public final class I18N extends I18NImpl {
-    private final static String resource_name = "iio-plugin.properties";
+    private static final String resource_name = "iio-plugin.properties";
     public static String getString(String key) {
         return getString("com.sun.imageio.plugins.common.I18N", resource_name, key);
     }
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/LZWStringTable.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/LZWStringTable.java	Wed Jul 05 20:52:37 2017 +0200
@@ -37,16 +37,16 @@
  **/
 public class LZWStringTable {
     /** codesize + Reserved Codes */
-    private final static int RES_CODES = 2;
+    private static final int RES_CODES = 2;
 
-    private final static short HASH_FREE = (short)0xFFFF;
-    private final static short NEXT_FIRST = (short)0xFFFF;
+    private static final short HASH_FREE = (short)0xFFFF;
+    private static final short NEXT_FIRST = (short)0xFFFF;
 
-    private final static int MAXBITS = 12;
-    private final static int MAXSTR = (1 << MAXBITS);
+    private static final int MAXBITS = 12;
+    private static final int MAXSTR = (1 << MAXBITS);
 
-    private final static short HASHSIZE = 9973;
-    private final static short HASHSTEP = 2039;
+    private static final short HASHSIZE = 9973;
+    private static final short HASHSTEP = 2039;
 
     byte[]  strChr;  // after predecessor character
     short[] strNxt;  // predecessor string
@@ -142,7 +142,7 @@
         }
     }
 
-    static public int hash(short index, byte lastbyte) {
+    public static int hash(short index, byte lastbyte) {
         return (((short)(lastbyte << 8) ^ index) & 0xFFFF) % HASHSIZE;
     }
 
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1773,7 +1773,7 @@
     private static final ImageTypeProducer [] defaultTypes =
             new ImageTypeProducer [JPEG.NUM_JCS_CODES];
 
-    public synchronized static ImageTypeProducer getTypeProducer(int csCode) {
+    public static synchronized ImageTypeProducer getTypeProducer(int csCode) {
         if (csCode < 0 || csCode >= JPEG.NUM_JCS_CODES) {
             return null;
         }
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java	Wed Jul 05 20:52:37 2017 +0200
@@ -56,7 +56,7 @@
  */
 class GTKEngine {
 
-    final static GTKEngine INSTANCE = new GTKEngine();
+    static final GTKEngine INSTANCE = new GTKEngine();
 
     /** Size of the image cache */
     private static final int CACHE_SIZE = 50;
@@ -523,7 +523,7 @@
         native_paint_background(widget, state, x - x0, y - y0, w, h);
     }
 
-    private final static ColorModel[] COLOR_MODELS = {
+    private static final ColorModel[] COLOR_MODELS = {
         // Transparency.OPAQUE
         new DirectColorModel(24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000),
         // Transparency.BITMASK
@@ -532,7 +532,7 @@
         ColorModel.getRGBdefault(),
     };
 
-    private final static int[][] BAND_OFFSETS = {
+    private static final int[][] BAND_OFFSETS = {
         { 0x00ff0000, 0x0000ff00, 0x000000ff },             // OPAQUE
         { 0x00ff0000, 0x0000ff00, 0x000000ff, 0x01000000 }, // BITMASK
         { 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }  // TRANSLUCENT
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -63,8 +63,8 @@
         ShadowType.ETCHED_IN, ShadowType.OUT
     };
 
-    private final static GTKEngine ENGINE = GTKEngine.INSTANCE;
-    final static GTKPainter INSTANCE = new GTKPainter();
+    private static final GTKEngine ENGINE = GTKEngine.INSTANCE;
+    static final GTKPainter INSTANCE = new GTKPainter();
 
     private GTKPainter() {
     }
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java	Wed Jul 05 20:52:37 2017 +0200
@@ -263,7 +263,7 @@
         Color frameShadow;
 
         // The width of the border
-        public final static int BORDER_SIZE = 5;
+        public static final int BORDER_SIZE = 5;
 
         /** Constructs an FrameBorder for the JComponent <b>comp</b>.
         */
@@ -446,7 +446,7 @@
         JInternalFrame frame;
 
         // The size of the bounding box for Motif frame corners.
-        public final static int CORNER_SIZE = 24;
+        public static final int CORNER_SIZE = 24;
 
         /** Constructs an InternalFrameBorder for the InternalFrame
           * <b>aFrame</b>.
@@ -634,10 +634,10 @@
         protected Color  highlightColor;
 
         // Space between the border and text
-        static protected final int TEXT_SPACING = 2;
+        protected static final int TEXT_SPACING = 2;
 
         // Space for the separator under the title
-        static protected final int GROOVE_HEIGHT = 2;
+        protected static final int GROOVE_HEIGHT = 2;
 
         /**
          * Creates a MotifPopupMenuBorder instance
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifCheckBoxUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifCheckBoxUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -49,7 +49,7 @@
 
     private static final Object MOTIF_CHECK_BOX_UI_KEY = new Object();
 
-    private final static String propertyPrefix = "CheckBox" + ".";
+    private static final String propertyPrefix = "CheckBox" + ".";
 
     private boolean defaults_initialized = false;
 
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -59,10 +59,10 @@
     JPopupMenu systemMenu;
     EventListener mml;
 
-    final static int LABEL_HEIGHT = 18;
-    final static int LABEL_DIVIDER = 4;    // padding between icon and label
+    static final int LABEL_HEIGHT = 18;
+    static final int LABEL_DIVIDER = 4;    // padding between icon and label
 
-    final static Font defaultTitleFont =
+    static final Font defaultTitleFont =
         new Font(Font.SANS_SERIF, Font.PLAIN, 12);
 
     public static ComponentUI createUI(JComponent c)    {
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -306,7 +306,7 @@
         }
 
         @SuppressWarnings("serial") // anonymous class
-        JTextField tmp1 = new JTextField(curDirName) {
+        JTextField tmp1 = new JTextField(curDirName, 35) {
             public Dimension getMaximumSize() {
                 Dimension d = super.getMaximumSize();
                 d.height = getPreferredSize().height;
@@ -420,7 +420,7 @@
         interior.add(fileNameLabel);
 
         @SuppressWarnings("serial") // anonymous class
-        JTextField tmp3 = new JTextField() {
+        JTextField tmp3 = new JTextField(35) {
             public Dimension getMaximumSize() {
                 Dimension d = super.getMaximumSize();
                 d.height = getPreferredSize().height;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifIconFactory.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifIconFactory.java	Wed Jul 05 20:52:37 2017 +0200
@@ -93,7 +93,7 @@
 
     @SuppressWarnings("serial") // Same-version serialization only
     private static class CheckBoxIcon implements Icon, UIResource, Serializable  {
-        final static int csize = 13;
+        static final int csize = 13;
 
         private Color control = UIManager.getColor("control");
         private Color foreground = UIManager.getColor("CheckBox.foreground");
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java	Wed Jul 05 20:52:37 2017 +0200
@@ -56,7 +56,7 @@
     Color shadow;
 
     // The width and height of a title pane button
-    public final static int BUTTON_SIZE = 19;  // 17 + 1 pixel border
+    public static final int BUTTON_SIZE = 19;  // 17 + 1 pixel border
 
 
     public MotifInternalFrameTitlePane(JInternalFrame frame) {
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifScrollPaneUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifScrollPaneUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -47,9 +47,9 @@
  */
 public class MotifScrollPaneUI extends BasicScrollPaneUI
 {
-    private final static Border vsbMarginBorderR = new EmptyBorder(0, 4, 0, 0);
-    private final static Border vsbMarginBorderL = new EmptyBorder(0, 0, 0, 4);
-    private final static Border hsbMarginBorder = new EmptyBorder(4, 0, 0, 0);
+    private static final Border vsbMarginBorderR = new EmptyBorder(0, 4, 0, 0);
+    private static final Border vsbMarginBorderL = new EmptyBorder(0, 0, 0, 4);
+    private static final Border hsbMarginBorder = new EmptyBorder(4, 0, 0, 0);
 
     private CompoundBorder vsbBorder;
     private CompoundBorder hsbBorder;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java	Wed Jul 05 20:52:37 2017 +0200
@@ -69,11 +69,11 @@
  */
 class AnimationController implements ActionListener, PropertyChangeListener {
 
-    private final static boolean VISTA_ANIMATION_DISABLED =
+    private static final boolean VISTA_ANIMATION_DISABLED =
         AccessController.doPrivileged(new GetBooleanAction("swing.disablevistaanimation"));
 
 
-    private final static Object ANIMATION_CONTROLLER_KEY =
+    private static final Object ANIMATION_CONTROLLER_KEY =
         new StringBuilder("ANIMATION_CONTROLLER_KEY");
 
     private final Map<JComponent, Map<Part, AnimationState>> animationStateMap =
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -53,7 +53,7 @@
 
     private static final Object WINDOWS_CHECK_BOX_UI_KEY = new Object();
 
-    private final static String propertyPrefix = "CheckBox" + ".";
+    private static final String propertyPrefix = "CheckBox" + ".";
 
     private boolean defaults_initialized = false;
 
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1017,7 +1017,7 @@
         }
     }
 
-    final static int space = 10;
+    static final int space = 10;
     class IndentIcon implements Icon {
 
         Icon icon = null;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java	Wed Jul 05 20:52:37 2017 +0200
@@ -321,7 +321,7 @@
     @SuppressWarnings("serial") // Same-version serialization only
     private static class CheckBoxIcon implements Icon, Serializable
     {
-        final static int csize = 13;
+        static final int csize = 13;
         public void paintIcon(Component c, Graphics g, int x, int y) {
             JCheckBox cb = (JCheckBox) c;
             ButtonModel model = cb.getModel();
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -2271,7 +2271,7 @@
         protected Object classicValue, xpValue;
 
         // A constant that lets you specify null when using XP styles.
-        private final static Object NULL_VALUE = new Object();
+        private static final Object NULL_VALUE = new Object();
 
         XPValue(Object xpValue, Object classicValue) {
             this.xpValue = xpValue;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -70,7 +70,7 @@
  */
 public class WindowsRootPaneUI extends BasicRootPaneUI {
 
-    private final static WindowsRootPaneUI windowsRootPaneUI = new WindowsRootPaneUI();
+    private static final WindowsRootPaneUI windowsRootPaneUI = new WindowsRootPaneUI();
     static final AltProcessor altProcessor = new AltProcessor();
 
     public static ComponentUI createUI(JComponent c) {
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTreeUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTreeUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -106,8 +106,8 @@
         }
     }
 
-    static protected final int HALF_SIZE = 4;
-    static protected final int SIZE = 9;
+    protected static final int HALF_SIZE = 4;
+    protected static final int SIZE = 9;
 
     /**
      * Returns the default cell renderer that is used to do the
@@ -130,7 +130,7 @@
     @SuppressWarnings("serial") // Same-version serialization only
     public static class ExpandedIcon implements Icon, Serializable {
 
-        static public Icon createExpandedIcon() {
+        public static Icon createExpandedIcon() {
             return new ExpandedIcon();
         }
 
@@ -182,7 +182,7 @@
      */
     @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class CollapsedIcon extends ExpandedIcon {
-        static public Icon createCollapsedIcon() {
+        public static Icon createCollapsedIcon() {
             return new CollapsedIcon();
         }
 
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AuFileWriter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AuFileWriter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -52,7 +52,7 @@
 public final class AuFileWriter extends SunFileWriter {
 
     //$$fb value for length field if length is not known
-    public final static int UNKNOWN_SIZE=-1;
+    public static final int UNKNOWN_SIZE=-1;
 
     /**
      * Constructs a new AuFileWriter object.
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AudioFloatConverter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AudioFloatConverter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -53,11 +53,11 @@
 
         private final AudioFloatConverter converter;
 
-        final private int offset;
+        private final int offset;
 
-        final private int stepsize;
+        private final int stepsize;
 
-        final private byte mask;
+        private final byte mask;
 
         private byte[] mask_buffer;
 
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/DLSRegion.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/DLSRegion.java	Wed Jul 05 20:52:37 2017 +0200
@@ -38,7 +38,7 @@
  */
 public final class DLSRegion {
 
-    public final static int OPTION_SELFNONEXCLUSIVE = 0x0001;
+    public static final int OPTION_SELFNONEXCLUSIVE = 0x0001;
     List<DLSModulator> modulators = new ArrayList<DLSModulator>();
     int keyfrom;
     int keyto;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/DLSSampleLoop.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/DLSSampleLoop.java	Wed Jul 05 20:52:37 2017 +0200
@@ -31,8 +31,8 @@
  */
 public final class DLSSampleLoop {
 
-    public final static int LOOP_TYPE_FORWARD = 0;
-    public final static int LOOP_TYPE_RELEASE = 1;
+    public static final int LOOP_TYPE_FORWARD = 0;
+    public static final int LOOP_TYPE_RELEASE = 1;
     long type;
     long start;
     long length;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/DLSSoundbank.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/DLSSoundbank.java	Wed Jul 05 20:52:37 2017 +0200
@@ -53,7 +53,7 @@
  */
 public final class DLSSoundbank implements Soundbank {
 
-    static private class DLSID {
+    private static class DLSID {
         long i1;
         int s1;
         int s2;
@@ -548,7 +548,7 @@
         long count = riff.readUnsignedInt();
 
         if (size - 8 != 0)
-            riff.skipBytes(size - 8);
+            riff.skip(size - 8);
 
         for (int i = 0; i < count; i++) {
             DLSModulator modulator = new DLSModulator();
@@ -568,7 +568,7 @@
         long count = riff.readUnsignedInt();
 
         if (size - 8 != 0)
-            riff.skipBytes(size - 8);
+            riff.skip(size - 8);
 
         for (int i = 0; i < count; i++) {
             DLSModulator modulator = new DLSModulator();
@@ -661,7 +661,7 @@
         long loops = riff.readInt();
 
         if (size > 20)
-            riff.skipBytes(size - 20);
+            riff.skip(size - 20);
 
         for (int i = 0; i < loops; i++) {
             DLSSampleLoop loop = new DLSSampleLoop();
@@ -671,7 +671,7 @@
             loop.length = riff.readUnsignedInt();
             sampleOptions.loops.add(loop);
             if (size2 > 16)
-                riff.skipBytes(size2 - 16);
+                riff.skip(size2 - 16);
         }
     }
 
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/EmergencySoundbank.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/EmergencySoundbank.java	Wed Jul 05 20:52:37 2017 +0200
@@ -37,7 +37,7 @@
  */
 public final class EmergencySoundbank {
 
-    private final static String[] general_midi_instruments = {
+    private static final String[] general_midi_instruments = {
         "Acoustic Grand Piano",
         "Bright Acoustic Piano",
         "Electric Grand Piano",
@@ -2564,11 +2564,11 @@
         return ins;
     }
 
-    static public void ifft(double[] data) {
+    public static void ifft(double[] data) {
         new FFT(data.length / 2, 1).transform(data);
     }
 
-    static public void fft(double[] data) {
+    public static void fft(double[] data) {
         new FFT(data.length / 2, -1).transform(data);
     }
 
@@ -2580,7 +2580,7 @@
         }
     }
 
-    static public void randomPhase(double[] data) {
+    public static void randomPhase(double[] data) {
         for (int i = 0; i < data.length; i += 2) {
             double phase = Math.random() * 2 * Math.PI;
             double d = data[i];
@@ -2589,7 +2589,7 @@
         }
     }
 
-    static public void randomPhase(double[] data, Random random) {
+    public static void randomPhase(double[] data, Random random) {
         for (int i = 0; i < data.length; i += 2) {
             double phase = random.nextDouble() * 2 * Math.PI;
             double d = data[i];
@@ -2598,7 +2598,7 @@
         }
     }
 
-    static public void normalize(double[] data, double target) {
+    public static void normalize(double[] data, double target) {
         double maxvalue = 0;
         for (int i = 0; i < data.length; i++) {
             if (data[i] > maxvalue)
@@ -2613,7 +2613,7 @@
             data[i] *= gain;
     }
 
-    static public void normalize(float[] data, double target) {
+    public static void normalize(float[] data, double target) {
         double maxvalue = 0.5;
         for (int i = 0; i < data.length; i++) {
             if (data[i * 2] > maxvalue)
@@ -2626,7 +2626,7 @@
             data[i * 2] *= gain;
     }
 
-    static public double[] realPart(double[] in) {
+    public static double[] realPart(double[] in) {
         double[] out = new double[in.length / 2];
         for (int i = 0; i < out.length; i++) {
             out[i] = in[i * 2];
@@ -2634,7 +2634,7 @@
         return out;
     }
 
-    static public double[] imgPart(double[] in) {
+    public static double[] imgPart(double[] in) {
         double[] out = new double[in.length / 2];
         for (int i = 0; i < out.length; i++) {
             out[i] = in[i * 2];
@@ -2642,7 +2642,7 @@
         return out;
     }
 
-    static public float[] toFloat(double[] in) {
+    public static float[] toFloat(double[] in) {
         float[] out = new float[in.length];
         for (int i = 0; i < out.length; i++) {
             out[i] = (float) in[i];
@@ -2650,24 +2650,24 @@
         return out;
     }
 
-    static public byte[] toBytes(float[] in, AudioFormat format) {
+    public static byte[] toBytes(float[] in, AudioFormat format) {
         byte[] out = new byte[in.length * format.getFrameSize()];
         return AudioFloatConverter.getConverter(format).toByteArray(in, out);
     }
 
-    static public void fadeUp(double[] data, int samples) {
+    public static void fadeUp(double[] data, int samples) {
         double dsamples = samples;
         for (int i = 0; i < samples; i++)
             data[i] *= i / dsamples;
     }
 
-    static public void fadeUp(float[] data, int samples) {
+    public static void fadeUp(float[] data, int samples) {
         double dsamples = samples;
         for (int i = 0; i < samples; i++)
             data[i] *= i / dsamples;
     }
 
-    static public double[] loopExtend(double[] data, int newsize) {
+    public static double[] loopExtend(double[] data, int newsize) {
         double[] outdata = new double[newsize];
         int p_len = data.length;
         int p_ps = 0;
@@ -2680,7 +2680,7 @@
         return outdata;
     }
 
-    static public float[] loopExtend(float[] data, int newsize) {
+    public static float[] loopExtend(float[] data, int newsize) {
         float[] outdata = new float[newsize];
         int p_len = data.length;
         int p_ps = 0;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java	Wed Jul 05 20:52:37 2017 +0200
@@ -88,9 +88,9 @@
      * with the number of samples in the stream.
      *
      */
-    private final static long CLIP_THRESHOLD = 1048576;
+    private static final long CLIP_THRESHOLD = 1048576;
     //private final static long CLIP_THRESHOLD = 1;
-    private final static int STREAM_BUFFER_SIZE = 1024;
+    private static final int STREAM_BUFFER_SIZE = 1024;
 
     public JavaSoundAudioClip(InputStream in) throws IOException {
         if (DEBUG || Printer.debug)Printer.debug("JavaSoundAudioClip.<init>");
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/MidiOutDeviceProvider.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/MidiOutDeviceProvider.java	Wed Jul 05 20:52:37 2017 +0200
@@ -42,7 +42,7 @@
     /** Cache of open MIDI output devices on the system. */
     private static MidiDevice[] devices = null;
 
-    private final static boolean enabled;
+    private static final boolean enabled;
 
     // STATIC
 
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/MidiUtils.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/MidiUtils.java	Wed Jul 05 20:52:37 2017 +0200
@@ -44,9 +44,9 @@
  */
 public final class MidiUtils {
 
-    public final static int DEFAULT_TEMPO_MPQ = 500000; // 120bpm
-    public final static int META_END_OF_TRACK_TYPE = 0x2F;
-    public final static int META_TEMPO_TYPE = 0x51;
+    public static final int DEFAULT_TEMPO_MPQ = 500000; // 120bpm
+    public static final int META_END_OF_TRACK_TYPE = 0x2F;
+    public static final int META_TEMPO_TYPE = 0x51;
 
     /**
      * Suppresses default constructor, ensuring non-instantiability.
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/ModelConnectionBlock.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/ModelConnectionBlock.java	Wed Jul 05 20:52:37 2017 +0200
@@ -39,7 +39,7 @@
     //
     //   source1 * source2 * scale -> destination
     //
-    private final static ModelSource[] no_sources = new ModelSource[0];
+    private static final ModelSource[] no_sources = new ModelSource[0];
     private ModelSource[] sources = no_sources;
     private double scale = 1;
     private ModelDestination destination;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/ModelTransform.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/ModelTransform.java	Wed Jul 05 20:52:37 2017 +0200
@@ -31,5 +31,5 @@
  */
 public interface ModelTransform {
 
-    abstract public double transform(double value);
+    public abstract double transform(double value);
 }
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/Platform.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/Platform.java	Wed Jul 05 20:52:37 2017 +0200
@@ -169,9 +169,9 @@
     }
 
     // the following native methods are implemented in Platform.c
-    private native static boolean nIsBigEndian();
-    private native static String nGetExtraLibraries();
-    private native static int nGetLibraryForFeature(int feature);
+    private static native boolean nIsBigEndian();
+    private static native String nGetExtraLibraries();
+    private static native int nGetLibraryForFeature(int feature);
 
     /**
      * Read the required system properties.
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/PortMixer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/PortMixer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -422,7 +422,7 @@
         private boolean closed = false;
 
         // predefined float control types. See also Ports.h
-        private final static FloatControl.Type[] FLOAT_CONTROL_TYPES = {
+        private static final FloatControl.Type[] FLOAT_CONTROL_TYPES = {
             null,
             FloatControl.Type.BALANCE,
             FloatControl.Type.MASTER_GAIN,
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/RIFFReader.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/RIFFReader.java	Wed Jul 05 20:52:37 2017 +0200
@@ -118,6 +118,7 @@
         return ckSize;
     }
 
+    @Override
     public int read() throws IOException {
         if (avail == 0) {
             return -1;
@@ -132,6 +133,7 @@
         return b;
     }
 
+    @Override
     public int read(byte[] b, int offset, int len) throws IOException {
         if (avail == 0) {
             return -1;
@@ -172,49 +174,45 @@
         }
     }
 
-    public long skipBytes(long n) throws IOException {
-        if (n < 0)
+    @Override
+    public long skip(final long n) throws IOException {
+        if (n <= 0 || avail == 0) {
             return 0;
-        long skipped = 0;
-        while (skipped != n) {
-            long s = skip(n - skipped);
-            if (s < 0)
+        }
+        // will not skip more than
+        long remaining = Math.min(n, avail);
+        while (remaining > 0) {
+            // Some input streams like FileInputStream can return more bytes,
+            // when EOF is reached.
+            long ret = Math.min(stream.skip(remaining), remaining);
+            if (ret == 0) {
+                // EOF or not? we need to check.
+                Thread.yield();
+                if (stream.read() == -1) {
+                    avail = 0;
+                    break;
+                }
+                ret = 1;
+            } else if (ret < 0) {
+                // the skip should not return negative value, but check it also
+                avail = 0;
                 break;
-            if (s == 0)
-                Thread.yield();
-            skipped += s;
+            }
+            remaining -= ret;
+            avail -= ret;
+            filepointer += ret;
         }
-        return skipped;
+        return n - remaining;
     }
 
-    public long skip(long n) throws IOException {
-        if (avail == 0)
-            return -1;
-        if (n > avail) {
-            long len = stream.skip(avail);
-            if (len != -1)
-                filepointer += len;
-            avail = 0;
-            return len;
-        } else {
-            long ret = stream.skip(n);
-            if (ret == -1) {
-                avail = 0;
-                return -1;
-            }
-            avail -= ret;
-            filepointer += ret;
-            return ret;
-        }
-    }
-
+    @Override
     public int available() {
         return (int)avail;
     }
 
     public void finish() throws IOException {
         if (avail != 0) {
-            skipBytes(avail);
+            skip(avail);
         }
     }
 
@@ -337,6 +335,7 @@
         return ch1 + (ch2 << 8) | (ch3 << 16) | (ch4 << 24);
     }
 
+    @Override
     public void close() throws IOException {
         finish();
         if (this == root)
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/RealTimeSequencer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/RealTimeSequencer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -51,8 +51,8 @@
     // STATIC VARIABLES
 
     /** debugging flags */
-    private final static boolean DEBUG_PUMP = false;
-    private final static boolean DEBUG_PUMP_ALL = false;
+    private static final boolean DEBUG_PUMP = false;
+    private static final boolean DEBUG_PUMP_ALL = false;
 
     /**
      * Event Dispatcher thread. Should be using a shared event
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SF2Modulator.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SF2Modulator.java	Wed Jul 05 20:52:37 2017 +0200
@@ -31,24 +31,24 @@
  */
 public final class SF2Modulator {
 
-    public final static int SOURCE_NONE = 0;
-    public final static int SOURCE_NOTE_ON_VELOCITY = 2;
-    public final static int SOURCE_NOTE_ON_KEYNUMBER = 3;
-    public final static int SOURCE_POLY_PRESSURE = 10;
-    public final static int SOURCE_CHANNEL_PRESSURE = 13;
-    public final static int SOURCE_PITCH_WHEEL = 14;
-    public final static int SOURCE_PITCH_SENSITIVITY = 16;
-    public final static int SOURCE_MIDI_CONTROL = 128 * 1;
-    public final static int SOURCE_DIRECTION_MIN_MAX = 256 * 0;
-    public final static int SOURCE_DIRECTION_MAX_MIN = 256 * 1;
-    public final static int SOURCE_POLARITY_UNIPOLAR = 512 * 0;
-    public final static int SOURCE_POLARITY_BIPOLAR = 512 * 1;
-    public final static int SOURCE_TYPE_LINEAR = 1024 * 0;
-    public final static int SOURCE_TYPE_CONCAVE = 1024 * 1;
-    public final static int SOURCE_TYPE_CONVEX = 1024 * 2;
-    public final static int SOURCE_TYPE_SWITCH = 1024 * 3;
-    public final static int TRANSFORM_LINEAR = 0;
-    public final static int TRANSFORM_ABSOLUTE = 2;
+    public static final int SOURCE_NONE = 0;
+    public static final int SOURCE_NOTE_ON_VELOCITY = 2;
+    public static final int SOURCE_NOTE_ON_KEYNUMBER = 3;
+    public static final int SOURCE_POLY_PRESSURE = 10;
+    public static final int SOURCE_CHANNEL_PRESSURE = 13;
+    public static final int SOURCE_PITCH_WHEEL = 14;
+    public static final int SOURCE_PITCH_SENSITIVITY = 16;
+    public static final int SOURCE_MIDI_CONTROL = 128 * 1;
+    public static final int SOURCE_DIRECTION_MIN_MAX = 256 * 0;
+    public static final int SOURCE_DIRECTION_MAX_MIN = 256 * 1;
+    public static final int SOURCE_POLARITY_UNIPOLAR = 512 * 0;
+    public static final int SOURCE_POLARITY_BIPOLAR = 512 * 1;
+    public static final int SOURCE_TYPE_LINEAR = 1024 * 0;
+    public static final int SOURCE_TYPE_CONCAVE = 1024 * 1;
+    public static final int SOURCE_TYPE_CONVEX = 1024 * 2;
+    public static final int SOURCE_TYPE_SWITCH = 1024 * 3;
+    public static final int TRANSFORM_LINEAR = 0;
+    public static final int TRANSFORM_ABSOLUTE = 2;
     int sourceOperator;
     int destinationOperator;
     short amount;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SF2Region.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SF2Region.java	Wed Jul 05 20:52:37 2017 +0200
@@ -36,67 +36,67 @@
  */
 public class SF2Region {
 
-    public final static int GENERATOR_STARTADDRSOFFSET = 0;
-    public final static int GENERATOR_ENDADDRSOFFSET = 1;
-    public final static int GENERATOR_STARTLOOPADDRSOFFSET = 2;
-    public final static int GENERATOR_ENDLOOPADDRSOFFSET = 3;
-    public final static int GENERATOR_STARTADDRSCOARSEOFFSET = 4;
-    public final static int GENERATOR_MODLFOTOPITCH = 5;
-    public final static int GENERATOR_VIBLFOTOPITCH = 6;
-    public final static int GENERATOR_MODENVTOPITCH = 7;
-    public final static int GENERATOR_INITIALFILTERFC = 8;
-    public final static int GENERATOR_INITIALFILTERQ = 9;
-    public final static int GENERATOR_MODLFOTOFILTERFC = 10;
-    public final static int GENERATOR_MODENVTOFILTERFC = 11;
-    public final static int GENERATOR_ENDADDRSCOARSEOFFSET = 12;
-    public final static int GENERATOR_MODLFOTOVOLUME = 13;
-    public final static int GENERATOR_UNUSED1 = 14;
-    public final static int GENERATOR_CHORUSEFFECTSSEND = 15;
-    public final static int GENERATOR_REVERBEFFECTSSEND = 16;
-    public final static int GENERATOR_PAN = 17;
-    public final static int GENERATOR_UNUSED2 = 18;
-    public final static int GENERATOR_UNUSED3 = 19;
-    public final static int GENERATOR_UNUSED4 = 20;
-    public final static int GENERATOR_DELAYMODLFO = 21;
-    public final static int GENERATOR_FREQMODLFO = 22;
-    public final static int GENERATOR_DELAYVIBLFO = 23;
-    public final static int GENERATOR_FREQVIBLFO = 24;
-    public final static int GENERATOR_DELAYMODENV = 25;
-    public final static int GENERATOR_ATTACKMODENV = 26;
-    public final static int GENERATOR_HOLDMODENV = 27;
-    public final static int GENERATOR_DECAYMODENV = 28;
-    public final static int GENERATOR_SUSTAINMODENV = 29;
-    public final static int GENERATOR_RELEASEMODENV = 30;
-    public final static int GENERATOR_KEYNUMTOMODENVHOLD = 31;
-    public final static int GENERATOR_KEYNUMTOMODENVDECAY = 32;
-    public final static int GENERATOR_DELAYVOLENV = 33;
-    public final static int GENERATOR_ATTACKVOLENV = 34;
-    public final static int GENERATOR_HOLDVOLENV = 35;
-    public final static int GENERATOR_DECAYVOLENV = 36;
-    public final static int GENERATOR_SUSTAINVOLENV = 37;
-    public final static int GENERATOR_RELEASEVOLENV = 38;
-    public final static int GENERATOR_KEYNUMTOVOLENVHOLD = 39;
-    public final static int GENERATOR_KEYNUMTOVOLENVDECAY = 40;
-    public final static int GENERATOR_INSTRUMENT = 41;
-    public final static int GENERATOR_RESERVED1 = 42;
-    public final static int GENERATOR_KEYRANGE = 43;
-    public final static int GENERATOR_VELRANGE = 44;
-    public final static int GENERATOR_STARTLOOPADDRSCOARSEOFFSET = 45;
-    public final static int GENERATOR_KEYNUM = 46;
-    public final static int GENERATOR_VELOCITY = 47;
-    public final static int GENERATOR_INITIALATTENUATION = 48;
-    public final static int GENERATOR_RESERVED2 = 49;
-    public final static int GENERATOR_ENDLOOPADDRSCOARSEOFFSET = 50;
-    public final static int GENERATOR_COARSETUNE = 51;
-    public final static int GENERATOR_FINETUNE = 52;
-    public final static int GENERATOR_SAMPLEID = 53;
-    public final static int GENERATOR_SAMPLEMODES = 54;
-    public final static int GENERATOR_RESERVED3 = 55;
-    public final static int GENERATOR_SCALETUNING = 56;
-    public final static int GENERATOR_EXCLUSIVECLASS = 57;
-    public final static int GENERATOR_OVERRIDINGROOTKEY = 58;
-    public final static int GENERATOR_UNUSED5 = 59;
-    public final static int GENERATOR_ENDOPR = 60;
+    public static final int GENERATOR_STARTADDRSOFFSET = 0;
+    public static final int GENERATOR_ENDADDRSOFFSET = 1;
+    public static final int GENERATOR_STARTLOOPADDRSOFFSET = 2;
+    public static final int GENERATOR_ENDLOOPADDRSOFFSET = 3;
+    public static final int GENERATOR_STARTADDRSCOARSEOFFSET = 4;
+    public static final int GENERATOR_MODLFOTOPITCH = 5;
+    public static final int GENERATOR_VIBLFOTOPITCH = 6;
+    public static final int GENERATOR_MODENVTOPITCH = 7;
+    public static final int GENERATOR_INITIALFILTERFC = 8;
+    public static final int GENERATOR_INITIALFILTERQ = 9;
+    public static final int GENERATOR_MODLFOTOFILTERFC = 10;
+    public static final int GENERATOR_MODENVTOFILTERFC = 11;
+    public static final int GENERATOR_ENDADDRSCOARSEOFFSET = 12;
+    public static final int GENERATOR_MODLFOTOVOLUME = 13;
+    public static final int GENERATOR_UNUSED1 = 14;
+    public static final int GENERATOR_CHORUSEFFECTSSEND = 15;
+    public static final int GENERATOR_REVERBEFFECTSSEND = 16;
+    public static final int GENERATOR_PAN = 17;
+    public static final int GENERATOR_UNUSED2 = 18;
+    public static final int GENERATOR_UNUSED3 = 19;
+    public static final int GENERATOR_UNUSED4 = 20;
+    public static final int GENERATOR_DELAYMODLFO = 21;
+    public static final int GENERATOR_FREQMODLFO = 22;
+    public static final int GENERATOR_DELAYVIBLFO = 23;
+    public static final int GENERATOR_FREQVIBLFO = 24;
+    public static final int GENERATOR_DELAYMODENV = 25;
+    public static final int GENERATOR_ATTACKMODENV = 26;
+    public static final int GENERATOR_HOLDMODENV = 27;
+    public static final int GENERATOR_DECAYMODENV = 28;
+    public static final int GENERATOR_SUSTAINMODENV = 29;
+    public static final int GENERATOR_RELEASEMODENV = 30;
+    public static final int GENERATOR_KEYNUMTOMODENVHOLD = 31;
+    public static final int GENERATOR_KEYNUMTOMODENVDECAY = 32;
+    public static final int GENERATOR_DELAYVOLENV = 33;
+    public static final int GENERATOR_ATTACKVOLENV = 34;
+    public static final int GENERATOR_HOLDVOLENV = 35;
+    public static final int GENERATOR_DECAYVOLENV = 36;
+    public static final int GENERATOR_SUSTAINVOLENV = 37;
+    public static final int GENERATOR_RELEASEVOLENV = 38;
+    public static final int GENERATOR_KEYNUMTOVOLENVHOLD = 39;
+    public static final int GENERATOR_KEYNUMTOVOLENVDECAY = 40;
+    public static final int GENERATOR_INSTRUMENT = 41;
+    public static final int GENERATOR_RESERVED1 = 42;
+    public static final int GENERATOR_KEYRANGE = 43;
+    public static final int GENERATOR_VELRANGE = 44;
+    public static final int GENERATOR_STARTLOOPADDRSCOARSEOFFSET = 45;
+    public static final int GENERATOR_KEYNUM = 46;
+    public static final int GENERATOR_VELOCITY = 47;
+    public static final int GENERATOR_INITIALATTENUATION = 48;
+    public static final int GENERATOR_RESERVED2 = 49;
+    public static final int GENERATOR_ENDLOOPADDRSCOARSEOFFSET = 50;
+    public static final int GENERATOR_COARSETUNE = 51;
+    public static final int GENERATOR_FINETUNE = 52;
+    public static final int GENERATOR_SAMPLEID = 53;
+    public static final int GENERATOR_SAMPLEMODES = 54;
+    public static final int GENERATOR_RESERVED3 = 55;
+    public static final int GENERATOR_SCALETUNING = 56;
+    public static final int GENERATOR_EXCLUSIVECLASS = 57;
+    public static final int GENERATOR_OVERRIDINGROOTKEY = 58;
+    public static final int GENERATOR_UNUSED5 = 59;
+    public static final int GENERATOR_ENDOPR = 60;
     protected Map<Integer, Short> generators = new HashMap<Integer, Short>();
     protected List<SF2Modulator> modulators = new ArrayList<SF2Modulator>();
 
@@ -108,7 +108,7 @@
         return generators.containsKey(generator);
     }
 
-    static public short getDefaultValue(int generator) {
+    public static short getDefaultValue(int generator) {
         if (generator == 8) return (short)13500;
         if (generator == 21) return (short)-12000;
         if (generator == 23) return (short)-12000;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftEnvelopeGenerator.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftEnvelopeGenerator.java	Wed Jul 05 20:52:37 2017 +0200
@@ -31,15 +31,15 @@
  */
 public final class SoftEnvelopeGenerator implements SoftProcess {
 
-    public final static int EG_OFF = 0;
-    public final static int EG_DELAY = 1;
-    public final static int EG_ATTACK = 2;
-    public final static int EG_HOLD = 3;
-    public final static int EG_DECAY = 4;
-    public final static int EG_SUSTAIN = 5;
-    public final static int EG_RELEASE = 6;
-    public final static int EG_SHUTDOWN = 7;
-    public final static int EG_END = 8;
+    public static final int EG_OFF = 0;
+    public static final int EG_DELAY = 1;
+    public static final int EG_ATTACK = 2;
+    public static final int EG_HOLD = 3;
+    public static final int EG_DECAY = 4;
+    public static final int EG_SUSTAIN = 5;
+    public static final int EG_RELEASE = 6;
+    public static final int EG_SHUTDOWN = 7;
+    public static final int EG_END = 8;
     int max_count = 10;
     int used_count = 0;
     private final int[] stage = new int[max_count];
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftFilter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftFilter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -35,13 +35,13 @@
  */
 public final class SoftFilter {
 
-    public final static int FILTERTYPE_LP6 = 0x00;
-    public final static int FILTERTYPE_LP12 = 0x01;
-    public final static int FILTERTYPE_HP12 = 0x11;
-    public final static int FILTERTYPE_BP12 = 0x21;
-    public final static int FILTERTYPE_NP12 = 0x31;
-    public final static int FILTERTYPE_LP24 = 0x03;
-    public final static int FILTERTYPE_HP24 = 0x13;
+    public static final int FILTERTYPE_LP6 = 0x00;
+    public static final int FILTERTYPE_LP12 = 0x01;
+    public static final int FILTERTYPE_HP12 = 0x11;
+    public static final int FILTERTYPE_BP12 = 0x21;
+    public static final int FILTERTYPE_NP12 = 0x31;
+    public static final int FILTERTYPE_LP24 = 0x03;
+    public static final int FILTERTYPE_HP24 = 0x13;
 
     //
     // 0x0 = 1st-order, 6 dB/oct
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftMainMixer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftMainMixer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -53,20 +53,20 @@
         SoftAudioBuffer[] buffers;
     }
 
-    public final static int CHANNEL_LEFT = 0;
-    public final static int CHANNEL_RIGHT = 1;
-    public final static int CHANNEL_MONO = 2;
-    public final static int CHANNEL_DELAY_LEFT = 3;
-    public final static int CHANNEL_DELAY_RIGHT = 4;
-    public final static int CHANNEL_DELAY_MONO = 5;
-    public final static int CHANNEL_EFFECT1 = 6;
-    public final static int CHANNEL_EFFECT2 = 7;
-    public final static int CHANNEL_DELAY_EFFECT1 = 8;
-    public final static int CHANNEL_DELAY_EFFECT2 = 9;
-    public final static int CHANNEL_LEFT_DRY = 10;
-    public final static int CHANNEL_RIGHT_DRY = 11;
-    public final static int CHANNEL_SCRATCH1 = 12;
-    public final static int CHANNEL_SCRATCH2 = 13;
+    public static final int CHANNEL_LEFT = 0;
+    public static final int CHANNEL_RIGHT = 1;
+    public static final int CHANNEL_MONO = 2;
+    public static final int CHANNEL_DELAY_LEFT = 3;
+    public static final int CHANNEL_DELAY_RIGHT = 4;
+    public static final int CHANNEL_DELAY_MONO = 5;
+    public static final int CHANNEL_EFFECT1 = 6;
+    public static final int CHANNEL_EFFECT2 = 7;
+    public static final int CHANNEL_DELAY_EFFECT1 = 8;
+    public static final int CHANNEL_DELAY_EFFECT2 = 9;
+    public static final int CHANNEL_LEFT_DRY = 10;
+    public static final int CHANNEL_RIGHT_DRY = 11;
+    public static final int CHANNEL_SCRATCH1 = 12;
+    public static final int CHANNEL_SCRATCH2 = 13;
     boolean active_sensing_on = false;
     private long msec_last_activity = -1;
     private boolean pusher_silent = false;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftMixingMainMixer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftMixingMainMixer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -39,29 +39,29 @@
  */
 public final class SoftMixingMainMixer {
 
-    public final static int CHANNEL_LEFT = 0;
+    public static final int CHANNEL_LEFT = 0;
 
-    public final static int CHANNEL_RIGHT = 1;
+    public static final int CHANNEL_RIGHT = 1;
 
-    public final static int CHANNEL_EFFECT1 = 2;
+    public static final int CHANNEL_EFFECT1 = 2;
 
-    public final static int CHANNEL_EFFECT2 = 3;
+    public static final int CHANNEL_EFFECT2 = 3;
 
-    public final static int CHANNEL_EFFECT3 = 4;
+    public static final int CHANNEL_EFFECT3 = 4;
 
-    public final static int CHANNEL_EFFECT4 = 5;
+    public static final int CHANNEL_EFFECT4 = 5;
 
-    public final static int CHANNEL_LEFT_DRY = 10;
+    public static final int CHANNEL_LEFT_DRY = 10;
 
-    public final static int CHANNEL_RIGHT_DRY = 11;
+    public static final int CHANNEL_RIGHT_DRY = 11;
 
-    public final static int CHANNEL_SCRATCH1 = 12;
+    public static final int CHANNEL_SCRATCH1 = 12;
 
-    public final static int CHANNEL_SCRATCH2 = 13;
+    public static final int CHANNEL_SCRATCH2 = 13;
 
-    public final static int CHANNEL_CHANNELMIXER_LEFT = 14;
+    public static final int CHANNEL_CHANNELMIXER_LEFT = 14;
 
-    public final static int CHANNEL_CHANNELMIXER_RIGHT = 15;
+    public static final int CHANNEL_CHANNELMIXER_RIGHT = 15;
 
     private final SoftMixingMixer mixer;
 
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftReverb.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftReverb.java	Wed Jul 05 20:52:37 2017 +0200
@@ -35,7 +35,7 @@
  */
 public final class SoftReverb implements SoftAudioProcessor {
 
-    private final static class Delay {
+    private static final class Delay {
 
         private float[] delaybuffer;
         private int rovepos = 0;
@@ -70,7 +70,7 @@
         }
     }
 
-    private final static class AllPass {
+    private static final class AllPass {
 
         private final float[] delaybuffer;
         private final int delaybuffersize;
@@ -117,7 +117,7 @@
         }
     }
 
-    private final static class Comb {
+    private static final class Comb {
 
         private final float[] delaybuffer;
         private final int delaybuffersize;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftSynthesizer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftSynthesizer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -178,7 +178,7 @@
     static final String INFO_VENDOR = "OpenJDK";
     static final String INFO_DESCRIPTION = "Software MIDI Synthesizer";
     static final String INFO_VERSION = "1.0";
-    final static MidiDevice.Info info = new Info();
+    static final MidiDevice.Info info = new Info();
 
     private static SourceDataLine testline = null;
 
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/StandardMidiFileWriter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/StandardMidiFileWriter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -307,7 +307,7 @@
         return ERROR;
     }
 
-    private final static long mask = 0x7F;
+    private static final long mask = 0x7F;
 
     private int writeVarInt(long value) throws IOException {
         int len = 1;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/UlawCodec.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/UlawCodec.java	Wed Jul 05 20:52:37 2017 +0200
@@ -43,8 +43,8 @@
 
     /* Tables used for U-law decoding */
 
-    private final static byte[] ULAW_TABH = new byte[256];
-    private final static byte[] ULAW_TABL = new byte[256];
+    private static final byte[] ULAW_TABH = new byte[256];
+    private static final byte[] ULAW_TABL = new byte[256];
 
     private static final AudioFormat.Encoding[] ulawEncodings = {AudioFormat.Encoding.ULAW,
                                                                  AudioFormat.Encoding.PCM_SIGNED};
--- a/jdk/src/java.desktop/share/classes/java/applet/Applet.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/applet/Applet.java	Wed Jul 05 20:52:37 2017 +0200
@@ -79,7 +79,7 @@
      * likely move it into RUNNING state).
      * The stub field will be restored by the reader.
      */
-    transient private AppletStub stub;
+    private transient AppletStub stub;
 
     /* version ID for serialized form. */
     private static final long serialVersionUID = -5836846270535785031L;
@@ -310,7 +310,7 @@
      *
      * @since       1.2
      */
-    public final static AudioClip newAudioClip(URL url) {
+    public static final AudioClip newAudioClip(URL url) {
         return new sun.applet.AppletAudioClip(url);
     }
 
--- a/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java	Wed Jul 05 20:52:37 2017 +0200
@@ -128,107 +128,107 @@
     /**
      * The event mask for selecting component events.
      */
-    public final static long COMPONENT_EVENT_MASK = 0x01;
+    public static final long COMPONENT_EVENT_MASK = 0x01;
 
     /**
      * The event mask for selecting container events.
      */
-    public final static long CONTAINER_EVENT_MASK = 0x02;
+    public static final long CONTAINER_EVENT_MASK = 0x02;
 
     /**
      * The event mask for selecting focus events.
      */
-    public final static long FOCUS_EVENT_MASK = 0x04;
+    public static final long FOCUS_EVENT_MASK = 0x04;
 
     /**
      * The event mask for selecting key events.
      */
-    public final static long KEY_EVENT_MASK = 0x08;
+    public static final long KEY_EVENT_MASK = 0x08;
 
     /**
      * The event mask for selecting mouse events.
      */
-    public final static long MOUSE_EVENT_MASK = 0x10;
+    public static final long MOUSE_EVENT_MASK = 0x10;
 
     /**
      * The event mask for selecting mouse motion events.
      */
-    public final static long MOUSE_MOTION_EVENT_MASK = 0x20;
+    public static final long MOUSE_MOTION_EVENT_MASK = 0x20;
 
     /**
      * The event mask for selecting window events.
      */
-    public final static long WINDOW_EVENT_MASK = 0x40;
+    public static final long WINDOW_EVENT_MASK = 0x40;
 
     /**
      * The event mask for selecting action events.
      */
-    public final static long ACTION_EVENT_MASK = 0x80;
+    public static final long ACTION_EVENT_MASK = 0x80;
 
     /**
      * The event mask for selecting adjustment events.
      */
-    public final static long ADJUSTMENT_EVENT_MASK = 0x100;
+    public static final long ADJUSTMENT_EVENT_MASK = 0x100;
 
     /**
      * The event mask for selecting item events.
      */
-    public final static long ITEM_EVENT_MASK = 0x200;
+    public static final long ITEM_EVENT_MASK = 0x200;
 
     /**
      * The event mask for selecting text events.
      */
-    public final static long TEXT_EVENT_MASK = 0x400;
+    public static final long TEXT_EVENT_MASK = 0x400;
 
     /**
      * The event mask for selecting input method events.
      */
-    public final static long INPUT_METHOD_EVENT_MASK = 0x800;
+    public static final long INPUT_METHOD_EVENT_MASK = 0x800;
 
     /**
      * The pseudo event mask for enabling input methods.
      * We're using one bit in the eventMask so we don't need
      * a separate field inputMethodsEnabled.
      */
-    final static long INPUT_METHODS_ENABLED_MASK = 0x1000;
+    static final long INPUT_METHODS_ENABLED_MASK = 0x1000;
 
     /**
      * The event mask for selecting paint events.
      */
-    public final static long PAINT_EVENT_MASK = 0x2000;
+    public static final long PAINT_EVENT_MASK = 0x2000;
 
     /**
      * The event mask for selecting invocation events.
      */
-    public final static long INVOCATION_EVENT_MASK = 0x4000;
+    public static final long INVOCATION_EVENT_MASK = 0x4000;
 
     /**
      * The event mask for selecting hierarchy events.
      */
-    public final static long HIERARCHY_EVENT_MASK = 0x8000;
+    public static final long HIERARCHY_EVENT_MASK = 0x8000;
 
     /**
      * The event mask for selecting hierarchy bounds events.
      */
-    public final static long HIERARCHY_BOUNDS_EVENT_MASK = 0x10000;
+    public static final long HIERARCHY_BOUNDS_EVENT_MASK = 0x10000;
 
     /**
      * The event mask for selecting mouse wheel events.
      * @since 1.4
      */
-    public final static long MOUSE_WHEEL_EVENT_MASK = 0x20000;
+    public static final long MOUSE_WHEEL_EVENT_MASK = 0x20000;
 
     /**
      * The event mask for selecting window state events.
      * @since 1.4
      */
-    public final static long WINDOW_STATE_EVENT_MASK = 0x40000;
+    public static final long WINDOW_STATE_EVENT_MASK = 0x40000;
 
     /**
      * The event mask for selecting window focus events.
      * @since 1.4
      */
-    public final static long WINDOW_FOCUS_EVENT_MASK = 0x80000;
+    public static final long WINDOW_FOCUS_EVENT_MASK = 0x80000;
 
     /**
      * WARNING: there are more mask defined privately.  See
@@ -239,7 +239,7 @@
      * The maximum value for reserved AWT event IDs. Programs defining
      * their own event IDs should use IDs greater than this value.
      */
-    public final static int RESERVED_ID_MAX = 1999;
+    public static final int RESERVED_ID_MAX = 1999;
 
     // security stuff
     private static Field inputEvent_CanAccessSystemClipboard_Field = null;
--- a/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java	Wed Jul 05 20:52:37 2017 +0200
@@ -32,12 +32,9 @@
 import java.util.Map;
 import java.util.StringTokenizer;
 import java.io.Serializable;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Field;
+import sun.swing.SwingAccessor;
 
 /**
  * An <code>AWTKeyStroke</code> represents a key action on the
@@ -80,21 +77,6 @@
     //A key withing the cache
     private static AWTKeyStroke APP_CONTEXT_KEYSTROKE_KEY = new AWTKeyStroke();
 
-    /*
-     * Reads keystroke class from AppContext and if null, puts there the
-     * AWTKeyStroke class.
-     * Must be called under locked AWTKeyStroke
-     */
-    private static Class<AWTKeyStroke> getAWTKeyStrokeClass() {
-        @SuppressWarnings("unchecked")
-        Class<AWTKeyStroke> clazz = (Class<AWTKeyStroke>)AppContext.getAppContext().get(AWTKeyStroke.class);
-        if (clazz == null) {
-            clazz = AWTKeyStroke.class;
-            AppContext.getAppContext().put(AWTKeyStroke.class, AWTKeyStroke.class);
-        }
-        return clazz;
-    }
-
     private char keyChar = KeyEvent.CHAR_UNDEFINED;
     private int keyCode = KeyEvent.VK_UNDEFINED;
     private int modifiers;
@@ -160,92 +142,15 @@
     }
 
     /**
-     * Registers a new class which the factory methods in
-     * <code>AWTKeyStroke</code> will use when generating new
-     * instances of <code>AWTKeyStroke</code>s. After invoking this
-     * method, the factory methods will return instances of the specified
-     * Class. The specified Class must be either <code>AWTKeyStroke</code>
-     * or derived from <code>AWTKeyStroke</code>, and it must have a
-     * no-arg constructor. The constructor can be of any accessibility,
-     * including <code>private</code>. This operation
-     * flushes the current <code>AWTKeyStroke</code> cache.
+     * The method has no effect and is only left present to avoid introducing
+     * a binary incompatibility.
      *
      * @param subclass the new Class of which the factory methods should create
      *        instances
-     * @throws IllegalArgumentException if subclass is <code>null</code>,
-     *         or if subclass does not have a no-arg constructor
-     * @throws ClassCastException if subclass is not
-     *         <code>AWTKeyStroke</code>, or a class derived from
-     *         <code>AWTKeyStroke</code>
+     * @deprecated
      */
+    @Deprecated
     protected static void registerSubclass(Class<?> subclass) {
-        if (subclass == null) {
-            throw new IllegalArgumentException("subclass cannot be null");
-        }
-        synchronized (AWTKeyStroke.class) {
-            @SuppressWarnings("unchecked")
-            Class<AWTKeyStroke> keyStrokeClass = (Class)AppContext.getAppContext().get(AWTKeyStroke.class);
-            if (keyStrokeClass != null && keyStrokeClass.equals(subclass)){
-                // Already registered
-                return;
-            }
-        }
-        if (!AWTKeyStroke.class.isAssignableFrom(subclass)) {
-            throw new ClassCastException("subclass is not derived from AWTKeyStroke");
-        }
-
-        Constructor<?> ctor = getCtor(subclass);
-
-        String couldNotInstantiate = "subclass could not be instantiated";
-
-        if (ctor == null) {
-            throw new IllegalArgumentException(couldNotInstantiate);
-        }
-        try {
-            AWTKeyStroke stroke = (AWTKeyStroke)ctor.newInstance((Object[]) null);
-            if (stroke == null) {
-                throw new IllegalArgumentException(couldNotInstantiate);
-            }
-        } catch (NoSuchMethodError e) {
-            throw new IllegalArgumentException(couldNotInstantiate);
-        } catch (ExceptionInInitializerError e) {
-            throw new IllegalArgumentException(couldNotInstantiate);
-        } catch (InstantiationException e) {
-            throw new IllegalArgumentException(couldNotInstantiate);
-        } catch (IllegalAccessException e) {
-            throw new IllegalArgumentException(couldNotInstantiate);
-        } catch (InvocationTargetException e) {
-            throw new IllegalArgumentException(couldNotInstantiate);
-        }
-
-        synchronized (AWTKeyStroke.class) {
-            AppContext.getAppContext().put(AWTKeyStroke.class, subclass);
-            AppContext.getAppContext().remove(APP_CONTEXT_CACHE_KEY);
-            AppContext.getAppContext().remove(APP_CONTEXT_KEYSTROKE_KEY);
-        }
-    }
-
-    /* returns no-arg Constructor for class with accessible flag. No security
-       threat as accessible flag is set only for this Constructor object,
-       not for Class constructor.
-     */
-    private static Constructor<?> getCtor(final Class<?> clazz)
-    {
-        Constructor<?> ctor = AccessController.doPrivileged(new PrivilegedAction<Constructor<?>>() {
-            public Constructor<?> run() {
-                try {
-                    Constructor<?> ctor = clazz.getDeclaredConstructor((Class<?>[]) null);
-                    if (ctor != null) {
-                        ctor.setAccessible(true);
-                    }
-                    return ctor;
-                } catch (SecurityException e) {
-                } catch (NoSuchMethodException e) {
-                }
-                return null;
-            }
-        });
-        return ctor;
     }
 
     private static synchronized AWTKeyStroke getCachedStroke
@@ -261,18 +166,10 @@
         }
 
         if (cacheKey == null) {
-            try {
-                Class<AWTKeyStroke> clazz = getAWTKeyStrokeClass();
-                cacheKey = (AWTKeyStroke)getCtor(clazz).newInstance((Object[]) null);
-                AppContext.getAppContext().put(APP_CONTEXT_KEYSTROKE_KEY, cacheKey);
-            } catch (InstantiationException e) {
-                assert(false);
-            } catch (IllegalAccessException e) {
-                assert(false);
-            } catch (InvocationTargetException e) {
-                assert(false);
-            }
+            cacheKey = SwingAccessor.getKeyStrokeAccessor().create();
+            AppContext.getAppContext().put(APP_CONTEXT_KEYSTROKE_KEY, cacheKey);
         }
+
         cacheKey.keyChar = keyChar;
         cacheKey.keyCode = keyCode;
         cacheKey.modifiers = mapNewModifiers(mapOldModifiers(modifiers));
@@ -806,11 +703,9 @@
      */
     protected Object readResolve() throws java.io.ObjectStreamException {
         synchronized (AWTKeyStroke.class) {
-            if (getClass().equals(getAWTKeyStrokeClass())) {
-                return  getCachedStroke(keyChar, keyCode, modifiers, onKeyRelease);
-            }
+
+            return getCachedStroke(keyChar, keyCode, modifiers, onKeyRelease);
         }
-        return this;
     }
 
     private static int mapOldModifiers(int modifiers) {
--- a/jdk/src/java.desktop/share/classes/java/awt/BasicStroke.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/BasicStroke.java	Wed Jul 05 20:52:37 2017 +0200
@@ -117,39 +117,39 @@
      * Joins path segments by extending their outside edges until
      * they meet.
      */
-    @Native public final static int JOIN_MITER = 0;
+    @Native public static final int JOIN_MITER = 0;
 
     /**
      * Joins path segments by rounding off the corner at a radius
      * of half the line width.
      */
-    @Native public final static int JOIN_ROUND = 1;
+    @Native public static final int JOIN_ROUND = 1;
 
     /**
      * Joins path segments by connecting the outer corners of their
      * wide outlines with a straight segment.
      */
-    @Native public final static int JOIN_BEVEL = 2;
+    @Native public static final int JOIN_BEVEL = 2;
 
     /**
      * Ends unclosed subpaths and dash segments with no added
      * decoration.
      */
-    @Native public final static int CAP_BUTT = 0;
+    @Native public static final int CAP_BUTT = 0;
 
     /**
      * Ends unclosed subpaths and dash segments with a round
      * decoration that has a radius equal to half of the width
      * of the pen.
      */
-    @Native public final static int CAP_ROUND = 1;
+    @Native public static final int CAP_ROUND = 1;
 
     /**
      * Ends unclosed subpaths and dash segments with a square
      * projection that extends beyond the end of the segment
      * to a distance equal to half of the line width.
      */
-    @Native public final static int CAP_SQUARE = 2;
+    @Native public static final int CAP_SQUARE = 2;
 
     float width;
 
--- a/jdk/src/java.desktop/share/classes/java/awt/Color.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/Color.java	Wed Jul 05 20:52:37 2017 +0200
@@ -62,145 +62,145 @@
     /**
      * The color white.  In the default sRGB space.
      */
-    public final static Color white     = new Color(255, 255, 255);
+    public static final Color white     = new Color(255, 255, 255);
 
     /**
      * The color white.  In the default sRGB space.
      * @since 1.4
      */
-    public final static Color WHITE = white;
+    public static final Color WHITE = white;
 
     /**
      * The color light gray.  In the default sRGB space.
      */
-    public final static Color lightGray = new Color(192, 192, 192);
+    public static final Color lightGray = new Color(192, 192, 192);
 
     /**
      * The color light gray.  In the default sRGB space.
      * @since 1.4
      */
-    public final static Color LIGHT_GRAY = lightGray;
+    public static final Color LIGHT_GRAY = lightGray;
 
     /**
      * The color gray.  In the default sRGB space.
      */
-    public final static Color gray      = new Color(128, 128, 128);
+    public static final Color gray      = new Color(128, 128, 128);
 
     /**
      * The color gray.  In the default sRGB space.
      * @since 1.4
      */
-    public final static Color GRAY = gray;
+    public static final Color GRAY = gray;
 
     /**
      * The color dark gray.  In the default sRGB space.
      */
-    public final static Color darkGray  = new Color(64, 64, 64);
+    public static final Color darkGray  = new Color(64, 64, 64);
 
     /**
      * The color dark gray.  In the default sRGB space.
      * @since 1.4
      */
-    public final static Color DARK_GRAY = darkGray;
+    public static final Color DARK_GRAY = darkGray;
 
     /**
      * The color black.  In the default sRGB space.
      */
-    public final static Color black     = new Color(0, 0, 0);
+    public static final Color black     = new Color(0, 0, 0);
 
     /**
      * The color black.  In the default sRGB space.
      * @since 1.4
      */
-    public final static Color BLACK = black;
+    public static final Color BLACK = black;
 
     /**
      * The color red.  In the default sRGB space.
      */
-    public final static Color red       = new Color(255, 0, 0);
+    public static final Color red       = new Color(255, 0, 0);
 
     /**
      * The color red.  In the default sRGB space.
      * @since 1.4
      */
-    public final static Color RED = red;
+    public static final Color RED = red;
 
     /**
      * The color pink.  In the default sRGB space.
      */
-    public final static Color pink      = new Color(255, 175, 175);
+    public static final Color pink      = new Color(255, 175, 175);
 
     /**
      * The color pink.  In the default sRGB space.
      * @since 1.4
      */
-    public final static Color PINK = pink;
+    public static final Color PINK = pink;
 
     /**
      * The color orange.  In the default sRGB space.
      */
-    public final static Color orange    = new Color(255, 200, 0);
+    public static final Color orange    = new Color(255, 200, 0);
 
     /**
      * The color orange.  In the default sRGB space.
      * @since 1.4
      */
-    public final static Color ORANGE = orange;
+    public static final Color ORANGE = orange;
 
     /**
      * The color yellow.  In the default sRGB space.
      */
-    public final static Color yellow    = new Color(255, 255, 0);
+    public static final Color yellow    = new Color(255, 255, 0);
 
     /**
      * The color yellow.  In the default sRGB space.
      * @since 1.4
      */
-    public final static Color YELLOW = yellow;
+    public static final Color YELLOW = yellow;
 
     /**
      * The color green.  In the default sRGB space.
      */
-    public final static Color green     = new Color(0, 255, 0);
+    public static final Color green     = new Color(0, 255, 0);
 
     /**
      * The color green.  In the default sRGB space.
      * @since 1.4
      */
-    public final static Color GREEN = green;
+    public static final Color GREEN = green;
 
     /**
      * The color magenta.  In the default sRGB space.
      */
-    public final static Color magenta   = new Color(255, 0, 255);
+    public static final Color magenta   = new Color(255, 0, 255);
 
     /**
      * The color magenta.  In the default sRGB space.
      * @since 1.4
      */
-    public final static Color MAGENTA = magenta;
+    public static final Color MAGENTA = magenta;
 
     /**
      * The color cyan.  In the default sRGB space.
      */
-    public final static Color cyan      = new Color(0, 255, 255);
+    public static final Color cyan      = new Color(0, 255, 255);
 
     /**
      * The color cyan.  In the default sRGB space.
      * @since 1.4
      */
-    public final static Color CYAN = cyan;
+    public static final Color CYAN = cyan;
 
     /**
      * The color blue.  In the default sRGB space.
      */
-    public final static Color blue      = new Color(0, 0, 255);
+    public static final Color blue      = new Color(0, 0, 255);
 
     /**
      * The color blue.  In the default sRGB space.
      * @since 1.4
      */
-    public final static Color BLUE = blue;
+    public static final Color BLUE = blue;
 
     /**
      * The color value.
--- a/jdk/src/java.desktop/share/classes/java/awt/Component.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/Component.java	Wed Jul 05 20:52:37 2017 +0200
@@ -545,24 +545,24 @@
     transient InputMethodListener inputMethodListener;
 
     /** Internal, constants for serialization */
-    final static String actionListenerK = "actionL";
-    final static String adjustmentListenerK = "adjustmentL";
-    final static String componentListenerK = "componentL";
-    final static String containerListenerK = "containerL";
-    final static String focusListenerK = "focusL";
-    final static String itemListenerK = "itemL";
-    final static String keyListenerK = "keyL";
-    final static String mouseListenerK = "mouseL";
-    final static String mouseMotionListenerK = "mouseMotionL";
-    final static String mouseWheelListenerK = "mouseWheelL";
-    final static String textListenerK = "textL";
-    final static String ownedWindowK = "ownedL";
-    final static String windowListenerK = "windowL";
-    final static String inputMethodListenerK = "inputMethodL";
-    final static String hierarchyListenerK = "hierarchyL";
-    final static String hierarchyBoundsListenerK = "hierarchyBoundsL";
-    final static String windowStateListenerK = "windowStateL";
-    final static String windowFocusListenerK = "windowFocusL";
+    static final String actionListenerK = "actionL";
+    static final String adjustmentListenerK = "adjustmentL";
+    static final String componentListenerK = "componentL";
+    static final String containerListenerK = "containerL";
+    static final String focusListenerK = "focusL";
+    static final String itemListenerK = "itemL";
+    static final String keyListenerK = "keyL";
+    static final String mouseListenerK = "mouseL";
+    static final String mouseMotionListenerK = "mouseMotionL";
+    static final String mouseWheelListenerK = "mouseWheelL";
+    static final String textListenerK = "textL";
+    static final String ownedWindowK = "ownedL";
+    static final String windowListenerK = "windowL";
+    static final String inputMethodListenerK = "inputMethodL";
+    static final String hierarchyListenerK = "hierarchyL";
+    static final String hierarchyBoundsListenerK = "hierarchyBoundsL";
+    static final String windowStateListenerK = "windowStateL";
+    static final String windowFocusListenerK = "windowFocusL";
 
     /**
      * The <code>eventMask</code> is ONLY set by subclasses via
@@ -6209,7 +6209,7 @@
      * @see #isCoalescingEnabled
      * @see #checkCoalescing
      */
-    transient private boolean coalescingEnabled = checkCoalescing();
+    private transient boolean coalescingEnabled = checkCoalescing();
 
     /**
      * Weak map of known coalesceEvent overriders.
@@ -7916,7 +7916,7 @@
         }
     };
 
-    synchronized static void setRequestFocusController(RequestFocusController requestController)
+    static synchronized void setRequestFocusController(RequestFocusController requestController)
     {
         if (requestController == null) {
             requestFocusController = new DummyRequestFocusController();
@@ -9173,7 +9173,7 @@
          * to add/remove ComponentListener and FocusListener to track
          * target Component's state.
          */
-        private volatile transient int propertyListenersCount = 0;
+        private transient volatile int propertyListenersCount = 0;
 
         /**
          * A component listener to track show/hide/resize events
--- a/jdk/src/java.desktop/share/classes/java/awt/Container.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/Container.java	Wed Jul 05 20:52:37 2017 +0200
@@ -2975,7 +2975,7 @@
         }
     }
 
-    final static class WakingRunnable implements Runnable {
+    static final class WakingRunnable implements Runnable {
         public void run() {
         }
     }
@@ -3843,7 +3843,7 @@
          * Number of PropertyChangeListener objects registered. It's used
          * to add/remove ContainerListener to track target Container's state.
          */
-        private volatile transient int propertyListenersCount = 0;
+        private transient volatile int propertyListenersCount = 0;
 
         /**
          * The handler to fire {@code PropertyChange}
--- a/jdk/src/java.desktop/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java	Wed Jul 05 20:52:37 2017 +0200
@@ -62,8 +62,8 @@
 {
     private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.ContainerOrderFocusTraversalPolicy");
 
-    final private int FORWARD_TRAVERSAL = 0;
-    final private int BACKWARD_TRAVERSAL = 1;
+    private final int FORWARD_TRAVERSAL = 0;
+    private final int BACKWARD_TRAVERSAL = 1;
 
     /*
      * JDK 1.4 serialVersionUID
@@ -84,8 +84,8 @@
      * that they need to invoke getFirstComponent or getLastComponent, the
      * list should be reused if possible.
      */
-    transient private Container cachedRoot;
-    transient private List<Component> cachedCycle;
+    private transient Container cachedRoot;
+    private transient List<Component> cachedCycle;
 
     /*
      * We suppose to use getFocusTraversalCycle & getComponentIndex methods in order
--- a/jdk/src/java.desktop/share/classes/java/awt/Cursor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/Cursor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -124,7 +124,7 @@
     /**
      * This field is a private replacement for 'predefined' array.
      */
-    private final static Cursor[] predefinedPrivate = new Cursor[14];
+    private static final Cursor[] predefinedPrivate = new Cursor[14];
 
     /* Localization names and default values */
     static final String[][] cursorProperties = {
@@ -449,5 +449,5 @@
         }
     }
 
-    private native static void finalizeImpl(long pData);
+    private static native void finalizeImpl(long pData);
 }
--- a/jdk/src/java.desktop/share/classes/java/awt/Dialog.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/Dialog.java	Wed Jul 05 20:52:37 2017 +0200
@@ -193,7 +193,7 @@
      *
      * @since 1.6
      */
-    public final static ModalityType DEFAULT_MODALITY_TYPE = ModalityType.APPLICATION_MODAL;
+    public static final ModalityType DEFAULT_MODALITY_TYPE = ModalityType.APPLICATION_MODAL;
 
     /**
      * True if this dialog is modal, false is the dialog is modeless.
@@ -265,7 +265,7 @@
     };
 
     /* operations with this list should be synchronized on tree lock*/
-    transient static IdentityArrayList<Dialog> modalDialogs = new IdentityArrayList<Dialog>();
+    static transient IdentityArrayList<Dialog> modalDialogs = new IdentityArrayList<Dialog>();
 
     transient IdentityArrayList<Window> blockedWindows = new IdentityArrayList<Window>();
 
--- a/jdk/src/java.desktop/share/classes/java/awt/DisplayMode.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/DisplayMode.java	Wed Jul 05 20:52:37 2017 +0200
@@ -92,7 +92,7 @@
      * display mode.
      * @see #getBitDepth
      */
-    @Native public final static int BIT_DEPTH_MULTI = -1;
+    @Native public static final int BIT_DEPTH_MULTI = -1;
 
     /**
      * Returns the bit depth of the display, in bits per pixel.  This may be
@@ -110,7 +110,7 @@
      * Value of the refresh rate if not known.
      * @see #getRefreshRate
      */
-    @Native public final static int REFRESH_RATE_UNKNOWN = 0;
+    @Native public static final int REFRESH_RATE_UNKNOWN = 0;
 
     /**
      * Returns the refresh rate of the display, in hertz.  This may be
--- a/jdk/src/java.desktop/share/classes/java/awt/EventQueue.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/EventQueue.java	Wed Jul 05 20:52:37 2017 +0200
@@ -47,8 +47,8 @@
 
 import java.security.AccessControlContext;
 
-import sun.misc.SharedSecrets;
-import sun.misc.JavaSecurityAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaSecurityAccess;
 
 /**
  * <code>EventQueue</code> is a platform-independent class
@@ -139,7 +139,7 @@
      * Dummy runnable to wake up EDT from getNextEvent() after
      push/pop is performed
      */
-    private final static Runnable dummyRunnable = new Runnable() {
+    private static final Runnable dummyRunnable = new Runnable() {
         public void run() {
         }
     };
--- a/jdk/src/java.desktop/share/classes/java/awt/GraphicsDevice.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/GraphicsDevice.java	Wed Jul 05 20:52:37 2017 +0200
@@ -99,18 +99,18 @@
     /**
      * Device is a raster screen.
      */
-    public final static int TYPE_RASTER_SCREEN          = 0;
+    public static final int TYPE_RASTER_SCREEN          = 0;
 
     /**
      * Device is a printer.
      */
-    public final static int TYPE_PRINTER                = 1;
+    public static final int TYPE_PRINTER                = 1;
 
     /**
      * Device is an image buffer.  This buffer can reside in device
      * or system memory but it is not physically viewable by the user.
      */
-    public final static int TYPE_IMAGE_BUFFER           = 2;
+    public static final int TYPE_IMAGE_BUFFER           = 2;
 
     /**
      * Kinds of translucency supported by the underlying system.
--- a/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java	Wed Jul 05 20:52:37 2017 +0200
@@ -216,7 +216,7 @@
         return getCurrentKeyboardFocusManager(AppContext.getAppContext());
     }
 
-    synchronized static KeyboardFocusManager
+    static synchronized KeyboardFocusManager
         getCurrentKeyboardFocusManager(AppContext appcontext)
     {
         KeyboardFocusManager manager = (KeyboardFocusManager)
@@ -2599,7 +2599,7 @@
      * @param comp the component to dispatch the event to
      * @param event the event to dispatch to the component
      */
-    static private Throwable dispatchAndCatchException(Throwable ex, Component comp, FocusEvent event) {
+    private static Throwable dispatchAndCatchException(Throwable ex, Component comp, FocusEvent event) {
         Throwable retEx = null;
         try {
             comp.dispatchEvent(event);
@@ -2617,7 +2617,7 @@
         return ex;
     }
 
-    static private void handleException(Throwable ex) {
+    private static void handleException(Throwable ex) {
         ex.printStackTrace();
     }
 
--- a/jdk/src/java.desktop/share/classes/java/awt/List.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/List.java	Wed Jul 05 20:52:37 2017 +0200
@@ -209,7 +209,7 @@
      * The default number of visible rows is 4.  A list with
      * zero rows is unusable and unsightly.
      */
-    final static int    DEFAULT_VISIBLE_ROWS = 4;
+    static final int    DEFAULT_VISIBLE_ROWS = 4;
 
     /**
      * Creates a new scrolling list initialized to display the specified
--- a/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java	Wed Jul 05 20:52:37 2017 +0200
@@ -123,8 +123,8 @@
     /*
      * Internal constants for serialization.
      */
-    final static String actionListenerK = Component.actionListenerK;
-    final static String itemListenerK = Component.itemListenerK;
+    static final String actionListenerK = Component.actionListenerK;
+    static final String itemListenerK = Component.itemListenerK;
 
     /*
      * JDK 1.1 serialVersionUID
--- a/jdk/src/java.desktop/share/classes/java/awt/RenderingHints.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/RenderingHints.java	Wed Jul 05 20:52:37 2017 +0200
@@ -110,7 +110,7 @@
                 Integer.toHexString(privatekey);
         }
 
-        private synchronized static void recordIdentity(Key k) {
+        private static synchronized void recordIdentity(Key k) {
             Object identity = k.getIdentity();
             Object otherref = identitymap.get(identity);
             if (otherref != null) {
--- a/jdk/src/java.desktop/share/classes/java/awt/SequencedEvent.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/SequencedEvent.java	Wed Jul 05 20:52:37 2017 +0200
@@ -135,7 +135,7 @@
     /**
      * true only if event exists and nested source appContext is disposed.
      */
-    private final static boolean isOwnerAppContextDisposed(SequencedEvent se) {
+    private static final boolean isOwnerAppContextDisposed(SequencedEvent se) {
         if (se != null) {
             Object target = se.nested.getSource();
             if (target instanceof Component) {
@@ -159,14 +159,14 @@
         return this == getFirstWithContext() || disposed;
     }
 
-    private final synchronized static SequencedEvent getFirst() {
+    private static final synchronized SequencedEvent getFirst() {
         return list.getFirst();
     }
 
     /* Disposes all events from disposed AppContext
      * return first valid event
      */
-    private final static SequencedEvent getFirstWithContext() {
+    private static final SequencedEvent getFirstWithContext() {
         SequencedEvent first = getFirst();
         while(isOwnerAppContextDisposed(first)) {
             first.dispose();
--- a/jdk/src/java.desktop/share/classes/java/awt/SplashScreen.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/SplashScreen.java	Wed Jul 05 20:52:37 2017 +0200
@@ -411,14 +411,14 @@
 
     private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.SplashScreen");
 
-    private native static void _update(long splashPtr, int[] data, int x, int y, int width, int height, int scanlineStride);
-    private native static boolean _isVisible(long splashPtr);
-    private native static Rectangle _getBounds(long splashPtr);
-    private native static long _getInstance();
-    private native static void _close(long splashPtr);
-    private native static String _getImageFileName(long splashPtr);
-    private native static String _getImageJarName(long SplashPtr);
-    private native static boolean _setImageData(long SplashPtr, byte[] data);
-    private native static float _getScaleFactor(long SplashPtr);
+    private static native void _update(long splashPtr, int[] data, int x, int y, int width, int height, int scanlineStride);
+    private static native boolean _isVisible(long splashPtr);
+    private static native Rectangle _getBounds(long splashPtr);
+    private static native long _getInstance();
+    private static native void _close(long splashPtr);
+    private static native String _getImageFileName(long splashPtr);
+    private static native String _getImageJarName(long SplashPtr);
+    private static native boolean _setImageData(long SplashPtr, byte[] data);
+    private static native float _getScaleFactor(long SplashPtr);
 
 }
--- a/jdk/src/java.desktop/share/classes/java/awt/SystemColor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/SystemColor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -58,187 +58,187 @@
      * {@link #desktop} system color.
      * @see SystemColor#desktop
      */
-    @Native public final static int DESKTOP = 0;
+    @Native public static final int DESKTOP = 0;
 
     /**
      * The array index for the
      * {@link #activeCaption} system color.
      * @see SystemColor#activeCaption
      */
-    @Native public final static int ACTIVE_CAPTION = 1;
+    @Native public static final int ACTIVE_CAPTION = 1;
 
     /**
      * The array index for the
      * {@link #activeCaptionText} system color.
      * @see SystemColor#activeCaptionText
      */
-    @Native public final static int ACTIVE_CAPTION_TEXT = 2;
+    @Native public static final int ACTIVE_CAPTION_TEXT = 2;
 
     /**
      * The array index for the
      * {@link #activeCaptionBorder} system color.
      * @see SystemColor#activeCaptionBorder
      */
-    @Native public final static int ACTIVE_CAPTION_BORDER = 3;
+    @Native public static final int ACTIVE_CAPTION_BORDER = 3;
 
     /**
      * The array index for the
      * {@link #inactiveCaption} system color.
      * @see SystemColor#inactiveCaption
      */
-    @Native public final static int INACTIVE_CAPTION = 4;
+    @Native public static final int INACTIVE_CAPTION = 4;
 
     /**
      * The array index for the
      * {@link #inactiveCaptionText} system color.
      * @see SystemColor#inactiveCaptionText
      */
-    @Native public final static int INACTIVE_CAPTION_TEXT = 5;
+    @Native public static final int INACTIVE_CAPTION_TEXT = 5;
 
     /**
      * The array index for the
      * {@link #inactiveCaptionBorder} system color.
      * @see SystemColor#inactiveCaptionBorder
      */
-    @Native public final static int INACTIVE_CAPTION_BORDER = 6;
+    @Native public static final int INACTIVE_CAPTION_BORDER = 6;
 
     /**
      * The array index for the
      * {@link #window} system color.
      * @see SystemColor#window
      */
-    @Native public final static int WINDOW = 7;
+    @Native public static final int WINDOW = 7;
 
     /**
      * The array index for the
      * {@link #windowBorder} system color.
      * @see SystemColor#windowBorder
      */
-    @Native public final static int WINDOW_BORDER = 8;
+    @Native public static final int WINDOW_BORDER = 8;
 
     /**
      * The array index for the
      * {@link #windowText} system color.
      * @see SystemColor#windowText
      */
-    @Native public final static int WINDOW_TEXT = 9;
+    @Native public static final int WINDOW_TEXT = 9;
 
     /**
      * The array index for the
      * {@link #menu} system color.
      * @see SystemColor#menu
      */
-    @Native public final static int MENU = 10;
+    @Native public static final int MENU = 10;
 
     /**
      * The array index for the
      * {@link #menuText} system color.
      * @see SystemColor#menuText
      */
-    @Native public final static int MENU_TEXT = 11;
+    @Native public static final int MENU_TEXT = 11;
 
     /**
      * The array index for the
      * {@link #text} system color.
      * @see SystemColor#text
      */
-    @Native public final static int TEXT = 12;
+    @Native public static final int TEXT = 12;
 
     /**
      * The array index for the
      * {@link #textText} system color.
      * @see SystemColor#textText
      */
-    @Native public final static int TEXT_TEXT = 13;
+    @Native public static final int TEXT_TEXT = 13;
 
     /**
      * The array index for the
      * {@link #textHighlight} system color.
      * @see SystemColor#textHighlight
      */
-    @Native public final static int TEXT_HIGHLIGHT = 14;
+    @Native public static final int TEXT_HIGHLIGHT = 14;
 
     /**
      * The array index for the
      * {@link #textHighlightText} system color.
      * @see SystemColor#textHighlightText
      */
-    @Native public final static int TEXT_HIGHLIGHT_TEXT = 15;
+    @Native public static final int TEXT_HIGHLIGHT_TEXT = 15;
 
     /**
      * The array index for the
      * {@link #textInactiveText} system color.
      * @see SystemColor#textInactiveText
      */
-    @Native public final static int TEXT_INACTIVE_TEXT = 16;
+    @Native public static final int TEXT_INACTIVE_TEXT = 16;
 
     /**
      * The array index for the
      * {@link #control} system color.
      * @see SystemColor#control
      */
-    @Native public final static int CONTROL = 17;
+    @Native public static final int CONTROL = 17;
 
     /**
      * The array index for the
      * {@link #controlText} system color.
      * @see SystemColor#controlText
      */
-    @Native public final static int CONTROL_TEXT = 18;
+    @Native public static final int CONTROL_TEXT = 18;
 
     /**
      * The array index for the
      * {@link #controlHighlight} system color.
      * @see SystemColor#controlHighlight
      */
-    @Native public final static int CONTROL_HIGHLIGHT = 19;
+    @Native public static final int CONTROL_HIGHLIGHT = 19;
 
     /**
      * The array index for the
      * {@link #controlLtHighlight} system color.
      * @see SystemColor#controlLtHighlight
      */
-    @Native public final static int CONTROL_LT_HIGHLIGHT = 20;
+    @Native public static final int CONTROL_LT_HIGHLIGHT = 20;
 
     /**
      * The array index for the
      * {@link #controlShadow} system color.
      * @see SystemColor#controlShadow
      */
-    @Native public final static int CONTROL_SHADOW = 21;
+    @Native public static final int CONTROL_SHADOW = 21;
 
     /**
      * The array index for the
      * {@link #controlDkShadow} system color.
      * @see SystemColor#controlDkShadow
      */
-    @Native public final static int CONTROL_DK_SHADOW = 22;
+    @Native public static final int CONTROL_DK_SHADOW = 22;
 
     /**
      * The array index for the
      * {@link #scrollbar} system color.
      * @see SystemColor#scrollbar
      */
-    @Native public final static int SCROLLBAR = 23;
+    @Native public static final int SCROLLBAR = 23;
 
     /**
      * The array index for the
      * {@link #info} system color.
      * @see SystemColor#info
      */
-    @Native public final static int INFO = 24;
+    @Native public static final int INFO = 24;
 
     /**
      * The array index for the
      * {@link #infoText} system color.
      * @see SystemColor#infoText
      */
-    @Native public final static int INFO_TEXT = 25;
+    @Native public static final int INFO_TEXT = 25;
 
     /**
      * The number of system colors in the array.
      */
-    @Native public final static int NUM_COLORS = 26;
+    @Native public static final int NUM_COLORS = 26;
 
     /******************************************************************************************/
 
@@ -280,146 +280,146 @@
    /**
      * The color rendered for the background of the desktop.
      */
-    public final static SystemColor desktop = new SystemColor((byte)DESKTOP);
+    public static final SystemColor desktop = new SystemColor((byte)DESKTOP);
 
     /**
      * The color rendered for the window-title background of the currently active window.
      */
-    public final static SystemColor activeCaption = new SystemColor((byte)ACTIVE_CAPTION);
+    public static final SystemColor activeCaption = new SystemColor((byte)ACTIVE_CAPTION);
 
     /**
      * The color rendered for the window-title text of the currently active window.
      */
-    public final static SystemColor activeCaptionText = new SystemColor((byte)ACTIVE_CAPTION_TEXT);
+    public static final SystemColor activeCaptionText = new SystemColor((byte)ACTIVE_CAPTION_TEXT);
 
     /**
      * The color rendered for the border around the currently active window.
      */
-    public final static SystemColor activeCaptionBorder = new SystemColor((byte)ACTIVE_CAPTION_BORDER);
+    public static final SystemColor activeCaptionBorder = new SystemColor((byte)ACTIVE_CAPTION_BORDER);
 
     /**
      * The color rendered for the window-title background of inactive windows.
      */
-    public final static SystemColor inactiveCaption = new SystemColor((byte)INACTIVE_CAPTION);
+    public static final SystemColor inactiveCaption = new SystemColor((byte)INACTIVE_CAPTION);
 
     /**
      * The color rendered for the window-title text of inactive windows.
      */
-    public final static SystemColor inactiveCaptionText = new SystemColor((byte)INACTIVE_CAPTION_TEXT);
+    public static final SystemColor inactiveCaptionText = new SystemColor((byte)INACTIVE_CAPTION_TEXT);
 
     /**
      * The color rendered for the border around inactive windows.
      */
-    public final static SystemColor inactiveCaptionBorder = new SystemColor((byte)INACTIVE_CAPTION_BORDER);
+    public static final SystemColor inactiveCaptionBorder = new SystemColor((byte)INACTIVE_CAPTION_BORDER);
 
     /**
      * The color rendered for the background of interior regions inside windows.
      */
-    public final static SystemColor window = new SystemColor((byte)WINDOW);
+    public static final SystemColor window = new SystemColor((byte)WINDOW);
 
     /**
      * The color rendered for the border around interior regions inside windows.
      */
-    public final static SystemColor windowBorder = new SystemColor((byte)WINDOW_BORDER);
+    public static final SystemColor windowBorder = new SystemColor((byte)WINDOW_BORDER);
 
     /**
      * The color rendered for text of interior regions inside windows.
      */
-    public final static SystemColor windowText = new SystemColor((byte)WINDOW_TEXT);
+    public static final SystemColor windowText = new SystemColor((byte)WINDOW_TEXT);
 
     /**
      * The color rendered for the background of menus.
      */
-    public final static SystemColor menu = new SystemColor((byte)MENU);
+    public static final SystemColor menu = new SystemColor((byte)MENU);
 
     /**
      * The color rendered for the text of menus.
      */
-    public final static SystemColor menuText = new SystemColor((byte)MENU_TEXT);
+    public static final SystemColor menuText = new SystemColor((byte)MENU_TEXT);
 
     /**
      * The color rendered for the background of text control objects, such as
      * textfields and comboboxes.
      */
-    public final static SystemColor text = new SystemColor((byte)TEXT);
+    public static final SystemColor text = new SystemColor((byte)TEXT);
 
     /**
      * The color rendered for the text of text control objects, such as textfields
      * and comboboxes.
      */
-    public final static SystemColor textText = new SystemColor((byte)TEXT_TEXT);
+    public static final SystemColor textText = new SystemColor((byte)TEXT_TEXT);
 
     /**
      * The color rendered for the background of selected items, such as in menus,
      * comboboxes, and text.
      */
-    public final static SystemColor textHighlight = new SystemColor((byte)TEXT_HIGHLIGHT);
+    public static final SystemColor textHighlight = new SystemColor((byte)TEXT_HIGHLIGHT);
 
     /**
      * The color rendered for the text of selected items, such as in menus, comboboxes,
      * and text.
      */
-    public final static SystemColor textHighlightText = new SystemColor((byte)TEXT_HIGHLIGHT_TEXT);
+    public static final SystemColor textHighlightText = new SystemColor((byte)TEXT_HIGHLIGHT_TEXT);
 
     /**
      * The color rendered for the text of inactive items, such as in menus.
      */
-    public final static SystemColor textInactiveText = new SystemColor((byte)TEXT_INACTIVE_TEXT);
+    public static final SystemColor textInactiveText = new SystemColor((byte)TEXT_INACTIVE_TEXT);
 
     /**
      * The color rendered for the background of control panels and control objects,
      * such as pushbuttons.
      */
-    public final static SystemColor control = new SystemColor((byte)CONTROL);
+    public static final SystemColor control = new SystemColor((byte)CONTROL);
 
     /**
      * The color rendered for the text of control panels and control objects,
      * such as pushbuttons.
      */
-    public final static SystemColor controlText = new SystemColor((byte)CONTROL_TEXT);
+    public static final SystemColor controlText = new SystemColor((byte)CONTROL_TEXT);
 
     /**
      * The color rendered for light areas of 3D control objects, such as pushbuttons.
      * This color is typically derived from the <code>control</code> background color
      * to provide a 3D effect.
      */
-    public final static SystemColor controlHighlight = new SystemColor((byte)CONTROL_HIGHLIGHT);
+    public static final SystemColor controlHighlight = new SystemColor((byte)CONTROL_HIGHLIGHT);
 
     /**
      * The color rendered for highlight areas of 3D control objects, such as pushbuttons.
      * This color is typically derived from the <code>control</code> background color
      * to provide a 3D effect.
      */
-    public final static SystemColor controlLtHighlight = new SystemColor((byte)CONTROL_LT_HIGHLIGHT);
+    public static final SystemColor controlLtHighlight = new SystemColor((byte)CONTROL_LT_HIGHLIGHT);
 
     /**
      * The color rendered for shadow areas of 3D control objects, such as pushbuttons.
      * This color is typically derived from the <code>control</code> background color
      * to provide a 3D effect.
      */
-    public final static SystemColor controlShadow = new SystemColor((byte)CONTROL_SHADOW);
+    public static final SystemColor controlShadow = new SystemColor((byte)CONTROL_SHADOW);
 
     /**
      * The color rendered for dark shadow areas on 3D control objects, such as pushbuttons.
      * This color is typically derived from the <code>control</code> background color
      * to provide a 3D effect.
      */
-    public final static SystemColor controlDkShadow = new SystemColor((byte)CONTROL_DK_SHADOW);
+    public static final SystemColor controlDkShadow = new SystemColor((byte)CONTROL_DK_SHADOW);
 
     /**
      * The color rendered for the background of scrollbars.
      */
-    public final static SystemColor scrollbar = new SystemColor((byte)SCROLLBAR);
+    public static final SystemColor scrollbar = new SystemColor((byte)SCROLLBAR);
 
     /**
      * The color rendered for the background of tooltips or spot help.
      */
-    public final static SystemColor info = new SystemColor((byte)INFO);
+    public static final SystemColor info = new SystemColor((byte)INFO);
 
     /**
      * The color rendered for the text of tooltips or spot help.
      */
-    public final static SystemColor infoText = new SystemColor((byte)INFO_TEXT);
+    public static final SystemColor infoText = new SystemColor((byte)INFO_TEXT);
 
     /*
      * JDK 1.1 serialVersionUID.
--- a/jdk/src/java.desktop/share/classes/java/awt/SystemTray.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/SystemTray.java	Wed Jul 05 20:52:37 2017 +0200
@@ -124,7 +124,7 @@
     private static SystemTray systemTray;
     private int currentIconID = 0; // each TrayIcon added gets a unique ID
 
-    transient private SystemTrayPeer peer;
+    private transient SystemTrayPeer peer;
 
     private static final TrayIcon[] EMPTY_TRAY_ARRAY = new TrayIcon[0];
 
--- a/jdk/src/java.desktop/share/classes/java/awt/TextComponent.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/TextComponent.java	Wed Jul 05 20:52:37 2017 +0200
@@ -110,7 +110,7 @@
     /**
      * A list of listeners that will receive events from this object.
      */
-    transient protected TextListener textListener;
+    protected transient TextListener textListener;
 
     /*
      * JDK 1.1 serialVersionUID
--- a/jdk/src/java.desktop/share/classes/java/awt/TexturePaintContext.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/TexturePaintContext.java	Wed Jul 05 20:52:37 2017 +0200
@@ -237,7 +237,7 @@
     private static WeakReference<Raster> xrgbRasRef;
     private static WeakReference<Raster> argbRasRef;
 
-    synchronized static WritableRaster makeRaster(ColorModel cm,
+    static synchronized WritableRaster makeRaster(ColorModel cm,
                                                   Raster srcRas,
                                                   int w, int h)
     {
@@ -273,7 +273,7 @@
         }
     }
 
-    synchronized static void dropRaster(ColorModel cm, Raster outRas) {
+    static synchronized void dropRaster(ColorModel cm, Raster outRas) {
         if (outRas == null) {
             return;
         }
@@ -286,7 +286,7 @@
 
     private static WeakReference<Raster> byteRasRef;
 
-    synchronized static WritableRaster makeByteRaster(Raster srcRas,
+    static synchronized WritableRaster makeByteRaster(Raster srcRas,
                                                       int w, int h)
     {
         if (byteRasRef != null) {
@@ -303,7 +303,7 @@
         return srcRas.createCompatibleWritableRaster(w, h);
     }
 
-    synchronized static void dropByteRaster(Raster outRas) {
+    static synchronized void dropByteRaster(Raster outRas) {
         if (outRas == null) {
             return;
         }
--- a/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1722,7 +1722,7 @@
      * Extracts a "pure" AWTEventListener from a AWTEventListenerProxy,
      * if the listener is proxied.
      */
-    static private AWTEventListener deProxyAWTEventListener(AWTEventListener l)
+    private static AWTEventListener deProxyAWTEventListener(AWTEventListener l)
     {
         AWTEventListener localL = l;
 
@@ -2007,7 +2007,7 @@
         }
     }
 
-    static private class ToolkitEventMulticaster extends AWTEventMulticaster
+    private static class ToolkitEventMulticaster extends AWTEventMulticaster
         implements AWTEventListener {
         // Implementation cloned from AWTEventMulticaster.
 
--- a/jdk/src/java.desktop/share/classes/java/awt/Transparency.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/Transparency.java	Wed Jul 05 20:52:37 2017 +0200
@@ -37,20 +37,20 @@
      * Represents image data that is guaranteed to be completely opaque,
      * meaning that all pixels have an alpha value of 1.0.
      */
-    @Native public final static int OPAQUE            = 1;
+    @Native public static final int OPAQUE            = 1;
 
     /**
      * Represents image data that is guaranteed to be either completely
      * opaque, with an alpha value of 1.0, or completely transparent,
      * with an alpha value of 0.0.
      */
-    @Native public final static int BITMASK = 2;
+    @Native public static final int BITMASK = 2;
 
     /**
      * Represents image data that contains or might contain arbitrary
      * alpha values between and including 0.0 and 1.0.
      */
-    @Native public final static int TRANSLUCENT        = 3;
+    @Native public static final int TRANSLUCENT        = 3;
 
     /**
      * Returns the type of this <code>Transparency</code>.
--- a/jdk/src/java.desktop/share/classes/java/awt/TrayIcon.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/TrayIcon.java	Wed Jul 05 20:52:37 2017 +0200
@@ -92,7 +92,7 @@
     private int id;
     private String actionCommand;
 
-    transient private TrayIconPeer peer;
+    private transient TrayIconPeer peer;
 
     transient MouseListener mouseListener;
     transient MouseMotionListener mouseMotionListener;
--- a/jdk/src/java.desktop/share/classes/java/awt/WaitDispatchSupport.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/WaitDispatchSupport.java	Wed Jul 05 20:52:37 2017 +0200
@@ -47,7 +47,7 @@
  */
 class WaitDispatchSupport implements SecondaryLoop {
 
-    private final static PlatformLogger log =
+    private static final PlatformLogger log =
         PlatformLogger.getLogger("java.awt.event.WaitDispatchSupport");
 
     private EventDispatchThread dispatchThread;
@@ -303,7 +303,7 @@
         return false;
     }
 
-    private final static Object getTreeLock() {
+    private static final Object getTreeLock() {
         return Component.LOCK;
     }
 
--- a/jdk/src/java.desktop/share/classes/java/awt/Window.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/Window.java	Wed Jul 05 20:52:37 2017 +0200
@@ -959,7 +959,7 @@
         }
     }
 
-    static private final AtomicBoolean
+    private static final AtomicBoolean
         beforeFirstWindowShown = new AtomicBoolean(true);
 
     final void closeSplashScreen() {
--- a/jdk/src/java.desktop/share/classes/java/awt/dnd/DropTargetDropEvent.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/DropTargetDropEvent.java	Wed Jul 05 20:52:37 2017 +0200
@@ -267,7 +267,7 @@
      * fields
      */
 
-    static final private Point  zero     = new Point(0,0);
+    private static final Point  zero     = new Point(0,0);
 
     /**
      * The location of the drag cursor's hotspot in Component coordinates.
--- a/jdk/src/java.desktop/share/classes/java/awt/dnd/InvalidDnDOperationException.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/InvalidDnDOperationException.java	Wed Jul 05 20:52:37 2017 +0200
@@ -38,7 +38,7 @@
 
     private static final long serialVersionUID = -6062568741193956678L;
 
-    static private String dft_msg = "The operation requested cannot be performed by the DnD system since it is not in the appropriate state";
+    private static String dft_msg = "The operation requested cannot be performed by the DnD system since it is not in the appropriate state";
 
     /**
      * Create a default Exception
--- a/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java	Wed Jul 05 20:52:37 2017 +0200
@@ -623,7 +623,7 @@
 
     /* if the button is an extra button and it is released or clicked then in Xsystem its state
        is not modified. Exclude this button number from ExtModifiers mask.*/
-    transient private boolean shouldExcludeButtonFromExtModifiers = false;
+    private transient boolean shouldExcludeButtonFromExtModifiers = false;
 
     /**
      * {@inheritDoc}
--- a/jdk/src/java.desktop/share/classes/java/awt/font/JavaAWTFontAccessImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/font/JavaAWTFontAccessImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,9 +26,9 @@
 package java.awt.font;
 
 import java.lang.reflect.Field;
-import sun.misc.JavaAWTFontAccess;
+import jdk.internal.misc.JavaAWTFontAccess;
 
-class JavaAWTFontAccessImpl implements sun.misc.JavaAWTFontAccess {
+class JavaAWTFontAccessImpl implements JavaAWTFontAccess {
 
     // java.awt.font.TextAttribute constants
     public Object getTextAttributeConstant(String name) {
--- a/jdk/src/java.desktop/share/classes/java/awt/font/NumericShaper.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/font/NumericShaper.java	Wed Jul 05 20:52:37 2017 +0200
@@ -31,7 +31,7 @@
 import java.util.Comparator;
 import java.util.EnumSet;
 import java.util.Set;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * The <code>NumericShaper</code> class is used to convert Latin-1 (European)
--- a/jdk/src/java.desktop/share/classes/java/awt/font/OpenType.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/font/OpenType.java	Wed Jul 05 20:52:37 2017 +0200
@@ -43,307 +43,307 @@
    * Character to glyph mapping.  Table tag "cmap" in the Open
    * Type Specification.
    */
-  public final static int       TAG_CMAP        = 0x636d6170;
+  public static final int       TAG_CMAP        = 0x636d6170;
 
   /**
    * Font header.  Table tag "head" in the Open
    * Type Specification.
    */
-  public final static int       TAG_HEAD        = 0x68656164;
+  public static final int       TAG_HEAD        = 0x68656164;
 
   /**
    * Naming table.  Table tag "name" in the Open
    * Type Specification.
    */
-  public final static int       TAG_NAME        = 0x6e616d65;
+  public static final int       TAG_NAME        = 0x6e616d65;
 
   /**
    * Glyph data.  Table tag "glyf" in the Open
    * Type Specification.
    */
-  public final static int       TAG_GLYF        = 0x676c7966;
+  public static final int       TAG_GLYF        = 0x676c7966;
 
   /**
    * Maximum profile.  Table tag "maxp" in the Open
    * Type Specification.
    */
-  public final static int       TAG_MAXP        = 0x6d617870;
+  public static final int       TAG_MAXP        = 0x6d617870;
 
   /**
    * CVT preprogram.  Table tag "prep" in the Open
    * Type Specification.
    */
-  public final static int       TAG_PREP        = 0x70726570;
+  public static final int       TAG_PREP        = 0x70726570;
 
   /**
    * Horizontal metrics.  Table tag "hmtx" in the Open
    * Type Specification.
    */
-  public final static int       TAG_HMTX        = 0x686d7478;
+  public static final int       TAG_HMTX        = 0x686d7478;
 
   /**
    * Kerning.  Table tag "kern" in the Open
    * Type Specification.
    */
-  public final static int       TAG_KERN        = 0x6b65726e;
+  public static final int       TAG_KERN        = 0x6b65726e;
 
   /**
    * Horizontal device metrics.  Table tag "hdmx" in the Open
    * Type Specification.
    */
-  public final static int       TAG_HDMX        = 0x68646d78;
+  public static final int       TAG_HDMX        = 0x68646d78;
 
   /**
    * Index to location.  Table tag "loca" in the Open
    * Type Specification.
    */
-  public final static int       TAG_LOCA        = 0x6c6f6361;
+  public static final int       TAG_LOCA        = 0x6c6f6361;
 
   /**
    * PostScript Information.  Table tag "post" in the Open
    * Type Specification.
    */
-  public final static int       TAG_POST        = 0x706f7374;
+  public static final int       TAG_POST        = 0x706f7374;
 
   /**
    * OS/2 and Windows specific metrics.  Table tag "OS/2"
    * in the Open Type Specification.
    */
-  public final static int       TAG_OS2 = 0x4f532f32;
+  public static final int       TAG_OS2 = 0x4f532f32;
 
   /**
    * Control value table.  Table tag "cvt "
    * in the Open Type Specification.
    */
-  public final static int       TAG_CVT = 0x63767420;
+  public static final int       TAG_CVT = 0x63767420;
 
   /**
    * Grid-fitting and scan conversion procedure.  Table tag
    * "gasp" in the Open Type Specification.
    */
-  public final static int       TAG_GASP        = 0x67617370;
+  public static final int       TAG_GASP        = 0x67617370;
 
   /**
    * Vertical device metrics.  Table tag "VDMX" in the Open
    * Type Specification.
    */
-  public final static int       TAG_VDMX        = 0x56444d58;
+  public static final int       TAG_VDMX        = 0x56444d58;
 
   /**
    * Vertical metrics.  Table tag "vmtx" in the Open
    * Type Specification.
    */
-  public final static int       TAG_VMTX        = 0x766d7478;
+  public static final int       TAG_VMTX        = 0x766d7478;
 
   /**
    * Vertical metrics header.  Table tag "vhea" in the Open
    * Type Specification.
    */
-  public final static int       TAG_VHEA        = 0x76686561;
+  public static final int       TAG_VHEA        = 0x76686561;
 
   /**
    * Horizontal metrics header.  Table tag "hhea" in the Open
    * Type Specification.
    */
-  public final static int       TAG_HHEA        = 0x68686561;
+  public static final int       TAG_HHEA        = 0x68686561;
 
   /**
    * Adobe Type 1 font data.  Table tag "typ1" in the Open
    * Type Specification.
    */
-  public final static int       TAG_TYP1        = 0x74797031;
+  public static final int       TAG_TYP1        = 0x74797031;
 
   /**
    * Baseline table.  Table tag "bsln" in the Open
    * Type Specification.
    */
-  public final static int       TAG_BSLN        = 0x62736c6e;
+  public static final int       TAG_BSLN        = 0x62736c6e;
 
   /**
    * Glyph substitution.  Table tag "GSUB" in the Open
    * Type Specification.
    */
-  public final static int       TAG_GSUB        = 0x47535542;
+  public static final int       TAG_GSUB        = 0x47535542;
 
   /**
    * Digital signature.  Table tag "DSIG" in the Open
    * Type Specification.
    */
-  public final static int       TAG_DSIG        = 0x44534947;
+  public static final int       TAG_DSIG        = 0x44534947;
 
   /**
    * Font program.   Table tag "fpgm" in the Open
    * Type Specification.
    */
-  public final static int       TAG_FPGM        = 0x6670676d;
+  public static final int       TAG_FPGM        = 0x6670676d;
 
   /**
    * Font variation.   Table tag "fvar" in the Open
    * Type Specification.
    */
-  public final static int       TAG_FVAR        = 0x66766172;
+  public static final int       TAG_FVAR        = 0x66766172;
 
   /**
    * Glyph variation.  Table tag "gvar" in the Open
    * Type Specification.
    */
-  public final static int       TAG_GVAR        = 0x67766172;
+  public static final int       TAG_GVAR        = 0x67766172;
 
   /**
    * Compact font format (Type1 font).  Table tag
    * "CFF " in the Open Type Specification.
    */
-  public final static int       TAG_CFF = 0x43464620;
+  public static final int       TAG_CFF = 0x43464620;
 
   /**
    * Multiple master supplementary data.  Table tag
    * "MMSD" in the Open Type Specification.
    */
-  public final static int       TAG_MMSD        = 0x4d4d5344;
+  public static final int       TAG_MMSD        = 0x4d4d5344;
 
   /**
    * Multiple master font metrics.  Table tag
    * "MMFX" in the Open Type Specification.
    */
-  public final static int       TAG_MMFX        = 0x4d4d4658;
+  public static final int       TAG_MMFX        = 0x4d4d4658;
 
   /**
    * Baseline data.  Table tag "BASE" in the Open
    * Type Specification.
    */
-  public final static int       TAG_BASE        = 0x42415345;
+  public static final int       TAG_BASE        = 0x42415345;
 
   /**
    * Glyph definition.  Table tag "GDEF" in the Open
    * Type Specification.
    */
-  public final static int       TAG_GDEF        = 0x47444546;
+  public static final int       TAG_GDEF        = 0x47444546;
 
   /**
    * Glyph positioning.  Table tag "GPOS" in the Open
    * Type Specification.
    */
-  public final static int       TAG_GPOS        = 0x47504f53;
+  public static final int       TAG_GPOS        = 0x47504f53;
 
   /**
    * Justification.  Table tag "JSTF" in the Open
    * Type Specification.
    */
-  public final static int       TAG_JSTF        = 0x4a535446;
+  public static final int       TAG_JSTF        = 0x4a535446;
 
   /**
    * Embedded bitmap data.  Table tag "EBDT" in the Open
    * Type Specification.
    */
-  public final static int       TAG_EBDT        = 0x45424454;
+  public static final int       TAG_EBDT        = 0x45424454;
 
   /**
    * Embedded bitmap location.  Table tag "EBLC" in the Open
    * Type Specification.
    */
-  public final static int       TAG_EBLC        = 0x45424c43;
+  public static final int       TAG_EBLC        = 0x45424c43;
 
   /**
    * Embedded bitmap scaling.  Table tag "EBSC" in the Open
    * Type Specification.
    */
-  public final static int       TAG_EBSC        = 0x45425343;
+  public static final int       TAG_EBSC        = 0x45425343;
 
   /**
    * Linear threshold.  Table tag "LTSH" in the Open
    * Type Specification.
    */
-  public final static int       TAG_LTSH        = 0x4c545348;
+  public static final int       TAG_LTSH        = 0x4c545348;
 
   /**
    * PCL 5 data.  Table tag "PCLT" in the Open
    * Type Specification.
    */
-  public final static int       TAG_PCLT        = 0x50434c54;
+  public static final int       TAG_PCLT        = 0x50434c54;
 
   /**
    * Accent attachment.  Table tag "acnt" in the Open
    * Type Specification.
    */
-  public final static int       TAG_ACNT        = 0x61636e74;
+  public static final int       TAG_ACNT        = 0x61636e74;
 
   /**
    * Axis variation.  Table tag "avar" in the Open
    * Type Specification.
    */
-  public final static int       TAG_AVAR        = 0x61766172;
+  public static final int       TAG_AVAR        = 0x61766172;
 
   /**
    * Bitmap data.  Table tag "bdat" in the Open
    * Type Specification.
    */
-  public final static int       TAG_BDAT        = 0x62646174;
+  public static final int       TAG_BDAT        = 0x62646174;
 
   /**
    * Bitmap location.  Table tag "bloc" in the Open
    * Type Specification.
    */
-  public final static int       TAG_BLOC        = 0x626c6f63;
+  public static final int       TAG_BLOC        = 0x626c6f63;
 
    /**
     * CVT variation.  Table tag "cvar" in the Open
     * Type Specification.
     */
-  public final static int       TAG_CVAR        = 0x63766172;
+  public static final int       TAG_CVAR        = 0x63766172;
 
   /**
    * Feature name.  Table tag "feat" in the Open
     * Type Specification.
    */
-  public final static int       TAG_FEAT        = 0x66656174;
+  public static final int       TAG_FEAT        = 0x66656174;
 
   /**
    * Font descriptors.  Table tag "fdsc" in the Open
    * Type Specification.
    */
-  public final static int       TAG_FDSC        = 0x66647363;
+  public static final int       TAG_FDSC        = 0x66647363;
 
   /**
    * Font metrics.  Table tag "fmtx" in the Open
    * Type Specification.
    */
-  public final static int       TAG_FMTX        = 0x666d7478;
+  public static final int       TAG_FMTX        = 0x666d7478;
 
   /**
    * Justification.  Table tag "just" in the Open
    * Type Specification.
    */
-  public final static int       TAG_JUST        = 0x6a757374;
+  public static final int       TAG_JUST        = 0x6a757374;
 
   /**
    * Ligature caret.   Table tag "lcar" in the Open
    * Type Specification.
    */
-  public final static int       TAG_LCAR        = 0x6c636172;
+  public static final int       TAG_LCAR        = 0x6c636172;
 
   /**
    * Glyph metamorphosis.  Table tag "mort" in the Open
    * Type Specification.
    */
-  public final static int       TAG_MORT        = 0x6d6f7274;
+  public static final int       TAG_MORT        = 0x6d6f7274;
 
   /**
    * Optical bounds.  Table tag "opbd" in the Open
    * Type Specification.
    */
-  public final static int       TAG_OPBD        = 0x6F706264;
+  public static final int       TAG_OPBD        = 0x6F706264;
 
   /**
    * Glyph properties.  Table tag "prop" in the Open
    * Type Specification.
    */
-  public final static int       TAG_PROP        = 0x70726f70;
+  public static final int       TAG_PROP        = 0x70726f70;
 
   /**
    * Tracking.  Table tag "trak" in the Open
    * Type Specification.
    */
-  public final static int       TAG_TRAK        = 0x7472616b;
+  public static final int       TAG_TRAK        = 0x7472616b;
 
   /**
    * Returns the version of the <code>OpenType</code> font.
--- a/jdk/src/java.desktop/share/classes/java/awt/font/TextAttribute.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/font/TextAttribute.java	Wed Jul 05 20:52:37 2017 +0200
@@ -44,7 +44,7 @@
 import java.text.AttributedCharacterIterator.Attribute;
 import java.util.Map;
 import java.util.HashMap;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * The <code>TextAttribute</code> class defines attribute keys and
--- a/jdk/src/java.desktop/share/classes/java/awt/geom/Arc2D.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/geom/Arc2D.java	Wed Jul 05 20:52:37 2017 +0200
@@ -60,7 +60,7 @@
      * connecting the two ends of the arc segment.
      * @since 1.2
      */
-    public final static int OPEN = 0;
+    public static final int OPEN = 0;
 
     /**
      * The closure type for an arc closed by drawing a straight
@@ -68,7 +68,7 @@
      * arc segment.
      * @since 1.2
      */
-    public final static int CHORD = 1;
+    public static final int CHORD = 1;
 
     /**
      * The closure type for an arc closed by drawing straight line
@@ -76,7 +76,7 @@
      * of the full ellipse and from that point to the end of the arc segment.
      * @since 1.2
      */
-    public final static int PIE = 2;
+    public static final int PIE = 2;
 
     /**
      * This class defines an arc specified in {@code float} precision.
--- a/jdk/src/java.desktop/share/classes/java/awt/geom/Path2D.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/geom/Path2D.java	Wed Jul 05 20:52:37 2017 +0200
@@ -2675,7 +2675,7 @@
         }
     }
 
-    static abstract class Iterator implements PathIterator {
+    abstract static class Iterator implements PathIterator {
         int typeIdx;
         int pointIdx;
         Path2D path;
--- a/jdk/src/java.desktop/share/classes/java/awt/im/InputMethodHighlight.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/im/InputMethodHighlight.java	Wed Jul 05 20:52:37 2017 +0200
@@ -71,36 +71,36 @@
     /**
      * Constant for the raw text state.
      */
-    public final static int RAW_TEXT = 0;
+    public static final int RAW_TEXT = 0;
 
     /**
      * Constant for the converted text state.
      */
-    public final static int CONVERTED_TEXT = 1;
+    public static final int CONVERTED_TEXT = 1;
 
 
     /**
      * Constant for the default highlight for unselected raw text.
      */
-    public final static InputMethodHighlight UNSELECTED_RAW_TEXT_HIGHLIGHT =
+    public static final InputMethodHighlight UNSELECTED_RAW_TEXT_HIGHLIGHT =
         new InputMethodHighlight(false, RAW_TEXT);
 
     /**
      * Constant for the default highlight for selected raw text.
      */
-    public final static InputMethodHighlight SELECTED_RAW_TEXT_HIGHLIGHT =
+    public static final InputMethodHighlight SELECTED_RAW_TEXT_HIGHLIGHT =
         new InputMethodHighlight(true, RAW_TEXT);
 
     /**
      * Constant for the default highlight for unselected converted text.
      */
-    public final static InputMethodHighlight UNSELECTED_CONVERTED_TEXT_HIGHLIGHT =
+    public static final InputMethodHighlight UNSELECTED_CONVERTED_TEXT_HIGHLIGHT =
         new InputMethodHighlight(false, CONVERTED_TEXT);
 
     /**
      * Constant for the default highlight for selected converted text.
      */
-    public final static InputMethodHighlight SELECTED_CONVERTED_TEXT_HIGHLIGHT =
+    public static final InputMethodHighlight SELECTED_CONVERTED_TEXT_HIGHLIGHT =
         new InputMethodHighlight(true, CONVERTED_TEXT);
 
 
--- a/jdk/src/java.desktop/share/classes/java/awt/image/BufferedImage.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/BufferedImage.java	Wed Jul 05 20:52:37 2017 +0200
@@ -281,7 +281,7 @@
     private static final int DCM_BGR_BLU_MASK = 0xff0000;
 
 
-    static private native void initIDs();
+    private static native void initIDs();
     static {
         ColorModel.loadLibraries();
         initIDs();
--- a/jdk/src/java.desktop/share/classes/java/awt/image/ColorModel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/ColorModel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -403,7 +403,7 @@
      * @return <code>true</code> if alpha is supported in this
      * <code>ColorModel</code>; <code>false</code> otherwise.
      */
-    final public boolean hasAlpha() {
+    public final boolean hasAlpha() {
         return supportsAlpha;
     }
 
@@ -419,7 +419,7 @@
      *          in the pixel values to be translated by this
      *          <code>ColorModel</code>; <code>false</code> otherwise.
      */
-    final public boolean isAlphaPremultiplied() {
+    public final boolean isAlphaPremultiplied() {
         return isAlphaPremultiplied;
     }
 
@@ -430,7 +430,7 @@
      * @return the transfer type.
      * @since 1.3
      */
-    final public int getTransferType() {
+    public final int getTransferType() {
         return transferType;
     }
 
@@ -1512,7 +1512,7 @@
      * @return the <code>ColorSpace</code> of this
      * <code>ColorModel</code>.
      */
-    final public ColorSpace getColorSpace() {
+    public final ColorSpace getColorSpace() {
         return colorSpace;
     }
 
--- a/jdk/src/java.desktop/share/classes/java/awt/image/DirectColorModel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/DirectColorModel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -266,7 +266,7 @@
      * @return the mask, which indicates which bits of the <code>int</code>
      *         pixel representation contain the red color sample.
      */
-    final public int getRedMask() {
+    public final int getRedMask() {
         return maskArray[0];
     }
 
@@ -276,7 +276,7 @@
      * @return the mask, which indicates which bits of the <code>int</code>
      *         pixel representation contain the green color sample.
      */
-    final public int getGreenMask() {
+    public final int getGreenMask() {
         return maskArray[1];
     }
 
@@ -286,7 +286,7 @@
      * @return the mask, which indicates which bits of the <code>int</code>
      *         pixel representation contain the blue color sample.
      */
-    final public int getBlueMask() {
+    public final int getBlueMask() {
         return maskArray[2];
     }
 
@@ -296,7 +296,7 @@
      * @return the mask, which indicates which bits of the <code>int</code>
      *         pixel representation contain the alpha sample.
      */
-    final public int getAlphaMask() {
+    public final int getAlphaMask() {
         if (supportsAlpha) {
             return maskArray[3];
         } else {
@@ -365,7 +365,7 @@
      * @return the red color component for the specified pixel, from
      *         0 to 255 in the sRGB <code>ColorSpace</code>.
      */
-    final public int getRed(int pixel) {
+    public final int getRed(int pixel) {
         if (is_sRGB) {
             return getsRGBComponentFromsRGB(pixel, 0);
         } else if (is_LinearRGB) {
@@ -388,7 +388,7 @@
      * @return the green color component for the specified pixel, from
      *         0 to 255 in the sRGB <code>ColorSpace</code>.
      */
-    final public int getGreen(int pixel) {
+    public final int getGreen(int pixel) {
         if (is_sRGB) {
             return getsRGBComponentFromsRGB(pixel, 1);
         } else if (is_LinearRGB) {
@@ -411,7 +411,7 @@
      * @return the blue color component for the specified pixel, from
      *         0 to 255 in the sRGB <code>ColorSpace</code>.
      */
-    final public int getBlue(int pixel) {
+    public final int getBlue(int pixel) {
         if (is_sRGB) {
             return getsRGBComponentFromsRGB(pixel, 2);
         } else if (is_LinearRGB) {
@@ -428,7 +428,7 @@
      * @return the value of the alpha component of <code>pixel</code>
      *         from 0 to 255.
      */
-    final public int getAlpha(int pixel) {
+    public final int getAlpha(int pixel) {
         if (!supportsAlpha) return 255;
         int a = ((pixel & maskArray[3]) >>> maskOffsets[3]);
         if (scaleFactors[3] != 1.0f) {
@@ -450,7 +450,7 @@
      *         pixel.
      * @see ColorModel#getRGBdefault
      */
-    final public int getRGB(int pixel) {
+    public final int getRGB(int pixel) {
         if (is_sRGB || is_LinearRGB) {
             return (getAlpha(pixel) << 24)
                 | (getRed(pixel) << 16)
@@ -923,7 +923,7 @@
      * @return an array containing the color and alpha components of the
      * specified pixel starting at the specified offset.
      */
-    final public int[] getComponents(int pixel, int[] components, int offset) {
+    public final int[] getComponents(int pixel, int[] components, int offset) {
         if (components == null) {
             components = new int[offset+numComponents];
         }
@@ -974,7 +974,7 @@
      *            <code>transferType</code> is not supported by this
      *            color model
      */
-    final public int[] getComponents(Object pixel, int[] components,
+    public final int[] getComponents(Object pixel, int[] components,
                                      int offset) {
         int intpixel=0;
         switch (transferType) {
@@ -1010,7 +1010,7 @@
      * @see WritableRaster
      * @see SampleModel
      */
-    final public WritableRaster createCompatibleWritableRaster (int w,
+    public final WritableRaster createCompatibleWritableRaster (int w,
                                                                 int h) {
         if ((w <= 0) || (h <= 0)) {
             throw new IllegalArgumentException("Width (" + w + ") and height (" + h +
@@ -1173,7 +1173,7 @@
      *            <code>transferType</code> is not supported by this
      *            color model
      */
-    final public ColorModel coerceData (WritableRaster raster,
+    public final ColorModel coerceData (WritableRaster raster,
                                         boolean isAlphaPremultiplied)
     {
         if (!supportsAlpha ||
--- a/jdk/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -135,7 +135,7 @@
     private static int[] opaqueBits = {8, 8, 8};
     private static int[] alphaBits = {8, 8, 8, 8};
 
-    static private native void initIDs();
+    private static native void initIDs();
     static {
         ColorModel.loadLibraries();
         initIDs();
@@ -634,7 +634,7 @@
      * <code>IndexColorModel</code>.
      * @return the size of the color and alpha component arrays.
      */
-    final public int getMapSize() {
+    public final int getMapSize() {
         return map_size;
     }
 
@@ -650,7 +650,7 @@
      *         <code>IndexColorModel</code> object, or -1 if there
      *         is no such pixel
      */
-    final public int getTransparentPixel() {
+    public final int getTransparentPixel() {
         return transparent_index;
     }
 
@@ -661,7 +661,7 @@
      * @param r the specified array into which the elements of the
      *      array of red color components are copied
      */
-    final public void getReds(byte r[]) {
+    public final void getReds(byte r[]) {
         for (int i = 0; i < map_size; i++) {
             r[i] = (byte) (rgb[i] >> 16);
         }
@@ -674,7 +674,7 @@
      * @param g the specified array into which the elements of the
      *      array of green color components are copied
      */
-    final public void getGreens(byte g[]) {
+    public final void getGreens(byte g[]) {
         for (int i = 0; i < map_size; i++) {
             g[i] = (byte) (rgb[i] >> 8);
         }
@@ -687,7 +687,7 @@
      * @param b the specified array into which the elements of the
      *      array of blue color components are copied
      */
-    final public void getBlues(byte b[]) {
+    public final void getBlues(byte b[]) {
         for (int i = 0; i < map_size; i++) {
             b[i] = (byte) rgb[i];
         }
@@ -700,7 +700,7 @@
      * @param a the specified array into which the elements of the
      *      array of alpha components are copied
      */
-    final public void getAlphas(byte a[]) {
+    public final void getAlphas(byte a[]) {
         for (int i = 0; i < map_size; i++) {
             a[i] = (byte) (rgb[i] >> 24);
         }
@@ -717,7 +717,7 @@
      *        values from this array of color and alpha components
      *        are copied.
      */
-    final public void getRGBs(int rgb[]) {
+    public final void getRGBs(int rgb[]) {
         System.arraycopy(this.rgb, 0, rgb, 0, map_size);
     }
 
@@ -776,7 +776,7 @@
      * @param pixel the specified pixel
      * @return the value of the red color component for the specified pixel
      */
-    final public int getRed(int pixel) {
+    public final int getRed(int pixel) {
         return (rgb[pixel & pixel_mask] >> 16) & 0xff;
     }
 
@@ -791,7 +791,7 @@
      * @param pixel the specified pixel
      * @return the value of the green color component for the specified pixel
      */
-    final public int getGreen(int pixel) {
+    public final int getGreen(int pixel) {
         return (rgb[pixel & pixel_mask] >> 8) & 0xff;
     }
 
@@ -806,7 +806,7 @@
      * @param pixel the specified pixel
      * @return the value of the blue color component for the specified pixel
      */
-    final public int getBlue(int pixel) {
+    public final int getBlue(int pixel) {
         return rgb[pixel & pixel_mask] & 0xff;
     }
 
@@ -819,7 +819,7 @@
      * @param pixel the specified pixel
      * @return the value of the alpha component for the specified pixel
      */
-    final public int getAlpha(int pixel) {
+    public final int getAlpha(int pixel) {
         return (rgb[pixel & pixel_mask] >> 24) & 0xff;
     }
 
@@ -834,7 +834,7 @@
      * @return the color and alpha components of the specified pixel
      * @see ColorModel#getRGBdefault
      */
-    final public int getRGB(int pixel) {
+    public final int getRGB(int pixel) {
         return rgb[pixel & pixel_mask];
     }
 
--- a/jdk/src/java.desktop/share/classes/java/awt/image/Kernel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/Kernel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -83,7 +83,7 @@
      * Returns the X origin of this <code>Kernel</code>.
      * @return the X origin.
      */
-    final public int getXOrigin(){
+    public final int getXOrigin(){
         return xOrigin;
     }
 
@@ -91,7 +91,7 @@
      * Returns the Y origin of this <code>Kernel</code>.
      * @return the Y origin.
      */
-    final public int getYOrigin() {
+    public final int getYOrigin() {
         return yOrigin;
     }
 
@@ -99,7 +99,7 @@
      * Returns the width of this <code>Kernel</code>.
      * @return the width of this <code>Kernel</code>.
      */
-    final public int getWidth() {
+    public final int getWidth() {
         return width;
     }
 
@@ -107,7 +107,7 @@
      * Returns the height of this <code>Kernel</code>.
      * @return the height of this <code>Kernel</code>.
      */
-    final public int getHeight() {
+    public final int getHeight() {
         return height;
     }
 
@@ -123,7 +123,7 @@
      * @throws IllegalArgumentException if <code>data</code> is less
      *         than the size of this <code>Kernel</code>
      */
-    final public float[] getKernelData(float[] data) {
+    public final float[] getKernelData(float[] data) {
         if (data == null) {
             data = new float[this.data.length];
         }
--- a/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -240,7 +240,7 @@
      *         <code>PackedColorModel</code> or if <code>index</code> is
      *         less than zero
      */
-    final public int getMask(int index) {
+    public final int getMask(int index) {
         return maskArray[index];
     }
 
@@ -251,7 +251,7 @@
      *         <code>int</code> pixel
      *         representation contain the color or alpha samples.
      */
-    final public int[] getMasks() {
+    public final int[] getMasks() {
         return maskArray.clone();
     }
 
@@ -415,7 +415,7 @@
         return true;
     }
 
-    private final static int[] createBitsArray(int[]colorMaskArray,
+    private static final int[] createBitsArray(int[]colorMaskArray,
                                                int alphaMask) {
         int numColors = colorMaskArray.length;
         int numAlpha = (alphaMask == 0 ? 0 : 1);
@@ -438,7 +438,7 @@
         return arr;
     }
 
-    private final static int[] createBitsArray(int rmask, int gmask, int bmask,
+    private static final int[] createBitsArray(int rmask, int gmask, int bmask,
                                          int amask) {
         int[] arr = new int[3 + (amask == 0 ? 0 : 1)];
         arr[0] = countBits(rmask);
@@ -466,7 +466,7 @@
         return arr;
     }
 
-    private final static int countBits(int mask) {
+    private static final int countBits(int mask) {
         int count = 0;
         if (mask != 0) {
             while ((mask & 1) == 0) {
--- a/jdk/src/java.desktop/share/classes/java/awt/image/Raster.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/Raster.java	Wed Jul 05 20:52:37 2017 +0200
@@ -167,7 +167,7 @@
     /** The parent of this Raster, or null. */
     protected Raster parent;
 
-    static private native void initIDs();
+    private static native void initIDs();
     static {
         ColorModel.loadLibraries();
         initIDs();
@@ -1139,7 +1139,7 @@
      * @return the X translation from the coordinate space of the
      *         Raster's SampleModel to that of the Raster.
      */
-    final public int getSampleModelTranslateX() {
+    public final int getSampleModelTranslateX() {
         return sampleModelTranslateX;
     }
 
@@ -1151,7 +1151,7 @@
      * @return the Y translation from the coordinate space of the
      *         Raster's SampleModel to that of the Raster.
      */
-    final public int getSampleModelTranslateY() {
+    public final int getSampleModelTranslateY() {
         return sampleModelTranslateY;
     }
 
@@ -1360,35 +1360,35 @@
     /** Returns the minimum valid X coordinate of the Raster.
      *  @return the minimum x coordinate of this <code>Raster</code>.
      */
-    final public int getMinX() {
+    public final int getMinX() {
         return minX;
     }
 
     /** Returns the minimum valid Y coordinate of the Raster.
      *  @return the minimum y coordinate of this <code>Raster</code>.
      */
-    final public int getMinY() {
+    public final int getMinY() {
         return minY;
     }
 
     /** Returns the width in pixels of the Raster.
      *  @return the width of this <code>Raster</code>.
      */
-    final public int getWidth() {
+    public final int getWidth() {
         return width;
     }
 
     /** Returns the height in pixels of the Raster.
      *  @return the height of this <code>Raster</code>.
      */
-    final public int getHeight() {
+    public final int getHeight() {
         return height;
     }
 
     /** Returns the number of bands (samples per pixel) in this Raster.
      *  @return the number of bands of this <code>Raster</code>.
      */
-    final public int getNumBands() {
+    public final int getNumBands() {
         return numBands;
     }
 
@@ -1403,7 +1403,7 @@
      *  as the storage data type of the DataBuffer.
      *  @return the number of data elements.
      */
-    final public int getNumDataElements() {
+    public final int getNumDataElements() {
         return sampleModel.getNumDataElements();
     }
 
@@ -1419,7 +1419,7 @@
      *  be one of the types defined in DataBuffer.
      *  @return this transfer type.
      */
-    final public int getTransferType() {
+    public final int getTransferType() {
         return sampleModel.getTransferType();
     }
 
--- a/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java	Wed Jul 05 20:52:37 2017 +0200
@@ -142,7 +142,7 @@
      *        this <code>RescaleOp</code>
      * @return the scale factors of this <code>RescaleOp</code>.
      */
-    final public float[] getScaleFactors (float scaleFactors[]) {
+    public final float[] getScaleFactors (float scaleFactors[]) {
         if (scaleFactors == null) {
             return this.scaleFactors.clone();
         }
@@ -160,7 +160,7 @@
      *        this <code>RescaleOp</code>
      * @return the offsets of this <code>RescaleOp</code>.
      */
-    final public float[] getOffsets(float offsets[]) {
+    public final float[] getOffsets(float offsets[]) {
         if (offsets == null) {
             return this.offsets.clone();
         }
@@ -176,7 +176,7 @@
      * @return the number of scaling factors and offsets of this
      *         <code>RescaleOp</code>.
      */
-    final public int getNumFactors() {
+    public final int getNumFactors() {
         return length;
     }
 
--- a/jdk/src/java.desktop/share/classes/java/awt/image/SampleModel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/SampleModel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -99,7 +99,7 @@
      */
     protected int dataType;
 
-    static private native void initIDs();
+    private static native void initIDs();
     static {
         ColorModel.loadLibraries();
         initIDs();
@@ -153,7 +153,7 @@
      *  @return the width in pixels of the region of image data
      *          that this <code>SampleModel</code> describes.
      */
-    final public int getWidth() {
+    public final int getWidth() {
          return width;
     }
 
@@ -161,7 +161,7 @@
      *  @return the height in pixels of the region of image data
      *          that this <code>SampleModel</code> describes.
      */
-    final public int getHeight() {
+    public final int getHeight() {
          return height;
     }
 
@@ -169,7 +169,7 @@
      *  @return the number of bands of image data that this
      *          <code>SampleModel</code> describes.
      */
-    final public int getNumBands() {
+    public final int getNumBands() {
          return numBands;
     }
 
@@ -193,7 +193,7 @@
     /** Returns the data type of the DataBuffer storing the pixel data.
      *  @return the data type.
      */
-    final public int getDataType() {
+    public final int getDataType() {
         return dataType;
     }
 
--- a/jdk/src/java.desktop/share/classes/java/beans/BeanInfo.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/beans/BeanInfo.java	Wed Jul 05 20:52:37 2017 +0200
@@ -159,20 +159,20 @@
     /**
      * Constant to indicate a 16 x 16 color icon.
      */
-    final static int ICON_COLOR_16x16 = 1;
+    static final int ICON_COLOR_16x16 = 1;
 
     /**
      * Constant to indicate a 32 x 32 color icon.
      */
-    final static int ICON_COLOR_32x32 = 2;
+    static final int ICON_COLOR_32x32 = 2;
 
     /**
      * Constant to indicate a 16 x 16 monochrome icon.
      */
-    final static int ICON_MONO_16x16 = 3;
+    static final int ICON_MONO_16x16 = 3;
 
     /**
      * Constant to indicate a 32 x 32 monochrome icon.
      */
-    final static int ICON_MONO_32x32 = 4;
+    static final int ICON_MONO_32x32 = 4;
 }
--- a/jdk/src/java.desktop/share/classes/java/beans/Introspector.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/beans/Introspector.java	Wed Jul 05 20:52:37 2017 +0200
@@ -47,9 +47,9 @@
 import java.util.EventObject;
 import java.util.List;
 import java.util.TreeMap;
-import sun.misc.JavaBeansAccess;
 
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaBeansAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.reflect.misc.ReflectUtil;
 
 /**
@@ -102,17 +102,17 @@
      * Flag to indicate to use of all beaninfo.
      * @since 1.2
      */
-    public final static int USE_ALL_BEANINFO           = 1;
+    public static final int USE_ALL_BEANINFO           = 1;
     /**
      * Flag to indicate to ignore immediate beaninfo.
      * @since 1.2
      */
-    public final static int IGNORE_IMMEDIATE_BEANINFO  = 2;
+    public static final int IGNORE_IMMEDIATE_BEANINFO  = 2;
     /**
      * Flag to indicate to ignore all beaninfo.
      * @since 1.2
      */
-    public final static int IGNORE_ALL_BEANINFO        = 3;
+    public static final int IGNORE_ALL_BEANINFO        = 3;
 
     // Static Caches to speed up introspection.
     private static final WeakCache<Class<?>, Method[]> declaredMethodCache = new WeakCache<>();
@@ -139,7 +139,7 @@
     // events maps from String names to EventSetDescriptors
     private Map<String, EventSetDescriptor> events;
 
-    private final static EventSetDescriptor[] EMPTY_EVENTSETDESCRIPTORS = new EventSetDescriptor[0];
+    private static final EventSetDescriptor[] EMPTY_EVENTSETDESCRIPTORS = new EventSetDescriptor[0];
 
     static final String ADD_PREFIX = "add";
     static final String REMOVE_PREFIX = "remove";
--- a/jdk/src/java.desktop/share/classes/java/beans/MetaData.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/java/beans/MetaData.java	Wed Jul 05 20:52:37 2017 +0200
@@ -356,7 +356,7 @@
  *
  * @author Sergey A. Malenkov
  */
-private static abstract class java_util_Collections extends PersistenceDelegate {
+private abstract static class java_util_Collections extends PersistenceDelegate {
     protected boolean mutatesTo(Object oldInstance, Object newInstance) {
         if (!super.mutatesTo(oldInstance, newInstance)) {
             return false;
@@ -1319,7 +1319,7 @@
     }
 
     @SuppressWarnings("rawtypes")
-    public synchronized static PersistenceDelegate getPersistenceDelegate(Class type) {
+    public static synchronized PersistenceDelegate getPersistenceDelegate(Class type) {
         if (type == null) {
             return nullPersistenceDelegate;
         }
--- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRole.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRole.java	Wed Jul 05 20:52:37 2017 +0200
@@ -588,7 +588,7 @@
      *
      * @since 1.5
      */
-    static public final AccessibleRole EDITBAR =
+    public static final AccessibleRole EDITBAR =
         new AccessibleRole("editbar");
 
     /**
@@ -597,7 +597,7 @@
      *
      * @since 1.5
      */
-    static public final AccessibleRole PROGRESS_MONITOR =
+    public static final AccessibleRole PROGRESS_MONITOR =
         new AccessibleRole("progressMonitor");
 
 
--- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleState.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleState.java	Wed Jul 05 20:52:37 2017 +0200
@@ -353,7 +353,7 @@
      *
      * @since 1.5
      */
-    static public final AccessibleState TRUNCATED
+    public static final AccessibleState TRUNCATED
            =  new AccessibleState("truncated");
 
     /**
--- a/jdk/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataFormatImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataFormatImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1252,7 +1252,7 @@
 
     // Standard format descriptor
 
-    private synchronized static void createStandardFormat() {
+    private static synchronized void createStandardFormat() {
         if (standardFormat == null) {
             standardFormat = new StandardMetadataFormat();
         }
--- a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/MediaSize.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/MediaSize.java	Wed Jul 05 20:52:37 2017 +0200
@@ -288,7 +288,7 @@
      * Class MediaSize.ISO includes {@link MediaSize MediaSize} values for ISO
      * media.
      */
-    public final static class ISO {
+    public static final class ISO {
         /**
          * Specifies the ISO A0 size, 841 mm by 1189 mm.
          */
@@ -437,7 +437,7 @@
      * Class MediaSize.JIS includes {@link MediaSize MediaSize} values for JIS
      * (Japanese) media.      *
      */
-    public final static class JIS {
+    public static final class JIS {
 
         /**
          * Specifies the JIS B0 size, 1030 mm by 1456 mm.
@@ -601,7 +601,7 @@
      * Class MediaSize.NA includes {@link MediaSize MediaSize} values for North
      * American media.
      */
-    public final static class NA {
+    public static final class NA {
 
         /**
          * Specifies the North American letter size, 8.5 inches by 11 inches.
@@ -721,7 +721,7 @@
      * Class MediaSize.Engineering includes {@link MediaSize MediaSize} values
      * for engineering media.
      */
-    public final static class Engineering {
+    public static final class Engineering {
 
         /**
          * Specifies the engineering A size, 8.5 inch by 11 inch.
@@ -764,7 +764,7 @@
      * Class MediaSize.Other includes {@link MediaSize MediaSize} values for
      * miscellaneous media.
      */
-    public final static class Other {
+    public static final class Other {
         /**
          * Specifies the executive size, 7.25 inches by 10.5 inches.
          */
--- a/jdk/src/java.desktop/share/classes/javax/sound/midi/MetaMessage.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/MetaMessage.java	Wed Jul 05 20:52:37 2017 +0200
@@ -214,7 +214,7 @@
         return length;
     }
 
-    private final static long mask = 0x7F;
+    private static final long mask = 0x7F;
 
     private void writeVarInt(byte[] data, int off, long value) {
         int shift=63; // number of bitwise left-shifts of mask
--- a/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiDevice.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiDevice.java	Wed Jul 05 20:52:37 2017 +0200
@@ -335,7 +335,7 @@
         /**
          * Obtains the version of the device.
          *
-         * @return textual version information for the device.
+         * @return textual version information for the device
          */
         public final String getVersion() {
             return version;
--- a/jdk/src/java.desktop/share/classes/javax/sound/midi/Synthesizer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/Synthesizer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -344,7 +344,7 @@
      * Opens the receiver.
      *
      * @throws MidiUnavailableException if the receiver is cannot be opened,
-     *         usually because the MIDI device is in use by another application.
+     *         usually because the MIDI device is in use by another application
      * @throws SecurityException if the receiver cannot be opened due to
      *         security restrictions
      */
--- a/jdk/src/java.desktop/share/classes/javax/sound/midi/SysexMessage.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/SysexMessage.java	Wed Jul 05 20:52:37 2017 +0200
@@ -124,7 +124,7 @@
      *         including the status byte; it should be non-negative and less
      *         than or equal to {@code data.length}
      * @throws InvalidMidiDataException if the parameter values do not specify a
-     *         valid MIDI meta message.
+     *         valid MIDI meta message
      * @see #setMessage(byte[], int)
      * @see #setMessage(int, byte[], int)
      * @see #getData()
--- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioInputStream.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioInputStream.java	Wed Jul 05 20:52:37 2017 +0200
@@ -392,7 +392,7 @@
      * Marks the current position in this audio input stream.
      *
      * @param  readlimit the maximum number of bytes that can be read before the
-     *         mark position becomes invalid.
+     *         mark position becomes invalid
      * @see #reset
      * @see #markSupported
      */
--- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/LineEvent.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/LineEvent.java	Wed Jul 05 20:52:37 2017 +0200
@@ -82,7 +82,7 @@
      * @param  position the number of sample frames that the line had already
      *         processed when the event occurred, or
      *         {@link AudioSystem#NOT_SPECIFIED}
-     * @throws IllegalArgumentException if {@code line} is {@code null}.
+     * @throws IllegalArgumentException if {@code line} is {@code null}
      */
     public LineEvent(Line line, Type type, long position) {
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/AbstractCellEditor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/AbstractCellEditor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -60,7 +60,7 @@
     /**
      * The change event.
      */
-    transient protected ChangeEvent changeEvent = null;
+    protected transient ChangeEvent changeEvent = null;
 
     // Force this to be implemented.
     // public Object  getCellEditorValue()
--- a/jdk/src/java.desktop/share/classes/javax/swing/BorderFactory.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/BorderFactory.java	Wed Jul 05 20:52:37 2017 +0200
@@ -536,7 +536,7 @@
                         titlePosition, titleFont, titleColor);
     }
 //// EmptyBorder ///////////////////////////////////////////////////////////
-    final static Border emptyBorder = new EmptyBorder(0, 0, 0, 0);
+    static final Border emptyBorder = new EmptyBorder(0, 0, 0, 0);
 
     /**
      * Creates an empty border that takes up no space. (The width
--- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -89,33 +89,33 @@
      * indicates partial commitment towards choosing/triggering
      * the button.
      */
-    public final static int ARMED = 1 << 0;
+    public static final int ARMED = 1 << 0;
 
     /**
      * Identifies the "selected" bit in the bitmask, which
      * indicates that the button has been selected. Only needed for
      * certain types of buttons - such as radio button or check box.
      */
-    public final static int SELECTED = 1 << 1;
+    public static final int SELECTED = 1 << 1;
 
     /**
      * Identifies the "pressed" bit in the bitmask, which
      * indicates that the button is pressed.
      */
-    public final static int PRESSED = 1 << 2;
+    public static final int PRESSED = 1 << 2;
 
     /**
      * Identifies the "enabled" bit in the bitmask, which
      * indicates that the button can be selected by
      * an input device (such as a mouse pointer).
      */
-    public final static int ENABLED = 1 << 3;
+    public static final int ENABLED = 1 << 3;
 
     /**
      * Identifies the "rollover" bit in the bitmask, which
      * indicates that the mouse is over the button.
      */
-    public final static int ROLLOVER = 1 << 4;
+    public static final int ROLLOVER = 1 << 4;
 
     /**
      * {@inheritDoc}
--- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultDesktopManager.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultDesktopManager.java	Wed Jul 05 20:52:37 2017 +0200
@@ -50,11 +50,11 @@
   */
 @SuppressWarnings("serial") // No Interesting Non-Transient State
 public class DefaultDesktopManager implements DesktopManager, java.io.Serializable {
-    final static String HAS_BEEN_ICONIFIED_PROPERTY = "wasIconOnce";
+    static final String HAS_BEEN_ICONIFIED_PROPERTY = "wasIconOnce";
 
-    final static int DEFAULT_DRAG_MODE = 0;
-    final static int OUTLINE_DRAG_MODE = 1;
-    final static int FASTER_DRAG_MODE = 2;
+    static final int DEFAULT_DRAG_MODE = 0;
+    static final int OUTLINE_DRAG_MODE = 1;
+    static final int FASTER_DRAG_MODE = 2;
 
     int dragMode = DEFAULT_DRAG_MODE;
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/GroupLayout.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/GroupLayout.java	Wed Jul 05 20:52:37 2017 +0200
@@ -3391,7 +3391,7 @@
      * Represents two springs that should have autopadding inserted between
      * them.
      */
-    private final static class AutoPreferredGapMatch {
+    private static final class AutoPreferredGapMatch {
         public final ComponentSpring source;
         public final ComponentSpring target;
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/ImageIcon.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/ImageIcon.java	Wed Jul 05 20:52:37 2017 +0200
@@ -74,8 +74,8 @@
      * images symbolically rather than including the image data
      * in the archive.
      */
-    transient private String filename;
-    transient private URL location;
+    private transient String filename;
+    private transient URL location;
 
     transient Image image;
     transient int loadStatus = 0;
@@ -88,7 +88,7 @@
      * @deprecated since 1.8
      */
     @Deprecated
-    protected final static Component component;
+    protected static final Component component;
 
     /**
      * Do not use this shared media tracker, which is used to load images.
@@ -96,7 +96,7 @@
      * @deprecated since 1.8
      */
     @Deprecated
-    protected final static MediaTracker tracker;
+    protected static final MediaTracker tracker;
 
     static {
         component = AccessController.doPrivileged(new PrivilegedAction<Component>() {
@@ -144,7 +144,7 @@
      */
     private static int mediaTrackerID;
 
-    private final static Object TRACKER_KEY = new StringBuilder("TRACKER_KEY");
+    private static final Object TRACKER_KEY = new StringBuilder("TRACKER_KEY");
 
     int width = -1;
     int height = -1;
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java	Wed Jul 05 20:52:37 2017 +0200
@@ -377,8 +377,8 @@
     /**
      * AA text hints.
      */
-    transient private Object aaHint;
-    transient private Object lcdRenderingHint;
+    private transient Object aaHint;
+    private transient Object lcdRenderingHint;
 
     static Graphics safelyGetGraphics(Component c) {
         return safelyGetGraphics(c, SwingUtilities.getRoot(c));
@@ -2805,7 +2805,7 @@
      * @see #setLocale
      * @since 1.4
      */
-    static public Locale getDefaultLocale() {
+    public static Locale getDefaultLocale() {
         Locale l = (Locale) SwingUtilities.appContextGet(defaultLocale);
         if( l == null ) {
             //REMIND(bcb) choosing the default value is more complicated
@@ -2832,7 +2832,7 @@
      * @see #setLocale
      * @since 1.4
      */
-    static public void setDefaultLocale( Locale l ) {
+    public static void setDefaultLocale( Locale l ) {
         SwingUtilities.appContextPut(defaultLocale, l);
     }
 
@@ -3714,7 +3714,7 @@
          * to add/remove ContainerListener and FocusListener to track
          * target JComponent's state
          */
-        private volatile transient int propertyListenersCount = 0;
+        private transient volatile int propertyListenersCount = 0;
 
         /**
          * This field duplicates the function of the accessibleAWTFocusHandler field
@@ -4064,8 +4064,6 @@
             return aaHint;
         } else if (key == RenderingHints.KEY_TEXT_LCD_CONTRAST) {
             return lcdRenderingHint;
-        } else if (key == SwingUtilities2.COMPONENT_UI_PROPERTY_KEY) {
-            return ui;
         }
          if(clientProperties == null) {
             return null;
--- a/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1537,7 +1537,7 @@
     private Hashtable<String, Object> pageProperties;
 
     /** Should be kept in sync with javax.swing.text.html.FormView counterpart. */
-    final static String PostDataProperty = "javax.swing.JEditorPane.postdata";
+    static final String PostDataProperty = "javax.swing.JEditorPane.postdata";
 
     /**
      * Table of registered type handlers for this editor.
--- a/jdk/src/java.desktop/share/classes/javax/swing/JFormattedTextField.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JFormattedTextField.java	Wed Jul 05 20:52:37 2017 +0200
@@ -860,7 +860,7 @@
      * doesn't have focus.
      * @since 1.4
      */
-    public static abstract class AbstractFormatterFactory {
+    public abstract static class AbstractFormatterFactory {
         /**
          * Returns an <code>AbstractFormatter</code> that can handle formatting
          * of the passed in <code>JFormattedTextField</code>.
@@ -903,7 +903,7 @@
      * at the appropriate times.
      * @since 1.4
      */
-    public static abstract class AbstractFormatter implements Serializable {
+    public abstract static class AbstractFormatter implements Serializable {
         private JFormattedTextField ftf;
 
         /**
--- a/jdk/src/java.desktop/share/classes/javax/swing/JInternalFrame.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JInternalFrame.java	Wed Jul 05 20:52:37 2017 +0200
@@ -198,31 +198,31 @@
     private Component lastFocusOwner;
 
     /** Bound property name. */
-    public final static String CONTENT_PANE_PROPERTY = "contentPane";
+    public static final String CONTENT_PANE_PROPERTY = "contentPane";
     /** Bound property name. */
-    public final static String MENU_BAR_PROPERTY = "JMenuBar";
+    public static final String MENU_BAR_PROPERTY = "JMenuBar";
     /** Bound property name. */
-    public final static String TITLE_PROPERTY = "title";
+    public static final String TITLE_PROPERTY = "title";
     /** Bound property name. */
-    public final static String LAYERED_PANE_PROPERTY = "layeredPane";
+    public static final String LAYERED_PANE_PROPERTY = "layeredPane";
     /** Bound property name. */
-    public final static String ROOT_PANE_PROPERTY = "rootPane";
+    public static final String ROOT_PANE_PROPERTY = "rootPane";
     /** Bound property name. */
-    public final static String GLASS_PANE_PROPERTY = "glassPane";
+    public static final String GLASS_PANE_PROPERTY = "glassPane";
     /** Bound property name. */
-    public final static String FRAME_ICON_PROPERTY = "frameIcon";
+    public static final String FRAME_ICON_PROPERTY = "frameIcon";
 
     /**
      * Constrained property name indicated that this frame has
      * selected status.
      */
-    public final static String IS_SELECTED_PROPERTY = "selected";
+    public static final String IS_SELECTED_PROPERTY = "selected";
     /** Constrained property name indicating that the internal frame is closed. */
-    public final static String IS_CLOSED_PROPERTY = "closed";
+    public static final String IS_CLOSED_PROPERTY = "closed";
     /** Constrained property name indicating that the internal frame is maximized. */
-    public final static String IS_MAXIMUM_PROPERTY = "maximum";
+    public static final String IS_MAXIMUM_PROPERTY = "maximum";
     /** Constrained property name indicating that the internal frame is iconified. */
-    public final static String IS_ICON_PROPERTY = "icon";
+    public static final String IS_ICON_PROPERTY = "icon";
 
     private static final Object PROPERTY_CHANGE_LISTENER_KEY =
         new StringBuilder("InternalFramePropertyChangeListener");
@@ -2159,7 +2159,7 @@
      * @author David Kloba
      */
     @SuppressWarnings("serial") // Same-version serialization only
-    static public class JDesktopIcon extends JComponent implements Accessible
+    public static class JDesktopIcon extends JComponent implements Accessible
     {
         JInternalFrame internalFrame;
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/JLayeredPane.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JLayeredPane.java	Wed Jul 05 20:52:37 2017 +0200
@@ -159,25 +159,25 @@
 public class JLayeredPane extends JComponent implements Accessible {
     /// Watch the values in getObjectForLayer()
     /** Convenience object defining the Default layer. Equivalent to new Integer(0).*/
-    public final static Integer DEFAULT_LAYER = 0;
+    public static final Integer DEFAULT_LAYER = 0;
     /** Convenience object defining the Palette layer. Equivalent to new Integer(100).*/
-    public final static Integer PALETTE_LAYER = 100;
+    public static final Integer PALETTE_LAYER = 100;
     /** Convenience object defining the Modal layer. Equivalent to new Integer(200).*/
-    public final static Integer MODAL_LAYER = 200;
+    public static final Integer MODAL_LAYER = 200;
     /** Convenience object defining the Popup layer. Equivalent to new Integer(300).*/
-    public final static Integer POPUP_LAYER = 300;
+    public static final Integer POPUP_LAYER = 300;
     /** Convenience object defining the Drag layer. Equivalent to new Integer(400).*/
-    public final static Integer DRAG_LAYER = 400;
+    public static final Integer DRAG_LAYER = 400;
     /** Convenience object defining the Frame Content layer.
       * This layer is normally only use to position the contentPane and menuBar
       * components of JFrame.
       * Equivalent to new Integer(-30000).
       * @see JFrame
       */
-    public final static Integer FRAME_CONTENT_LAYER = new Integer(-30000);
+    public static final Integer FRAME_CONTENT_LAYER = new Integer(-30000);
 
     /** Bound property */
-    public final static String LAYER_PROPERTY = "layeredContainerLayer";
+    public static final String LAYER_PROPERTY = "layeredContainerLayer";
     // Hashtable to store layer values for non-JComponent components
     private Hashtable<Component,Integer> componentToLayer;
     private boolean optimizedDrawingPossible = true;
--- a/jdk/src/java.desktop/share/classes/javax/swing/JList.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JList.java	Wed Jul 05 20:52:37 2017 +0200
@@ -161,8 +161,8 @@
  *  // Display an icon and a string for each object in the list.
  *
  * class MyCellRenderer extends JLabel implements ListCellRenderer<Object> {
- *     final static ImageIcon longIcon = new ImageIcon("long.gif");
- *     final static ImageIcon shortIcon = new ImageIcon("short.gif");
+ *     static final ImageIcon longIcon = new ImageIcon("long.gif");
+ *     static final ImageIcon shortIcon = new ImageIcon("short.gif");
  *
  *     // This is the only method defined by ListCellRenderer.
  *     // We just reconfigure the JLabel each time we're called.
--- a/jdk/src/java.desktop/share/classes/javax/swing/JOptionPane.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JOptionPane.java	Wed Jul 05 20:52:37 2017 +0200
@@ -394,13 +394,13 @@
     public static final String      WANTS_INPUT_PROPERTY = "wantsInput";
 
     /** Icon used in pane. */
-    transient protected Icon                  icon;
+    protected transient Icon                  icon;
     /** Message to display. */
-    transient protected Object                message;
+    protected transient Object                message;
     /** Options to display to the user. */
-    transient protected Object[]              options;
+    protected transient Object[]              options;
     /** Value that should be initially selected in <code>options</code>. */
-    transient protected Object                initialValue;
+    protected transient Object                initialValue;
     /** Message type. */
     protected int                   messageType;
     /**
@@ -412,7 +412,7 @@
     protected int                   optionType;
     /** Currently selected value, will be a valid option, or
      * <code>UNINITIALIZED_VALUE</code> or <code>null</code>. */
-    transient protected Object                value;
+    protected transient Object                value;
     /** Array of values the user can choose from. Look and feel will
      * provide the UI component to choose this from. */
     protected transient Object[]              selectionValues;
--- a/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1545,7 +1545,7 @@
      * A popup menu-specific separator.
      */
     @SuppressWarnings("serial")
-    static public class Separator extends JSeparator
+    public static class Separator extends JSeparator
     {
         /**
          * Constructs a popup menu-specific Separator.
--- a/jdk/src/java.desktop/share/classes/javax/swing/JProgressBar.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JProgressBar.java	Wed Jul 05 20:52:37 2017 +0200
@@ -190,15 +190,15 @@
     /**
      * The default minimum for a progress bar is 0.
      */
-    static final private int defaultMinimum = 0;
+    private static final int defaultMinimum = 0;
     /**
      * The default maximum for a progress bar is 100.
      */
-    static final private int defaultMaximum = 100;
+    private static final int defaultMaximum = 100;
     /**
      * The default orientation for a progress bar is <code>HORIZONTAL</code>.
      */
-    static final private int defaultOrientation = HORIZONTAL;
+    private static final int defaultOrientation = HORIZONTAL;
 
     /**
      * Only one <code>ChangeEvent</code> is needed per instance since the
--- a/jdk/src/java.desktop/share/classes/javax/swing/JSplitPane.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JSplitPane.java	Wed Jul 05 20:52:37 2017 +0200
@@ -113,7 +113,7 @@
      * split along the y axis.  For example the two
      * <code>Component</code>s will be split one on top of the other.
      */
-    public final static int VERTICAL_SPLIT = 0;
+    public static final int VERTICAL_SPLIT = 0;
 
     /**
      * Horizontal split indicates the <code>Component</code>s are
@@ -121,75 +121,75 @@
      * <code>Component</code>s will be split one to the left of the
      * other.
      */
-    public final static int HORIZONTAL_SPLIT = 1;
+    public static final int HORIZONTAL_SPLIT = 1;
 
     /**
      * Used to add a <code>Component</code> to the left of the other
      * <code>Component</code>.
      */
-    public final static String LEFT = "left";
+    public static final String LEFT = "left";
 
     /**
      * Used to add a <code>Component</code> to the right of the other
      * <code>Component</code>.
      */
-    public final static String RIGHT = "right";
+    public static final String RIGHT = "right";
 
     /**
      * Used to add a <code>Component</code> above the other
      * <code>Component</code>.
      */
-    public final static String TOP = "top";
+    public static final String TOP = "top";
 
     /**
      * Used to add a <code>Component</code> below the other
      * <code>Component</code>.
      */
-    public final static String BOTTOM = "bottom";
+    public static final String BOTTOM = "bottom";
 
     /**
      * Used to add a <code>Component</code> that will represent the divider.
      */
-    public final static String DIVIDER = "divider";
+    public static final String DIVIDER = "divider";
 
     /**
      * Bound property name for orientation (horizontal or vertical).
      */
-    public final static String ORIENTATION_PROPERTY = "orientation";
+    public static final String ORIENTATION_PROPERTY = "orientation";
 
     /**
      * Bound property name for continuousLayout.
      */
-    public final static String CONTINUOUS_LAYOUT_PROPERTY = "continuousLayout";
+    public static final String CONTINUOUS_LAYOUT_PROPERTY = "continuousLayout";
 
     /**
      * Bound property name for border.
      */
-    public final static String DIVIDER_SIZE_PROPERTY = "dividerSize";
+    public static final String DIVIDER_SIZE_PROPERTY = "dividerSize";
 
     /**
      * Bound property for oneTouchExpandable.
      */
-    public final static String ONE_TOUCH_EXPANDABLE_PROPERTY =
+    public static final String ONE_TOUCH_EXPANDABLE_PROPERTY =
                                "oneTouchExpandable";
 
     /**
      * Bound property for lastLocation.
      */
-    public final static String LAST_DIVIDER_LOCATION_PROPERTY =
+    public static final String LAST_DIVIDER_LOCATION_PROPERTY =
                                "lastDividerLocation";
 
     /**
      * Bound property for the dividerLocation.
      * @since 1.3
      */
-    public final static String DIVIDER_LOCATION_PROPERTY = "dividerLocation";
+    public static final String DIVIDER_LOCATION_PROPERTY = "dividerLocation";
 
     /**
      * Bound property for weight.
      * @since 1.3
      */
-    public final static String RESIZE_WEIGHT_PROPERTY = "resizeWeight";
+    public static final String RESIZE_WEIGHT_PROPERTY = "resizeWeight";
 
     /**
      * How the views are split.
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTable.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTable.java	Wed Jul 05 20:52:37 2017 +0200
@@ -343,27 +343,27 @@
     protected boolean           cellSelectionEnabled;
 
     /** If editing, the <code>Component</code> that is handling the editing. */
-    transient protected Component       editorComp;
+    protected transient Component       editorComp;
 
     /**
      * The active cell editor object, that overwrites the screen real estate
      * occupied by the current cell and allows the user to change its contents.
      * {@code null} if the table isn't currently editing.
      */
-    transient protected TableCellEditor cellEditor;
+    protected transient TableCellEditor cellEditor;
 
     /** Identifies the column of the cell being edited. */
-    transient protected int             editingColumn;
+    protected transient int             editingColumn;
 
     /** Identifies the row of the cell being edited. */
-    transient protected int             editingRow;
+    protected transient int             editingRow;
 
    /**
      * A table of objects that display the contents of a cell,
      * indexed by class as declared in <code>getColumnClass</code>
      * in the <code>TableModel</code> interface.
      */
-    transient protected Hashtable<Object, Object> defaultRenderersByColumnClass;
+    protected transient Hashtable<Object, Object> defaultRenderersByColumnClass;
     // Logicaly, the above is a Hashtable<Class<?>, TableCellRenderer>.
     // It is declared otherwise to accomodate using UIDefaults.
 
@@ -372,7 +372,7 @@
      * indexed by class as declared in <code>getColumnClass</code>
      * in the <code>TableModel</code> interface.
      */
-    transient protected Hashtable<Object, Object> defaultEditorsByColumnClass;
+    protected transient Hashtable<Object, Object> defaultEditorsByColumnClass;
     // Logicaly, the above is a Hashtable<Class<?>, TableCellEditor>.
     // It is declared otherwise to accomodate using UIDefaults.
 
@@ -880,7 +880,7 @@
      * replaced by <code>new JScrollPane(aTable)</code>.
      */
     @Deprecated
-    static public JScrollPane createScrollPaneForTable(JTable aTable) {
+    public static JScrollPane createScrollPaneForTable(JTable aTable) {
         return new JScrollPane(aTable);
     }
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/JToolBar.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JToolBar.java	Wed Jul 05 20:52:37 2017 +0200
@@ -593,7 +593,7 @@
      * A toolbar-specific separator. An object with dimension but
      * no contents used to divide buttons on a tool bar into groups.
      */
-    static public class Separator extends JSeparator
+    public static class Separator extends JSeparator
     {
         private Dimension separatorSize;
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTree.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTree.java	Wed Jul 05 20:52:37 2017 +0200
@@ -155,12 +155,12 @@
     /**
      * The model that defines the tree displayed by this object.
      */
-    transient protected TreeModel        treeModel;
+    protected transient TreeModel        treeModel;
 
     /**
      * Models the set of selected nodes in this tree.
      */
-    transient protected TreeSelectionModel selectionModel;
+    protected transient TreeSelectionModel selectionModel;
 
     /**
      * True if the root node is displayed, false if its children are
@@ -172,7 +172,7 @@
      * The cell used to draw nodes. If <code>null</code>, the UI uses a default
      * <code>cellRenderer</code>.
      */
-    transient protected TreeCellRenderer  cellRenderer;
+    protected transient TreeCellRenderer  cellRenderer;
 
     /**
      * Height to use for each display row. If this is &lt;= 0 the renderer
@@ -189,7 +189,7 @@
      * information must be determined by visiting all the parent
      * paths and seeing if they are visible.
      */
-    transient private Hashtable<TreePath, Boolean> expandedState;
+    private transient Hashtable<TreePath, Boolean> expandedState;
 
 
     /**
@@ -227,7 +227,7 @@
      * Editor for the entries.  Default is <code>null</code>
      * (tree is not editable).
      */
-    transient protected TreeCellEditor          cellEditor;
+    protected transient TreeCellEditor          cellEditor;
 
     /**
      * Is the tree editable? Default is false.
@@ -277,13 +277,13 @@
     /**
      * Updates the <code>expandedState</code>.
      */
-    transient protected TreeModelListener       treeModelListener;
+    protected transient TreeModelListener       treeModelListener;
 
     /**
      * Used when <code>setExpandedState</code> is invoked,
      * will be a <code>Stack</code> of <code>Stack</code>s.
      */
-    transient private Stack<Stack<TreePath>> expandedStack;
+    private transient Stack<Stack<TreePath>> expandedStack;
 
     /**
      * Lead selection path, may not be <code>null</code>.
@@ -459,40 +459,40 @@
     // Bound property names
     //
     /** Bound property name for <code>cellRenderer</code>. */
-    public final static String        CELL_RENDERER_PROPERTY = "cellRenderer";
+    public static final String        CELL_RENDERER_PROPERTY = "cellRenderer";
     /** Bound property name for <code>treeModel</code>. */
-    public final static String        TREE_MODEL_PROPERTY = "model";
+    public static final String        TREE_MODEL_PROPERTY = "model";
     /** Bound property name for <code>rootVisible</code>. */
-    public final static String        ROOT_VISIBLE_PROPERTY = "rootVisible";
+    public static final String        ROOT_VISIBLE_PROPERTY = "rootVisible";
     /** Bound property name for <code>showsRootHandles</code>. */
-    public final static String        SHOWS_ROOT_HANDLES_PROPERTY = "showsRootHandles";
+    public static final String        SHOWS_ROOT_HANDLES_PROPERTY = "showsRootHandles";
     /** Bound property name for <code>rowHeight</code>. */
-    public final static String        ROW_HEIGHT_PROPERTY = "rowHeight";
+    public static final String        ROW_HEIGHT_PROPERTY = "rowHeight";
     /** Bound property name for <code>cellEditor</code>. */
-    public final static String        CELL_EDITOR_PROPERTY = "cellEditor";
+    public static final String        CELL_EDITOR_PROPERTY = "cellEditor";
     /** Bound property name for <code>editable</code>. */
-    public final static String        EDITABLE_PROPERTY = "editable";
+    public static final String        EDITABLE_PROPERTY = "editable";
     /** Bound property name for <code>largeModel</code>. */
-    public final static String        LARGE_MODEL_PROPERTY = "largeModel";
+    public static final String        LARGE_MODEL_PROPERTY = "largeModel";
     /** Bound property name for selectionModel. */
-    public final static String        SELECTION_MODEL_PROPERTY = "selectionModel";
+    public static final String        SELECTION_MODEL_PROPERTY = "selectionModel";
     /** Bound property name for <code>visibleRowCount</code>. */
-    public final static String        VISIBLE_ROW_COUNT_PROPERTY = "visibleRowCount";
+    public static final String        VISIBLE_ROW_COUNT_PROPERTY = "visibleRowCount";
     /** Bound property name for <code>messagesStopCellEditing</code>. */
-    public final static String        INVOKES_STOP_CELL_EDITING_PROPERTY = "invokesStopCellEditing";
+    public static final String        INVOKES_STOP_CELL_EDITING_PROPERTY = "invokesStopCellEditing";
     /** Bound property name for <code>scrollsOnExpand</code>. */
-    public final static String        SCROLLS_ON_EXPAND_PROPERTY = "scrollsOnExpand";
+    public static final String        SCROLLS_ON_EXPAND_PROPERTY = "scrollsOnExpand";
     /** Bound property name for <code>toggleClickCount</code>. */
-    public final static String        TOGGLE_CLICK_COUNT_PROPERTY = "toggleClickCount";
+    public static final String        TOGGLE_CLICK_COUNT_PROPERTY = "toggleClickCount";
     /** Bound property name for <code>leadSelectionPath</code>.
      * @since 1.3 */
-    public final static String        LEAD_SELECTION_PATH_PROPERTY = "leadSelectionPath";
+    public static final String        LEAD_SELECTION_PATH_PROPERTY = "leadSelectionPath";
     /** Bound property name for anchor selection path.
      * @since 1.3 */
-    public final static String        ANCHOR_SELECTION_PATH_PROPERTY = "anchorSelectionPath";
+    public static final String        ANCHOR_SELECTION_PATH_PROPERTY = "anchorSelectionPath";
     /** Bound property name for expands selected paths property
      * @since 1.3 */
-    public final static String        EXPANDS_SELECTED_PATHS_PROPERTY = "expandsSelectedPaths";
+    public static final String        EXPANDS_SELECTED_PATHS_PROPERTY = "expandsSelectedPaths";
 
 
     /**
@@ -3322,7 +3322,7 @@
          *
          * @return single instance of {@code EmptySelectionModel}
          */
-        static public EmptySelectionModel sharedInstance() {
+        public static EmptySelectionModel sharedInstance() {
             return sharedInstance;
         }
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/JViewport.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JViewport.java	Wed Jul 05 20:52:37 2017 +0200
@@ -139,7 +139,7 @@
     protected boolean backingStore = false;
 
     /** The view image used for a backing store. */
-    transient protected Image backingStoreImage = null;
+    protected transient Image backingStoreImage = null;
 
     /**
      * The <code>scrollUnderway</code> flag is used for components like
--- a/jdk/src/java.desktop/share/classes/javax/swing/KeyStroke.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/KeyStroke.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,6 +26,7 @@
 
 import java.awt.AWTKeyStroke;
 import java.awt.event.KeyEvent;
+import sun.swing.SwingAccessor;
 
 /**
  * A KeyStroke represents a key action on the keyboard, or equivalent input
@@ -70,6 +71,16 @@
      */
     private static final long serialVersionUID = -9060180771037902530L;
 
+    static {
+        SwingAccessor.setKeyStrokeAccessor(new SwingAccessor.KeyStrokeAccessor() {
+
+            @Override
+            public KeyStroke create() {
+                return new KeyStroke();
+            }
+        });
+    }
+
     private KeyStroke() {
     }
     private KeyStroke(char keyChar, int keyCode, int modifiers,
@@ -87,7 +98,6 @@
      */
     public static KeyStroke getKeyStroke(char keyChar) {
         synchronized (AWTKeyStroke.class) {
-            registerSubclass(KeyStroke.class);
             return (KeyStroke)getAWTKeyStroke(keyChar);
         }
     }
@@ -148,7 +158,6 @@
      */
     public static KeyStroke getKeyStroke(Character keyChar, int modifiers) {
         synchronized (AWTKeyStroke.class) {
-            registerSubclass(KeyStroke.class);
             return (KeyStroke)getAWTKeyStroke(keyChar, modifiers);
         }
     }
@@ -199,7 +208,6 @@
     public static KeyStroke getKeyStroke(int keyCode, int modifiers,
                                          boolean onKeyRelease) {
         synchronized (AWTKeyStroke.class) {
-            registerSubclass(KeyStroke.class);
             return (KeyStroke)getAWTKeyStroke(keyCode, modifiers,
                                               onKeyRelease);
         }
@@ -247,7 +255,6 @@
      */
     public static KeyStroke getKeyStroke(int keyCode, int modifiers) {
         synchronized (AWTKeyStroke.class) {
-            registerSubclass(KeyStroke.class);
             return (KeyStroke)getAWTKeyStroke(keyCode, modifiers);
         }
     }
@@ -266,7 +273,6 @@
      */
     public static KeyStroke getKeyStrokeForEvent(KeyEvent anEvent) {
         synchronized (AWTKeyStroke.class) {
-            registerSubclass(KeyStroke.class);
             return (KeyStroke)getAWTKeyStrokeForEvent(anEvent);
         }
     }
@@ -307,7 +313,6 @@
             return null;
         }
         synchronized (AWTKeyStroke.class) {
-            registerSubclass(KeyStroke.class);
             try {
                 return (KeyStroke)getAWTKeyStroke(s);
             } catch (IllegalArgumentException e) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/RepaintManager.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/RepaintManager.java	Wed Jul 05 20:52:37 2017 +0200
@@ -35,13 +35,13 @@
 import java.util.concurrent.atomic.AtomicInteger;
 import java.applet.*;
 
+import jdk.internal.misc.JavaSecurityAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.awt.AWTAccessor;
 import sun.awt.AppContext;
 import sun.awt.DisplayChangedListener;
 import sun.awt.SunToolkit;
 import sun.java2d.SunGraphicsEnvironment;
-import sun.misc.JavaSecurityAccess;
-import sun.misc.SharedSecrets;
 import sun.security.action.GetPropertyAction;
 
 import com.sun.java.swing.SwingUtilities3;
--- a/jdk/src/java.desktop/share/classes/javax/swing/RowFilter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/RowFilter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -340,7 +340,7 @@
      * @see javax.swing.DefaultRowSorter#setRowFilter(javax.swing.RowFilter)
      * @since 1.6
      */
-    public static abstract class Entry<M, I> {
+    public abstract static class Entry<M, I> {
         /**
          * Creates an <code>Entry</code>.
          */
@@ -409,7 +409,7 @@
     }
 
 
-    private static abstract class GeneralFilter<M, I> extends RowFilter<M, I> {
+    private abstract static class GeneralFilter<M, I> extends RowFilter<M, I> {
         private int[] columns;
 
         GeneralFilter(int[] columns) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/SortingFocusTraversalPolicy.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/SortingFocusTraversalPolicy.java	Wed Jul 05 20:52:37 2017 +0200
@@ -83,16 +83,16 @@
      * that they need to invoke getFirstComponent or getLastComponent, the
      * sorted list should be reused if possible.
      */
-    transient private Container cachedRoot;
-    transient private List<Component> cachedCycle;
+    private transient Container cachedRoot;
+    private transient List<Component> cachedCycle;
 
     // Delegate our fitness test to ContainerOrder so that we only have to
     // code the algorithm once.
     private static final SwingContainerOrderFocusTraversalPolicy
         fitnessTestPolicy = new SwingContainerOrderFocusTraversalPolicy();
 
-    final private int FORWARD_TRAVERSAL = 0;
-    final private int BACKWARD_TRAVERSAL = 1;
+    private final int FORWARD_TRAVERSAL = 0;
+    private final int BACKWARD_TRAVERSAL = 1;
 
     /*
      * When true (by default), the legacy merge-sort algo is used to sort an FTP cycle.
--- a/jdk/src/java.desktop/share/classes/javax/swing/SwingWorker.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/SwingWorker.java	Wed Jul 05 20:52:37 2017 +0200
@@ -827,7 +827,7 @@
     }
     private static class DoSubmitAccumulativeRunnable
           extends AccumulativeRunnable<Runnable> implements ActionListener {
-        private final static int DELAY = 1000 / 30;
+        private static final int DELAY = 1000 / 30;
         @Override
         protected void run(List<Runnable> args) {
             for (Runnable runnable : args) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/Timer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/Timer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -172,16 +172,16 @@
     // notify is set to true when the Timer fires and the Runnable is queued.
     // It will be set to false after notifying the listeners (if coalesce is
     // true) or if the developer invokes stop.
-    private transient final AtomicBoolean notify = new AtomicBoolean(false);
+    private final transient AtomicBoolean notify = new AtomicBoolean(false);
 
     private volatile int     initialDelay, delay;
     private volatile boolean repeats = true, coalesce = true;
 
-    private transient final Runnable doPostEvent;
+    private final transient Runnable doPostEvent;
 
     private static volatile boolean logTimers;
 
-    private transient final Lock lock = new ReentrantLock();
+    private final transient Lock lock = new ReentrantLock();
 
     // This field is maintained by TimerQueue.
     // eventQueued can also be reset by the TimerQueue, but will only ever
--- a/jdk/src/java.desktop/share/classes/javax/swing/TimerQueue.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/TimerQueue.java	Wed Jul 05 20:52:37 2017 +0200
@@ -267,7 +267,7 @@
         }
 
 
-        final public long getDelay(TimeUnit unit) {
+        public final long getDelay(TimeUnit unit) {
             return  unit.convert(time - now(), TimeUnit.NANOSECONDS);
         }
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/TransferHandler.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/TransferHandler.java	Wed Jul 05 20:52:37 2017 +0200
@@ -47,8 +47,8 @@
 
 import java.security.AccessControlContext;
 import java.security.ProtectionDomain;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaSecurityAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaSecurityAccess;
 
 import sun.awt.AWTAccessor;
 
@@ -210,7 +210,7 @@
      * @see #importData(TransferHandler.TransferSupport)
      * @since 1.6
      */
-    public final static class TransferSupport {
+    public static final class TransferSupport {
         private boolean isDrop;
         private Component component;
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/UIManager.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/UIManager.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1074,7 +1074,7 @@
      * @see #getAuxiliaryLookAndFeels
      * @see #getInstalledLookAndFeels
      */
-    static public void addAuxiliaryLookAndFeel(LookAndFeel laf) {
+    public static void addAuxiliaryLookAndFeel(LookAndFeel laf) {
         maybeInitialize();
 
         if (!laf.isSupportedLookAndFeel()) {
@@ -1115,7 +1115,7 @@
      * @see #setLookAndFeel
      * @see #getInstalledLookAndFeels
      */
-    static public boolean removeAuxiliaryLookAndFeel(LookAndFeel laf) {
+    public static boolean removeAuxiliaryLookAndFeel(LookAndFeel laf) {
         maybeInitialize();
 
         boolean result;
@@ -1153,7 +1153,7 @@
      * @see #setLookAndFeel
      * @see #getInstalledLookAndFeels
      */
-    static public LookAndFeel[] getAuxiliaryLookAndFeels() {
+    public static LookAndFeel[] getAuxiliaryLookAndFeels() {
         maybeInitialize();
 
         Vector<LookAndFeel> v = getLAFState().auxLookAndFeels;
--- a/jdk/src/java.desktop/share/classes/javax/swing/border/TitledBorder.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/border/TitledBorder.java	Wed Jul 05 20:52:37 2017 +0200
@@ -100,55 +100,55 @@
     /**
      * Use the default vertical orientation for the title text.
      */
-    static public final int     DEFAULT_POSITION        = 0;
+    public static final int     DEFAULT_POSITION        = 0;
     /** Position the title above the border's top line. */
-    static public final int     ABOVE_TOP               = 1;
+    public static final int     ABOVE_TOP               = 1;
     /** Position the title in the middle of the border's top line. */
-    static public final int     TOP                     = 2;
+    public static final int     TOP                     = 2;
     /** Position the title below the border's top line. */
-    static public final int     BELOW_TOP               = 3;
+    public static final int     BELOW_TOP               = 3;
     /** Position the title above the border's bottom line. */
-    static public final int     ABOVE_BOTTOM            = 4;
+    public static final int     ABOVE_BOTTOM            = 4;
     /** Position the title in the middle of the border's bottom line. */
-    static public final int     BOTTOM                  = 5;
+    public static final int     BOTTOM                  = 5;
     /** Position the title below the border's bottom line. */
-    static public final int     BELOW_BOTTOM            = 6;
+    public static final int     BELOW_BOTTOM            = 6;
 
     /**
      * Use the default justification for the title text.
      */
-    static public final int     DEFAULT_JUSTIFICATION   = 0;
+    public static final int     DEFAULT_JUSTIFICATION   = 0;
     /** Position title text at the left side of the border line. */
-    static public final int     LEFT                    = 1;
+    public static final int     LEFT                    = 1;
     /** Position title text in the center of the border line. */
-    static public final int     CENTER                  = 2;
+    public static final int     CENTER                  = 2;
     /** Position title text at the right side of the border line. */
-    static public final int     RIGHT                   = 3;
+    public static final int     RIGHT                   = 3;
     /** Position title text at the left side of the border line
      *  for left to right orientation, at the right side of the
      *  border line for right to left orientation.
      */
-    static public final int     LEADING = 4;
+    public static final int     LEADING = 4;
     /** Position title text at the right side of the border line
      *  for left to right orientation, at the left side of the
      *  border line for right to left orientation.
      */
-    static public final int     TRAILING = 5;
+    public static final int     TRAILING = 5;
 
     /**
      * Space between the border and the component's edge
      */
-    static protected final int EDGE_SPACING = 2;
+    protected static final int EDGE_SPACING = 2;
 
     /**
      * Space between the border and text
      */
-    static protected final int TEXT_SPACING = 2;
+    protected static final int TEXT_SPACING = 2;
 
     /**
      * Horizontal inset of text that is left or right justified
      */
-    static protected final int TEXT_INSET_H = 5;
+    protected static final int TEXT_INSET_H = 5;
 
     /**
      * Creates a TitledBorder instance.
--- a/jdk/src/java.desktop/share/classes/javax/swing/event/EventListenerList.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/event/EventListenerList.java	Wed Jul 05 20:52:37 2017 +0200
@@ -100,7 +100,7 @@
 @SuppressWarnings("serial")
 public class EventListenerList implements Serializable {
     /* A null array to be shared by all empty listener lists*/
-    private final static Object[] NULL_ARRAY = new Object[0];
+    private static final Object[] NULL_ARRAY = new Object[0];
     /** The list of ListenerType - Listener pairs */
     protected transient Object[] listenerList = NULL_ARRAY;
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -64,7 +64,7 @@
      */
     protected int defaultTextShiftOffset;
 
-    private final static String propertyPrefix = "Button" + ".";
+    private static final String propertyPrefix = "Button" + ".";
 
     private static final Object BASIC_BUTTON_UI_KEY = new Object();
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -54,7 +54,7 @@
 
     private static final Object BASIC_CHECK_BOX_UI_KEY = new Object();
 
-    private final static String propertyPrefix = "CheckBox" + ".";
+    private static final String propertyPrefix = "CheckBox" + ".";
 
     // ********************************
     //            Create PLAF
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -57,7 +57,7 @@
     * the <code>setBorder</code> method.
     */
     protected static Border noFocusBorder = new EmptyBorder(1, 1, 1, 1);
-    private final static Border SAFE_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1);
+    private static final Border SAFE_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1);
 
     /**
      * Constructs a new instance of {@code BasicComboBoxRenderer}.
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicIconFactory.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicIconFactory.java	Wed Jul 05 20:52:37 2017 +0200
@@ -167,7 +167,7 @@
 
     private static class CheckBoxIcon implements Icon, Serializable
     {
-        final static int csize = 13;
+        static final int csize = 13;
         public void paintIcon(Component c, Graphics g, int x, int y) {
         }
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicListUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicListUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -167,35 +167,35 @@
     /**
      * The bit relates to model changed property.
      */
-    protected final static int modelChanged = 1 << 0;
+    protected static final int modelChanged = 1 << 0;
     /**
      * The bit relates to selection model changed property.
      */
-    protected final static int selectionModelChanged = 1 << 1;
+    protected static final int selectionModelChanged = 1 << 1;
     /**
      * The bit relates to font changed property.
      */
-    protected final static int fontChanged = 1 << 2;
+    protected static final int fontChanged = 1 << 2;
     /**
      * The bit relates to fixed cell width changed property.
      */
-    protected final static int fixedCellWidthChanged = 1 << 3;
+    protected static final int fixedCellWidthChanged = 1 << 3;
     /**
      * The bit relates to fixed cell height changed property.
      */
-    protected final static int fixedCellHeightChanged = 1 << 4;
+    protected static final int fixedCellHeightChanged = 1 << 4;
     /**
      * The bit relates to prototype cell value changed property.
      */
-    protected final static int prototypeCellValueChanged = 1 << 5;
+    protected static final int prototypeCellValueChanged = 1 << 5;
     /**
      * The bit relates to cell renderer changed property.
      */
-    protected final static int cellRendererChanged = 1 << 6;
-    private final static int layoutOrientationChanged = 1 << 7;
-    private final static int heightChanged = 1 << 8;
-    private final static int widthChanged = 1 << 9;
-    private final static int componentOrientationChanged = 1 << 10;
+    protected static final int cellRendererChanged = 1 << 6;
+    private static final int layoutOrientationChanged = 1 << 7;
+    private static final int heightChanged = 1 << 8;
+    private static final int widthChanged = 1 << 9;
+    private static final int componentOrientationChanged = 1 << 10;
 
     private static final int DROP_LINE_THICKNESS = 2;
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicRadioButtonUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicRadioButtonUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -53,7 +53,7 @@
 
     private boolean defaults_initialized = false;
 
-    private final static String propertyPrefix = "RadioButton" + ".";
+    private static final String propertyPrefix = "RadioButton" + ".";
 
     private KeyListener keyListener = null;
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -115,7 +115,7 @@
     /** Scroll timer */
     protected Timer scrollTimer;
 
-    private final static int scrollSpeedThrottle = 60; // delay in milli seconds
+    private static final int scrollSpeedThrottle = 60; // delay in milli seconds
 
     /**
      * True indicates a middle click will absolutely position the
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -2542,21 +2542,21 @@
     }
 
     private static class Actions extends UIAction {
-        final static String NEXT = "navigateNext";
-        final static String PREVIOUS = "navigatePrevious";
-        final static String RIGHT = "navigateRight";
-        final static String LEFT = "navigateLeft";
-        final static String UP = "navigateUp";
-        final static String DOWN = "navigateDown";
-        final static String PAGE_UP = "navigatePageUp";
-        final static String PAGE_DOWN = "navigatePageDown";
-        final static String REQUEST_FOCUS = "requestFocus";
-        final static String REQUEST_FOCUS_FOR_VISIBLE =
+        static final String NEXT = "navigateNext";
+        static final String PREVIOUS = "navigatePrevious";
+        static final String RIGHT = "navigateRight";
+        static final String LEFT = "navigateLeft";
+        static final String UP = "navigateUp";
+        static final String DOWN = "navigateDown";
+        static final String PAGE_UP = "navigatePageUp";
+        static final String PAGE_DOWN = "navigatePageDown";
+        static final String REQUEST_FOCUS = "requestFocus";
+        static final String REQUEST_FOCUS_FOR_VISIBLE =
                                     "requestFocusForVisibleComponent";
-        final static String SET_SELECTED = "setSelectedIndex";
-        final static String SELECT_FOCUSED = "selectTabWithFocus";
-        final static String SCROLL_FORWARD = "scrollTabsForwardAction";
-        final static String SCROLL_BACKWARD = "scrollTabsBackwardAction";
+        static final String SET_SELECTED = "setSelectedIndex";
+        static final String SELECT_FOCUSED = "selectTabWithFocus";
+        static final String SCROLL_FORWARD = "scrollTabsForwardAction";
+        static final String SCROLL_BACKWARD = "scrollTabsBackwardAction";
 
         Actions(String key) {
             super(key);
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -97,7 +97,13 @@
             String kind = elem.getName();
             if (kind != null) {
                 if (kind.equals(AbstractDocument.ContentElementName)) {
-                    return new GlyphView(elem);
+                    return new GlyphView(elem){
+                        @Override
+                        public float getMinimumSpan(int axis) {
+                            // no wrap
+                            return getPreferredSpan(axis);
+                        }
+                    };
                 } else if (kind.equals(AbstractDocument.ParagraphElementName)) {
                     return new I18nFieldView(elem);
                 }
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -46,7 +46,7 @@
 
     private static final Object BASIC_TOGGLE_BUTTON_UI_KEY = new Object();
 
-    private final static String propertyPrefix = "ToggleButton" + ".";
+    private static final String propertyPrefix = "ToggleButton" + ".";
 
     // ********************************
     //          Create PLAF
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -61,16 +61,16 @@
         new StringBuilder("Tree.baselineComponent");
 
     // Old actions forward to an instance of this.
-    static private final Actions SHARED_ACTION = new Actions();
+    private static final Actions SHARED_ACTION = new Actions();
 
     /**
      * The collapsed icon.
      */
-    transient protected Icon        collapsedIcon;
+    protected transient Icon        collapsedIcon;
     /**
      * The expanded icon.
      */
-    transient protected Icon        expandedIcon;
+    protected transient Icon        expandedIcon;
 
     /**
       * Color used to draw hash marks.  If <code>null</code> no hash marks
@@ -98,14 +98,14 @@
     protected JTree             tree;
 
     /** Renderer that is being used to do the actual cell drawing. */
-    transient protected TreeCellRenderer   currentCellRenderer;
+    protected transient TreeCellRenderer   currentCellRenderer;
 
     /** Set to true if the renderer that is currently in the tree was
      * created by this instance. */
     protected boolean           createdRenderer;
 
     /** Editor for the tree. */
-    transient protected TreeCellEditor     cellEditor;
+    protected transient TreeCellEditor     cellEditor;
 
     /** Set to true if editor that is currently in the tree was
      * created by this instance. */
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalCheckBoxUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalCheckBoxUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -60,7 +60,7 @@
 
     private static final Object METAL_CHECK_BOX_UI_KEY = new Object();
 
-    private final static String propertyPrefix = "CheckBox" + ".";
+    private static final String propertyPrefix = "CheckBox" + ".";
 
     private boolean defaults_initialized = false;
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -954,7 +954,7 @@
         }
     }
 
-    final static int space = 10;
+    static final int space = 10;
     class IndentIcon implements Icon {
 
         Icon icon = null;
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalIconFactory.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalIconFactory.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1617,7 +1617,7 @@
     }  // End class TreeFloppyDriveIcon
 
 
-    static private final Dimension folderIcon16Size = new Dimension( 16, 16 );
+    private static final Dimension folderIcon16Size = new Dimension( 16, 16 );
 
     /**
      * Utility class for caching icon images.  This is necessary because
@@ -1787,7 +1787,7 @@
     }
 
 
-    static private final Dimension fileIcon16Size = new Dimension( 16, 16 );
+    private static final Dimension fileIcon16Size = new Dimension( 16, 16 );
 
     /**
      * <p>
@@ -1887,7 +1887,7 @@
     }
 
 
-    static private final Dimension treeControlSize = new Dimension( 18, 18 );
+    private static final Dimension treeControlSize = new Dimension( 18, 18 );
 
     /**
      * <p>
@@ -2052,9 +2052,9 @@
   // Menu Icons
   //
 
-    static private final Dimension menuArrowIconSize = new Dimension( 4, 8 );
-    static private final Dimension menuCheckIconSize = new Dimension( 10, 10 );
-    static private final int xOff = 4;
+    private static final Dimension menuArrowIconSize = new Dimension( 4, 8 );
+    private static final Dimension menuCheckIconSize = new Dimension( 10, 10 );
+    private static final int xOff = 4;
 
     private static class MenuArrowIcon implements Icon, UIResource, Serializable
     {
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -88,7 +88,7 @@
     /**
      * Registers the specified component.
      */
-    synchronized static void register(JComponent c) {
+    static synchronized void register(JComponent c) {
         if (c == null) {
             // Exception is thrown as convenience for callers that are
             // typed to throw an NPE.
@@ -100,7 +100,7 @@
     /**
      * Unregisters the specified component.
      */
-    synchronized static void unregister(JComponent c) {
+    static synchronized void unregister(JComponent c) {
         for (int counter = components.size() - 1; counter >= 0; counter--) {
             // Search for the component, removing any flushed references
             // along the way.
@@ -116,7 +116,7 @@
      * Finds a previously registered component of class <code>target</code>
      * that shares the JRootPane ancestor of <code>from</code>.
      */
-    synchronized static Object findRegisteredComponentOfType(JComponent from,
+    static synchronized Object findRegisteredComponentOfType(JComponent from,
                                                              Class<?> target) {
         JRootPane rp = SwingUtilities.getRootPane(from);
         if (rp != null) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -949,8 +949,7 @@
          * @comp the component to check
          */
         private void repaintIfBackgroundsDiffer(JComponent comp) {
-            ComponentUI ui = (ComponentUI)comp.getClientProperty(
-                    SwingUtilities2.COMPONENT_UI_PROPERTY_KEY);
+            ComponentUI ui = comp.getUI();
             if (ui instanceof SynthUI) {
                 SynthUI synthUI = (SynthUI)ui;
                 SynthContext context = synthUI.getContext(comp);
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html	Wed Jul 05 20:52:37 2017 +0200
@@ -105,7 +105,7 @@
       <dd>Unique identifier for the style.</dd>
       <dt><a name="style.clone"><samp>clone</samp></a></dt>
       <dd>Identifier of a previously defined style that is copied
-	    and used for the new style. This provides a conveniant
+	    and used for the new style. This provides a convenient
 	    mechanism for overriding only a portion of an existing
 	    style.</dd>
     </dl>
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -73,7 +73,7 @@
     protected EventListenerList listenerList = new EventListenerList();
 
     /** Change event (only one needed) */
-    transient protected ChangeEvent changeEvent = null;
+    protected transient ChangeEvent changeEvent = null;
 
     /** Column selection allowed in this column model */
     protected boolean columnSelectionAllowed;
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java	Wed Jul 05 20:52:37 2017 +0200
@@ -106,13 +106,13 @@
     protected boolean   updateTableInRealTime;
 
     /** The index of the column being resized. <code>null</code> if not resizing. */
-    transient protected TableColumn     resizingColumn;
+    protected transient TableColumn     resizingColumn;
 
     /** The index of the column being dragged. <code>null</code> if not dragging. */
-    transient protected TableColumn     draggedColumn;
+    protected transient TableColumn     draggedColumn;
 
     /** The distance from its original position the column has been dragged. */
-    transient protected int     draggedDistance;
+    protected transient int     draggedDistance;
 
     /**
       *  The default renderer to be used when a <code>TableColumn</code>
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/TableColumn.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/TableColumn.java	Wed Jul 05 20:52:37 2017 +0200
@@ -92,25 +92,25 @@
      * Warning: The value of this constant, "columWidth" is wrong as the
      * name of the property is "columnWidth".
      */
-    public final static String COLUMN_WIDTH_PROPERTY = "columWidth";
+    public static final String COLUMN_WIDTH_PROPERTY = "columWidth";
 
     /**
      * Obsolete as of Java 2 platform v1.3.  Please use string literals to identify
      * properties.
      */
-    public final static String HEADER_VALUE_PROPERTY = "headerValue";
+    public static final String HEADER_VALUE_PROPERTY = "headerValue";
 
     /**
      * Obsolete as of Java 2 platform v1.3.  Please use string literals to identify
      * properties.
      */
-    public final static String HEADER_RENDERER_PROPERTY = "headerRenderer";
+    public static final String HEADER_RENDERER_PROPERTY = "headerRenderer";
 
     /**
      * Obsolete as of Java 2 platform v1.3.  Please use string literals to identify
      * properties.
      */
-    public final static String CELL_RENDERER_PROPERTY = "cellRenderer";
+    public static final String CELL_RENDERER_PROPERTY = "cellRenderer";
 
 //
 //  Instance Variables
@@ -173,7 +173,7 @@
      *  end of the resize.
      */
     @Deprecated
-    transient protected int     resizedPostingDisableCount;
+    protected transient int     resizedPostingDisableCount;
 
     /**
      * If any <code>PropertyChangeListeners</code> have been registered, the
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1300,7 +1300,7 @@
      * @return the thread actively modifying the document
      *  or <code>null</code> if there are no modifications in progress
      */
-    protected synchronized final Thread getCurrentWriter() {
+    protected final synchronized Thread getCurrentWriter() {
         return currWriter;
     }
 
@@ -1329,7 +1329,7 @@
      *  where order of delivery is not guaranteed and all listeners
      *  should be notified before further mutations are allowed.
      */
-    protected synchronized final void writeLock() {
+    protected final synchronized void writeLock() {
         try {
             while ((numReaders > 0) || (currWriter != null)) {
                 if (Thread.currentThread() == currWriter) {
@@ -1359,7 +1359,7 @@
      *
      * @see #writeLock
      */
-    protected synchronized final void writeUnlock() {
+    protected final synchronized void writeUnlock() {
         if (--numWriters <= 0) {
             numWriters = 0;
             currWriter = null;
@@ -1378,7 +1378,7 @@
      *
      * @see #readUnlock
      */
-    public synchronized final void readLock() {
+    public final synchronized void readLock() {
         try {
             while (currWriter != null) {
                 if (currWriter == Thread.currentThread()) {
@@ -1412,7 +1412,7 @@
      *
      * @see #readLock
      */
-    public synchronized final void readUnlock() {
+    public final synchronized void readUnlock() {
         if (currWriter == Thread.currentThread()) {
             // writer has full read access.... may try to acquire
             // lock in notification
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -261,7 +261,7 @@
      * @throws BadLocationException for an invalid location within
      * the document
      */
-    abstract protected void write() throws IOException, BadLocationException;
+    protected abstract void write() throws IOException, BadLocationException;
 
     /**
      * Returns the text associated with the element.
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1598,11 +1598,11 @@
     boolean dotLTR;
     boolean markLTR;
     transient Handler handler = new Handler();
-    transient private int[] flagXPoints = new int[3];
-    transient private int[] flagYPoints = new int[3];
+    private transient int[] flagXPoints = new int[3];
+    private transient int[] flagYPoints = new int[3];
     private transient NavigationFilter.FilterBypass filterBypass;
-    static private transient Action selectWord = null;
-    static private transient Action selectLine = null;
+    private static transient Action selectWord = null;
+    private static transient Action selectLine = null;
     /**
      * This is used to indicate if the caret currently owns the selection.
      * This is always false if the system does not support the system
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -352,7 +352,7 @@
 
     // ---- member variables --------------------------------------------
 
-    private final static Highlighter.Highlight[] noHighlights =
+    private static final Highlighter.Highlight[] noHighlights =
             new Highlighter.Highlight[0];
     private Vector<HighlightInfo> highlights = new Vector<HighlightInfo>();
     private JTextComponent component;
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java	Wed Jul 05 20:52:37 2017 +0200
@@ -2650,7 +2650,7 @@
         }
 
         /** Class-specific reference queues.  */
-        private final static Map<Class<?>, ReferenceQueue<DefaultStyledDocument>> queueMap
+        private static final Map<Class<?>, ReferenceQueue<DefaultStyledDocument>> queueMap
                 = new HashMap<Class<?>, ReferenceQueue<DefaultStyledDocument>>();
 
         /** A weak reference to the document object.  */
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DocumentFilter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DocumentFilter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -129,7 +129,7 @@
      * are invoked from the DocumentFilter.
      * @since 1.4
      */
-    public static abstract class FilterBypass {
+    public abstract static class FilterBypass {
         /**
          * Returns the Document the mutation is occurring on.
          *
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/GapContent.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/GapContent.java	Wed Jul 05 20:52:37 2017 +0200
@@ -332,7 +332,7 @@
 
     private transient ReferenceQueue<StickyPosition> queue;
 
-    final static int GROWTH_SIZE = 1024 * 512;
+    static final int GROWTH_SIZE = 1024 * 512;
 
     // --- gap management -------------------------------
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java	Wed Jul 05 20:52:37 2017 +0200
@@ -550,11 +550,6 @@
      */
     @Override
     public float getMinimumSpan(int axis) {
-        int w = getResizeWeight(axis);
-        if (w == 0) {
-            // can't resize
-            return getPreferredSpan(axis);
-        }
         switch (axis) {
             case View.X_AXIS:
                 if (minimumSpan < 0) {
@@ -1158,7 +1153,7 @@
      *
      * @since 1.3
      */
-    public static abstract class GlyphPainter {
+    public abstract static class GlyphPainter {
 
         /**
          * Determine the span the glyphs given a start location
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/LayeredHighlighter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/LayeredHighlighter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -55,7 +55,7 @@
     /**
      * Layered highlight renderer.
      */
-    static public abstract class LayerPainter implements Highlighter.HighlightPainter {
+    public abstract static class LayerPainter implements Highlighter.HighlightPainter {
         /**
          * @return a shape
          * @param g Graphics used to draw
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/NavigationFilter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/NavigationFilter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -120,7 +120,7 @@
      * not callback into the NavigationFilter.
      * @since 1.4
      */
-    public static abstract class FilterBypass {
+    public abstract static class FilterBypass {
         /**
          * Returns the Caret that is changing.
          *
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1184,11 +1184,11 @@
                            lineSpacing);
         }
 
-        final static int SPACE_ADDON = 0;
-        final static int SPACE_ADDON_LEFTOVER_END = 1;
-        final static int START_JUSTIFIABLE = 2;
+        static final int SPACE_ADDON = 0;
+        static final int SPACE_ADDON_LEFTOVER_END = 1;
+        static final int START_JUSTIFIABLE = 2;
         //this should be the last index in justificationData
-        final static int END_JUSTIFIABLE = 3;
+        static final int END_JUSTIFIABLE = 3;
 
         int justificationData[] = null;
     }
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/TableView.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/TableView.java	Wed Jul 05 20:52:37 2017 +0200
@@ -579,7 +579,7 @@
     SizeRequirements[] columnRequirements;
     Vector<TableRow> rows;
     boolean gridValid;
-    static final private BitSet EMPTY = new BitSet();
+    private static final BitSet EMPTY = new BitSet();
 
     /**
      * View of a row in a row-centric table.
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/CSS.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/CSS.java	Wed Jul 05 20:52:37 2017 +0200
@@ -2433,7 +2433,7 @@
         }
 
         // CSS.Values are static, don't archive it.
-        transient private CSS.Value style;
+        private transient CSS.Value style;
     }
 
     @SuppressWarnings("serial") // Same-version serialization only
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/CSSBorder.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/CSSBorder.java	Wed Jul 05 20:52:37 2017 +0200
@@ -54,13 +54,13 @@
 class CSSBorder extends AbstractBorder {
 
     /** Indices for the attribute groups.  */
-    final static int COLOR = 0, STYLE = 1, WIDTH = 2;
+    static final int COLOR = 0, STYLE = 1, WIDTH = 2;
 
     /** Indices for the box sides within the attribute group.  */
-    final static int TOP = 0, RIGHT = 1, BOTTOM = 2, LEFT = 3;
+    static final int TOP = 0, RIGHT = 1, BOTTOM = 2, LEFT = 3;
 
     /** The attribute groups.  */
-    final static Attribute[][] ATTRIBUTES = {
+    static final Attribute[][] ATTRIBUTES = {
         { Attribute.BORDER_TOP_COLOR, Attribute.BORDER_RIGHT_COLOR,
           Attribute.BORDER_BOTTOM_COLOR, Attribute.BORDER_LEFT_COLOR, },
         { Attribute.BORDER_TOP_STYLE, Attribute.BORDER_RIGHT_STYLE,
@@ -70,12 +70,12 @@
     };
 
     /** Parsers for the border properties.  */
-    final static CssValue PARSERS[] = {
+    static final CssValue PARSERS[] = {
         new ColorValue(), new BorderStyle(), new BorderWidthValue(null, 0),
     };
 
     /** Default values for the border properties.  */
-    final static Object[] DEFAULTS = {
+    static final Object[] DEFAULTS = {
         Attribute.BORDER_COLOR, // marker: value will be computed on request
         PARSERS[1].parseCssValue(Attribute.BORDER_STYLE.getDefaultValue()),
         PARSERS[2].parseCssValue(Attribute.BORDER_WIDTH.getDefaultValue()),
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/FormView.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/FormView.java	Wed Jul 05 20:52:37 2017 +0200
@@ -129,7 +129,7 @@
      * Document attribute name for storing POST data. JEditorPane.getPostData()
      * uses the same name, should be kept in sync.
      */
-    final static String PostDataProperty = "javax.swing.JEditorPane.postdata";
+    static final String PostDataProperty = "javax.swing.JEditorPane.postdata";
 
     /**
      * Used to indicate if the maximum span should be the same as the
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1885,7 +1885,7 @@
      * its use should be performed under the protection of
      * Document.render.
      */
-    public static abstract class Iterator {
+    public abstract static class Iterator {
 
         /**
          * Return the attributes for this tag.
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java	Wed Jul 05 20:52:37 2017 +0200
@@ -987,7 +987,7 @@
      * providing a different parser while reusing some of the
      * implementation provided by this editor kit.
      */
-    public static abstract class Parser {
+    public abstract static class Parser {
         /**
          * Parse the given stream and drive the given callback
          * with the results of the parse.  This method should
@@ -1564,7 +1564,7 @@
      * methods may have inconsistent behavior, or return the wrong thing.
      */
     @SuppressWarnings("serial") // Superclass is not serializable across versions
-    public static abstract class HTMLTextAction extends StyledTextAction {
+    public abstract static class HTMLTextAction extends StyledTextAction {
 
         /**
          * Creates a new HTMLTextAction from a string action name.
@@ -2009,7 +2009,7 @@
     /*
      * Returns the object in an AttributeSet matching a key
      */
-    static private Object getAttrValue(AttributeSet attr, HTML.Attribute key) {
+    private static Object getAttrValue(AttributeSet attr, HTML.Attribute key) {
         Enumeration<?> names = attr.getAttributeNames();
         while (names.hasMoreElements()) {
             Object nextKey = names.nextElement();
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/Map.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/Map.java	Wed Jul 05 20:52:37 2017 +0200
@@ -180,7 +180,7 @@
      * % the returned value with be negative. If a parse error results
      * from trying to parse one of the numbers null is returned.
      */
-    static protected int[] extractCoords(Object stringCoords) {
+    protected static int[] extractCoords(Object stringCoords) {
         if (stringCoords == null || !(stringCoords instanceof String)) {
             return null;
         }
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java	Wed Jul 05 20:52:37 2017 +0200
@@ -3196,7 +3196,7 @@
 
     // ---- Variables ---------------------------------------------
 
-    final static int DEFAULT_FONT_SIZE = 3;
+    static final int DEFAULT_FONT_SIZE = 3;
 
     private CSS css;
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/TableView.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/TableView.java	Wed Jul 05 20:52:37 2017 +0200
@@ -996,7 +996,7 @@
     boolean skipComments = false;
 
     boolean gridValid;
-    static final private BitSet EMPTY = new BitSet();
+    private static final BitSet EMPTY = new BitSet();
 
     class ColumnIterator implements CSS.LayoutIterator {
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFAttributes.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFAttributes.java	Wed Jul 05 20:52:37 2017 +0200
@@ -145,7 +145,7 @@
     /************************************************************************/
     /************************************************************************/
 
-    static abstract class GenericAttribute
+    abstract static class GenericAttribute
     {
         int domain;
         Object swingName;
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFGenerator.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFGenerator.java	Wed Jul 05 20:52:37 2017 +0200
@@ -76,14 +76,14 @@
 
     /** The default color, used for text without an explicit color
      *  attribute. */
-    static public final Color defaultRTFColor = Color.black;
+    public static final Color defaultRTFColor = Color.black;
 
-    static public final float defaultFontSize = 12f;
+    public static final float defaultFontSize = 12f;
 
-    static public final String defaultFontFamily = "Helvetica";
+    public static final String defaultFontFamily = "Helvetica";
 
     /* constants so we can avoid allocating objects in inner loops */
-    final static private Object MagicToken;
+    private static final Object MagicToken;
 
     /* An array of character-keyword pairs. This could be done
        as a dictionary (and lookup would be quicker), but that
@@ -91,7 +91,7 @@
        written (slow!). */
     static class CharacterKeywordPair
       { public char character; public String keyword; }
-    static protected CharacterKeywordPair[] textKeywords;
+    protected static CharacterKeywordPair[] textKeywords;
 
     static {
         MagicToken = new Object();
@@ -112,7 +112,7 @@
     static final char[] hexdigits = { '0', '1', '2', '3', '4', '5', '6', '7',
                                       '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
 
-static public void writeDocument(Document d, OutputStream to)
+public static void writeDocument(Document d, OutputStream to)
     throws IOException
 {
     RTFGenerator gen = new RTFGenerator(to);
@@ -238,7 +238,7 @@
     return null;
 }
 
-static private Object attrDiff(MutableAttributeSet oldAttrs,
+private static Object attrDiff(MutableAttributeSet oldAttrs,
                                AttributeSet newAttrs,
                                Object key,
                                Object dfl)
@@ -265,7 +265,7 @@
     return null;
 }
 
-static private boolean equalArraysOK(Object a, Object b)
+private static boolean equalArraysOK(Object a, Object b)
 {
     Object[] aa, bb;
     if (a == b)
@@ -987,7 +987,7 @@
  * corresponding byte value (as an int, since bytes are signed).
  */
     /* Not very efficient. TODO. */
-static protected int convertCharacter(int[] conversion, char ch)
+protected static int convertCharacter(int[] conversion, char ch)
 {
    int index;
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFReader.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFReader.java	Wed Jul 05 20:52:37 2017 +0200
@@ -86,7 +86,7 @@
    *  Unicode character. */
   int skippingCharacters;
 
-  static private Dictionary<String, RTFAttribute> straightforwardAttributes;
+  private static Dictionary<String, RTFAttribute> straightforwardAttributes;
   static {
       straightforwardAttributes = RTFAttributes.attributesByKeyword();
   }
@@ -1066,7 +1066,7 @@
         parserState.put("sec", sectionAttributes);
     }
 
-    abstract public void handleText(String text);
+    public abstract void handleText(String text);
 
     public void handleBinaryBlob(byte[] data)
     {
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/AbstractLayoutCache.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/AbstractLayoutCache.java	Wed Jul 05 20:52:37 2017 +0200
@@ -513,7 +513,7 @@
      * Used by <code>AbstractLayoutCache</code> to determine the size
      * and x origin of a particular node.
      */
-    static public abstract class NodeDimensions {
+    public abstract static class NodeDimensions {
         /**
          * Returns, by reference in bounds, the size and x origin to
          * place value at. The calling method is responsible for determining
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultMutableTreeNode.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultMutableTreeNode.java	Wed Jul 05 20:52:37 2017 +0200
@@ -95,7 +95,7 @@
      * An enumeration that is always empty. This is used when an enumeration
      * of a leaf node's children is requested.
      */
-    static public final Enumeration<TreeNode> EMPTY_ENUMERATION
+    public static final Enumeration<TreeNode> EMPTY_ENUMERATION
         = Collections.emptyEnumeration();
 
     /** this node's parent, or null if this node has no parent */
@@ -105,7 +105,7 @@
     protected Vector<TreeNode> children;
 
     /** optional user object */
-    transient protected Object  userObject;
+    protected transient Object  userObject;
 
     /** true if the node is able to have children */
     protected boolean           allowsChildren;
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -72,7 +72,7 @@
      * Component used in editing, obtained from the
      * <code>editingContainer</code>.
      */
-    transient protected Component          editingComponent;
+    protected transient Component          editingComponent;
 
     /**
      * As of Java 2 platform v1.4 this field should no longer be used. If
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -131,13 +131,13 @@
 
     // Icons
     /** Icon used to show non-leaf nodes that aren't expanded. */
-    transient protected Icon closedIcon;
+    protected transient Icon closedIcon;
 
     /** Icon used to show leaf nodes. */
-    transient protected Icon leafIcon;
+    protected transient Icon leafIcon;
 
     /** Icon used to show non-leaf nodes that are expanded. */
-    transient protected Icon openIcon;
+    protected transient Icon openIcon;
 
     // Colors
     /** Color to use for the foreground for selected nodes. */
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -78,7 +78,7 @@
     protected EventListenerList   listenerList = new EventListenerList();
 
     /** Provides a row for a given path. */
-    transient protected RowMapper               rowMapper;
+    protected transient RowMapper               rowMapper;
 
     /** Handles maintaining the list selection model. The RowMapper is used
      * to map from a TreePath to a row, and the value is then placed here. */
--- a/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java	Wed Jul 05 20:52:37 2017 +0200
@@ -65,13 +65,6 @@
      */
     Applet applet;
 
-    /**
-     * Applet will allow initialization.  Should be
-     * set to false if loading a serialized applet
-     * that was pickled in the init=true state.
-     */
-    protected boolean doInit = true;
-
 
     /**
      * The classloader for the applet.
@@ -79,23 +72,23 @@
     protected AppletClassLoader loader;
 
     /* applet event ids */
-    public final static int APPLET_DISPOSE = 0;
-    public final static int APPLET_LOAD = 1;
-    public final static int APPLET_INIT = 2;
-    public final static int APPLET_START = 3;
-    public final static int APPLET_STOP = 4;
-    public final static int APPLET_DESTROY = 5;
-    public final static int APPLET_QUIT = 6;
-    public final static int APPLET_ERROR = 7;
+    public static final int APPLET_DISPOSE = 0;
+    public static final int APPLET_LOAD = 1;
+    public static final int APPLET_INIT = 2;
+    public static final int APPLET_START = 3;
+    public static final int APPLET_STOP = 4;
+    public static final int APPLET_DESTROY = 5;
+    public static final int APPLET_QUIT = 6;
+    public static final int APPLET_ERROR = 7;
 
     /* send to the parent to force relayout */
-    public final static int APPLET_RESIZE = 51234;
+    public static final int APPLET_RESIZE = 51234;
 
     /* sent to a (distant) parent to indicate that the applet is being
      * loaded or as completed loading
      */
-    public final static int APPLET_LOADING = 51235;
-    public final static int APPLET_LOADING_COMPLETED = 51236;
+    public static final int APPLET_LOADING = 51235;
+    public static final int APPLET_LOADING_COMPLETED = 51236;
 
     /**
      * The current status. One of:
@@ -139,15 +132,14 @@
     boolean loadAbortRequest = false;
 
     /* abstract classes */
-    abstract protected String getCode();
-    abstract protected String getJarFiles();
-    abstract protected String getSerializedObject();
+    protected abstract String getCode();
+    protected abstract String getJarFiles();
 
     @Override
-    abstract public int    getWidth();
+    public abstract int    getWidth();
     @Override
-    abstract public int    getHeight();
-    abstract public boolean hasInitialFocus();
+    public abstract int    getHeight();
+    public abstract boolean hasInitialFocus();
 
     private static int threadGroupNumber = 0;
 
@@ -258,11 +250,11 @@
     private Queue<Integer> queue = null;
 
 
-    synchronized public void addAppletListener(AppletListener l) {
+    public synchronized void addAppletListener(AppletListener l) {
         listeners = AppletEventMulticaster.add(listeners, l);
     }
 
-    synchronized public void removeAppletListener(AppletListener l) {
+    public synchronized void removeAppletListener(AppletListener l) {
         listeners = AppletEventMulticaster.remove(listeners, l);
     }
 
@@ -430,13 +422,12 @@
                           break;
                       }
                       applet.resize(defaultAppletSize);
-                      if (doInit) {
-                          if (PerformanceLogger.loggingEnabled()) {
-                              PerformanceLogger.setTime("Applet Init");
-                              PerformanceLogger.outputLog();
-                          }
-                          applet.init();
+
+                      if (PerformanceLogger.loggingEnabled()) {
+                          PerformanceLogger.setTime("Applet Init");
+                          PerformanceLogger.outputLog();
                       }
+                      applet.init();
 
                       //Need the default(fallback) font to be created in this AppContext
                       Font f = getFont();
@@ -446,8 +437,6 @@
                           setFont(new Font(Font.DIALOG, Font.PLAIN, 12));
                       }
 
-                      doInit = true;    // allow restarts
-
                       // Validate the applet in event dispatch thread
                       // to avoid deadlock.
                       try {
@@ -786,34 +775,17 @@
 
     protected Applet createApplet(final AppletClassLoader loader) throws ClassNotFoundException,
                                                                          IllegalAccessException, IOException, InstantiationException, InterruptedException {
-        final String serName = getSerializedObject();
         String code = getCode();
 
-        if (code != null && serName != null) {
-            System.err.println(amh.getMessage("runloader.err"));
-//          return null;
-            throw new InstantiationException("Either \"code\" or \"object\" should be specified, but not both.");
-        }
-        if (code == null && serName == null) {
+        if (code != null) {
+            applet = (Applet)loader.loadCode(code).newInstance();
+        } else {
             String msg = "nocode";
             status = APPLET_ERROR;
             showAppletStatus(msg);
             showAppletLog(msg);
             repaint();
         }
-        if (code != null) {
-            applet = (Applet)loader.loadCode(code).newInstance();
-            doInit = true;
-        } else {
-            // serName is not null;
-            try (InputStream is = AccessController.doPrivileged(
-                    (PrivilegedAction<InputStream>)() -> loader.getResourceAsStream(serName));
-                 ObjectInputStream ois = new AppletObjectInputStream(is, loader)) {
-
-                applet = (Applet) ois.readObject();
-                doInit = false; // skip over the first init
-            }
-        }
 
         // Determine the JDK level that the applet targets.
         // This is critical for enabling certain backward
--- a/jdk/src/java.desktop/share/classes/sun/applet/AppletViewer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/applet/AppletViewer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1081,7 +1081,7 @@
 
     static String encoding = null;
 
-    static private Reader makeReader(InputStream is) {
+    private static Reader makeReader(InputStream is) {
         if (encoding != null) {
             try {
                 return new BufferedReader(new InputStreamReader(is, encoding));
--- a/jdk/src/java.desktop/share/classes/sun/awt/AppContext.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/AppContext.java	Wed Jul 05 20:52:37 2017 +0200
@@ -44,6 +44,8 @@
 import java.beans.PropertyChangeListener;
 import java.lang.ref.SoftReference;
 
+import jdk.internal.misc.JavaAWTAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.ManagedLocalsThread;
 import sun.util.logging.PlatformLogger;
 import java.util.concurrent.locks.Condition;
@@ -148,8 +150,8 @@
     /*
      * The keys to store EventQueue push/pop lock and condition.
      */
-    public final static Object EVENT_QUEUE_LOCK_KEY = new StringBuilder("EventQueue.Lock");
-    public final static Object EVENT_QUEUE_COND_KEY = new StringBuilder("EventQueue.Condition");
+    public static final Object EVENT_QUEUE_LOCK_KEY = new StringBuilder("EventQueue.Lock");
+    public static final Object EVENT_QUEUE_COND_KEY = new StringBuilder("EventQueue.Condition");
 
     /* A map of AppContexts, referenced by ThreadGroup.
      */
@@ -172,7 +174,7 @@
     private static volatile AppContext mainAppContext = null;
 
     private static class GetAppContextLock {};
-    private final static Object getAppContextLock = new GetAppContextLock();
+    private static final Object getAppContextLock = new GetAppContextLock();
 
     /*
      * The hash map associated with this AppContext.  A private delegate
@@ -839,7 +841,7 @@
 
     // Set up JavaAWTAccess in SharedSecrets
     static {
-        sun.misc.SharedSecrets.setJavaAWTAccess(new sun.misc.JavaAWTAccess() {
+        SharedSecrets.setJavaAWTAccess(new JavaAWTAccess() {
             private boolean hasRootThreadGroup(final AppContext ecx) {
                 return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
                     @Override
@@ -878,13 +880,13 @@
                 // the window of opportunity in which that issue could
                 // happen.
                 if (numAppContexts.get() > 0) {
-                   // Defaults to thread group caching.
-                   // This is probably not required as we only really need
-                   // isolation in a deployed applet environment, in which
-                   // case ecx will not be null when we reach here
-                   // However it helps emulate the deployed environment,
-                   // in tests for instance.
-                   ecx = ecx != null ? ecx : getAppContext();
+                    // Defaults to thread group caching.
+                    // This is probably not required as we only really need
+                    // isolation in a deployed applet environment, in which
+                    // case ecx will not be null when we reach here
+                    // However it helps emulate the deployed environment,
+                    // in tests for instance.
+                    ecx = ecx != null ? ecx : getAppContext();
                 }
 
                 // getAppletContext() may be called when initializing the main
@@ -895,8 +897,8 @@
                 // the root TG as its thread group.
                 // See: JDK-8023258
                 final boolean isMainAppContext = ecx == null
-                    || mainAppContext == ecx
-                    || mainAppContext == null && hasRootThreadGroup(ecx);
+                        || mainAppContext == ecx
+                        || mainAppContext == null && hasRootThreadGroup(ecx);
 
                 return isMainAppContext ? null : ecx;
             }
--- a/jdk/src/java.desktop/share/classes/sun/awt/DebugSettings.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/DebugSettings.java	Wed Jul 05 20:52:37 2017 +0200
@@ -252,9 +252,9 @@
     private static final String PROP_CTRACE = "ctrace";
     private static final int PROP_CTRACE_LEN = PROP_CTRACE.length();
 
-    private native synchronized void setCTracingOn(boolean enabled);
-    private native synchronized void setCTracingOn(boolean enabled, String file);
-    private native synchronized void setCTracingOn(boolean enabled, String file, int line);
+    private synchronized native void setCTracingOn(boolean enabled);
+    private synchronized native void setCTracingOn(boolean enabled, String file);
+    private synchronized native void setCTracingOn(boolean enabled, String file, int line);
 
     private void loadNativeSettings() {
         boolean        ctracingOn;
--- a/jdk/src/java.desktop/share/classes/sun/awt/ExtendedKeyCodes.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/ExtendedKeyCodes.java	Wed Jul 05 20:52:37 2017 +0200
@@ -12,16 +12,16 @@
      * or higher.
      */
      // Keycodes declared in KeyEvent.java with corresponding Unicode values.
-     private final static HashMap<Integer, Integer>  regularKeyCodesMap =
+     private static final HashMap<Integer, Integer>  regularKeyCodesMap =
                                           new HashMap<Integer,Integer>(98, 1.0f);
 
      // Keycodes derived from Unicode values. Here should be collected codes
      // for characters appearing on the primary layer of at least one
      // known keyboard layout. For instance, sterling sign is on the primary layer
      // of the Mac Italian layout.
-     private final static HashSet<Integer> extendedKeyCodesSet =
+     private static final HashSet<Integer> extendedKeyCodesSet =
                                                   new HashSet<Integer>(501, 1.0f);
-     final public static int getExtendedKeyCodeForChar( int c ) {
+     public static final int getExtendedKeyCodeForChar( int c ) {
          int uc = Character.toUpperCase( c );
          int lc = Character.toLowerCase( c );
          if (regularKeyCodesMap.containsKey( c )) {
--- a/jdk/src/java.desktop/share/classes/sun/awt/OSInfo.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/OSInfo.java	Wed Jul 05 20:52:37 2017 +0200
@@ -60,7 +60,7 @@
     private static final String OS_NAME = "os.name";
     private static final String OS_VERSION = "os.version";
 
-    private final static Map<String, WindowsVersion> windowsVersionMap = new HashMap<String, OSInfo.WindowsVersion>();
+    private static final Map<String, WindowsVersion> windowsVersionMap = new HashMap<String, OSInfo.WindowsVersion>();
 
     static {
         windowsVersionMap.put(WINDOWS_95.toString(), WINDOWS_95);
--- a/jdk/src/java.desktop/share/classes/sun/awt/SunHints.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/SunHints.java	Wed Jul 05 20:52:37 2017 +0200
@@ -102,7 +102,7 @@
         private static Value[][] ValueObjects =
             new Value[NUM_KEYS][VALS_PER_KEY];
 
-        private synchronized static void register(SunHints.Key key,
+        private static synchronized void register(SunHints.Key key,
                                                   Value value) {
             int kindex = key.getIndex();
             int vindex = value.getIndex();
--- a/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Wed Jul 05 20:52:37 2017 +0200
@@ -113,7 +113,7 @@
      * the 4-bytes limit for the int type. (CR 6799099)
      * One more bit is reserved for FIRST_HIGH_BIT.
      */
-    public final static int MAX_BUTTONS_SUPPORTED = 20;
+    public static final int MAX_BUTTONS_SUPPORTED = 20;
 
     /**
      * Creates and initializes EventQueue instance for the specified
@@ -1820,7 +1820,7 @@
      * Returns the value of "sun.awt.disableMixing" property. Default
      * value is {@code false}.
      */
-    public synchronized static boolean getSunAwtDisableMixing() {
+    public static synchronized boolean getSunAwtDisableMixing() {
         if (sunAwtDisableMixing == null) {
             sunAwtDisableMixing = AccessController.doPrivileged(
                                       new GetBooleanAction("sun.awt.disableMixing"));
--- a/jdk/src/java.desktop/share/classes/sun/awt/UngrabEvent.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/UngrabEvent.java	Wed Jul 05 20:52:37 2017 +0200
@@ -42,7 +42,7 @@
 @SuppressWarnings("serial")
 public class UngrabEvent extends AWTEvent {
 
-    private final static int UNGRAB_EVENT_ID = 1998;
+    private static final int UNGRAB_EVENT_ID = 1998;
 
     public UngrabEvent(Component source) {
         super(source, UNGRAB_EVENT_ID);
--- a/jdk/src/java.desktop/share/classes/sun/awt/datatransfer/DataTransferer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/datatransfer/DataTransferer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -938,15 +938,9 @@
 
             try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
                 try (InputStream is = (InputStream)obj) {
-                    boolean eof = false;
-                    int avail = is.available();
-                    byte[] tmp = new byte[avail > 8192 ? avail : 8192];
-                    do {
-                        int aValue;
-                        if (!(eof = (aValue = is.read(tmp, 0, tmp.length)) == -1)) {
-                            bos.write(tmp, 0, aValue);
-                        }
-                    } while (!eof);
+                    is.mark(Integer.MAX_VALUE);
+                    is.transferTo(bos);
+                    is.reset();
                 }
 
                 if (DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
@@ -1086,14 +1080,14 @@
         return new File(filePath);
     }
 
-    private final static String[] DEPLOYMENT_CACHE_PROPERTIES = {
+    private static final String[] DEPLOYMENT_CACHE_PROPERTIES = {
         "deployment.system.cachedir",
         "deployment.user.cachedir",
         "deployment.javaws.cachedir",
         "deployment.javapi.cachedir"
     };
 
-    private final static ArrayList <File> deploymentCacheDirectoryList = new ArrayList<>();
+    private static final ArrayList <File> deploymentCacheDirectoryList = new ArrayList<>();
 
     private static boolean isFileInWebstartedCache(File f) {
 
--- a/jdk/src/java.desktop/share/classes/sun/awt/dnd/SunDragSourceContextPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/dnd/SunDragSourceContextPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -81,12 +81,12 @@
      * dispatch constants
      */
 
-    protected final static int DISPATCH_ENTER   = 1;
-    protected final static int DISPATCH_MOTION  = 2;
-    protected final static int DISPATCH_CHANGED = 3;
-    protected final static int DISPATCH_EXIT    = 4;
-    protected final static int DISPATCH_FINISH  = 5;
-    protected final static int DISPATCH_MOUSE_MOVED  = 6;
+    protected static final int DISPATCH_ENTER   = 1;
+    protected static final int DISPATCH_MOTION  = 2;
+    protected static final int DISPATCH_CHANGED = 3;
+    protected static final int DISPATCH_EXIT    = 4;
+    protected static final int DISPATCH_FINISH  = 5;
+    protected static final int DISPATCH_MOUSE_MOVED  = 6;
 
     /**
      * construct a new SunDragSourceContextPeer
--- a/jdk/src/java.desktop/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -137,10 +137,10 @@
      * constants used by dropAccept() or dropReject()
      */
 
-    protected final static int STATUS_NONE   =  0; // none pending
-    protected final static int STATUS_WAIT   =  1; // drop pending
-    protected final static int STATUS_ACCEPT =  2;
-    protected final static int STATUS_REJECT = -1;
+    protected static final int STATUS_NONE   =  0; // none pending
+    protected static final int STATUS_WAIT   =  1; // drop pending
+    protected static final int STATUS_ACCEPT =  2;
+    protected static final int STATUS_REJECT = -1;
 
     /**
      * create the peer
--- a/jdk/src/java.desktop/share/classes/sun/awt/geom/AreaOp.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/geom/AreaOp.java	Wed Jul 05 20:52:37 2017 +0200
@@ -31,7 +31,7 @@
 import java.util.Arrays;
 
 public abstract class AreaOp {
-    public static abstract class CAGOp extends AreaOp {
+    public abstract static class CAGOp extends AreaOp {
         boolean inLeft;
         boolean inRight;
         boolean inResult;
--- a/jdk/src/java.desktop/share/classes/sun/awt/geom/Crossings.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/geom/Crossings.java	Wed Jul 05 20:52:37 2017 +0200
@@ -307,7 +307,7 @@
         return false;
     }
 
-    public final static class EvenOdd extends Crossings {
+    public static final class EvenOdd extends Crossings {
         public EvenOdd(double xlo, double ylo, double xhi, double yhi) {
             super(xlo, ylo, xhi, yhi);
         }
@@ -390,7 +390,7 @@
         }
     }
 
-    public final static class NonZero extends Crossings {
+    public static final class NonZero extends Crossings {
         private int crosscounts[];
 
         public NonZero(double xlo, double ylo, double xhi, double yhi) {
--- a/jdk/src/java.desktop/share/classes/sun/awt/im/CompositionArea.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/im/CompositionArea.java	Wed Jul 05 20:52:37 2017 +0200
@@ -64,11 +64,11 @@
     private TextLayout composedTextLayout;
     private TextHitInfo caret = null;
     private JFrame compositionWindow;
-    private final static int TEXT_ORIGIN_X = 5;
-    private final static int TEXT_ORIGIN_Y = 15;
-    private final static int PASSIVE_WIDTH = 480;
-    private final static int WIDTH_MARGIN=10;
-    private final static int HEIGHT_MARGIN=3;
+    private static final int TEXT_ORIGIN_X = 5;
+    private static final int TEXT_ORIGIN_Y = 15;
+    private static final int PASSIVE_WIDTH = 480;
+    private static final int WIDTH_MARGIN=10;
+    private static final int HEIGHT_MARGIN=3;
 
     CompositionArea() {
         // create composition window with localized title
--- a/jdk/src/java.desktop/share/classes/sun/awt/im/InputMethodContext.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/im/InputMethodContext.java	Wed Jul 05 20:52:37 2017 +0200
@@ -66,7 +66,7 @@
     private CompositionAreaHandler compositionAreaHandler;
     private Object compositionAreaHandlerLock = new Object();
 
-    static private boolean belowTheSpotInputRequested;
+    private static boolean belowTheSpotInputRequested;
     private boolean inputMethodSupportsBelowTheSpot;
 
     static {
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ByteComponentRaster.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ByteComponentRaster.java	Wed Jul 05 20:52:37 2017 +0200
@@ -76,7 +76,7 @@
     /** A cached copy of minY + height for use in bounds checks. */
     private int maxY;
 
-    static private native void initIDs();
+    private static native void initIDs();
     static {
         /* ensure that the necessary native libraries are loaded */
         NativeLibLoader.loadLibraries();
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java	Wed Jul 05 20:52:37 2017 +0200
@@ -73,7 +73,7 @@
     /** A cached copy of minY + height for use in bounds checks. */
     private int maxY;
 
-    static private native void initIDs();
+    private static native void initIDs();
     static {
         /* ensure that the necessary native libraries are loaded */
         NativeLibLoader.loadLibraries();
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ImageCache.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ImageCache.java	Wed Jul 05 20:52:37 2017 +0200
@@ -40,7 +40,7 @@
  * The ImageCache must be used from the thread with an AppContext only.
  *
  */
-final public class ImageCache {
+public final class ImageCache {
 
     // Ordered Map keyed by args hash, ordered by most recent accessed entry.
     private final LinkedHashMap<PixelsKey, ImageSoftReference> map
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ImageRepresentation.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ImageRepresentation.java	Wed Jul 05 20:52:37 2017 +0200
@@ -75,7 +75,7 @@
     boolean isDefaultBI = false;
     boolean isSameCM = false;
 
-    private native static void initIDs();
+    private static native void initIDs();
 
     static {
         /* ensure that the necessary native libraries are loaded */
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ImagingLib.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ImagingLib.java	Wed Jul 05 20:52:37 2017 +0200
@@ -73,18 +73,18 @@
      */
     private static native boolean init();
 
-    static public native int transformBI(BufferedImage src, BufferedImage dst,
+    public static native int transformBI(BufferedImage src, BufferedImage dst,
                                          double[] matrix, int interpType);
-    static public native int transformRaster(Raster src, Raster dst,
+    public static native int transformRaster(Raster src, Raster dst,
                                              double[] matrix,
                                              int interpType);
-    static public native int convolveBI(BufferedImage src, BufferedImage dst,
+    public static native int convolveBI(BufferedImage src, BufferedImage dst,
                                         Kernel kernel, int edgeHint);
-    static public native int convolveRaster(Raster src, Raster dst,
+    public static native int convolveRaster(Raster src, Raster dst,
                                             Kernel kernel, int edgeHint);
-    static public native int lookupByteBI(BufferedImage src, BufferedImage dst,
+    public static native int lookupByteBI(BufferedImage src, BufferedImage dst,
                                         byte[][] table);
-    static public native int lookupByteRaster(Raster src, Raster dst,
+    public static native int lookupByteRaster(Raster src, Raster dst,
                                               byte[][] table);
 
     static {
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/IntegerComponentRaster.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/IntegerComponentRaster.java	Wed Jul 05 20:52:37 2017 +0200
@@ -91,7 +91,7 @@
     /** A cached copy of minY + height for use in bounds checks. */
     private int maxY;
 
-    static private native void initIDs();
+    private static native void initIDs();
     static {
         /* ensure that the necessary native libraries are loaded */
         NativeLibLoader.loadLibraries();
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/PNGImageDecoder.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/PNGImageDecoder.java	Wed Jul 05 20:52:37 2017 +0200
@@ -650,13 +650,13 @@
     }
   /* code changed to make it work with ImageDecoder architecture
     static int ThreadLimit = 10;
-    private synchronized static void waitTurn() {
+    private static synchronized void waitTurn() {
         try {
             while(ThreadLimit<=0) PNGImageDecoder.class.wait(1000);
         } catch(InterruptedException e){}
         ThreadLimit--;
     }
-    private synchronized static void endTurn() {
+    private static synchronized void endTurn() {
         if(ThreadLimit<=0) PNGImageDecoder.class.notify();
         ThreadLimit++;
     }
@@ -771,7 +771,7 @@
     is the 1's complement of the final running CRC (see the
     crc() routine below)). */
 
-    static private int update_crc(int crc, byte[] buf, int offset, int len) {
+    private static int update_crc(int crc, byte[] buf, int offset, int len) {
         int c = crc;
         while (--len>=0)
             c = crc_table[(c ^ buf[offset++]) & 0xff] ^ (c >>> 8);
@@ -779,7 +779,7 @@
     }
 
     /* Return the CRC of the bytes buf[0..len-1]. */
-    static private int crc(byte[] buf, int offset, int len) {
+    private static int crc(byte[] buf, int offset, int len) {
         return update_crc(0xffffffff, buf, offset, len) ^ 0xffffffff;
     }
     public static class Chromaticities {
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ShortComponentRaster.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ShortComponentRaster.java	Wed Jul 05 20:52:37 2017 +0200
@@ -76,7 +76,7 @@
     /** A cached copy of minY + height for use in bounds checks. */
     private int maxY;
 
-    static private native void initIDs();
+    private static native void initIDs();
     static {
         /* ensure that the necessary native libraries are loaded */
         NativeLibLoader.loadLibraries();
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/SurfaceManager.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/SurfaceManager.java	Wed Jul 05 20:52:37 2017 +0200
@@ -51,7 +51,7 @@
  */
 public abstract class SurfaceManager {
 
-    public static abstract class ImageAccessor {
+    public abstract static class ImageAccessor {
         public abstract SurfaceManager getSurfaceManager(Image img);
         public abstract void setSurfaceManager(Image img, SurfaceManager mgr);
     }
--- a/jdk/src/java.desktop/share/classes/sun/dc/DuctusRenderingEngine.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/dc/DuctusRenderingEngine.java	Wed Jul 05 20:52:37 2017 +0200
@@ -359,7 +359,7 @@
 
     private static Rasterizer theRasterizer;
 
-    public synchronized static Rasterizer getRasterizer() {
+    public static synchronized Rasterizer getRasterizer() {
         Rasterizer r = theRasterizer;
         if (r == null) {
             r = new Rasterizer();
@@ -369,7 +369,7 @@
         return r;
     }
 
-    public synchronized static void dropRasterizer(Rasterizer r) {
+    public static synchronized void dropRasterizer(Rasterizer r) {
         r.reset();
         theRasterizer = r;
     }
--- a/jdk/src/java.desktop/share/classes/sun/font/Type1Font.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/font/Type1Font.java	Wed Jul 05 20:52:37 2017 +0200
@@ -102,8 +102,8 @@
 
     private String psName = null;
 
-    static private HashMap<String, String> styleAbbreviationsMapping;
-    static private HashSet<String> styleNameTokes;
+    private static HashMap<String, String> styleAbbreviationsMapping;
+    private static HashSet<String> styleNameTokes;
 
     static {
         styleAbbreviationsMapping = new HashMap<>();
--- a/jdk/src/java.desktop/share/classes/sun/java2d/NullSurfaceData.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/NullSurfaceData.java	Wed Jul 05 20:52:37 2017 +0200
@@ -63,7 +63,7 @@
         return this;
     }
 
-    private final static NullPipe nullpipe = new NullPipe();
+    private static final NullPipe nullpipe = new NullPipe();
 
     public void validatePipe(SunGraphics2D sg2d) {
         sg2d.drawpipe = nullpipe;
--- a/jdk/src/java.desktop/share/classes/sun/java2d/StateTrackableDelegate.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/StateTrackableDelegate.java	Wed Jul 05 20:52:37 2017 +0200
@@ -44,7 +44,7 @@
      * of the StateTrackable interface that is permanently in the
      * {@link State#UNTRACKABLE UNTRACKABLE} state.
      */
-    public final static StateTrackableDelegate UNTRACKABLE_DELEGATE =
+    public static final StateTrackableDelegate UNTRACKABLE_DELEGATE =
         new StateTrackableDelegate(UNTRACKABLE);
 
     /**
@@ -52,7 +52,7 @@
      * of the StateTrackable interface that is permanently in the
      * {@link State#IMMUTABLE IMMUTABLE} state.
      */
-    public final static StateTrackableDelegate IMMUTABLE_DELEGATE =
+    public static final StateTrackableDelegate IMMUTABLE_DELEGATE =
         new StateTrackableDelegate(IMMUTABLE);
 
     /**
--- a/jdk/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java	Wed Jul 05 20:52:37 2017 +0200
@@ -252,7 +252,7 @@
     private FontInfo glyphVectorFontInfo;
     private FontRenderContext glyphVectorFRC;
 
-    private final static int slowTextTransformMask =
+    private static final int slowTextTransformMask =
                             AffineTransform.TYPE_GENERAL_TRANSFORM
                         |   AffineTransform.TYPE_MASK_ROTATION
                         |   AffineTransform.TYPE_FLIP;
--- a/jdk/src/java.desktop/share/classes/sun/java2d/SurfaceManagerFactory.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/SurfaceManagerFactory.java	Wed Jul 05 20:52:37 2017 +0200
@@ -50,7 +50,7 @@
      *
      * @return the surface manager factory
      */
-    public synchronized static SurfaceManagerFactory getInstance() {
+    public static synchronized SurfaceManagerFactory getInstance() {
 
         if (instance == null) {
             throw new IllegalStateException("No SurfaceManagerFactory set.");
@@ -65,7 +65,7 @@
      *
      * @param factory the factory to set
      */
-    public synchronized static void setInstance(SurfaceManagerFactory factory) {
+    public static synchronized void setInstance(SurfaceManagerFactory factory) {
 
         if (factory == null) {
             // We don't want to allow setting this to null at any time.
--- a/jdk/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMS.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMS.java	Wed Jul 05 20:52:37 2017 +0200
@@ -136,7 +136,7 @@
     private native void setTagDataNative(long ptr, int tagSignature,
                                                byte[] data);
 
-    public synchronized static native LCMSProfile getProfileID(ICC_Profile profile);
+    public static synchronized native LCMSProfile getProfileID(ICC_Profile profile);
 
     /* Helper method used from LCMSColorTransfrom */
     static long createTransform(
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/CompositeType.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/CompositeType.java	Wed Jul 05 20:52:37 2017 +0200
@@ -242,7 +242,7 @@
         this.uniqueID = makeUniqueID(desc);
     }
 
-    public synchronized static int makeUniqueID(String desc) {
+    public static synchronized int makeUniqueID(String desc) {
         Integer i = compositeUIDMap.get(desc);
 
         if (i == null) {
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawGlyphList.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawGlyphList.java	Wed Jul 05 20:52:37 2017 +0200
@@ -39,9 +39,9 @@
  */
 public class DrawGlyphList extends GraphicsPrimitive {
 
-    public final static String methodSignature = "DrawGlyphList(...)".toString();
+    public static final String methodSignature = "DrawGlyphList(...)".toString();
 
-    public final static int primTypeID = makePrimTypeID();
+    public static final int primTypeID = makePrimTypeID();
 
     public static DrawGlyphList locate(SurfaceType srctype,
                                    CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawGlyphListAA.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawGlyphListAA.java	Wed Jul 05 20:52:37 2017 +0200
@@ -39,9 +39,9 @@
  */
 public class DrawGlyphListAA extends GraphicsPrimitive {
 
-    public final static String methodSignature = "DrawGlyphListAA(...)".toString();
+    public static final String methodSignature = "DrawGlyphListAA(...)".toString();
 
-    public final static int primTypeID = makePrimTypeID();
+    public static final int primTypeID = makePrimTypeID();
 
     public static DrawGlyphListAA locate(SurfaceType srctype,
                                    CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawGlyphListLCD.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawGlyphListLCD.java	Wed Jul 05 20:52:37 2017 +0200
@@ -39,10 +39,10 @@
  */
 public class DrawGlyphListLCD extends GraphicsPrimitive {
 
-    public final static String
+    public static final String
         methodSignature = "DrawGlyphListLCD(...)".toString();
 
-    public final static int primTypeID = makePrimTypeID();
+    public static final int primTypeID = makePrimTypeID();
 
     public static DrawGlyphListLCD locate(SurfaceType srctype,
                                            CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawLine.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawLine.java	Wed Jul 05 20:52:37 2017 +0200
@@ -44,9 +44,9 @@
  */
 public class DrawLine extends GraphicsPrimitive
 {
-    public final static String methodSignature = "DrawLine(...)".toString();
+    public static final String methodSignature = "DrawLine(...)".toString();
 
-    public final static int primTypeID = makePrimTypeID();
+    public static final int primTypeID = makePrimTypeID();
 
     public static DrawLine locate(SurfaceType srctype,
                                   CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawParallelogram.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawParallelogram.java	Wed Jul 05 20:52:37 2017 +0200
@@ -42,10 +42,10 @@
  */
 public class DrawParallelogram extends GraphicsPrimitive
 {
-    public final static String methodSignature =
+    public static final String methodSignature =
         "DrawParallelogram(...)".toString();
 
-    public final static int primTypeID = makePrimTypeID();
+    public static final int primTypeID = makePrimTypeID();
 
     public static DrawParallelogram locate(SurfaceType srctype,
                                            CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawPath.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawPath.java	Wed Jul 05 20:52:37 2017 +0200
@@ -38,10 +38,10 @@
  */
 public class DrawPath extends GraphicsPrimitive {
 
-    public final static String methodSignature =
+    public static final String methodSignature =
         "DrawPath(...)".toString();
 
-    public final static int primTypeID = makePrimTypeID();
+    public static final int primTypeID = makePrimTypeID();
 
     public static DrawPath locate(SurfaceType srctype,
                                   CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawPolygons.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawPolygons.java	Wed Jul 05 20:52:37 2017 +0200
@@ -41,9 +41,9 @@
  */
 public class DrawPolygons extends GraphicsPrimitive
 {
-    public final static String methodSignature = "DrawPolygons(...)".toString();
+    public static final String methodSignature = "DrawPolygons(...)".toString();
 
-    public final static int primTypeID = makePrimTypeID();
+    public static final int primTypeID = makePrimTypeID();
 
     public static DrawPolygons locate(SurfaceType srctype,
                                       CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawRect.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawRect.java	Wed Jul 05 20:52:37 2017 +0200
@@ -44,9 +44,9 @@
  */
 public class DrawRect extends GraphicsPrimitive
 {
-    public final static String methodSignature = "DrawRect(...)".toString();
+    public static final String methodSignature = "DrawRect(...)".toString();
 
-    public final static int primTypeID = makePrimTypeID();
+    public static final int primTypeID = makePrimTypeID();
 
     public static DrawRect locate(SurfaceType srctype,
                                   CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillParallelogram.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillParallelogram.java	Wed Jul 05 20:52:37 2017 +0200
@@ -40,10 +40,10 @@
  */
 public class FillParallelogram extends GraphicsPrimitive
 {
-    public final static String methodSignature =
+    public static final String methodSignature =
         "FillParallelogram(...)".toString();
 
-    public final static int primTypeID = makePrimTypeID();
+    public static final int primTypeID = makePrimTypeID();
 
     public static FillParallelogram locate(SurfaceType srctype,
                                            CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillPath.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillPath.java	Wed Jul 05 20:52:37 2017 +0200
@@ -38,10 +38,10 @@
  */
 public class FillPath extends GraphicsPrimitive {
 
-    public final static String methodSignature =
+    public static final String methodSignature =
         "FillPath(...)".toString();
 
-    public final static int primTypeID = makePrimTypeID();
+    public static final int primTypeID = makePrimTypeID();
 
     public static FillPath locate(SurfaceType srctype,
                                   CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillRect.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillRect.java	Wed Jul 05 20:52:37 2017 +0200
@@ -44,9 +44,9 @@
  */
 public class FillRect extends GraphicsPrimitive
 {
-    public final static String methodSignature = "FillRect(...)".toString();
+    public static final String methodSignature = "FillRect(...)".toString();
 
-    public final static int primTypeID = makePrimTypeID();
+    public static final int primTypeID = makePrimTypeID();
 
     public static FillRect locate(SurfaceType srctype,
                                   CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillSpans.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillSpans.java	Wed Jul 05 20:52:37 2017 +0200
@@ -45,9 +45,9 @@
  */
 public class FillSpans extends GraphicsPrimitive
 {
-    public final static String methodSignature = "FillSpans(...)".toString();
+    public static final String methodSignature = "FillSpans(...)".toString();
 
-    public final static int primTypeID = makePrimTypeID();
+    public static final int primTypeID = makePrimTypeID();
 
     public static FillSpans locate(SurfaceType srctype,
                                    CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/GraphicsPrimitive.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/GraphicsPrimitive.java	Wed Jul 05 20:52:37 2017 +0200
@@ -119,14 +119,14 @@
 
     private long pNativePrim;   // Native blit loop info
 
-    public synchronized static final int makePrimTypeID() {
+    public static final synchronized int makePrimTypeID() {
         if (unusedPrimID > 255) {
             throw new InternalError("primitive id overflow");
         }
         return unusedPrimID++;
     }
 
-    public synchronized static final int makeUniqueID(int primTypeID,
+    public static final synchronized int makeUniqueID(int primTypeID,
                                                       SurfaceType src,
                                                       CompositeType cmp,
                                                       SurfaceType dst)
@@ -456,7 +456,7 @@
         }
     }
 
-    public synchronized static void tracePrimitive(Object prim) {
+    public static synchronized void tracePrimitive(Object prim) {
         if ((traceflags & TRACECOUNTS) != 0) {
             if (traceMap == null) {
                 traceMap = new HashMap<>();
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/GraphicsPrimitiveMgr.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/GraphicsPrimitiveMgr.java	Wed Jul 05 20:52:37 2017 +0200
@@ -98,7 +98,7 @@
     private GraphicsPrimitiveMgr() {
     }
 
-    public synchronized static void register(GraphicsPrimitive[] newPrimitives)
+    public static synchronized void register(GraphicsPrimitive[] newPrimitives)
     {
         GraphicsPrimitive[] devCollection = primitives;
         int oldSize = 0;
@@ -121,7 +121,7 @@
         primitives = temp;
     }
 
-    public synchronized static void registerGeneral(GraphicsPrimitive gen) {
+    public static synchronized void registerGeneral(GraphicsPrimitive gen) {
         if (generalPrimitives == null) {
             generalPrimitives = new GraphicsPrimitive[] {gen};
             return;
@@ -133,7 +133,7 @@
         generalPrimitives = newGen;
     }
 
-    public synchronized static GraphicsPrimitive locate(int primTypeID,
+    public static synchronized GraphicsPrimitive locate(int primTypeID,
                                                         SurfaceType dsttype)
     {
         return locate(primTypeID,
@@ -142,7 +142,7 @@
                       dsttype);
     }
 
-    public synchronized static GraphicsPrimitive locate(int primTypeID,
+    public static synchronized GraphicsPrimitive locate(int primTypeID,
                                                         SurfaceType srctype,
                                                         CompositeType comptype,
                                                         SurfaceType dsttype)
@@ -170,7 +170,7 @@
         return prim;
     }
 
-    public synchronized static GraphicsPrimitive
+    public static synchronized GraphicsPrimitive
         locatePrim(int primTypeID,
                    SurfaceType srctype,
                    CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/ProcessPath.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/ProcessPath.java	Wed Jul 05 20:52:37 2017 +0200
@@ -45,7 +45,7 @@
 
     /* Public interfaces and methods for drawing and filling general paths */
 
-    public static abstract class DrawHandler {
+    public abstract static class DrawHandler {
         public int xMin;
         public int yMin;
         public int xMax;
@@ -121,7 +121,7 @@
     public static final int PH_MODE_DRAW_CLIP = 0;
     public static final int PH_MODE_FILL_CLIP = 1;
 
-    public static abstract class ProcessHandler implements EndSubPathHandler {
+    public abstract static class ProcessHandler implements EndSubPathHandler {
         DrawHandler dhnd;
         int clipMode;
 
--- a/jdk/src/java.desktop/share/classes/sun/java2d/opengl/OGLPaints.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/opengl/OGLPaints.java	Wed Jul 05 20:52:37 2017 +0200
@@ -151,7 +151,7 @@
 
 /****************** Shared MultipleGradientPaint support ********************/
 
-    private static abstract class MultiGradient extends OGLPaints {
+    private abstract static class MultiGradient extends OGLPaints {
         protected MultiGradient() {}
 
         /**
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/AAShapePipe.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/AAShapePipe.java	Wed Jul 05 20:52:37 2017 +0200
@@ -127,7 +127,7 @@
 
     private static byte[] theTile;
 
-    private synchronized static byte[] getAlphaTile(int len) {
+    private static synchronized byte[] getAlphaTile(int len) {
         byte[] t = theTile;
         if (t == null || t.length < len) {
             t = new byte[len];
@@ -137,7 +137,7 @@
         return t;
     }
 
-    private synchronized static void dropAlphaTile(byte[] t) {
+    private static synchronized void dropAlphaTile(byte[] t) {
         theTile = t;
     }
 
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/LoopPipe.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/LoopPipe.java	Wed Jul 05 20:52:37 2017 +0200
@@ -52,7 +52,7 @@
                ShapeDrawPipe,
                LoopBasedPipe
 {
-    final static RenderingEngine RenderEngine = RenderingEngine.getInstance();
+    static final RenderingEngine RenderEngine = RenderingEngine.getInstance();
 
     public void drawLine(SunGraphics2D sg2d,
                          int x1, int y1, int x2, int y2)
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/SpanShapeRenderer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/SpanShapeRenderer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -42,7 +42,7 @@
  * perform the actual rendering.
  */
 public abstract class SpanShapeRenderer implements ShapeDrawPipe {
-    final static RenderingEngine RenderEngine = RenderingEngine.getInstance();
+    static final RenderingEngine RenderEngine = RenderingEngine.getInstance();
 
     public static class Composite extends SpanShapeRenderer {
         CompositePipe comppipe;
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pisces/Renderer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pisces/Renderer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -311,12 +311,12 @@
     public static final int WIND_NON_ZERO = 1;
 
     // Antialiasing
-    final private int SUBPIXEL_LG_POSITIONS_X;
-    final private int SUBPIXEL_LG_POSITIONS_Y;
-    final private int SUBPIXEL_POSITIONS_X;
-    final private int SUBPIXEL_POSITIONS_Y;
-    final private int SUBPIXEL_MASK_X;
-    final private int SUBPIXEL_MASK_Y;
+    private final int SUBPIXEL_LG_POSITIONS_X;
+    private final int SUBPIXEL_LG_POSITIONS_Y;
+    private final int SUBPIXEL_POSITIONS_X;
+    private final int SUBPIXEL_POSITIONS_Y;
+    private final int SUBPIXEL_MASK_X;
+    private final int SUBPIXEL_MASK_Y;
     final int MAX_AA_ALPHA;
 
     // Cache to store RLE-encoded coverage mask of the current primitive
--- a/jdk/src/java.desktop/share/classes/sun/print/CustomMediaSizeName.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/print/CustomMediaSizeName.java	Wed Jul 05 20:52:37 2017 +0200
@@ -43,7 +43,7 @@
 
     }
 
-    private synchronized static int nextValue(String name) {
+    private static synchronized int nextValue(String name) {
       customStringTable.add(name);
 
       return (customStringTable.size()-1);
--- a/jdk/src/java.desktop/share/classes/sun/print/CustomMediaTray.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/print/CustomMediaTray.java	Wed Jul 05 20:52:37 2017 +0200
@@ -40,7 +40,7 @@
 
     }
 
-    private synchronized static int nextValue(String name) {
+    private static synchronized int nextValue(String name) {
       customStringTable.add(name);
       return (customStringTable.size()-1);
     }
--- a/jdk/src/java.desktop/share/classes/sun/print/PSStreamPrintJob.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/print/PSStreamPrintJob.java	Wed Jul 05 20:52:37 2017 +0200
@@ -66,9 +66,9 @@
 
 public class PSStreamPrintJob implements CancelablePrintJob {
 
-    transient private Vector<PrintJobListener> jobListeners;
-    transient private Vector<PrintJobAttributeListener> attrListeners;
-    transient private Vector<PrintJobAttributeSet> listenedAttributeSets;
+    private transient Vector<PrintJobListener> jobListeners;
+    private transient Vector<PrintJobAttributeListener> attrListeners;
+    private transient Vector<PrintJobAttributeSet> listenedAttributeSets;
 
     private PSStreamPrintService service;
     private boolean fidelity;
--- a/jdk/src/java.desktop/share/classes/sun/print/PeekGraphics.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/print/PeekGraphics.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1885,7 +1885,7 @@
             return mHeight;
         }
 
-        synchronized private void waitForDimensions(Image img) {
+        private synchronized void waitForDimensions(Image img) {
             mHeight = img.getHeight(this);
             mWidth = img.getWidth(this);
             while (!badImage && (mWidth < 0 || mHeight < 0)) {
@@ -1903,7 +1903,7 @@
             }
         }
 
-        synchronized public boolean imageUpdate(Image image, int flags,
+        public synchronized boolean imageUpdate(Image image, int flags,
                                                 int x, int y, int w, int h) {
 
             boolean dontCallMeAgain = (flags & (HEIGHT | ABORT | ERROR)) != 0;
--- a/jdk/src/java.desktop/share/classes/sun/print/PrintJob2D.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/print/PrintJob2D.java	Wed Jul 05 20:52:37 2017 +0200
@@ -263,27 +263,27 @@
 
     // The following Strings are maintained for backward-compatibility with
     // Properties based print control.
-    private final static String DEST_PROP = "awt.print.destination";
-    private final static String PRINTER = "printer";
-    private final static String FILE = "file";
+    private static final String DEST_PROP = "awt.print.destination";
+    private static final String PRINTER = "printer";
+    private static final String FILE = "file";
 
-    private final static String PRINTER_PROP = "awt.print.printer";
+    private static final String PRINTER_PROP = "awt.print.printer";
 
-    private final static String FILENAME_PROP = "awt.print.fileName";
+    private static final String FILENAME_PROP = "awt.print.fileName";
 
-    private final static String NUMCOPIES_PROP = "awt.print.numCopies";
+    private static final String NUMCOPIES_PROP = "awt.print.numCopies";
 
-    private final static String OPTIONS_PROP = "awt.print.options";
+    private static final String OPTIONS_PROP = "awt.print.options";
 
-    private final static String ORIENT_PROP = "awt.print.orientation";
-    private final static String PORTRAIT = "portrait";
-    private final static String LANDSCAPE = "landscape";
+    private static final String ORIENT_PROP = "awt.print.orientation";
+    private static final String PORTRAIT = "portrait";
+    private static final String LANDSCAPE = "landscape";
 
-    private final static String PAPERSIZE_PROP = "awt.print.paperSize";
-    private final static String LETTER = "letter";
-    private final static String LEGAL = "legal";
-    private final static String EXECUTIVE = "executive";
-    private final static String A4 = "a4";
+    private static final String PAPERSIZE_PROP = "awt.print.paperSize";
+    private static final String LETTER = "letter";
+    private static final String LEGAL = "legal";
+    private static final String EXECUTIVE = "executive";
+    private static final String A4 = "a4";
 
     private Properties props;
 
--- a/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java	Wed Jul 05 20:52:37 2017 +0200
@@ -335,67 +335,67 @@
      * Returns the resolution in dots per inch across the width
      * of the page.
      */
-    abstract protected double getXRes();
+    protected abstract double getXRes();
 
     /**
      * Returns the resolution in dots per inch down the height
      * of the page.
      */
-    abstract protected double getYRes();
+    protected abstract double getYRes();
 
     /**
      * Must be obtained from the current printer.
      * Value is in device pixels.
      * Not adjusted for orientation of the paper.
      */
-    abstract protected double getPhysicalPrintableX(Paper p);
+    protected abstract double getPhysicalPrintableX(Paper p);
 
     /**
      * Must be obtained from the current printer.
      * Value is in device pixels.
      * Not adjusted for orientation of the paper.
      */
-    abstract protected double getPhysicalPrintableY(Paper p);
+    protected abstract double getPhysicalPrintableY(Paper p);
 
     /**
      * Must be obtained from the current printer.
      * Value is in device pixels.
      * Not adjusted for orientation of the paper.
      */
-    abstract protected double getPhysicalPrintableWidth(Paper p);
+    protected abstract double getPhysicalPrintableWidth(Paper p);
 
     /**
      * Must be obtained from the current printer.
      * Value is in device pixels.
      * Not adjusted for orientation of the paper.
      */
-    abstract protected double getPhysicalPrintableHeight(Paper p);
+    protected abstract double getPhysicalPrintableHeight(Paper p);
 
     /**
      * Must be obtained from the current printer.
      * Value is in device pixels.
      * Not adjusted for orientation of the paper.
      */
-    abstract protected double getPhysicalPageWidth(Paper p);
+    protected abstract double getPhysicalPageWidth(Paper p);
 
     /**
      * Must be obtained from the current printer.
      * Value is in device pixels.
      * Not adjusted for orientation of the paper.
      */
-    abstract protected double getPhysicalPageHeight(Paper p);
+    protected abstract double getPhysicalPageHeight(Paper p);
 
     /**
      * Begin a new page.
      */
-    abstract protected void startPage(PageFormat format, Printable painter,
+    protected abstract void startPage(PageFormat format, Printable painter,
                                       int index, boolean paperChanged)
         throws PrinterException;
 
     /**
      * End a page.
      */
-    abstract protected void endPage(PageFormat format, Printable painter,
+    protected abstract void endPage(PageFormat format, Printable painter,
                                     int index)
         throws PrinterException;
 
@@ -406,7 +406,7 @@
      * page. The width and height of the band is
      * specified by the caller.
      */
-    abstract protected void printBand(byte[] data, int x, int y,
+    protected abstract void printBand(byte[] data, int x, int y,
                                       int width, int height)
         throws PrinterException;
 
--- a/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java	Wed Jul 05 20:52:37 2017 +0200
@@ -87,17 +87,17 @@
     /**
      * Waiting print status (user response pending).
      */
-    public final static int WAITING = 0;
+    public static final int WAITING = 0;
 
     /**
      * Approve print status (user activated "Print" or "OK").
      */
-    public final static int APPROVE = 1;
+    public static final int APPROVE = 1;
 
     /**
      * Cancel print status (user activated "Cancel");
      */
-    public final static int CANCEL = 2;
+    public static final int CANCEL = 2;
 
     private static final String strBundle = "sun.print.resources.serviceui";
     private static final Insets panelInsets = new Insets(6, 6, 6, 6);
--- a/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java	Wed Jul 05 20:52:37 2017 +0200
@@ -63,14 +63,14 @@
     // Constants for actions. These are used for the actions' ACTION_COMMAND_KEY
     // and as keys in the action maps for FilePane and the corresponding UI classes
 
-    public final static String ACTION_APPROVE_SELECTION = "approveSelection";
-    public final static String ACTION_CANCEL            = "cancelSelection";
-    public final static String ACTION_EDIT_FILE_NAME    = "editFileName";
-    public final static String ACTION_REFRESH           = "refresh";
-    public final static String ACTION_CHANGE_TO_PARENT_DIRECTORY = "Go Up";
-    public final static String ACTION_NEW_FOLDER        = "New Folder";
-    public final static String ACTION_VIEW_LIST         = "viewTypeList";
-    public final static String ACTION_VIEW_DETAILS      = "viewTypeDetails";
+    public static final String ACTION_APPROVE_SELECTION = "approveSelection";
+    public static final String ACTION_CANCEL            = "cancelSelection";
+    public static final String ACTION_EDIT_FILE_NAME    = "editFileName";
+    public static final String ACTION_REFRESH           = "refresh";
+    public static final String ACTION_CHANGE_TO_PARENT_DIRECTORY = "Go Up";
+    public static final String ACTION_NEW_FOLDER        = "New Folder";
+    public static final String ACTION_VIEW_LIST         = "viewTypeList";
+    public static final String ACTION_VIEW_DETAILS      = "viewTypeDetails";
 
     private Action[] actions;
 
--- a/jdk/src/java.desktop/share/classes/sun/swing/ImageCache.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/swing/ImageCache.java	Wed Jul 05 20:52:37 2017 +0200
@@ -37,7 +37,7 @@
     // Maximum number of entries to cache
     private int maxCount;
     // The entries.
-    final private LinkedList<SoftReference<Entry>> entries;
+    private final LinkedList<SoftReference<Entry>> entries;
 
     public ImageCache(int maxCount) {
         this.maxCount = maxCount;
@@ -102,10 +102,10 @@
      * Caches set of arguments and Image.
      */
     private static class Entry {
-        final private GraphicsConfiguration config;
-        final private int w;
-        final private int h;
-        final private Object[] args;
+        private final GraphicsConfiguration config;
+        private final int w;
+        private final int h;
+        private final Object[] args;
         private Image image;
 
         Entry(GraphicsConfiguration config, int w, int h, Object[] args) {
--- a/jdk/src/java.desktop/share/classes/sun/swing/SwingAccessor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/swing/SwingAccessor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -97,6 +97,14 @@
                                   int ownerX, int ownerY);
     }
 
+    /*
+     * An accessor for the KeyStroke class
+     */
+    public interface KeyStrokeAccessor {
+
+        KeyStroke create();
+    }
+
     /**
      * The javax.swing.text.JTextComponent class accessor object.
      */
@@ -185,4 +193,26 @@
     public static void setPopupFactoryAccessor(PopupFactoryAccessor popupFactoryAccessor) {
         SwingAccessor.popupFactoryAccessor = popupFactoryAccessor;
     }
+
+    /**
+     * The KeyStroke class accessor object.
+     */
+    private static KeyStrokeAccessor keyStrokeAccessor;
+
+    /**
+     * Retrieve the accessor object for the KeyStroke class.
+     */
+    public static KeyStrokeAccessor getKeyStrokeAccessor() {
+        if (keyStrokeAccessor == null) {
+            unsafe.ensureClassInitialized(KeyStroke.class);
+        }
+        return keyStrokeAccessor;
+    }
+
+    /*
+     * Set the accessor object for the KeyStroke class.
+     */
+    public static void setKeyStrokeAccessor(KeyStrokeAccessor accessor) {
+        SwingAccessor.keyStrokeAccessor = accessor;
+    }
 }
--- a/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java	Wed Jul 05 20:52:37 2017 +0200
@@ -135,13 +135,6 @@
         }
     }
 
-    /**
-     * Key used in client properties used to indicate that the
-     * {@code ComponentUI} of the JComponent instance should be returned.
-     */
-    public static final Object COMPONENT_UI_PROPERTY_KEY =
-                            new StringBuffer("ComponentUIPropertyKey");
-
     /** Client Property key for the text maximal offsets for BasicMenuItemUI */
     public static final StringUIClientPropertyKey BASICMENUITEMUI_MAX_TEXT_OFFSET =
         new StringUIClientPropertyKey ("maxTextOffset");
--- a/jdk/src/java.desktop/share/classes/sun/swing/plaf/synth/SynthFileChooserUI.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/swing/plaf/synth/SynthFileChooserUI.java	Wed Jul 05 20:52:37 2017 +0200
@@ -228,8 +228,8 @@
     protected void paint(SynthContext context, Graphics g) {
     }
 
-    abstract public void setFileName(String fileName);
-    abstract public String getFileName();
+    public abstract void setFileName(String fileName);
+    public abstract String getFileName();
 
     protected void doSelectedFileChanged(PropertyChangeEvent e) {
     }
--- a/jdk/src/java.desktop/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java	Wed Jul 05 20:52:37 2017 +0200
@@ -699,7 +699,7 @@
         }
     }
 
-    final static int space = 10;
+    static final int space = 10;
     class IndentIcon implements Icon {
 
         Icon icon = null;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java	Wed Jul 05 20:52:37 2017 +0200
@@ -169,12 +169,12 @@
                     display();
                 }};
 
-        private final static int TOOLTIP_SHOW_TIME = 10000;
-        private final static int TOOLTIP_START_DELAY_TIME = 1000;
-        private final static int TOOLTIP_MAX_LENGTH = 64;
-        private final static int TOOLTIP_MOUSE_CURSOR_INDENT = 5;
-        private final static Color TOOLTIP_BACKGROUND_COLOR = new Color(255, 255, 220);
-        private final static Font TOOLTIP_TEXT_FONT = XWindow.getDefaultFont();
+        private static final int TOOLTIP_SHOW_TIME = 10000;
+        private static final int TOOLTIP_START_DELAY_TIME = 1000;
+        private static final int TOOLTIP_MAX_LENGTH = 64;
+        private static final int TOOLTIP_MOUSE_CURSOR_INDENT = 5;
+        private static final Color TOOLTIP_BACKGROUND_COLOR = new Color(255, 255, 220);
+        private static final Font TOOLTIP_TEXT_FONT = XWindow.getDefaultFont();
 
         public Tooltip(Frame parent, Object target,
                 LiveArguments liveArguments)
@@ -258,15 +258,15 @@
         private final LiveArguments liveArguments;
         private final Object target;
 
-        private final static int BALLOON_SHOW_TIME = 10000;
-        private final static int BALLOON_TEXT_MAX_LENGTH = 256;
-        private final static int BALLOON_WORD_LINE_MAX_LENGTH = 16;
-        private final static int BALLOON_WORD_LINE_MAX_COUNT = 4;
-        private final static int BALLOON_ICON_WIDTH = 32;
-        private final static int BALLOON_ICON_HEIGHT = 32;
-        private final static int BALLOON_TRAY_ICON_INDENT = 0;
-        private final static Color BALLOON_CAPTION_BACKGROUND_COLOR = new Color(200, 200 ,255);
-        private final static Font BALLOON_CAPTION_FONT = new Font(Font.DIALOG, Font.BOLD, 12);
+        private static final int BALLOON_SHOW_TIME = 10000;
+        private static final int BALLOON_TEXT_MAX_LENGTH = 256;
+        private static final int BALLOON_WORD_LINE_MAX_LENGTH = 16;
+        private static final int BALLOON_WORD_LINE_MAX_COUNT = 4;
+        private static final int BALLOON_ICON_WIDTH = 32;
+        private static final int BALLOON_ICON_HEIGHT = 32;
+        private static final int BALLOON_TRAY_ICON_INDENT = 0;
+        private static final Color BALLOON_CAPTION_BACKGROUND_COLOR = new Color(200, 200 ,255);
+        private static final Font BALLOON_CAPTION_FONT = new Font(Font.DIALOG, Font.BOLD, 12);
 
         private Panel mainPanel = new Panel();
         private Panel captionPanel = new Panel();
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/MWMConstants.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/MWMConstants.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,7 +26,7 @@
 
 package sun.awt.X11;
 
-final public class MWMConstants {
+public final class MWMConstants {
 
     private MWMConstants(){}
 
@@ -62,8 +62,8 @@
 /* number of elements of size 32 in _MWM_HINTS */
     static final int PROP_MWM_HINTS_ELEMENTS          = 5;
 /* number of elements of size 32 in _MWM_INFO */
-    final static int PROP_MOTIF_WM_INFO_ELEMENTS=       2;
-    final static int PROP_MWM_INFO_ELEMENTS=            PROP_MOTIF_WM_INFO_ELEMENTS;
+    static final int PROP_MOTIF_WM_INFO_ELEMENTS=       2;
+    static final int PROP_MWM_INFO_ELEMENTS=            PROP_MOTIF_WM_INFO_ELEMENTS;
 
     static final String MWM_HINTS_ATOM_NAME = "_MOTIF_WM_HINTS";
 }
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XAwtState.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XAwtState.java	Wed Jul 05 20:52:37 2017 +0200
@@ -27,7 +27,7 @@
  * This class is a placeholder for all internal static objects that represent
  * system state. We keep our representation up-to-date with actual system
  * state by tracking events, such as X Focus, Component under cursor etc.
- * All attributes should be static private with accessors to simpify change
+ * All attributes should be private static with accessors to simpify change
  * tracking.
  */
 package sun.awt.X11;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java	Wed Jul 05 20:52:37 2017 +0200
@@ -41,7 +41,7 @@
  * The abstract class XBaseMenuWindow is the superclass
  * of all menu windows.
  */
-abstract public class XBaseMenuWindow extends XWindow {
+public abstract class XBaseMenuWindow extends XWindow {
 
     /************************************************
      *
@@ -89,7 +89,7 @@
      * no other locks should be taken when
      * thread own this lock.
      */
-    static private Object menuTreeLock = new Object();
+    private static Object menuTreeLock = new Object();
 
     /************************************************
      *
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java	Wed Jul 05 20:52:37 2017 +0200
@@ -72,8 +72,8 @@
     private XSizeHints hints;
     private XWMHints wmHints;
 
-    final static int MIN_SIZE = 1;
-    final static int DEF_LOCATION = 1;
+    static final int MIN_SIZE = 1;
+    static final int DEF_LOCATION = 1;
 
     private static XAtom wm_client_leader;
 
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -40,7 +40,7 @@
     private Insets borderInsets;
     private Insets contentAreaInsets;
 
-    private final static String propertyPrefix = "Button" + ".";
+    private static final String propertyPrefix = "Button" + ".";
     protected Color focusColor =  SystemColor.windowText;
 
     private boolean disposed = false;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -50,10 +50,10 @@
     // at a time in an
     // unfurled Choice
     // Description of these constants in ListHelper
-    public final static int TEXT_SPACE = 1;
-    public final static int BORDER_WIDTH = 1;
-    public final static int ITEM_MARGIN = 1;
-    public final static int SCROLLBAR_WIDTH = 15;
+    public static final int TEXT_SPACE = 1;
+    public static final int BORDER_WIDTH = 1;
+    public static final int ITEM_MARGIN = 1;
+    public static final int SCROLLBAR_WIDTH = 15;
 
 
     // SHARE THESE!
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -210,7 +210,7 @@
      * Descendants should use this method to determine whether or not native window
      * has focus.
      */
-    final public boolean hasFocus() {
+    public final boolean hasFocus() {
         return bHasFocus;
     }
 
@@ -242,7 +242,7 @@
     private static Class<?> seClass;
     private static Constructor<?> seCtor;
 
-    final static AWTEvent wrapInSequenced(AWTEvent event) {
+    static final AWTEvent wrapInSequenced(AWTEvent event) {
         try {
             if (seClass == null) {
                 seClass = Class.forName("java.awt.SequencedEvent");
@@ -283,7 +283,7 @@
 
     // TODO: consider moving it to KeyboardFocusManagerPeerImpl
     @SuppressWarnings("deprecation")
-    final public boolean requestFocus(Component lightweightChild, boolean temporary,
+    public final boolean requestFocus(Component lightweightChild, boolean temporary,
                                       boolean focusedWindowChangeAllowed, long time,
                                       CausedFocusEvent.Cause cause)
     {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XConstants.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XConstants.java	Wed Jul 05 20:52:37 2017 +0200
@@ -25,7 +25,7 @@
 
 package sun.awt.X11;
 
-final public class XConstants {
+public final class XConstants {
 
     private XConstants(){}
 
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XCursorFontConstants.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XCursorFontConstants.java	Wed Jul 05 20:52:37 2017 +0200
@@ -25,7 +25,7 @@
 
 package sun.awt.X11;
 
-final public class XCursorFontConstants {
+public final class XCursorFontConstants {
 
     private XCursorFontConstants(){}
 
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -904,7 +904,7 @@
         return getSize().height;
     }
 
-    final public WindowDimensions getDimensions() {
+    public final WindowDimensions getDimensions() {
         return dimensions;
     }
 
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDragAndDropProtocols.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDragAndDropProtocols.java	Wed Jul 05 20:52:37 2017 +0200
@@ -36,8 +36,8 @@
  * @since 1.5
  */
 final class XDragAndDropProtocols {
-    private final static List<XDragSourceProtocol> dragProtocols;
-    private final static List<XDropTargetProtocol> dropProtocols;
+    private static final List<XDragSourceProtocol> dragProtocols;
+    private static final List<XDropTargetProtocol> dropProtocols;
 
     public static final String XDnD = "XDnD";
     public static final String MotifDnD = "MotifDnD";
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetContextPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetContextPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -238,7 +238,7 @@
     static final class XDropTargetProtocolListenerImpl
         implements XDropTargetProtocolListener {
 
-        private final static XDropTargetProtocolListener theInstance =
+        private static final XDropTargetProtocolListener theInstance =
             new XDropTargetProtocolListenerImpl();
 
         private XDropTargetProtocolListenerImpl() {}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedHelper.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedHelper.java	Wed Jul 05 20:52:37 2017 +0200
@@ -38,43 +38,43 @@
  */
 public class XEmbedHelper {
     private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed");
-    final static Unsafe unsafe = Unsafe.getUnsafe();
+    static final Unsafe unsafe = Unsafe.getUnsafe();
 
-    final static int XEMBED_VERSION = 0,
+    static final int XEMBED_VERSION = 0,
         XEMBED_MAPPED = (1 << 0);
 /* XEMBED messages */
-    final static int XEMBED_EMBEDDED_NOTIFY     =       0;
-    final static int XEMBED_WINDOW_ACTIVATE  =  1;
-    final static int XEMBED_WINDOW_DEACTIVATE =         2;
-    final static int XEMBED_REQUEST_FOCUS               =3;
-    final static int XEMBED_FOCUS_IN    =       4;
-    final static int XEMBED_FOCUS_OUT   =       5;
-    final static int XEMBED_FOCUS_NEXT  =       6;
-    final static int XEMBED_FOCUS_PREV  =       7;
+    static final int XEMBED_EMBEDDED_NOTIFY     =       0;
+    static final int XEMBED_WINDOW_ACTIVATE  =  1;
+    static final int XEMBED_WINDOW_DEACTIVATE =         2;
+    static final int XEMBED_REQUEST_FOCUS               =3;
+    static final int XEMBED_FOCUS_IN    =       4;
+    static final int XEMBED_FOCUS_OUT   =       5;
+    static final int XEMBED_FOCUS_NEXT  =       6;
+    static final int XEMBED_FOCUS_PREV  =       7;
 /* 8-9 were used for XEMBED_GRAB_KEY/XEMBED_UNGRAB_KEY */
-    final static int XEMBED_GRAB_KEY = 8;
-    final static int XEMBED_UNGRAB_KEY = 9;
-    final static int XEMBED_MODALITY_ON         =       10;
-    final static int XEMBED_MODALITY_OFF        =       11;
-    final static int XEMBED_REGISTER_ACCELERATOR =    12;
-    final static int XEMBED_UNREGISTER_ACCELERATOR=   13;
-    final static int XEMBED_ACTIVATE_ACCELERATOR  =   14;
+    static final int XEMBED_GRAB_KEY = 8;
+    static final int XEMBED_UNGRAB_KEY = 9;
+    static final int XEMBED_MODALITY_ON         =       10;
+    static final int XEMBED_MODALITY_OFF        =       11;
+    static final int XEMBED_REGISTER_ACCELERATOR =    12;
+    static final int XEMBED_UNREGISTER_ACCELERATOR=   13;
+    static final int XEMBED_ACTIVATE_ACCELERATOR  =   14;
 
-    final static int NON_STANDARD_XEMBED_GTK_GRAB_KEY = 108;
-    final static int NON_STANDARD_XEMBED_GTK_UNGRAB_KEY = 109;
+    static final int NON_STANDARD_XEMBED_GTK_GRAB_KEY = 108;
+    static final int NON_STANDARD_XEMBED_GTK_UNGRAB_KEY = 109;
 
 //     A detail code is required for XEMBED_FOCUS_IN. The following values are valid:
 /* Details for  XEMBED_FOCUS_IN: */
-    final static int XEMBED_FOCUS_CURRENT       =       0;
-    final static int XEMBED_FOCUS_FIRST         =       1;
-    final static int XEMBED_FOCUS_LAST  =       2;
+    static final int XEMBED_FOCUS_CURRENT       =       0;
+    static final int XEMBED_FOCUS_FIRST         =       1;
+    static final int XEMBED_FOCUS_LAST  =       2;
 
 // Modifiers bits
-    final static int XEMBED_MODIFIER_SHIFT   = (1 << 0);
-    final static int XEMBED_MODIFIER_CONTROL = (1 << 1);
-    final static int XEMBED_MODIFIER_ALT     = (1 << 2);
-    final static int XEMBED_MODIFIER_SUPER   = (1 << 3);
-    final static int XEMBED_MODIFIER_HYPER   = (1 << 4);
+    static final int XEMBED_MODIFIER_SHIFT   = (1 << 0);
+    static final int XEMBED_MODIFIER_CONTROL = (1 << 1);
+    static final int XEMBED_MODIFIER_ALT     = (1 << 2);
+    static final int XEMBED_MODIFIER_SUPER   = (1 << 3);
+    static final int XEMBED_MODIFIER_HYPER   = (1 << 4);
 
     static XAtom XEmbedInfo;
     static XAtom XEmbed;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XFileDialogPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XFileDialogPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -862,8 +862,8 @@
 
 @SuppressWarnings("serial") // JDK-implementation class
 class Separator extends Canvas {
-    public final static int HORIZONTAL = 0;
-    public final static int VERTICAL = 1;
+    public static final int HORIZONTAL = 0;
+    public static final int VERTICAL = 1;
     int orientation;
 
     @SuppressWarnings("deprecation")
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XIconWindow.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XIconWindow.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,7 +34,7 @@
 import sun.util.logging.PlatformLogger;
 
 public class XIconWindow extends XBaseWindow {
-    private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XIconWindow");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XIconWindow");
     XDecoratedPeer parent;
     Dimension size;
     long iconPixmap = 0;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XLayerProtocol.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XLayerProtocol.java	Wed Jul 05 20:52:37 2017 +0200
@@ -28,7 +28,7 @@
 
 public interface XLayerProtocol {
 
-    final static int LAYER_NORMAL = 0,
+    static final int LAYER_NORMAL = 0,
         LAYER_ALWAYS_ON_TOP = 1;
 
     boolean supportsLayer(int layer);
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -42,28 +42,28 @@
 
     private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XListPeer");
 
-    public final static int     MARGIN = 2;
-    public final static int     SPACE = 1;
-    public final static int     SCROLLBAR_AREA = 17;  // Area reserved for the
+    public static final int     MARGIN = 2;
+    public static final int     SPACE = 1;
+    public static final int     SCROLLBAR_AREA = 17;  // Area reserved for the
                                                       // scrollbar
-    public final static int     SCROLLBAR_WIDTH = 13; // Actual width of the
+    public static final int     SCROLLBAR_WIDTH = 13; // Actual width of the
                                                       // scrollbar
-    public final static int     NONE = -1;
-    public final static int     WINDOW = 0;
-    public final static int     VERSCROLLBAR = 1;
-    public final static int     HORSCROLLBAR = 2;
-    public final static int     DEFAULT_VISIBLE_ROWS = 4; // From java.awt.List,
-    public final static int     HORIZ_SCROLL_AMT = 10;
+    public static final int     NONE = -1;
+    public static final int     WINDOW = 0;
+    public static final int     VERSCROLLBAR = 1;
+    public static final int     HORSCROLLBAR = 2;
+    public static final int     DEFAULT_VISIBLE_ROWS = 4; // From java.awt.List,
+    public static final int     HORIZ_SCROLL_AMT = 10;
 
-    private final static int    PAINT_VSCROLL = 2;
-    private final static int    PAINT_HSCROLL = 4;
-    private final static int    PAINT_ITEMS = 8;
-    private final static int    PAINT_FOCUS = 16;
-    private final static int    PAINT_BACKGROUND = 32;
-    private final static int    PAINT_HIDEFOCUS = 64;
-    private final static int    PAINT_ALL =
+    private static final int    PAINT_VSCROLL = 2;
+    private static final int    PAINT_HSCROLL = 4;
+    private static final int    PAINT_ITEMS = 8;
+    private static final int    PAINT_FOCUS = 16;
+    private static final int    PAINT_BACKGROUND = 32;
+    private static final int    PAINT_HIDEFOCUS = 64;
+    private static final int    PAINT_ALL =
         PAINT_VSCROLL | PAINT_HSCROLL | PAINT_ITEMS | PAINT_FOCUS | PAINT_BACKGROUND;
-    private final static int    COPY_AREA = 128;
+    private static final int    COPY_AREA = 128;
 
     XVerticalScrollbar       vsb;
     XHorizontalScrollbar     hsb;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -56,15 +56,15 @@
     /*
      * dimension constants
      */
-    private final static int BAR_SPACING_TOP = 3;
-    private final static int BAR_SPACING_BOTTOM = 3;
-    private final static int BAR_SPACING_LEFT = 3;
-    private final static int BAR_SPACING_RIGHT = 3;
-    private final static int BAR_ITEM_SPACING = 2;
-    private final static int BAR_ITEM_MARGIN_LEFT = 10;
-    private final static int BAR_ITEM_MARGIN_RIGHT = 10;
-    private final static int BAR_ITEM_MARGIN_TOP = 2;
-    private final static int BAR_ITEM_MARGIN_BOTTOM = 2;
+    private static final int BAR_SPACING_TOP = 3;
+    private static final int BAR_SPACING_BOTTOM = 3;
+    private static final int BAR_SPACING_LEFT = 3;
+    private static final int BAR_SPACING_RIGHT = 3;
+    private static final int BAR_ITEM_SPACING = 2;
+    private static final int BAR_ITEM_MARGIN_LEFT = 10;
+    private static final int BAR_ITEM_MARGIN_RIGHT = 10;
+    private static final int BAR_ITEM_MARGIN_TOP = 2;
+    private static final int BAR_ITEM_MARGIN_BOTTOM = 2;
 
     /************************************************
      *
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuItemPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuItemPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -75,8 +75,8 @@
     /*
      * Size constants
      */
-    private final static int SEPARATOR_WIDTH = 20;
-    private final static int SEPARATOR_HEIGHT = 5;
+    private static final int SEPARATOR_WIDTH = 20;
+    private static final int SEPARATOR_HEIGHT = 5;
 
     /************************************************
      *
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuWindow.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuWindow.java	Wed Jul 05 20:52:37 2017 +0200
@@ -52,16 +52,16 @@
     /*
      * dimension constants
      */
-    private final static int WINDOW_SPACING_LEFT = 2;
-    private final static int WINDOW_SPACING_RIGHT = 2;
-    private final static int WINDOW_SPACING_TOP = 2;
-    private final static int WINDOW_SPACING_BOTTOM = 2;
-    private final static int WINDOW_ITEM_INDENT = 15;
-    private final static int WINDOW_ITEM_MARGIN_LEFT = 2;
-    private final static int WINDOW_ITEM_MARGIN_RIGHT = 2;
-    private final static int WINDOW_ITEM_MARGIN_TOP = 2;
-    private final static int WINDOW_ITEM_MARGIN_BOTTOM = 2;
-    private final static int WINDOW_SHORTCUT_SPACING = 10;
+    private static final int WINDOW_SPACING_LEFT = 2;
+    private static final int WINDOW_SPACING_RIGHT = 2;
+    private static final int WINDOW_SPACING_TOP = 2;
+    private static final int WINDOW_SPACING_BOTTOM = 2;
+    private static final int WINDOW_ITEM_INDENT = 15;
+    private static final int WINDOW_ITEM_MARGIN_LEFT = 2;
+    private static final int WINDOW_ITEM_MARGIN_RIGHT = 2;
+    private static final int WINDOW_ITEM_MARGIN_TOP = 2;
+    private static final int WINDOW_ITEM_MARGIN_BOTTOM = 2;
+    private static final int WINDOW_SHORTCUT_SPACING = 10;
 
     /*
      * Checkmark
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XNETProtocol.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XNETProtocol.java	Wed Jul 05 20:52:37 2017 +0200
@@ -33,8 +33,8 @@
 
 final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProtocol
 {
-    private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XNETProtocol");
-    private final static PlatformLogger iconLog = PlatformLogger.getLogger("sun.awt.X11.icon.XNETProtocol");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XNETProtocol");
+    private static final PlatformLogger iconLog = PlatformLogger.getLogger("sun.awt.X11.icon.XNETProtocol");
     private static PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states.XNETProtocol");
 
     /**
@@ -280,9 +280,9 @@
     XAtom XA_NET_WM_WINDOW_OPACITY = XAtom.get("_NET_WM_WINDOW_OPACITY");
 
 /* For _NET_WM_STATE ClientMessage requests */
-    final static int _NET_WM_STATE_REMOVE      =0; /* remove/unset property */
-    final static int _NET_WM_STATE_ADD         =1; /* add/set property      */
-    final static int _NET_WM_STATE_TOGGLE      =2; /* toggle property       */
+    static final int _NET_WM_STATE_REMOVE      =0; /* remove/unset property */
+    static final int _NET_WM_STATE_ADD         =1; /* add/set property      */
+    static final int _NET_WM_STATE_TOGGLE      =2; /* toggle property       */
 
     boolean supportChecked = false;
     long NetWindow = 0;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -58,8 +58,8 @@
     /*
      * Painting constants
      */
-    private final static int CAPTION_MARGIN_TOP = 4;
-    private final static int CAPTION_SEPARATOR_HEIGHT = 6;
+    private static final int CAPTION_MARGIN_TOP = 4;
+    private static final int CAPTION_SEPARATOR_HEIGHT = 6;
 
     /************************************************
      *
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XProtocol.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XProtocol.java	Wed Jul 05 20:52:37 2017 +0200
@@ -30,7 +30,7 @@
 import java.util.*;
 
 class XProtocol {
-    private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XProtocol");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XProtocol");
 
     private Map<XAtom, XAtomList> atomToList = new HashMap<XAtom, XAtomList>();
     private Map<XAtom, Long> atomToAnchor = new HashMap<XAtom, Long>();
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XProtocolConstants.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XProtocolConstants.java	Wed Jul 05 20:52:37 2017 +0200
@@ -25,7 +25,7 @@
 
 package sun.awt.X11;
 
-final public class XProtocolConstants {
+public final class XProtocolConstants {
 
     private XProtocolConstants(){}
 
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -107,16 +107,16 @@
         return pixelArray;
     }
 
-    private static native synchronized void setup(int numberOfButtons, int[] buttonDownMasks);
+    private static synchronized native void setup(int numberOfButtons, int[] buttonDownMasks);
 
-    private static native synchronized void mouseMoveImpl(X11GraphicsConfig xgc, int x, int y);
-    private static native synchronized void mousePressImpl(int buttons);
-    private static native synchronized void mouseReleaseImpl(int buttons);
-    private static native synchronized void mouseWheelImpl(int wheelAmt);
+    private static synchronized native void mouseMoveImpl(X11GraphicsConfig xgc, int x, int y);
+    private static synchronized native void mousePressImpl(int buttons);
+    private static synchronized native void mouseReleaseImpl(int buttons);
+    private static synchronized native void mouseWheelImpl(int wheelAmt);
 
-    private static native synchronized void keyPressImpl(int keycode);
-    private static native synchronized void keyReleaseImpl(int keycode);
+    private static synchronized native void keyPressImpl(int keycode);
+    private static synchronized native void keyReleaseImpl(int keycode);
 
-    private static native synchronized void getRGBPixelsImpl(X11GraphicsConfig xgc,
+    private static synchronized native void getRGBPixelsImpl(X11GraphicsConfig xgc,
             int x, int y, int width, int height, int pixelArray[], boolean isGtkSupported);
 }
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,13 +34,13 @@
 
 class XScrollPanePeer extends XComponentPeer implements ScrollPanePeer, XScrollbarClient {
 
-    public final static int     MARGIN = 1;
-    public final static int     SCROLLBAR;
-    public final static int     SPACE = 2;
-    public final static int     SCROLLBAR_INSET = 2;
+    public static final int     MARGIN = 1;
+    public static final int     SCROLLBAR;
+    public static final int     SPACE = 2;
+    public static final int     SCROLLBAR_INSET = 2;
 
-    public final static int     VERTICAL = 1 << 0;
-    public final static int     HORIZONTAL = 1 << 1;
+    public static final int     VERTICAL = 1 << 0;
+    public static final int     HORIZONTAL = 1 << 1;
 
     static {
         SCROLLBAR = XToolkit.getUIDefaults().getInt("ScrollBar.defaultWidth");
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java	Wed Jul 05 20:52:37 2017 +0200
@@ -51,7 +51,7 @@
     private XScrollRepeater i_scroller = new XScrollRepeater(null);
 
     // Thumb length is always >= MIN_THUMB_H
-    private final static int MIN_THUMB_H = 5;
+    private static final int MIN_THUMB_H = 5;
 
     private static final int ARROW_IND = 1;
 
@@ -115,7 +115,7 @@
         }
     }
 
-    abstract protected void rebuildArrows();
+    protected abstract void rebuildArrows();
 
     public void setSize(int width, int height) {
         if (log.isLoggable(PlatformLogger.Level.FINER)) {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -31,7 +31,7 @@
 import sun.util.logging.PlatformLogger;
 
 class XScrollbarPeer extends XComponentPeer implements ScrollbarPeer, XScrollbarClient {
-    private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XScrollbarPeer");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XScrollbarPeer");
 
     private static final int DEFAULT_LENGTH = 50;
     private static final int DEFAULT_WIDTH_SOLARIS = 19;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java	Wed Jul 05 20:52:37 2017 +0200
@@ -67,7 +67,7 @@
 
     //There is 400 ms is set by default on Windows and 500 by default on KDE and GNOME.
     //We use the same hardcoded constant.
-    private final static int AWT_MULTICLICK_DEFAULT_TIME = 500;
+    private static final int AWT_MULTICLICK_DEFAULT_TIME = 500;
 
     static final boolean PRIMARY_LOOP = false;
     static final boolean SECONDARY_LOOP = true;
@@ -140,8 +140,8 @@
      */
     static native long getTrayIconDisplayTimeout();
 
-    private native static void initIDs();
-    native static void waitForEvents(long nextTaskTime);
+    private static native void initIDs();
+    static native void waitForEvents(long nextTaskTime);
     static Thread toolkitThread;
     static boolean isToolkitThread() {
         return Thread.currentThread() == toolkitThread;
@@ -1102,7 +1102,7 @@
      * Returns the value of "sun.awt.disableGtkFileDialogs" property. Default
      * value is {@code false}.
      */
-    public synchronized static boolean getSunAwtDisableGtkFileDialogs() {
+    public static synchronized boolean getSunAwtDisableGtkFileDialogs() {
         if (sunAwtDisableGtkFileDialogs == null) {
             sunAwtDisableGtkFileDialogs = AccessController.doPrivileged(
                                               new GetBooleanAction("sun.awt.disableGtkFileDialogs"));
@@ -1579,8 +1579,8 @@
         return Math.min(XConstants.MAX_BUTTONS, ((SunToolkit) (Toolkit.getDefaultToolkit())).getNumberOfButtons());
     }
 
-    private final static String prefix  = "DnD.Cursor.";
-    private final static String postfix = ".32x32";
+    private static final String prefix  = "DnD.Cursor.";
+    private static final String postfix = ".32x32";
     private static final String dndPrefix  = "DnD.";
 
     @Override
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -63,8 +63,8 @@
     int old_x, old_y;
     int ex_width, ex_height;
 
-    final static int TRAY_ICON_WIDTH = 24;
-    final static int TRAY_ICON_HEIGHT = 24;
+    static final int TRAY_ICON_WIDTH = 24;
+    static final int TRAY_ICON_HEIGHT = 24;
 
     XTrayIconPeer(TrayIcon target)
       throws AWTException
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XUtilConstants.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XUtilConstants.java	Wed Jul 05 20:52:37 2017 +0200
@@ -25,7 +25,7 @@
 
 package sun.awt.X11;
 
-final public class XUtilConstants {
+public final class XUtilConstants {
 
     private XUtilConstants(){}
 
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWINProtocol.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWINProtocol.java	Wed Jul 05 20:52:37 2017 +0200
@@ -30,7 +30,7 @@
 import sun.util.logging.PlatformLogger;
 
 class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol {
-    final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWINProtocol");
+    static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWINProtocol");
 
 /* Gnome WM spec  */
     XAtom XA_WIN_SUPPORTING_WM_CHECK = XAtom.get("_WIN_SUPPORTING_WM_CHECK");
@@ -187,15 +187,15 @@
     XAtom XA_WIN_LAYER = XAtom.get("_WIN_LAYER");
 
 /* _WIN_STATE bits */
-    final static int WIN_STATE_STICKY          =(1<<0); /* everyone knows sticky            */
-    final static int WIN_STATE_MINIMIZED       =(1<<1); /* Reserved - definition is unclear */
-    final static int WIN_STATE_MAXIMIZED_VERT  =(1<<2); /* window in maximized V state      */
-    final static int WIN_STATE_MAXIMIZED_HORIZ =(1<<3); /* window in maximized H state      */
-    final static int WIN_STATE_HIDDEN          =(1<<4); /* not on taskbar but window visible*/
-    final static int WIN_STATE_SHADED          =(1<<5); /* shaded (MacOS / Afterstep style) */
+    static final int WIN_STATE_STICKY          =(1<<0); /* everyone knows sticky            */
+    static final int WIN_STATE_MINIMIZED       =(1<<1); /* Reserved - definition is unclear */
+    static final int WIN_STATE_MAXIMIZED_VERT  =(1<<2); /* window in maximized V state      */
+    static final int WIN_STATE_MAXIMIZED_HORIZ =(1<<3); /* window in maximized H state      */
+    static final int WIN_STATE_HIDDEN          =(1<<4); /* not on taskbar but window visible*/
+    static final int WIN_STATE_SHADED          =(1<<5); /* shaded (MacOS / Afterstep style) */
 /* _WIN_LAYER values */
-    final static int WIN_LAYER_ONTOP = 6;
-    final static int WIN_LAYER_NORMAL = 4;
+    static final int WIN_LAYER_ONTOP = 6;
+    static final int WIN_LAYER_NORMAL = 4;
 
     long WinWindow = 0;
     boolean supportChecked = false;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWM.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWM.java	Wed Jul 05 20:52:37 2017 +0200
@@ -50,9 +50,9 @@
 final class XWM
 {
 
-    private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWM");
-    private final static PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XWM");
-    private final static PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states.XWM");
+    private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWM");
+    private static final PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XWM");
+    private static final PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states.XWM");
 
     static final XAtom XA_MWM_HINTS = new XAtom();
 
@@ -66,30 +66,30 @@
     XAtom XA_UTF8_STRING = XAtom.get("UTF8_STRING");    /* like STRING but encoding is UTF-8 */
 
 /* Currently we only care about max_v and max_h in _NET_WM_STATE */
-    final static int AWT_NET_N_KNOWN_STATES=2;
+    static final int AWT_NET_N_KNOWN_STATES=2;
 
 /* Enlightenment */
-    final static XAtom XA_E_FRAME_SIZE = new XAtom();
+    static final XAtom XA_E_FRAME_SIZE = new XAtom();
 
 /* KWin (KDE2) */
-    final static XAtom XA_KDE_NET_WM_FRAME_STRUT = new XAtom();
+    static final XAtom XA_KDE_NET_WM_FRAME_STRUT = new XAtom();
 
 /* KWM (KDE 1.x) OBSOLETE??? */
-    final static XAtom XA_KWM_WIN_ICONIFIED = new XAtom();
-    final static XAtom XA_KWM_WIN_MAXIMIZED = new XAtom();
+    static final XAtom XA_KWM_WIN_ICONIFIED = new XAtom();
+    static final XAtom XA_KWM_WIN_MAXIMIZED = new XAtom();
 
 /* OpenLook */
-    final static XAtom XA_OL_DECOR_DEL = new XAtom();
-    final static XAtom XA_OL_DECOR_HEADER = new XAtom();
-    final static XAtom XA_OL_DECOR_RESIZE = new XAtom();
-    final static XAtom XA_OL_DECOR_PIN = new XAtom();
-    final static XAtom XA_OL_DECOR_CLOSE = new XAtom();
+    static final XAtom XA_OL_DECOR_DEL = new XAtom();
+    static final XAtom XA_OL_DECOR_HEADER = new XAtom();
+    static final XAtom XA_OL_DECOR_RESIZE = new XAtom();
+    static final XAtom XA_OL_DECOR_PIN = new XAtom();
+    static final XAtom XA_OL_DECOR_CLOSE = new XAtom();
 
 /* EWMH */
-    final static XAtom XA_NET_FRAME_EXTENTS = new XAtom();
-    final static XAtom XA_NET_REQUEST_FRAME_EXTENTS = new XAtom();
+    static final XAtom XA_NET_FRAME_EXTENTS = new XAtom();
+    static final XAtom XA_NET_REQUEST_FRAME_EXTENTS = new XAtom();
 
-    final static int
+    static final int
         UNDETERMINED_WM = 1,
         NO_WM = 2,
         OTHER_WM = 3,
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWarningWindow.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWarningWindow.java	Wed Jul 05 20:52:37 2017 +0200
@@ -33,14 +33,14 @@
 import sun.awt.SunToolkit;
 
 class XWarningWindow extends XWindow {
-    private final static int SHOWING_DELAY = 330;
-    private final static int HIDING_DELAY = 2000;
+    private static final int SHOWING_DELAY = 330;
+    private static final int HIDING_DELAY = 2000;
 
     private final Window ownerWindow;
     private WeakReference<XWindowPeer> ownerPeer;
     private long parentWindow;
 
-    private final static String OWNER = "OWNER";
+    private static final String OWNER = "OWNER";
     private InfoWindow.Tooltip tooltip;
 
     /**
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java	Wed Jul 05 20:52:37 2017 +0200
@@ -54,7 +54,7 @@
    * allow a smudge factor so that moving the mouse by a small
    * amount does not wipe out the multi-click state variables.
    */
-    private final static int AWT_MULTICLICK_SMUDGE = 4;
+    private static final int AWT_MULTICLICK_SMUDGE = 4;
     // ButtonXXX events stuff
     static int lastX = 0, lastY = 0;
     static long lastTime = 0;
@@ -123,7 +123,7 @@
     native void getWMInsets(long window, long left, long top, long right, long bottom, long border);
     native long getTopWindow(long window, long rootWin);
     native void getWindowBounds(long window, long x, long y, long width, long height);
-    private native static void initIDs();
+    private static native void initIDs();
 
     static {
         initIDs();
@@ -441,7 +441,7 @@
     // and one that does not get overridden. The problem is that in postInit
     // we call setBackground and we don't have all the stuff initialized to
     // do a full paint for most peers. So we cannot call setBackground in postInit.
-    final public void xSetBackground(Color c) {
+    public final void xSetBackground(Color c) {
         XToolkit.awtLock();
         try {
             winBackground(c);
@@ -572,6 +572,14 @@
     }
 
     static int getModifiers(int state, int button, int keyCode) {
+        return getModifiers(state, button, keyCode, false);
+    }
+
+    static int getWheelModifiers(int state, int button) {
+        return getModifiers(state, button, 0, true);
+    }
+
+    private static int getModifiers(int state, int button, int keyCode, boolean isWheelMouse) {
         int modifiers = 0;
 
         if (((state & XConstants.ShiftMask) != 0) ^ (keyCode == KeyEvent.VK_SHIFT)) {
@@ -602,7 +610,7 @@
             // ONLY one of these conditions should be TRUE to add that modifier.
             if (((state & XlibUtil.getButtonMask(i + 1)) != 0) != (button == XConstants.buttons[i])){
                 //exclude wheel buttons from adding their numbers as modifiers
-                if (!isWheel(XConstants.buttons[i])) {
+                if (!isWheelMouse || !isWheel(XConstants.buttons[i])) {
                     modifiers |= InputEvent.getMaskForButton(i+1);
                 }
             }
@@ -715,9 +723,9 @@
         if (button > XConstants.buttons[4]){
             button -= 2;
         }
-        modifiers = getModifiers(xbe.get_state(),button,0);
 
         if (!isWheel(lbutton)) {
+            modifiers = getModifiers(xbe.get_state(), button, 0);
             MouseEvent me = new MouseEvent(getEventSource(),
                                            type == XConstants.ButtonPress ? MouseEvent.MOUSE_PRESSED : MouseEvent.MOUSE_RELEASED,
                                            jWhen,modifiers, x, y,
@@ -743,6 +751,7 @@
 
         }
         else {
+            modifiers = getWheelModifiers(xbe.get_state(), button);
             if (xev.get_type() == XConstants.ButtonPress) {
                 MouseWheelEvent mwe = new MouseWheelEvent(getEventSource(),MouseEvent.MOUSE_WHEEL, jWhen,
                                                           modifiers,
@@ -1037,13 +1046,13 @@
         return xEventType == XConstants.KeyPress ? java.awt.event.KeyEvent.KEY_PRESSED :
                xEventType == XConstants.KeyRelease ? java.awt.event.KeyEvent.KEY_RELEASED : 0;
     }
-    static private long xkeycodeToKeysym(XKeyEvent ev) {
+    private static long xkeycodeToKeysym(XKeyEvent ev) {
         return XKeysym.getKeysym( ev );
     }
     private long xkeycodeToPrimaryKeysym(XKeyEvent ev) {
         return XKeysym.xkeycode2primary_keysym( ev );
     }
-    static private int primaryUnicode2JavaKeycode(int uni) {
+    private static int primaryUnicode2JavaKeycode(int uni) {
         return (uni > 0? sun.awt.ExtendedKeyCodes.getExtendedKeyCodeForChar(uni) : 0);
         //return (uni > 0? uni + 0x01000000 : 0);
     }
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -429,7 +429,7 @@
     }
 
     private static ArrayList<IconInfo> defaultIconInfo;
-    protected synchronized static java.util.List<IconInfo> getDefaultIconInfo() {
+    protected static synchronized java.util.List<IconInfo> getDefaultIconInfo() {
         if (defaultIconInfo == null) {
             defaultIconInfo = new ArrayList<IconInfo>();
             if (XlibWrapper.dataModel == 32) {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java	Wed Jul 05 20:52:37 2017 +0200
@@ -313,7 +313,7 @@
                                          long delete, long req_type, long actualy_type,
                                          long actualy_format, long nitems_ptr,
                                          long bytes_after, long data_ptr);
-    native static void XChangePropertyImpl(long display, long window, long atom,
+    static native void XChangePropertyImpl(long display, long window, long atom,
                                            long type, int format, int mode, long data,
                                            int nelements);
     static void XChangeProperty(long display, long window, long atom,
@@ -566,8 +566,8 @@
 
 /* Global memory area used for X lib parameter passing */
 
-    final static long lbuffer = unsafe.allocateMemory(64);  // array to hold 8 longs
-    final static long ibuffer = unsafe.allocateMemory(32);  // array to hold 8 ints
+    static final long lbuffer = unsafe.allocateMemory(64);  // array to hold 8 longs
+    static final long ibuffer = unsafe.allocateMemory(32);  // array to hold 8 ints
 
     static final long larg1 = lbuffer;
     static final long larg2 = larg1+8;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java	Wed Jul 05 20:52:37 2017 +0200
@@ -125,7 +125,7 @@
     // private data (X11InputMethodData structure defined in
     // awt_InputMethod.c) for native methods
     // this structure needs to be accessed within AWT_LOCK/UNLOCK
-    transient private long pData = 0; // accessed by native
+    private transient long pData = 0; // accessed by native
 
     // Initialize highlight mapping table
     static {
--- a/jdk/src/java.desktop/unix/classes/sun/font/X11GB18030_0.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/font/X11GB18030_0.java	Wed Jul 05 20:52:37 2017 +0200
@@ -56,7 +56,7 @@
         protected int encodeSingle(char inputChar) {
             return -1;
         }
-        private final static String innerIndex0=
+        private static final String innerIndex0=
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -570,7 +570,7 @@
             "\uA5F0\uA5F1\uA5F2\uA5F3\uA5F4\uA5F5\uA5F6\u0000"+
             "\u0000\u0000\u0000\u0000\uA960\uA963\uA964\u0000";
 
-        private final static String innerIndex1=
+        private static final String innerIndex1=
             "\u0000\u0000\u0000\u0000\u0000\uA8C5\uA8C6\uA8C7"+
             "\uA8C8\uA8C9\uA8CA\uA8CB\uA8CC\uA8CD\uA8CE\uA8CF"+
             "\uA8D0\uA8D1\uA8D2\uA8D3\uA8D4\uA8D5\uA8D6\uA8D7"+
@@ -1084,7 +1084,7 @@
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
 
-        private final static String innerIndex2=
+        private static final String innerIndex2=
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -1598,7 +1598,7 @@
             "\u8BAF\uE6CD\u8BB0\u8BB1\u8BB2\u8BB3\u8BB4\u8BB5"+
             "\u8BB6\u8BB7\u8BB8\u8BB9\u8BBA\u8BBB\u8BBC\u8BBD";
 
-        private final static String innerIndex3=
+        private static final String innerIndex3=
             "\u8BBE\u8BBF\u8BC0\u8BC1\u8BC2\u8BC3\u8BC4\u8BC5"+
             "\u8BC6\uE6D2\u8BC7\u8BC8\u8BC9\u8BCA\u8BCB\u8BCC"+
             "\u8BCD\u8BCE\u8BCF\u8BD0\u8BD1\u8BD2\uE6D4\uE6D3"+
@@ -2112,7 +2112,7 @@
             "\u99C6\u99C7\u99C8\u99C9\u99CA\u99CB\u99CC\u99CD"+
             "\u99CE\u99CF\u99D0\u99D1\u99D2\u99D3\u99D4\u99D5";
 
-        private final static String innerIndex4=
+        private static final String innerIndex4=
             "\u99D6\u99D7\u99D8\u99D9\u99DA\u99DB\u99DC\u99DD"+
             "\u99DE\u99DF\u99E0\u99E1\u99E2\u99E3\u99E4\u99E5"+
             "\u99E6\u99E7\u99E8\u99E9\u99EA\u99EB\u99EC\u99ED"+
@@ -2626,7 +2626,7 @@
             "\uB87B\uB87C\uB87D\uB87E\uB880\uB881\uB882\uB883"+
             "\uB884\uD6F1\uF3C3\uB885\uB886\uF3C4\uB887\uB8CD";
 
-        private final static String innerIndex5=
+        private static final String innerIndex5=
             "\uB888\uB889\uB88A\uF3C6\uF3C7\uB88B\uB0CA\uB88C"+
             "\uF3C5\uB88D\uF3C9\uCBF1\uB88E\uB88F\uB890\uF3CB"+
             "\uB891\uD0A6\uB892\uB893\uB1CA\uF3C8\uB894\uB895"+
@@ -3140,7 +3140,7 @@
             "\uD64C\uD64D\uD64E\uD64F\uD650\uD651\uD652\uD653"+
             "\uD654\uD655\uD656\uD657\uD658\uD659\uD65A\uD65B";
 
-        private final static String innerIndex6=
+        private static final String innerIndex6=
             "\uD65C\uD65D\uD65E\uD65F\uD660\uD661\uD662\uE5C0"+
             "\uD663\uD664\uD665\uD666\uD667\uD668\uD669\uD66A"+
             "\uD66B\uD66C\uD66D\uD66E\uD66F\uD670\uD671\uD672"+
@@ -3654,7 +3654,7 @@
             "\uF38D\uF38E\uF38F\uF390\uF391\uF392\uF393\uF394"+
             "\uF395\uF7DB\uF396\uF7D9\uF397\uF398\uF399\uF39A";
 
-        private final static String innerIndex7=
+        private static final String innerIndex7=
             "\uF39B\uF39C\uF39D\uD7D7\uF39E\uF39F\uF3A0\uF440"+
             "\uF7DC\uF441\uF442\uF443\uF444\uF445\uF446\uF7DD"+
             "\uF447\uF448\uF449\uF7DE\uF44A\uF44B\uF44C\uF44D"+
@@ -4168,7 +4168,7 @@
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
 
-        private final static String innerIndex8=
+        private static final String innerIndex8=
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -4234,7 +4234,7 @@
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
 
-        private final static short index1[] = {
+        private static final short index1[] = {
             1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
             6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 13, 14,
@@ -4253,7 +4253,7 @@
             0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 127, 0, 0, 0, 128, 129
         };
 
-        private final static String index2[] = {
+        private static final String index2[] = {
             innerIndex0,
             innerIndex1,
             innerIndex2,
--- a/jdk/src/java.desktop/unix/classes/sun/font/X11GB18030_1.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/font/X11GB18030_1.java	Wed Jul 05 20:52:37 2017 +0200
@@ -55,7 +55,7 @@
         protected int encodeSingle(char inputChar) {
             return -1;
         }
-        private final static String innerIndex0=
+        private static final String innerIndex0=
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -569,7 +569,7 @@
             "\u0DD2\u0DD3\u0DD4\u0DD5\u0DD6\u0DD7\u0DD8\u0DD9"+
             "\u0DDA\u0DDB\u0DDC\u0DDD\u0DDE\u0DDF\u0DE0\u0DE1";
 
-        private final static String innerIndex1=
+        private static final String innerIndex1=
             "\u0DE2\u0DE3\u0DE4\u0DE5\u0DE6\u0DE7\u0DE8\u0DE9"+
             "\u0DEA\u0DEB\u0DEC\u0DED\u0DEE\u0DEF\u0DF0\u0DF1"+
             "\u0DF2\u0DF3\u0DF4\u0DF5\u0DF6\u0DF7\u0DF8\u0DF9"+
@@ -1083,7 +1083,7 @@
             "\u1DD2\u1DD3\u1DD4\u1DD5\u1DD6\u1DD7\u1DD8\u1DD9"+
             "\u1DDA\u1DDB\u1DDC\u1DDD\u1DDE\u1DDF\u1DE0\u1DE1";
 
-        private final static String innerIndex2=
+        private static final String innerIndex2=
             "\u1DE2\u1DE3\u1DE4\u1DE5\u1DE6\u1DE7\u1DE8\u1DE9"+
             "\u1DEA\u1DEB\u1DEC\u1DED\u1DEE\u1DEF\u1DF0\u1DF1"+
             "\u1DF2\u1DF3\u1DF4\u1DF5\u1DF6\u1DF7\u1DF8\u1DF9"+
@@ -1597,7 +1597,7 @@
             "\u2CA2\u2CA3\u2CA4\u2CA5\u2CA6\u2CA7\u2CA8\u2CA9"+
             "\u2CAA\u2CAB\u2CAC\u2CAD\u2CAE\u2CAF\u2CB0\u2CB1";
 
-        private final static String innerIndex3=
+        private static final String innerIndex3=
             "\u2CB2\u2CB3\u2CB4\u2CB5\u2CB6\u2CB7\u2CB8\u2CB9"+
             "\u2CBA\u2CBB\u2CBC\u2CBD\u2CBE\u2CBF\u2CC0\u2CC1"+
             "\u2CC2\u2CC3\u2CC4\u2CC5\u2CC6\u2CC7\u2CC8\u2CC9"+
@@ -2111,7 +2111,7 @@
             "\u3B79\u3B7A\u3B7B\u3B7C\u3B7D\u3B7E\u3B7F\u3B80"+
             "\u3B81\u3B82\u3B83\u3B84\u3B85\u3B86\u3B87\u3B88";
 
-        private final static String innerIndex4=
+        private static final String innerIndex4=
             "\u3B89\u3B8A\u3B8B\u3B8C\u3B8D\u3B8E\u3B8F\u3B90"+
             "\u3B91\u3B92\u3B93\u3B94\u3B95\u3B96\u3B97\u3B98"+
             "\u3B99\u3B9A\u3B9B\u3B9C\u3B9D\u3B9E\u3B9F\u3BA0"+
@@ -2625,7 +2625,7 @@
             "\u4AAD\u4AAE\u4AAF\u4AB0\u4AB1\u4AB2\u4AB3\u4AB4"+
             "\u4AB5\u4AB6\u4AB7\u4AB8\u4AB9\u4ABA\u4ABB\u4ABC";
 
-        private final static String innerIndex5=
+        private static final String innerIndex5=
             "\u4ABD\u4ABE\u4ABF\u4AC0\u4AC1\u4AC2\u4AC3\u4AC4"+
             "\u4AC5\u4AC6\u4AC7\u4AC8\u4AC9\u4ACA\u4ACB\u4ACC"+
             "\u4ACD\u4ACE\u4ACF\u4AD0\u4AD1\u4AD2\u4AD3\u4AD4"+
@@ -3139,7 +3139,7 @@
             "\u5AAD\u5AAE\u5AAF\u5AB0\u5AB1\u5AB2\u5AB3\u5AB4"+
             "\u5AB5\u5AB6\u5AB7\u5AB8\u5AB9\u5ABA\u5ABB\u5ABC";
 
-        private final static String innerIndex6=
+        private static final String innerIndex6=
             "\u5ABD\u5ABE\u5ABF\u5AC0\u5AC1\u5AC2\u5AC3\u5AC4"+
             "\u5AC5\u5AC6\u5AC7\u5AC8\u5AC9\u5ACA\u5ACB\u5ACC"+
             "\u5ACD\u5ACE\u5ACF\u5AD0\u5AD1\u5AD2\u5AD3\u5AD4"+
@@ -3653,7 +3653,7 @@
             "\u6AAD\u6AAE\u6AAF\u6AB0\u6AB1\u6AB2\u6AB3\u6AB4"+
             "\u6AB5\u6AB6\u6AB7\u6AB8\u6AB9\u6ABA\u6ABB\u6ABC";
 
-        private final static String innerIndex7=
+        private static final String innerIndex7=
             "\u6ABD\u6ABE\u6ABF\u6AC0\u6AC1\u6AC2\u6AC3\u6AC4"+
             "\u6AC5\u6AC6\u6AC7\u6AC8\u6AC9\u6ACA\u6ACB\u6ACC"+
             "\u6ACD\u6ACE\u6ACF\u6AD0\u6AD1\u6AD2\u6AD3\u6AD4"+
@@ -4167,7 +4167,7 @@
             "\u7AAD\u7AAE\u7AAF\u7AB0\u7AB1\u7AB2\u7AB3\u7AB4"+
             "\u7AB5\u7AB6\u7AB7\u7AB8\u7AB9\u7ABA\u7ABB\u7ABC";
 
-        private final static String innerIndex8=
+        private static final String innerIndex8=
             "\u7ABD\u7ABE\u7ABF\u7AC0\u7AC1\u7AC2\u7AC3\u7AC4"+
             "\u7AC5\u7AC6\u7AC7\u7AC8\u7AC9\u7ACA\u7ACB\u7ACC"+
             "\u7ACD\u7ACE\u7ACF\u7AD0\u7AD1\u7AD2\u7AD3\u7AD4"+
@@ -4681,7 +4681,7 @@
             "\u8999\u899A\u899B\u899C\u899D\u899E\u899F\u89A0"+
             "\u89A1\u89A2\u89A3\u89A4\u89A5\u89A6\u89A7\u89A8";
 
-        private final static String innerIndex9=
+        private static final String innerIndex9=
             "\u89A9\u89AA\u89AB\u89AC\u89AD\u89AE\u89AF\u89B0"+
             "\u89B1\u89B2\u89B3\u89B4\u89B5\u89B6\u89B7\u89B8"+
             "\u89B9\u89BA\u89BB\u89BC\u89BD\u89BE\u89BF\u89C0"+
@@ -5195,7 +5195,7 @@
             "\u9950\u9951\u9952\u9953\u9954\u9955\u9956\u9957"+
             "\u9958\u9959\u995A\u995B\u995C\u995D\u995E\u995F";
 
-        private final static String innerIndex10=
+        private static final String innerIndex10=
             "\u9960\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -5229,7 +5229,7 @@
             "\u99EC\u99ED\u99EE\u99EF\u99F0\u99F1\u99F2\u99F3"+
             "\u99F4\u99F5\u99F6\u99F7\u99F8\u0000\u99FA\u99FB";
 
-        private final static short index1[] = {
+        private static final short index1[] = {
             1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
             17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
             33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
@@ -5248,7 +5248,7 @@
             145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160
         };
 
-        private final static String index2[] = {
+        private static final String index2[] = {
             innerIndex0,
             innerIndex1,
             innerIndex2,
--- a/jdk/src/java.desktop/unix/classes/sun/font/X11Johab.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/font/X11Johab.java	Wed Jul 05 20:52:37 2017 +0200
@@ -55,7 +55,7 @@
             return true;
         }
 
-        private final static String innerIndex0=
+        private static final String innerIndex0=
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -569,7 +569,7 @@
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
 
-        private final static String innerIndex1=
+        private static final String innerIndex1=
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -1083,7 +1083,7 @@
             "\uE978\u0000\u0000\u0000\uF866\u0000\uE4F6\u0000"+
             "\u0000\u0000\u0000\uF3DA\u0000\uF894\u0000\u0000";
 
-        private final static String innerIndex2=
+        private static final String innerIndex2=
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uEC9F"+
             "\u0000\u0000\u0000\u0000\u0000\uE5CF\uE39A\u0000"+
             "\u0000\uE1DF\u0000\u0000\uF5CB\u0000\uED92\uE0AB"+
@@ -1597,7 +1597,7 @@
             "\uF6C1\u0000\u0000\uEEB6\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
 
-        private final static String innerIndex3=
+        private static final String innerIndex3=
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\uEDC7\uE63C\u0000\u0000\u0000"+
             "\u0000\uE957\u0000\u0000\u0000\u0000\u0000\uEBA9"+
@@ -2111,7 +2111,7 @@
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\uE1A7\u0000\u0000\uE33C\u0000";
 
-        private final static String innerIndex4=
+        private static final String innerIndex4=
             "\uE3BA\u0000\uF3C4\u0000\uEDB3\uF8F5\uEFE1\uF9E0"+
             "\uF94C\u0000\uE832\uE833\u0000\uE431\u0000\u0000"+
             "\uE491\u0000\u0000\u0000\uEC7D\u0000\u0000\uEA79"+
@@ -2625,7 +2625,7 @@
             "\u0000\u0000\u0000\u0000\uE695\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\uE9B8\uE2C5\uEADF\u0000\u0000";
 
-        private final static String innerIndex5=
+        private static final String innerIndex5=
             "\u0000\u0000\u0000\u0000\uF44E\uF631\u0000\uF0CB"+
             "\uF3FC\u0000\uF4C7\u0000\u0000\uEB7B\u0000\u0000"+
             "\u0000\u0000\u0000\uF1FC\u0000\u0000\uEBDB\u0000"+
@@ -3139,7 +3139,7 @@
             "\u0000\u0000\u0000\uE995\uE7B0\u0000\uEE79\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
 
-        private final static String innerIndex6=
+        private static final String innerIndex6=
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\uED4C\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -3653,7 +3653,7 @@
             "\u9E89\u9E8A\u9E8B\u9E8C\u9E8D\u9E8E\u9E8F\u9E90"+
             "\u9E91\u9E93\u9E94\u9E95\u9E96\u9E97\u9E98\u9E99";
 
-        private final static String innerIndex7=
+        private static final String innerIndex7=
             "\u9E9A\u9E9B\u9E9C\u9E9D\u9EA1\u9EA2\u9EA3\u9EA4"+
             "\u9EA5\u9EA6\u9EA7\u9EA8\u9EA9\u9EAA\u9EAB\u9EAC"+
             "\u9EAD\u9EAE\u9EAF\u9EB0\u9EB1\u9EB3\u9EB4\u9EB5"+
@@ -4167,7 +4167,7 @@
             "\uBA71\uBA73\uBA74\uBA75\uBA76\uBA77\uBA78\uBA79"+
             "\uBA7A\uBA7B\uBA7C\uBA7D\uBA81\uBA82\uBA83\uBA84";
 
-        private final static String innerIndex8=
+        private static final String innerIndex8=
             "\uBA85\uBA86\uBA87\uBA88\uBA89\uBA8A\uBA8B\uBA8C"+
             "\uBA8D\uBA8E\uBA8F\uBA90\uBA91\uBA93\uBA94\uBA95"+
             "\uBA96\uBA97\uBA98\uBA99\uBA9A\uBA9B\uBA9C\uBA9D"+
@@ -4681,7 +4681,7 @@
             "\uF171\uF174\uF177\uF178\uF199\uF19A\uF19C\uF1A1"+
             "\uF1A2\uF1A3\uF1EE\uF26B\uF44D\uF49C\uF4B1\uF537";
 
-        private final static String innerIndex9=
+        private static final String innerIndex9=
             "\uF57E\uF696\uF698\uF6B8\uF6C8\uF6D3\uF76B\uF792"+
             "\uF831\uF832\uF876\uF939\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -4747,7 +4747,7 @@
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
 
-        private final static short index1[] = {
+        private static final short index1[] = {
             1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
             6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0,
--- a/jdk/src/java.desktop/unix/classes/sun/font/X11SunUnicode_0.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/font/X11SunUnicode_0.java	Wed Jul 05 20:52:37 2017 +0200
@@ -55,7 +55,7 @@
             super(cs, index1, index2);
         }
 
-        private final static String innerIndex0=
+        private static final String innerIndex0=
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -121,7 +121,7 @@
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
             "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
 
-        private final static short index1[] = {
+        private static final short index1[] = {
             0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -140,7 +140,7 @@
             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
         };
 
-        private final static String index2[] = {
+        private static final String index2[] = {
             innerIndex0
         };
 
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/jules/IdleTileCache.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/jules/IdleTileCache.java	Wed Jul 05 20:52:37 2017 +0200
@@ -28,8 +28,8 @@
 import java.util.*;
 
 public class IdleTileCache {
-    final static int IDLE_TILE_SYNC_GRANULARITY = 16;
-    final static ArrayList<JulesTile> idleBuffers = new ArrayList<JulesTile>();
+    static final int IDLE_TILE_SYNC_GRANULARITY = 16;
+    static final ArrayList<JulesTile> idleBuffers = new ArrayList<JulesTile>();
 
     ArrayList<JulesTile> idleTileWorkerCacheList = new ArrayList<JulesTile>();
     ArrayList<JulesTile> idleTileConsumerCacheList =
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/jules/JulesAATileGenerator.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/jules/JulesAATileGenerator.java	Wed Jul 05 20:52:37 2017 +0200
@@ -33,13 +33,13 @@
 
 public class JulesAATileGenerator implements AATileGenerator {
     /* Threading stuff */
-    final static ExecutorService rasterThreadPool =
+    static final ExecutorService rasterThreadPool =
                                           Executors.newCachedThreadPool();
-    final static int CPU_CNT = Runtime.getRuntime().availableProcessors();
+    static final int CPU_CNT = Runtime.getRuntime().availableProcessors();
 
-    final static boolean ENABLE_THREADING = false;
-    final static int THREAD_MIN = 16;
-    final static int THREAD_BEGIN = 16;
+    static final boolean ENABLE_THREADING = false;
+    static final int THREAD_MIN = 16;
+    static final int THREAD_BEGIN = 16;
 
     IdleTileCache tileCache;
     TileWorker worker;
@@ -47,8 +47,8 @@
     int rasterTileCnt;
 
     /* Tiling */
-    final static int TILE_SIZE = 32;
-    final static int TILE_SIZE_FP = 32 << 16;
+    static final int TILE_SIZE = 32;
+    static final int TILE_SIZE_FP = 32 << 16;
     int left, right, top, bottom, width, height;
     int leftFP, topFP;
     int tileCnt, tilesX, tilesY;
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/jules/TileWorker.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/jules/TileWorker.java	Wed Jul 05 20:52:37 2017 +0200
@@ -28,7 +28,7 @@
 import java.util.*;
 
 public class TileWorker implements Runnable {
-    final static int RASTERIZED_TILE_SYNC_GRANULARITY = 8;
+    static final int RASTERIZED_TILE_SYNC_GRANULARITY = 8;
     final ArrayList<JulesTile> rasterizedTileConsumerCache =
          new ArrayList<JulesTile>();
     final LinkedList<JulesTile> rasterizedBuffers = new LinkedList<JulesTile>();
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XIDGenerator.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XIDGenerator.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,7 +34,7 @@
  */
 
 public class XIDGenerator {
-    private final static int XID_BUFFER_SIZE = 512;
+    private static final int XID_BUFFER_SIZE = 512;
 
     int[] xidBuffer = new int[XID_BUFFER_SIZE];
     int currentIndex = XID_BUFFER_SIZE;
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRBackendNative.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRBackendNative.java	Wed Jul 05 20:52:37 2017 +0200
@@ -107,7 +107,7 @@
                                           int x1, int y1, int x2, int y2,
                                           int numStops, int repeat);
 
-    private native static int
+    private static native int
         XRCreateRadialGradientPaintNative(float[] fractionsArray,
                                           short[] pixelsArray, int numStops,
                                           int centerX, int centerY,
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRCompositeManager.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRCompositeManager.java	Wed Jul 05 20:52:37 2017 +0200
@@ -48,9 +48,9 @@
     private static boolean enableGradCache = true;
     private static XRCompositeManager instance;
 
-    private final static int SOLID = 0;
-    private final static int TEXTURE = 1;
-    private final static int GRADIENT = 2;
+    private static final int SOLID = 0;
+    private static final int TEXTURE = 1;
+    private static final int GRADIENT = 2;
 
     int srcType;
     XRSolidSrcPict solidSrc32;
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XcbRequestCounter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XcbRequestCounter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -32,7 +32,7 @@
  */
 
 public class XcbRequestCounter {
-    private final static long MAX_UINT = 4294967295L;
+    private static final long MAX_UINT = 4294967295L;
 
     long value;
 
--- a/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java	Wed Jul 05 20:52:37 2017 +0200
@@ -83,7 +83,7 @@
     private String printer;
     private URI    myURI;
     private URL    myURL;
-    transient private ServiceNotifier notifier = null;
+    private transient ServiceNotifier notifier = null;
 
     private static int MAXCOPIES = 1000;
     private static short MAX_ATTRIBUTE_LENGTH = 255;
--- a/jdk/src/java.desktop/unix/classes/sun/print/UnixPrintJob.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/print/UnixPrintJob.java	Wed Jul 05 20:52:37 2017 +0200
@@ -90,9 +90,9 @@
 public class UnixPrintJob implements CancelablePrintJob {
     private static String debugPrefix = "UnixPrintJob>> ";
 
-    transient private Vector<PrintJobListener> jobListeners;
-    transient private Vector<PrintJobAttributeListener> attrListeners;
-    transient private Vector<PrintJobAttributeSet> listenedAttributeSets;
+    private transient Vector<PrintJobListener> jobListeners;
+    private transient Vector<PrintJobAttributeListener> attrListeners;
+    private transient Vector<PrintJobAttributeSet> listenedAttributeSets;
 
     private PrintService service;
     private boolean fidelity;
--- a/jdk/src/java.desktop/unix/classes/sun/print/UnixPrintService.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/unix/classes/sun/print/UnixPrintService.java	Wed Jul 05 20:52:37 2017 +0200
@@ -192,8 +192,8 @@
     private PrinterName name;
     private boolean isInvalid;
 
-    transient private PrintServiceAttributeSet lastSet;
-    transient private ServiceNotifier notifier = null;
+    private transient PrintServiceAttributeSet lastSet;
+    private transient ServiceNotifier notifier = null;
 
     UnixPrintService(String name) {
         if (name == null) {
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WComponentPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WComponentPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -233,7 +233,7 @@
         paintArea.paint(target, shouldClearRectBeforePaint());
     }
 
-    native synchronized void updateWindow();
+    synchronized native void updateWindow();
 
     @Override
     public void paint(Graphics g) {
@@ -566,7 +566,7 @@
     }
 
     // fallback default font object
-    final static Font defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);
+    static final Font defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);
 
     @Override
     public Graphics getGraphics() {
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WDialogPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WDialogPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -35,7 +35,7 @@
 
     // Platform default background for dialogs.  Gets set on target if
     // target has none explicitly specified.
-    final static Color defaultBackground =  SystemColor.control;
+    static final Color defaultBackground =  SystemColor.control;
 
     // If target doesn't have its background color set, we set its
     // background to platform default.
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFramePeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFramePeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -195,7 +195,7 @@
         setState(target.getExtendedState());
     }
 
-    private native static int getSysMenuHeight();
+    private static native int getSysMenuHeight();
 
     native void pSetIMMOption(String option);
     void notifyIMMOptionChange(){
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java	Wed Jul 05 20:52:37 2017 +0200
@@ -67,23 +67,23 @@
     private boolean statusWindowHidden = false;
 
     // attribute definition in Win32 (in IMM.H)
-    public final static byte ATTR_INPUT                 = 0x00;
-    public final static byte ATTR_TARGET_CONVERTED      = 0x01;
-    public final static byte ATTR_CONVERTED             = 0x02;
-    public final static byte ATTR_TARGET_NOTCONVERTED   = 0x03;
-    public final static byte ATTR_INPUT_ERROR           = 0x04;
+    public static final byte ATTR_INPUT                 = 0x00;
+    public static final byte ATTR_TARGET_CONVERTED      = 0x01;
+    public static final byte ATTR_CONVERTED             = 0x02;
+    public static final byte ATTR_TARGET_NOTCONVERTED   = 0x03;
+    public static final byte ATTR_INPUT_ERROR           = 0x04;
     // cmode definition in Win32 (in IMM.H)
-    public final static int  IME_CMODE_ALPHANUMERIC     = 0x0000;
-    public final static int  IME_CMODE_NATIVE           = 0x0001;
-    public final static int  IME_CMODE_KATAKANA         = 0x0002;
-    public final static int  IME_CMODE_LANGUAGE         = 0x0003;
-    public final static int  IME_CMODE_FULLSHAPE        = 0x0008;
-    public final static int  IME_CMODE_HANJACONVERT     = 0x0040;
-    public final static int  IME_CMODE_ROMAN            = 0x0010;
+    public static final int  IME_CMODE_ALPHANUMERIC     = 0x0000;
+    public static final int  IME_CMODE_NATIVE           = 0x0001;
+    public static final int  IME_CMODE_KATAKANA         = 0x0002;
+    public static final int  IME_CMODE_LANGUAGE         = 0x0003;
+    public static final int  IME_CMODE_FULLSHAPE        = 0x0008;
+    public static final int  IME_CMODE_HANJACONVERT     = 0x0040;
+    public static final int  IME_CMODE_ROMAN            = 0x0010;
 
     // flag values for endCompositionNative() behavior
-    private final static boolean COMMIT_INPUT           = true;
-    private final static boolean DISCARD_INPUT          = false;
+    private static final boolean COMMIT_INPUT           = true;
+    private static final boolean DISCARD_INPUT          = false;
 
     private static Map<TextAttribute,Object> [] highlightStyles;
 
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WObjectPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WObjectPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -66,7 +66,7 @@
      * Subclasses should override disposeImpl() instead of dispose(). Client
      * code should always invoke dispose(), never disposeImpl().
      */
-    abstract protected void disposeImpl();
+    protected abstract void disposeImpl();
     public final void dispose() {
         boolean call_disposeImpl = false;
 
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -78,7 +78,7 @@
     private native void setInsets();
 
     @Override
-    public native synchronized void setScrollPosition(int x, int y);
+    public synchronized native void setScrollPosition(int x, int y);
 
     @Override
     public int getHScrollbarHeight() {
@@ -112,7 +112,7 @@
         setInsets();
     }
 
-    native synchronized void setSpans(int viewWidth, int viewHeight,
+    synchronized native void setSpans(int viewWidth, int viewHeight,
                                       int childWidth, int childHeight);
 
     /**
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java	Wed Jul 05 20:52:37 2017 +0200
@@ -832,7 +832,7 @@
      * Have Win32GraphicsEnvironment execute the display change code on the
      * Event thread.
      */
-    static public void displayChanged() {
+    public static void displayChanged() {
         EventQueue.invokeLater(new Runnable() {
             @Override
             public void run() {
@@ -1127,7 +1127,7 @@
         return areExtraMouseButtonsEnabled;
     }
 
-    private native synchronized int getNumberOfButtonsImpl();
+    private synchronized native int getNumberOfButtonsImpl();
 
     @Override
     public int getNumberOfButtons(){
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -40,9 +40,9 @@
 import sun.awt.image.IntegerComponentRaster;
 
 final class WTrayIconPeer extends WObjectPeer implements TrayIconPeer {
-    final static int TRAY_ICON_WIDTH = 16;
-    final static int TRAY_ICON_HEIGHT = 16;
-    final static int TRAY_ICON_MASK_SIZE = (TRAY_ICON_WIDTH * TRAY_ICON_HEIGHT) / 8;
+    static final int TRAY_ICON_WIDTH = 16;
+    static final int TRAY_ICON_HEIGHT = 16;
+    static final int TRAY_ICON_MASK_SIZE = (TRAY_ICON_WIDTH * TRAY_ICON_HEIGHT) / 8;
 
     IconObserver observer = new IconObserver();
     boolean firstUpdate = true;
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -59,7 +59,7 @@
      * is a list of windows, sorted by the time of activation: later a window is
      * activated, greater its index is in the list.
      */
-    private final static StringBuffer ACTIVE_WINDOWS_KEY =
+    private static final StringBuffer ACTIVE_WINDOWS_KEY =
         new StringBuffer("active_windows_list");
 
     /*
@@ -72,7 +72,7 @@
     /*
      * The object is a listener for the AppContext.GUI_DISPOSED property.
      */
-    private final static PropertyChangeListener guiDisposedListener =
+    private static final PropertyChangeListener guiDisposedListener =
         new GuiDisposedListener();
 
     /*
--- a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DPaints.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DPaints.java	Wed Jul 05 20:52:37 2017 +0200
@@ -158,7 +158,7 @@
 
 /****************** Shared MultipleGradientPaint support ********************/
 
-    private static abstract class MultiGradient extends D3DPaints {
+    private abstract static class MultiGradient extends D3DPaints {
 
         /**
          * Note that this number is lower than the MULTI_MAX_FRACTIONS
--- a/jdk/src/java.desktop/windows/classes/sun/print/Win32MediaTray.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/windows/classes/sun/print/Win32MediaTray.java	Wed Jul 05 20:52:37 2017 +0200
@@ -59,7 +59,7 @@
         winID = id;
     }
 
-    private synchronized static int nextValue(String name) {
+    private static synchronized int nextValue(String name) {
       winStringTable.add(name);
       return (getTraySize()-1);
     }
--- a/jdk/src/java.desktop/windows/classes/sun/print/Win32PrintJob.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/windows/classes/sun/print/Win32PrintJob.java	Wed Jul 05 20:52:37 2017 +0200
@@ -79,9 +79,9 @@
 
 public class Win32PrintJob implements CancelablePrintJob {
 
-    transient private Vector<PrintJobListener> jobListeners;
-    transient private Vector<PrintJobAttributeListener> attrListeners;
-    transient private Vector<PrintJobAttributeSet> listenedAttributeSets;
+    private transient Vector<PrintJobListener> jobListeners;
+    private transient Vector<PrintJobAttributeListener> attrListeners;
+    private transient Vector<PrintJobAttributeSet> listenedAttributeSets;
 
     private Win32PrintService service;
     private boolean fidelity;
--- a/jdk/src/java.desktop/windows/classes/sun/print/Win32PrintService.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.desktop/windows/classes/sun/print/Win32PrintService.java	Wed Jul 05 20:52:37 2017 +0200
@@ -195,8 +195,8 @@
     private PrinterName name;
     private String port;
 
-    transient private PrintServiceAttributeSet lastSet;
-    transient private ServiceNotifier notifier = null;
+    private transient PrintServiceAttributeSet lastSet;
+    private transient ServiceNotifier notifier = null;
 
     private MediaSizeName[] mediaSizeNames;
     private MediaPrintableArea[] mediaPrintables;
@@ -1734,7 +1734,7 @@
 
     }
 
-    private synchronized static int nextValue(String name) {
+    private static synchronized int nextValue(String name) {
       winStringTable.add(name);
       return (winStringTable.size()-1);
     }
--- a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,9 +34,9 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.locks.ReentrantLock;
-import sun.misc.JavaAWTAccess;
+import jdk.internal.misc.JavaAWTAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.ManagedLocalsThread;
-import sun.misc.SharedSecrets;
 
 /**
  * There is a single global LogManager object that is used to
--- a/jdk/src/java.logging/share/classes/java/util/logging/LogRecord.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/LogRecord.java	Wed Jul 05 20:52:37 2017 +0200
@@ -31,8 +31,8 @@
 import java.io.*;
 import java.time.Clock;
 
-import sun.misc.JavaLangAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * LogRecord objects are used to pass logging requests between
--- a/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/Introspector.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/Introspector.java	Wed Jul 05 20:52:37 2017 +0200
@@ -56,8 +56,6 @@
 import javax.management.AttributeNotFoundException;
 import javax.management.openmbean.CompositeData;
 
-import sun.misc.JavaBeansAccess;
-import sun.misc.SharedSecrets;
 import sun.reflect.misc.MethodUtil;
 import sun.reflect.misc.ReflectUtil;
 
--- a/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/JavaBeansAccessor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/JavaBeansAccessor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,8 +26,8 @@
 
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
-import sun.misc.JavaBeansAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaBeansAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * A centralized place for gaining access to java.beans related functionality -
--- a/jdk/src/java.management/share/classes/javax/management/modelmbean/RequiredModelMBean.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/modelmbean/RequiredModelMBean.java	Wed Jul 05 20:52:37 2017 +0200
@@ -80,8 +80,8 @@
 import javax.management.RuntimeOperationsException;
 import javax.management.ServiceNotFoundException;
 import javax.management.loading.ClassLoaderRepository;
-import sun.misc.JavaSecurityAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaSecurityAccess;
+import jdk.internal.misc.SharedSecrets;
 
 import sun.reflect.misc.MethodUtil;
 import sun.reflect.misc.ReflectUtil;
--- a/jdk/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java	Wed Jul 05 20:52:37 2017 +0200
@@ -36,6 +36,9 @@
 import java.security.AccessController;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
+
+import jdk.internal.misc.JavaNioAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.util.logging.LoggingSupport;
 import java.util.ArrayList;
 import java.util.List;
@@ -208,7 +211,7 @@
     public static synchronized List<BufferPoolMXBean> getBufferPoolMXBeans() {
         if (bufferPools == null) {
             bufferPools = new ArrayList<>(2);
-            bufferPools.add(createBufferPoolMXBean(sun.misc.SharedSecrets.getJavaNioAccess()
+            bufferPools.add(createBufferPoolMXBean(SharedSecrets.getJavaNioAccess()
                 .getDirectBufferPool()));
             bufferPools.add(createBufferPoolMXBean(sun.nio.ch.FileChannelImpl
                 .getMappedBufferPool()));
@@ -222,7 +225,7 @@
      * Creates management interface for the given buffer pool.
      */
     private static BufferPoolMXBean
-        createBufferPoolMXBean(final sun.misc.JavaNioAccess.BufferPool pool)
+        createBufferPoolMXBean(final JavaNioAccess.BufferPool pool)
     {
         return new BufferPoolMXBean() {
             private volatile ObjectName objname;  // created lazily
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/VersionHelper.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/VersionHelper.java	Wed Jul 05 20:52:37 2017 +0200
@@ -25,7 +25,7 @@
 
 package com.sun.jndi.ldap;
 
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.SharedSecrets;
 
 import java.net.MalformedURLException;
 import java.net.URL;
--- a/jdk/src/java.sql/share/classes/java/sql/Date.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.sql/share/classes/java/sql/Date.java	Wed Jul 05 20:52:37 2017 +0200
@@ -27,8 +27,8 @@
 
 import java.time.Instant;
 import java.time.LocalDate;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
 
 /**
  * <P>A thin wrapper around a millisecond value that allows
--- a/jdk/src/java.sql/share/classes/java/sql/Time.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.sql/share/classes/java/sql/Time.java	Wed Jul 05 20:52:37 2017 +0200
@@ -27,8 +27,8 @@
 
 import java.time.Instant;
 import java.time.LocalTime;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
 
 /**
  * <P>A thin wrapper around the <code>java.util.Date</code> class that allows the JDBC
--- a/jdk/src/java.sql/share/classes/java/sql/Timestamp.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.sql/share/classes/java/sql/Timestamp.java	Wed Jul 05 20:52:37 2017 +0200
@@ -27,8 +27,8 @@
 
 import java.time.Instant;
 import java.time.LocalDateTime;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
 
 /**
  * <P>A thin wrapper around {@code java.util.Date} that allows
--- a/jdk/src/java.sql/share/classes/javax/transaction/xa/XAException.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.sql/share/classes/javax/transaction/xa/XAException.java	Wed Jul 05 20:52:37 2017 +0200
@@ -31,7 +31,11 @@
  *
  */
 public class XAException extends Exception {
-    //private static final long serialVersionUID = -8249683284832867751L;
+
+    /**
+     * Specify serialVersionUID for backward compatibility
+     */
+    private static final long serialVersionUID = -8249683284832867751L;
 
     /**
      * The error code with which to create the SystemException.
--- a/jdk/src/java.transaction/share/classes/javax/transaction/InvalidTransactionException.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.transaction/share/classes/javax/transaction/InvalidTransactionException.java	Wed Jul 05 20:52:37 2017 +0200
@@ -40,6 +40,11 @@
 public class InvalidTransactionException extends java.rmi.RemoteException {
 
     /**
+     * Specify serialVersionUID for backward compatibility
+     */
+    private static final long serialVersionUID = 3597320220337691496L;
+
+    /**
      * Constructs an {@code InvalidTransactionException}.
      */
     public InvalidTransactionException() {
--- a/jdk/src/java.transaction/share/classes/javax/transaction/TransactionRequiredException.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.transaction/share/classes/javax/transaction/TransactionRequiredException.java	Wed Jul 05 20:52:37 2017 +0200
@@ -39,6 +39,11 @@
 public class TransactionRequiredException extends java.rmi.RemoteException {
 
     /**
+     * Specify serialVersionUID for backward compatibility
+     */
+    private static final long serialVersionUID = -1898806419937446439L;
+
+    /**
      * Constructs a {@code TransactionRequiredException}.
      */
     public TransactionRequiredException() {
--- a/jdk/src/java.transaction/share/classes/javax/transaction/TransactionRolledbackException.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/java.transaction/share/classes/javax/transaction/TransactionRolledbackException.java	Wed Jul 05 20:52:37 2017 +0200
@@ -42,6 +42,11 @@
 public class TransactionRolledbackException extends java.rmi.RemoteException {
 
     /**
+     * Specify serialVersionUID for backward compatibility
+     */
+    private static final long serialVersionUID = -3142798139623020577L;
+
+    /**
      * Constructs a {@code TransactionRolledbackException}.
      */
     public TransactionRolledbackException() {
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/de/TimeZoneNames_de.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/de/TimeZoneNames_de.java	Wed Jul 05 20:52:37 2017 +0200
@@ -431,6 +431,7 @@
             {"America/Eirunepe", ACT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
+            {"America/Fort_Nelson", MST},
             {"America/Fort_Wayne", EST},
             {"America/Fortaleza", BRT},
             {"America/Glace_Bay", AST},
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/es/TimeZoneNames_es.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/es/TimeZoneNames_es.java	Wed Jul 05 20:52:37 2017 +0200
@@ -431,6 +431,7 @@
             {"America/Eirunepe", ACT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
+            {"America/Fort_Nelson", MST},
             {"America/Fort_Wayne", EST},
             {"America/Fortaleza", BRT},
             {"America/Glace_Bay", AST},
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java	Wed Jul 05 20:52:37 2017 +0200
@@ -431,6 +431,7 @@
             {"America/Eirunepe", ACT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
+            {"America/Fort_Nelson", MST},
             {"America/Fort_Wayne", EST},
             {"America/Fortaleza", BRT},
             {"America/Glace_Bay", AST},
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/it/TimeZoneNames_it.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/it/TimeZoneNames_it.java	Wed Jul 05 20:52:37 2017 +0200
@@ -431,6 +431,7 @@
             {"America/Eirunepe", ACT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
+            {"America/Fort_Nelson", MST},
             {"America/Fort_Wayne", EST},
             {"America/Fortaleza", BRT},
             {"America/Glace_Bay", AST},
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java	Wed Jul 05 20:52:37 2017 +0200
@@ -431,6 +431,7 @@
             {"America/Eirunepe", ACT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
+            {"America/Fort_Nelson", MST},
             {"America/Fort_Wayne", EST},
             {"America/Fortaleza", BRT},
             {"America/Glace_Bay", AST},
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java	Wed Jul 05 20:52:37 2017 +0200
@@ -431,6 +431,7 @@
             {"America/Eirunepe", ACT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
+            {"America/Fort_Nelson", MST},
             {"America/Fort_Wayne", EST},
             {"America/Fortaleza", BRT},
             {"America/Glace_Bay", AST},
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/pt/BR/TimeZoneNames_pt_BR.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/pt/BR/TimeZoneNames_pt_BR.java	Wed Jul 05 20:52:37 2017 +0200
@@ -431,6 +431,7 @@
             {"America/Eirunepe", ACT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
+            {"America/Fort_Nelson", MST},
             {"America/Fort_Wayne", EST},
             {"America/Fortaleza", BRT},
             {"America/Glace_Bay", AST},
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java	Wed Jul 05 20:52:37 2017 +0200
@@ -431,6 +431,7 @@
             {"America/Eirunepe", ACT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
+            {"America/Fort_Nelson", MST},
             {"America/Fort_Wayne", EST},
             {"America/Fortaleza", BRT},
             {"America/Glace_Bay", AST},
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/zh/CN/TimeZoneNames_zh_CN.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/zh/CN/TimeZoneNames_zh_CN.java	Wed Jul 05 20:52:37 2017 +0200
@@ -431,6 +431,7 @@
             {"America/Eirunepe", ACT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
+            {"America/Fort_Nelson", MST},
             {"America/Fort_Wayne", EST},
             {"America/Fortaleza", BRT},
             {"America/Glace_Bay", AST},
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/zh/TW/TimeZoneNames_zh_TW.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/zh/TW/TimeZoneNames_zh_TW.java	Wed Jul 05 20:52:37 2017 +0200
@@ -431,6 +431,7 @@
             {"America/Eirunepe", ACT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
+            {"America/Fort_Nelson", MST},
             {"America/Fort_Wayne", EST},
             {"America/Fortaleza", BRT},
             {"America/Glace_Bay", AST},
--- a/jdk/test/TEST.groups	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/TEST.groups	Wed Jul 05 20:52:37 2017 +0200
@@ -250,6 +250,7 @@
     javax/naming \
     javax/script \
     javax/smartcardio \
+    javax/transaction \
     javax/xml \
     -javax/xml/crypto \
     jdk/asm \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.html	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,44 @@
+<!--
+ Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+ This code is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License version 2 only, as
+ published by the Free Software Foundation.
+
+ This code is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ version 2 for more details (a copy is included in the LICENSE file that
+ accompanied this code).
+
+ You should have received a copy of the GNU General Public License version
+ 2 along with this work; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ or visit www.oracle.com if you need additional information or have any
+ questions.
+-->
+
+
+<html>
+<!--
+  @test
+  @bug 6392086 8014725
+  @summary Tests basic DnD functionality in an applet
+  @author Alexey Utkin, Semyon Sadetsky area=dnd
+  @run applet HTMLTransferTest.html
+-->
+<head>
+<title>  </title>
+</head>
+<body>
+
+<h1>HTMLTransferTest<br>Bug ID: 6392086</h1>
+
+<p> This is an AUTOMATIC test, simply wait for completion </p>
+
+<APPLET CODE="HTMLTransferTest.class" WIDTH=200 HEIGHT=200></APPLET>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,767 @@
+/*
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+  @bug 6392086 8014725
+  @summary Tests basic DnD functionality in an applet
+  @author Alexey Utkin, Semyon Sadetsky
+  @run applet HTMLTransferTest.html
+*/
+
+/**
+ * HTMLTransferTest.java
+ *
+ * summary: tests that HTMLs of all supported native HTML formats
+ *          are transfered properly
+ */
+
+import java.applet.Applet;
+import java.awt.*;
+import java.awt.datatransfer.*;
+import java.io.*;
+
+
+public class HTMLTransferTest extends Applet {
+    public static final int CODE_NOT_RETURNED = 100;
+    public static final int CODE_CONSUMER_TEST_FAILED = 101;
+    public static final int CODE_FAILURE = 102;
+    public static DataFlavor[] HTMLFlavors = null;
+    public static DataFlavor SyncFlavor = null;
+    static {
+        try{
+            HTMLFlavors = new DataFlavor[] {
+                new DataFlavor("text/html; document=selection; Class=" + InputStream.class.getName() + "; charset=UTF-8"),
+                new DataFlavor("text/html; document=selection; Class=" + String.class.getName() + "; charset=UTF-8")
+            };
+            SyncFlavor = new DataFlavor(
+                "application/x-java-serialized-object; class="
+                + SyncMessage.class.getName()
+                + "; charset=UTF-8"
+            );
+        }catch(Exception e){
+            e.printStackTrace();
+        }
+    }
+
+    private THTMLProducer imPr;
+    private int returnCode = CODE_NOT_RETURNED;
+
+    public void init() {
+        initImpl();
+
+        String[] instructions =
+        {
+            "This is an AUTOMATIC test",
+            "simply wait until it is done"
+        };
+        Sysout.createDialog( );
+        Sysout.printInstructions( instructions );
+
+    } // init()
+
+    private void initImpl() {
+        imPr = new THTMLProducer();
+        imPr.begin();
+    }
+
+
+    public void start() {
+        try {
+            String stFormats = "";
+
+            String iniMsg = "Testing formats from the list:\n";
+            for (int i = 0; i < HTMLTransferTest.HTMLFlavors.length; i++) {
+                stFormats += "\"" + HTMLTransferTest.HTMLFlavors[i].getMimeType() + "\"\n";
+            }
+            Sysout.println(iniMsg + stFormats);
+            System.err.println("===>" + iniMsg + stFormats);
+
+            String javaPath = System.getProperty("java.home", "");
+            String cmd = javaPath + File.separator + "bin" + File.separator
+                + "java -cp " + System.getProperty("test.classes", ".") +
+                //+ "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 "
+                " THTMLConsumer"
+                //+ stFormats
+                ;
+
+            Process process = Runtime.getRuntime().exec(cmd);
+            ProcessResults pres = ProcessResults.doWaitFor(process);
+            returnCode = pres.exitValue;
+
+            if (pres.stderr != null && pres.stderr.length() > 0) {
+                System.err.println("========= Child VM System.err ========");
+                System.err.print(pres.stderr);
+                System.err.println("======================================");
+            }
+
+            if (pres.stdout != null && pres.stdout.length() > 0) {
+                System.err.println("========= Child VM System.out ========");
+                System.err.print(pres.stdout);
+                System.err.println("======================================");
+            }
+        } catch (Throwable e) {
+            e.printStackTrace();
+            //returnCode equals CODE_NOT_RETURNED
+        }
+
+        switch (returnCode) {
+        case CODE_NOT_RETURNED:
+            System.err.println("Child VM: failed to start");
+            break;
+        case CODE_FAILURE:
+            System.err.println("Child VM: abnormal termination");
+            break;
+        case CODE_CONSUMER_TEST_FAILED:
+            throw new RuntimeException("test failed: HTMLs in some " +
+                "native formats are not transferred properly: " +
+                "see output of child VM");
+        default:
+            boolean failed = false;
+            String passedFormats = "";
+            String failedFormats = "";
+
+            for (int i = 0; i < imPr.passedArray.length; i++) {
+               if (imPr.passedArray[i]) {
+                   passedFormats += HTMLTransferTest.HTMLFlavors[i].getMimeType() + " ";
+               } else {
+                   failed = true;
+                   failedFormats += HTMLTransferTest.HTMLFlavors[i].getMimeType() + " ";
+               }
+            }
+            if (failed) {
+                throw new RuntimeException(
+                    "test failed: HTMLs in following "
+                    + "native formats are not transferred properly: "
+                    + failedFormats
+                );
+            } else {
+                System.err.println(
+                    "HTMLs in following native formats are "
+                    + "transferred properly: "
+                    + passedFormats
+                );
+            }
+        }
+
+    } // start()
+
+} // class HTMLTransferTest
+
+class SyncMessage implements Serializable {
+    String msg;
+
+    public SyncMessage(String sync) {
+        this.msg = sync;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return this.msg.equals(((SyncMessage)obj).msg);
+    }
+
+    @Override
+    public String toString() {
+        return msg;
+    }
+}
+
+class ProcessResults {
+    public int exitValue;
+    public String stdout;
+    public String stderr;
+
+    public ProcessResults() {
+        exitValue = -1;
+        stdout = "";
+        stderr = "";
+    }
+
+    /**
+     * Method to perform a "wait" for a process and return its exit value.
+     * This is a workaround for <code>Process.waitFor()</code> never returning.
+     */
+    public static ProcessResults doWaitFor(Process p) {
+        ProcessResults pres = new ProcessResults();
+
+        InputStream in = null;
+        InputStream err = null;
+
+        try {
+            in = p.getInputStream();
+            err = p.getErrorStream();
+
+            boolean finished = false;
+
+            while (!finished) {
+                try {
+                    while (in.available() > 0) {
+                        pres.stdout += (char)in.read();
+                    }
+                    while (err.available() > 0) {
+                        pres.stderr += (char)err.read();
+                    }
+                    // Ask the process for its exitValue. If the process
+                    // is not finished, an IllegalThreadStateException
+                    // is thrown. If it is finished, we fall through and
+                    // the variable finished is set to true.
+                    pres.exitValue = p.exitValue();
+                    finished  = true;
+                }
+                catch (IllegalThreadStateException e) {
+                    // Process is not finished yet;
+                    // Sleep a little to save on CPU cycles
+                    Thread.currentThread().sleep(500);
+                }
+            }
+            if (in != null) in.close();
+            if (err != null) err.close();
+        }
+        catch (Throwable e) {
+            System.err.println("doWaitFor(): unexpected exception");
+            e.printStackTrace();
+        }
+        return pres;
+    }
+}
+
+
+abstract class HTMLTransferer implements ClipboardOwner {
+
+    static final SyncMessage S_PASSED = new SyncMessage("Y");
+    static final SyncMessage S_FAILED = new SyncMessage("N");
+    static final SyncMessage S_BEGIN = new SyncMessage("B");
+    static final SyncMessage S_BEGIN_ANSWER = new SyncMessage("BA");
+    static final SyncMessage S_END = new SyncMessage("E");
+
+
+
+    Clipboard m_clipboard;
+
+    HTMLTransferer() {
+        m_clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+    }
+
+
+    abstract void notifyTransferSuccess(boolean status);
+
+
+    static Object createTRInstance(int i) {
+        try{
+            String _htmlText =
+                "The quick <font color='#78650d'>brown</font> <b>mouse</b> jumped over the lazy <b>cat</b>.";
+            switch(i){
+            case 0:
+                return new ByteArrayInputStream(_htmlText.getBytes("utf-8"));
+            case 1:
+                return _htmlText;
+            }
+        }catch(UnsupportedEncodingException e){ e.printStackTrace(); }
+        return null;
+    }
+
+    static byte[] getContent(InputStream is)
+    {
+        ByteArrayOutputStream tmp = new ByteArrayOutputStream();
+        try{
+            int read;
+            while( -1 != (read = is.read()) ){
+                tmp.write(read);
+            };
+        } catch( IOException e ) {
+            e.printStackTrace();
+        }
+        return tmp.toByteArray();
+    }
+
+    static void Dump(byte[] b){
+        System.err.println( new String(b) );
+    };
+
+    void setClipboardContents(
+        Transferable contents,
+        ClipboardOwner owner
+    ) {
+        synchronized (m_clipboard) {
+            boolean set = false;
+            while (!set) {
+                try {
+                    m_clipboard.setContents(contents, owner);
+                    set = true;
+                } catch (IllegalStateException ise) {
+                    try {
+                        Thread.sleep(100);
+                    } catch(InterruptedException e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        }
+    }
+
+    Transferable getClipboardContents(Object requestor)
+    {
+        synchronized (m_clipboard) {
+            while (true) {
+                try {
+                    Transferable t = m_clipboard.getContents(requestor);
+                    return t;
+                } catch (IllegalStateException ise) {
+                    try {
+                        Thread.sleep(100);
+                    } catch (InterruptedException e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        }
+    }
+
+}
+
+
+class THTMLProducer extends HTMLTransferer {
+
+    boolean[] passedArray;
+    int fi = 0; // next format index
+    private boolean isFirstCallOfLostOwnership = true;
+
+    THTMLProducer() {
+        passedArray = new boolean[HTMLTransferTest.HTMLFlavors.length];
+    }
+
+    void begin() {
+        setClipboardContents(
+            new HTMLSelection(
+                HTMLTransferTest.SyncFlavor,
+                S_BEGIN
+            ),
+            this
+        );
+    }
+
+    public void lostOwnership(Clipboard cb, Transferable contents) {
+        System.err.println("{PRODUCER: lost clipboard ownership");
+        Transferable t = getClipboardContents(null);
+        if (t.isDataFlavorSupported(HTMLTransferTest.SyncFlavor)) {
+            SyncMessage msg = null;
+            // for test going on if t.getTransferData() will throw an exception
+            if (isFirstCallOfLostOwnership) {
+                isFirstCallOfLostOwnership = false;
+                msg = S_BEGIN_ANSWER;
+            } else {
+                msg = S_PASSED;
+            }
+            try {
+                msg = (SyncMessage)t.getTransferData(HTMLTransferTest.SyncFlavor);
+                System.err.println("++received message: " + msg);
+            } catch (Exception e) {
+                System.err.println("Can't getTransferData-message: " + e);
+            }
+            if( msg.equals(S_PASSED) ){
+                notifyTransferSuccess(true);
+            } else if( msg.equals(S_FAILED) ){
+                notifyTransferSuccess(false);
+            } else if (!msg.equals(S_BEGIN_ANSWER)) {
+                throw new RuntimeException("wrong message in " +
+                    "THTMLProducer.lostOwnership(): " + msg +
+                    "  (possibly due to bug 4683804)");
+            }
+        } else {
+            throw new RuntimeException(
+                "DataFlavor.stringFlavor is not "
+                + "suppurted by transferable in "
+                + "THTMLProducer.lostOwnership()"
+            );
+        }
+
+        if (fi < HTMLTransferTest.HTMLFlavors.length) {
+            System.err.println(
+                "testing native HTML format \""
+                + HTMLTransferTest.HTMLFlavors[fi].getMimeType()
+                + "\"..."
+            );
+            //leaveFormat( HTMLTransferTest.HTMLFlavors[fi].getMimeType() );
+            setClipboardContents(
+                new HTMLSelection(
+                    HTMLTransferTest.HTMLFlavors[fi],
+                    HTMLTransferer.createTRInstance(fi)
+                ),
+                this
+            );
+        } else {
+            setClipboardContents(
+                new HTMLSelection(
+                    HTMLTransferTest.SyncFlavor,
+                    S_END
+                ),
+                null
+            );
+        }
+        System.err.println("}PRODUCER: lost clipboard ownership");
+    }
+
+
+    void notifyTransferSuccess(boolean status) {
+        passedArray[fi] = status;
+        fi++;
+    }
+
+}
+
+
+class THTMLConsumer extends HTMLTransferer
+{
+    private static final Object LOCK = new Object();
+    private static boolean failed;
+    int fi = 0; // next format index
+
+    public void lostOwnership(Clipboard cb, Transferable contents) {
+        System.err.println("{CONSUMER: lost clipboard ownership");
+        Transferable t = getClipboardContents(null);
+        boolean bContinue = true;
+        if(t.isDataFlavorSupported(HTMLTransferTest.SyncFlavor)) {
+            try {
+                SyncMessage msg = (SyncMessage)t.getTransferData(HTMLTransferTest.SyncFlavor);
+                System.err.println("received message: " + msg);
+                if(msg.equals(S_END)){
+                    synchronized (LOCK) {
+                        LOCK.notifyAll();
+                    }
+                    bContinue = false;
+                }
+            } catch (Exception e) {
+                System.err.println("Can't getTransferData-message: " + e);
+            }
+        }
+        if(bContinue){
+            // all HTML formats have been processed
+            System.err.println( "============================================================");
+            System.err.println( "Put as " + HTMLTransferTest.HTMLFlavors[fi].getMimeType() );
+            boolean bSuccess = false;
+            for(int i = 0; i < HTMLTransferTest.HTMLFlavors.length; ++i) {
+                System.err.println( "----------------------------------------------------------");
+                if( t.isDataFlavorSupported(HTMLTransferTest.HTMLFlavors[i]) ){
+                    Object im = null; //? HTML;
+                    try {
+                       im = t.getTransferData(HTMLTransferTest.HTMLFlavors[i]);
+                       if (im == null) {
+                           System.err.println("getTransferData returned null");
+                       } else {
+                            System.err.println( "Extract as " + HTMLTransferTest.HTMLFlavors[i].getMimeType() );
+                            String stIn = "(unknown)", stOut = "(unknown)";
+                            switch( i ){
+                            case 0:
+                                stIn = new String( getContent( (InputStream)HTMLTransferer.createTRInstance(i) ) );
+                                stOut = new String( getContent((InputStream)im) );
+                                bSuccess = stIn.equals(stOut);
+                                break;
+                            case 1:
+                                stIn = (String)HTMLTransferer.createTRInstance(i);
+                                stOut = (String)im;
+                                int head = stOut.indexOf("<HTML><BODY>");
+                                if (head >= 0) {
+                                    stOut = stOut.substring(head + 12, stOut.length() - 14);
+                                }
+                                bSuccess = stIn.equals(stOut);
+                                break;
+                            default:
+                                bSuccess = HTMLTransferer.createTRInstance(i).equals(im);
+                                break;
+                            };
+                            System.err.println("in :" + stIn);
+                            System.err.println("out:" + stOut);
+                       };
+                    } catch (Exception e) {
+                        System.err.println("Can't getTransferData: " + e);
+                    }
+                    if(!bSuccess)
+                        System.err.println("transferred DATA is different from initial DATA\n");
+                } else {
+                    System.err.println("Flavor is not supported by transferable:\n");
+                    DataFlavor[] dfs = t.getTransferDataFlavors();
+                    int ii;
+                    for(ii = 0; ii < dfs.length; ++ii)
+                        System.err.println("Supported:" + dfs[ii] + "\n");
+                    dfs = HTMLTransferTest.HTMLFlavors;
+                    for(ii = 0; ii < dfs.length; ++ii)
+                        System.err.println("Accepted:" + dfs[ii] + "\n" );
+                }
+            }
+            System.err.println( "----------------------------------------------------------");
+            notifyTransferSuccess(bSuccess);
+            System.err.println( "============================================================");
+            ++fi;
+        }
+        System.err.println("}CONSUMER: lost clipboard ownership");
+    }
+
+
+    void notifyTransferSuccess(boolean status) {
+        System.err.println(
+            "format "
+            + (status
+                ? "passed"
+                : "failed"
+            )
+            + "!!!"
+        );
+        setClipboardContents(
+            new HTMLSelection(
+                HTMLTransferTest.SyncFlavor,
+                status
+                    ? S_PASSED
+                    : S_FAILED
+            ),
+            this
+        );
+    }
+
+
+    public static void main(String[] args) {
+        try {
+            System.err.println("{CONSUMER: start");
+            THTMLConsumer ic = new THTMLConsumer();
+            ic.setClipboardContents(
+                new HTMLSelection(
+                    HTMLTransferTest.SyncFlavor,
+                    S_BEGIN_ANSWER
+                ),
+                ic
+            );
+            synchronized (LOCK) {
+                LOCK.wait();
+            }
+            System.err.println("}CONSUMER: start");
+        } catch (Throwable e) {
+            e.printStackTrace();
+            System.exit(HTMLTransferTest.CODE_FAILURE);
+        }
+    }
+
+}
+
+
+/**
+ * A <code>Transferable</code> which implements the capability required
+ * to transfer an <code>HTML</code>.
+ *
+ * This <code>Transferable</code> properly supports
+ * <code>HTMLTransferTest.HTMLFlavors</code>.
+ * and all equivalent flavors.
+ * No other <code>DataFlavor</code>s are supported.
+ *
+ * @see java.awt.datatransfer.HTMLTransferTest.HTMLFlavors
+ */
+class HTMLSelection implements Transferable {
+    private DataFlavor m_flavor;
+    private Object m_data;
+
+    /**
+     * Creates a <code>Transferable</code> capable of transferring
+     * the specified <code>String</code>.
+     */
+    public HTMLSelection(
+        DataFlavor flavor,
+        Object data
+    ){
+        m_flavor = flavor;
+        m_data = data;
+    }
+
+    /**
+     * Returns an array of flavors in which this <code>Transferable</code>
+     * can provide the data. <code>DataFlavor.stringFlavor</code>
+     * is properly supported.
+     * Support for <code>DataFlavor.plainTextFlavor</code> is
+     * <b>deprecated</b>.
+     *
+     * @return an array of length one, whose element is <code>DataFlavor.
+     *         HTMLTransferTest.HTMLFlavors</code>
+     */
+    public DataFlavor[] getTransferDataFlavors() {
+        // returning flavors itself would allow client code to modify
+        // our internal behavior
+        return new DataFlavor[]{ m_flavor } ;
+    }
+
+    /**
+     * Returns whether the requested flavor is supported by this
+     * <code>Transferable</code>.
+     *
+     * @param flavor the requested flavor for the data
+     * @return true if <code>flavor</code> is equal to
+     *   <code>HTMLTransferTest.HTMLFlavors</code>;
+     *   false if <code>flavor</code>
+     *   is not one of the above flavors
+     * @throws NullPointerException if flavor is <code>null</code>
+     */
+    public boolean isDataFlavorSupported(DataFlavor flavor) {
+        System.err.println("Have:" + flavor + " Can:" + m_flavor);
+        if(flavor.equals(m_flavor))
+            return true;
+        return false;
+    }
+
+    /**
+     * Returns the <code>Transferable</code>'s data in the requested
+     * <code>DataFlavor</code> if possible. If the desired flavor is
+     * <code>HTMLTransferTest.HTMLFlavors</code>, or an equivalent flavor,
+     * the <code>HTML</code> representing the selection is
+     * returned.
+     *
+     * @param flavor the requested flavor for the data
+     * @return the data in the requested flavor, as outlined above
+     * @throws UnsupportedFlavorException if the requested data flavor is
+     *         not equivalent to <code>HTMLTransferTest.HTMLFlavors</code>
+     * @throws IOException if an IOException occurs while retrieving the data.
+     *         By default, <code>HTMLSelection</code> never throws
+     *         this exception, but a subclass may.
+     * @throws NullPointerException if flavor is <code>null</code>
+     */
+    public Object getTransferData(DataFlavor flavor)
+        throws UnsupportedFlavorException, IOException
+    {
+        if (flavor.equals(m_flavor)) {
+            return (Object)m_data;
+        } else {
+            throw new UnsupportedFlavorException(flavor);
+        }
+    }
+
+} // class HTMLSelection
+
+
+/****************************************************
+ Standard Test Machinery
+ DO NOT modify anything below -- it's a standard
+  chunk of code whose purpose is to make user
+  interaction uniform, and thereby make it simpler
+  to read and understand someone else's test.
+ ****************************************************/
+class Sysout
+ {
+   private static TestDialog dialog;
+
+   public static void createDialogWithInstructions( String[] instructions )
+    {
+      dialog = new TestDialog( new Frame(), "Instructions" );
+      dialog.printInstructions( instructions );
+      dialog.show();
+      println( "Any messages for the tester will display here." );
+    }
+
+   public static void createDialog( )
+    {
+      dialog = new TestDialog( new Frame(), "Instructions" );
+      String[] defInstr = { "Instructions will appear here. ", "" } ;
+      dialog.printInstructions( defInstr );
+      dialog.show();
+      println( "Any messages for the tester will display here." );
+    }
+
+
+   public static void printInstructions( String[] instructions )
+    {
+      dialog.printInstructions( instructions );
+    }
+
+
+   public static void println( String messageIn )
+    {
+      dialog.displayMessage( messageIn );
+    }
+
+ }// Sysout  class
+
+class TestDialog extends Dialog
+ {
+
+   TextArea instructionsText;
+   TextArea messageText;
+   int maxStringLength = 80;
+
+   //DO NOT call this directly, go through Sysout
+   public TestDialog( Frame frame, String name )
+    {
+      super( frame, name );
+      int scrollBoth = TextArea.SCROLLBARS_BOTH;
+      instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth );
+      add( "North", instructionsText );
+
+      messageText = new TextArea( "", 5, maxStringLength, scrollBoth );
+      add("South", messageText);
+
+      pack();
+
+      show();
+    }// TestDialog()
+
+   //DO NOT call this directly, go through Sysout
+   public void printInstructions( String[] instructions )
+    {
+      //Clear out any current instructions
+      instructionsText.setText( "" );
+
+      //Go down array of instruction strings
+
+      String printStr, remainingStr;
+      for( int i=0; i < instructions.length; i++ )
+       {
+         //chop up each into pieces maxSringLength long
+         remainingStr = instructions[ i ];
+         while( remainingStr.length() > 0 )
+          {
+            //if longer than max then chop off first max chars to print
+            if( remainingStr.length() >= maxStringLength )
+             {
+               //Try to chop on a word boundary
+               int posOfSpace = remainingStr.
+                  lastIndexOf(' ', maxStringLength - 1);
+
+               if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1;
+
+               printStr = remainingStr.substring( 0, posOfSpace + 1 );
+               remainingStr = remainingStr.substring( posOfSpace + 1 );
+             }
+            //else just print
+            else
+             {
+               printStr = remainingStr;
+               remainingStr = "";
+             }
+
+            instructionsText.append( printStr + "\n" );
+
+          }// while
+
+       }// for
+
+    }//printInstructions()
+
+   //DO NOT call this directly, go through Sysout
+   public void displayMessage( String messageIn )
+    {
+      messageText.append( messageIn + "\n" );
+    }
+
+ }// TestDialog  class
--- a/jdk/test/java/awt/EventQueue/6980209/bug6980209.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/java/awt/EventQueue/6980209/bug6980209.java	Wed Jul 05 20:52:37 2017 +0200
@@ -29,6 +29,7 @@
 
 import javax.swing.*;
 import java.awt.*;
+import java.awt.event.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.KeyEvent;
@@ -47,6 +48,8 @@
     private static Boolean enterReturn;
     private static Boolean exitReturn;
     private static int dispatchedEvents;
+    private static JButton button;
+    private static Point point;
 
     public static void main(String[] args) throws Exception {
         System.out.println(
@@ -62,6 +65,23 @@
                     setup(frame);
                 }
             });
+            final Robot robot = new Robot();
+            robot.delay(100);
+            robot.waitForIdle();
+            robot.setAutoDelay(10);
+            robot.setAutoWaitForIdle(true);
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    point = button.getLocationOnScreen();
+                }
+            });
+            robot.mouseMove( point.x + 5, point.y + 5 );
+            robot.mousePress(InputEvent.BUTTON1_MASK);
+            robot.mouseRelease(InputEvent.BUTTON1_MASK);
+            robot.delay(100);
+            robot.waitForIdle();
+
             testExitBeforeEnter();
             System.out.println("Run random test in EDT");
             runInEDT = true;
@@ -102,6 +122,7 @@
     private static void testRandomly() throws AWTException {
         disorderCounter = 0;
         final Robot robot = new Robot();
+        robot.setAutoDelay(1);
         for (int i = 0; i < ATTEMPTS; i++) {
             enterReturn = null;
             exitReturn = null;
@@ -156,14 +177,14 @@
     }
 
     private static void setup(final JFrame frame) {
-        JButton jButton = new JButton("Button");
-        frame.getContentPane().add(jButton);
-        jButton.addActionListener(new bug6980209());
+        button = new JButton("Button");
+        frame.getContentPane().add(button);
+        button.addActionListener(new bug6980209());
         frame.pack();
         frame.setVisible(true);
-        jButton.setFocusable(true);
-        jButton.requestFocus();
-        jButton.addKeyListener(new KeyListener() {
+        button.setFocusable(true);
+        button.requestFocus();
+        button.addKeyListener(new KeyListener() {
             @Override
             public void keyTyped(KeyEvent e) {
             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,237 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.awt.Point;
+import java.awt.Robot;
+import java.awt.Window;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.dnd.DnDConstants;
+import java.awt.dnd.DragGestureEvent;
+import java.awt.dnd.DragGestureListener;
+import java.awt.dnd.DragSource;
+import java.awt.dnd.DropTarget;
+import java.awt.dnd.DropTargetDragEvent;
+import java.awt.dnd.DropTargetDropEvent;
+import java.awt.dnd.DropTargetEvent;
+import java.awt.dnd.DropTargetListener;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+/*
+ * @test
+ * @bug 8134917
+ * @summary [macosx] JOptionPane doesn't receive mouse events when opened from a drop event
+ * @author Alexandr Scherbatiy
+ */
+public class MissingEventsOnModalDialogTest {
+
+    private static volatile boolean passed = false;
+
+    public static void main(String[] args) throws Exception {
+        Frame sourceFrame = createFrame("Source Frame", 0, 0);
+        Frame targetFrame = createFrame("Target Frame", 250, 250);
+
+        DragSource defaultDragSource
+                = DragSource.getDefaultDragSource();
+        defaultDragSource.createDefaultDragGestureRecognizer(sourceFrame,
+                DnDConstants.ACTION_COPY_OR_MOVE,
+                new TestDragGestureListener());
+        new DropTarget(targetFrame, DnDConstants.ACTION_COPY_OR_MOVE,
+                new TestDropTargetListener(targetFrame));
+
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        sourceFrame.toFront();
+        robot.waitForIdle();
+
+        Point point = getCenterPoint(sourceFrame);
+        robot.mouseMove(point.x, point.y);
+        robot.waitForIdle();
+
+        mouseDragAndDrop(robot, point, getCenterPoint(targetFrame));
+
+        long time = System.currentTimeMillis() + 200;
+
+        while (!passed) {
+            if (time < System.currentTimeMillis()) {
+                sourceFrame.dispose();
+                targetFrame.dispose();
+                throw new RuntimeException("Mouse clicked event is lost!");
+            }
+            Thread.sleep(10);
+        }
+        sourceFrame.dispose();
+        targetFrame.dispose();
+    }
+
+    private static Frame createFrame(String title, int x, int y) {
+        Frame frame = new Frame();
+        frame.setSize(200, 200);
+        frame.setLocation(x, y);
+        frame.setTitle(title);
+        frame.setVisible(true);
+        return frame;
+    }
+
+    private static Point getCenterPoint(Window window) {
+        Point centerPoint = window.getLocationOnScreen();
+        centerPoint.translate(window.getWidth() / 2, window.getHeight() / 2);
+        return centerPoint;
+    }
+
+    public static void mouseDragAndDrop(Robot robot, Point from, Point to) {
+        mouseDND(robot, from.x, from.y, to.x, to.y);
+    }
+
+    public static void mouseDND(Robot robot, int x1, int y1, int x2, int y2) {
+
+        int N = 20;
+        int x = x1;
+        int y = y1;
+        int dx = (x2 - x1) / N;
+        int dy = (y2 - y1) / N;
+
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+
+        for (int i = 0; i < N; i++) {
+            robot.mouseMove(x += dx, y += dy);
+        }
+
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+    }
+
+    private static class TestDragGestureListener implements DragGestureListener {
+
+        public void dragGestureRecognized(DragGestureEvent dge) {
+            dge.startDrag(null, new StringTransferable());
+        }
+    }
+
+    static class StringTransferable implements Transferable {
+
+        @Override
+        public DataFlavor[] getTransferDataFlavors() {
+            return new DataFlavor[]{DataFlavor.stringFlavor};
+        }
+
+        @Override
+        public boolean isDataFlavorSupported(DataFlavor flavor) {
+            return flavor.equals(DataFlavor.stringFlavor);
+        }
+
+        @Override
+        public Object getTransferData(DataFlavor flavor) {
+            return "Hello World!";
+        }
+    }
+
+    private static class TestDropTargetListener implements DropTargetListener {
+
+        private final Frame targetFrame;
+
+        public TestDropTargetListener(Frame targetFrame) {
+            this.targetFrame = targetFrame;
+        }
+
+        @Override
+        public void dragEnter(DropTargetDragEvent dtde) {
+            dtde.acceptDrag(dtde.getDropAction());
+        }
+
+        @Override
+        public void dragOver(DropTargetDragEvent dtde) {
+            dtde.acceptDrag(dtde.getDropAction());
+        }
+
+        @Override
+        public void dropActionChanged(DropTargetDragEvent dtde) {
+            dtde.acceptDrag(dtde.getDropAction());
+        }
+
+        @Override
+        public void dragExit(DropTargetEvent dte) {
+        }
+
+        @Override
+        public void drop(DropTargetDropEvent dtde) {
+            dtde.acceptDrop(dtde.getDropAction());
+            showModalDialog(targetFrame);
+            dtde.dropComplete(true);
+        }
+    }
+
+    private static void showModalDialog(Frame targetFrame) {
+
+        Dialog dialog = new Dialog(targetFrame, true);
+
+        dialog.addMouseListener(new MouseAdapter() {
+
+            @Override
+            public void mouseClicked(MouseEvent e) {
+                passed = true;
+                dialog.dispose();
+            }
+        });
+
+        dialog.setSize(400, 300);
+        dialog.setTitle("Modal Dialog!");
+
+        clickOnModalDialog(dialog);
+        dialog.setVisible(true);
+    }
+
+    private static void clickOnModalDialog(Dialog dialog) {
+        new Thread(() -> {
+            clickOnDialog(dialog);
+        }).start();
+    }
+
+    private static void clickOnDialog(Dialog dialog) {
+        try {
+            long time = System.currentTimeMillis() + 200;
+
+            while (!dialog.isVisible()) {
+                if (time < System.currentTimeMillis()) {
+                    throw new RuntimeException("Dialog is not visible!");
+                }
+                Thread.sleep(10);
+            }
+
+            Point point = getCenterPoint(dialog);
+            Robot robot = new Robot();
+            robot.setAutoDelay(50);
+
+            robot.mouseMove(point.x, point.y);
+            robot.mousePress(InputEvent.BUTTON1_MASK);
+            robot.mouseRelease(InputEvent.BUTTON1_MASK);
+
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/KeyEvent/RegisterKeyStroke/TestAWTKeyStroke.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.AWTKeyStroke;
+import java.awt.event.InputEvent;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInput;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutput;
+import java.io.ObjectOutputStream;
+import javax.swing.KeyStroke;
+
+/*
+ * @test
+ * @bug 8133453
+ * @summary Remove AWTKeyStroke.registerSubclass(Class) method
+ * @author Alexander Scherbatiy
+ * @run main/othervm TestAWTKeyStroke
+ * @run main/othervm/policy=policy -Djava.security.manager TestAWTKeyStroke
+ */
+public class TestAWTKeyStroke {
+
+    public static void main(String[] args) throws Exception {
+
+        int modifiers = InputEvent.CTRL_MASK | InputEvent.CTRL_DOWN_MASK;
+        checkAWTKeyStroke('A', modifiers, true);
+        checkKeyStroke('B', modifiers, false);
+        checkAWTKeyStroke('C', modifiers, false);
+        checkKeyStroke('D', modifiers, true);
+        checkSerializedKeyStrokes('E', modifiers, true);
+    }
+
+    private static void checkAWTKeyStroke(int keyCode, int modifiers,
+            boolean onKeyRelease) throws Exception {
+
+        AWTKeyStroke awtKeyStroke1 = AWTKeyStroke.getAWTKeyStroke(
+                keyCode, modifiers, onKeyRelease);
+
+        checkAWTKeyStroke(awtKeyStroke1, keyCode, modifiers, onKeyRelease);
+
+        AWTKeyStroke awtKeyStroke2 = AWTKeyStroke.getAWTKeyStroke(
+                keyCode, modifiers, onKeyRelease);
+
+        if (awtKeyStroke1 != awtKeyStroke2) {
+            throw new RuntimeException("AWTKeyStroke is not cached!");
+        }
+
+        checkSerializedKeyStroke(awtKeyStroke1);
+    }
+
+    private static void checkKeyStroke(int keyCode, int modifiers,
+            boolean onKeyRelease) throws Exception {
+
+        KeyStroke keyStroke1 = KeyStroke.getKeyStroke(
+                keyCode, modifiers, onKeyRelease);
+        checkAWTKeyStroke(keyStroke1, keyCode, modifiers, onKeyRelease);
+
+        KeyStroke keyStroke2 = KeyStroke.getKeyStroke(
+                keyCode, modifiers, onKeyRelease);
+
+        if (keyStroke1 != keyStroke2) {
+            throw new RuntimeException("KeyStroke is not cached!");
+        }
+
+        checkSerializedKeyStroke(keyStroke1);
+    }
+
+    private static void checkSerializedKeyStrokes(int keyCode, int modifiers,
+            boolean onKeyRelease) throws Exception {
+
+        AWTKeyStroke awtKeyStroke = AWTKeyStroke.getAWTKeyStroke(
+                keyCode, modifiers, onKeyRelease);
+
+        KeyStroke keyStroke = KeyStroke.getKeyStroke(
+                keyCode, modifiers, onKeyRelease);
+
+        if (awtKeyStroke != getSerializedAWTKeyStroke(awtKeyStroke)) {
+            throw new RuntimeException("Serialized AWTKeyStroke is not cached!");
+        }
+
+        awtKeyStroke = AWTKeyStroke.getAWTKeyStroke(
+                keyCode, modifiers, !onKeyRelease);
+
+        if (!keyStroke.equals(getSerializedAWTKeyStroke(keyStroke))) {
+            throw new RuntimeException("Serialized KeyStroke is not cached!");
+        }
+    }
+
+    private static void checkAWTKeyStroke(AWTKeyStroke awtKeyStroke,
+            int keyCode, int modifiers, boolean onKeyRelease) {
+
+        if (awtKeyStroke.getKeyCode() != keyCode) {
+            throw new RuntimeException("Wrong key code!");
+        }
+
+        if (awtKeyStroke.getModifiers() != modifiers) {
+            throw new RuntimeException("Wrong modifiers!");
+        }
+
+        if (awtKeyStroke.isOnKeyRelease() != onKeyRelease) {
+            throw new RuntimeException("Wrong on key release!");
+        }
+    }
+
+    private static void checkSerializedKeyStroke(AWTKeyStroke keyStroke)
+            throws Exception {
+        if (keyStroke != getSerializedAWTKeyStroke(keyStroke)) {
+            throw new RuntimeException("New instance is returned during"
+                    + " serialization!");
+        }
+    }
+
+    private static AWTKeyStroke getSerializedAWTKeyStroke(AWTKeyStroke keyStroke)
+            throws Exception {
+
+        try (ByteArrayOutputStream bos = new ByteArrayOutputStream();
+                ObjectOutput out = new ObjectOutputStream(bos)) {
+            out.writeObject(keyStroke);
+            byte[] bytes = bos.toByteArray();
+
+            try (ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
+                    ObjectInput in = new ObjectInputStream(bis)) {
+                return (AWTKeyStroke) in.readObject();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/KeyEvent/RegisterKeyStroke/policy	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,2 @@
+grant {
+};
--- a/jdk/test/java/lang/ProcessHandle/TreeTest.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/java/lang/ProcessHandle/TreeTest.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,6 +34,7 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import java.util.concurrent.ExecutionException;
+import jdk.testlibrary.Utils;
 import org.testng.Assert;
 import org.testng.TestNG;
 import org.testng.annotations.Test;
@@ -174,7 +175,7 @@
 
             // Poll until all 9 child processes exist or the timeout is reached
             int expected = 9;
-            long timeout = jdk.testlibrary.Utils.adjustTimeout(10L);
+            long timeout = Utils.adjustTimeout(10L);
             Instant endTimeout = Instant.now().plusSeconds(timeout);
             do {
                 Thread.sleep(200L);
@@ -223,6 +224,10 @@
 
     /**
      * Test destroy of processes.
+     * A JavaChild is started and it starts three children.
+     * Each one is then checked to be alive and listed by allChildren
+     * and forcibly destroyed.
+     * After they exit they should no longer be listed by allChildren.
      */
     @Test
     public static void test3() {
@@ -239,7 +244,7 @@
             // Spawn children and have them wait
             p1.sendAction("spawn", newChildren, "stdin");
 
-            // Gather the PIDs from the output of the spawing process
+            // Gather the PIDs from the output of the spawning process
             p1.forEachOutputLine((s) -> {
                 String[] split = s.trim().split(" ");
                 if (split.length == 3 && split[1].equals("spawn")) {
@@ -259,15 +264,23 @@
                 Assert.assertTrue(allChildren.contains(p), "Spawned child should be listed in allChildren: " + p);
                 p.destroyForcibly();
             });
+            Assert.assertEquals(processes.size(), newChildren, "Wrong number of children");
 
             processes.forEach((p, parent) ->  {
-                while (p.isAlive()) {
+                for (long retries = Utils.adjustTimeout(100L); retries > 0 ; retries--) {
+                    if (!p.isAlive()) {
+                        return;                 // not alive, go on to the next
+                    }
+                    // Wait a bit and retry
                     try {
-                        Thread.sleep(100L);  // It will happen but don't burn the cpu
+                        Thread.sleep(100L);
                     } catch (InterruptedException ie) {
                         // try again
                     }
                 }
+                printf("Timeout waiting for exit of pid %s, parent: %s, info: %s%n",
+                        p, parent, p.info());
+                Assert.fail("Process still alive: " + p);
             });
             p1.destroyForcibly();
             p1.waitFor();
@@ -281,7 +294,12 @@
         } catch (InterruptedException inte) {
             Assert.fail("InterruptedException", inte);
         } finally {
-            processes.forEach((p, parent) -> p.destroyForcibly());
+            processes.forEach((p, parent) -> {
+                if (p.isAlive()) {
+                    ProcessUtil.printProcess(p);
+                    p.destroyForcibly();
+                }
+            });
         }
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/StrictMath/PowTests.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,301 @@
+/*
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 8136874
+ * @summary Tests for StrictMath.pow
+ * @author Joseph D. Darcy
+ */
+
+/**
+ * The tests in ../Math/PowTests.java test properties that should
+ * hold for any pow implementation, including the FDLIBM-based one
+ * required for StrictMath.pow.  Therefore, the test cases in
+ * ../Math/PowTests.java are run against both the Math and
+ * StrictMath versions of pow.  The role of this test is to verify
+ * that the FDLIBM pow algorithm is being used by running golden
+ * file tests on values that may vary from one conforming pow
+ * implementation to another.
+ */
+
+public class PowTests {
+    private PowTests(){}
+
+    private static final double INFINITY = Double.POSITIVE_INFINITY;
+
+    public static void main(String... args) {
+        int failures = 0;
+
+        failures += testPow();
+
+        if (failures > 0) {
+            System.err.println("Testing pow incurred "
+                               + failures + " failures.");
+            throw new RuntimeException();
+        }
+    }
+
+    private static int testPow() {
+        int failures = 0;
+
+        double [][] testCases = {
+            // Probe near decision points of the fdlibm algorithm
+
+            {0x1.00000_0000_0001p1,  // |x| > 1.0
+             INFINITY,               // infinity
+             INFINITY                // 0
+            },
+
+
+            {0x1.fffffp-1,           // |x| = 0.9999995231628418
+             0x1.0p31,               // 2^31
+             0.0                     // 0
+            },
+
+            {0x1.ffffe_ffffffffp-1,  // |x| < 0.9999995231628418
+             0x1.0p31,               // 2^31
+             0.0                     // 0
+            },
+
+            {-0x1.ffffe_ffffffffp-1, // |x| < 0.9999995231628418
+             0x1.0p31,               // 2^31
+             0.0                     // 0
+            },
+
+            {0x1.fffffp-1,           // |x| = 0.9999995231628418
+             0x1.0000000000001p31,   // nextUp(2^31)
+             0.0                     // 0
+            },
+
+            {0x1.fffffp-1,           // |x| = 0.9999995231628418
+             0x1.0p31 + 1.0,         // 2^31 + 1, odd integer
+             0.0                     // 0
+            },
+
+            {0x1.fffffp-1,           // |x| = 0.9999995231628418
+             0x1.0p31 + 2.0,         // 2^31 + 2, even integer
+             0.0                     // 0
+            },
+
+            {0x1.ffffe_ffffffffp-1,  // |x| < 0.9999995231628418
+             0x1.0000000000001p31,   // nextUp(2^31)
+             0.0                     // 0
+            },
+
+            {-0x1.ffffe_ffffffffp-1, // |x| < 0.9999995231628418
+             0x1.0000000000001p31,   // nextUp(2^31)
+             Double.NaN              // 0
+            },
+
+            {-0x1.ffffe_ffffffffp-1, // |x| < 0.9999995231628418
+             0x1.0p31 + 1.0,         // 2^31 + 1, odd integer
+             -0.0                    // 0
+            },
+
+            {-0x1.ffffe_ffffffffp-1, // |x| < 0.9999995231628418
+             0x1.0p31 + 2.0,         // 2^31 + 2, even integer
+             0.0                     // 0
+            },
+
+            {0x1.0000000000001p0,    // nextUp(1)
+             0x1.0000000000001p31,   // nextUp(2^31)
+             0x1.00000800002p0
+            },
+
+            {0x1.0000000000001p0,    // nextUp(1)
+             -0x1.0000000000001p31,  // -nextUp(2^31)
+             0x1.fffff000004p-1
+            },
+
+            {-0x1.0000000000001p0,   // -nextUp(1)
+             -0x1.0000000000001p31,  // -nextUp(2^31)
+             Double.NaN
+            },
+
+            {-0x1.0000000000001p0,   // -nextUp(1)
+             0x1.0p31 + 1.0,         // 2^31 + 1, odd integer
+             -0x1.0000080000201p0
+            },
+
+            {-0x1.0000000000001p0,   // -nextUp(1)
+             0x1.0p31 + 2.0,         // 2^31 + 2, even integer
+             0x1.0000080000202p0
+            },
+
+            {0x1.00000_ffff_ffffp0,
+             0x1.00001_0000_0000p31,
+             INFINITY
+            },
+
+            // Huge y, |y| > 0x1.00000_ffff_ffffp31 ~2**31 is a decision point
+
+            // First y = 0x1.00001_0000_0000p31
+            {0x1.fffff_ffff_ffffp-1,
+             0x1.00001_0000_0000p31,
+             0x1.fffff7ffff9p-1
+            },
+
+            {0x1.fffff_ffff_fffep-1,
+             0x1.00001_0000_0000p31,
+             0x1.ffffefffff4p-1
+            },
+
+            {0x1.fffff_0000_0000p-1,
+             0x1.00001_0000_0000p31,
+             0.0
+            },
+
+            //  Cycle through decision points on x values
+
+            {0x1.fffff_0000_0000p-1,
+             0x1.00001_0000_0000p31,
+             0.0
+            },
+
+            {-0x1.fffff_0000_0000p-1,
+             0x1.00001_0000_0000p31,
+             0.0
+            },
+
+            {0x1.ffffe_ffff_ffffp-1,
+             0x1.00001_0000_0000p31,
+             0.0
+            },
+
+            {-0x1.ffffe_ffff_ffffp-1,
+             0x1.00001_0000_0000p31,
+             0.0
+            },
+
+            {0x1.00000_ffff_ffffp0,
+             0x1.00001_0000_0000p31,
+             INFINITY
+            },
+
+
+            {0x1.00001_0000_0000p0,
+             0x1.00001_0000_0000p31,
+             INFINITY
+            },
+
+            {-0x1.00000_ffff_ffffp0,
+             0x1.00001_0000_0000p31,
+             INFINITY
+            },
+
+
+            {-0x1.00001_0000_0000p0,
+             0x1.00001_0000_0000p31,
+             INFINITY
+            },
+
+            // Now y = -0x1.00001_0000_0000p31
+
+            {0x1.fffff_0000_0000p-1,
+             -0x1.00001_0000_0000p31,
+             INFINITY
+            },
+
+            {-0x1.fffff_0000_0000p-1,
+             0x1.00001_0000_0000p31,
+             0.0
+            },
+
+            {0x1.ffffe_ffff_ffffp-1,
+             -0x1.00001_0000_0000p31,
+             INFINITY
+            },
+
+            {-0x1.ffffe_ffff_ffffp-1,
+             -0x1.00001_0000_0000p31,
+             INFINITY
+            },
+
+            {0x1.00000_ffff_ffffp0,
+             -0x1.00001_0000_0000p31,
+             0.0
+            },
+
+
+            {0x1.00001_0000_0000p0,
+             -0x1.00001_0000_0000p31,
+             0.0
+            },
+
+            {-0x1.00000_ffff_ffffp0,
+             -0x1.00001_0000_0000p31,
+             0.0
+            },
+
+
+            {-0x1.00001_0000_0000p0,
+             -0x1.00001_0000_0000p31,
+             0.0
+            },
+
+            //-----------------------
+
+            {0x1.ffffe_ffff_ffffp-1,
+             -0x1.00001_0000_0000p31,
+             INFINITY
+            },
+
+            {0x1.00001_0000_0000p0,
+             -0x1.00001_0000_0000p31,
+             0.0
+            },
+
+
+            {0x1.0000000000002p0, // 1.0000000000000004
+             0x1.f4add4p30,       // 2.1E9
+             0x1.00000fa56f1a6p0  // 1.0000009325877754
+            },
+
+            // Verify no early overflow
+            {0x1.0000000000002p0, // 1.0000000000000004
+             0x1.0642acp31,       // 2.2E9
+             0x1.000010642b465p0, // 1.0000009769967388
+            },
+
+            // Verify proper overflow
+            {0x1.0000000000002p0,    // 1.0000000000000004
+             0x1.62e42fefa39fp60,    // 1.59828858065033216E18
+             0x1.ffffffffffd9fp1023, // 1.7976931348621944E308
+            },
+
+        };
+
+        for (double[] testCase: testCases)
+            failures += testPowCase(testCase[0], testCase[1], testCase[2]);
+
+        return failures;
+    }
+
+    private static int testPowCase(double input1, double input2, double expected) {
+        int failures = 0;
+        failures += Tests.test("StrictMath.pow(double)", input1, input2,
+                               StrictMath.pow(input1, input2), expected);
+        return failures;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/InetAddress/IsReachableViaLoopbackTest.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,40 @@
+import java.io.*;
+import java.net.*;
+import java.util.*;
+
+/**
+ * @test
+ * @bug 8135305
+ * @summary ensure we can't ping external hosts via loopback if
+ */
+
+public class IsReachableViaLoopbackTest {
+    public static void main(String[] args) {
+        try {
+            InetAddress addr = InetAddress.getByName("localhost");
+            InetAddress remoteAddr = InetAddress.getByName("bugs.openjdk.java.net");
+            if (!addr.isReachable(10000))
+                throw new RuntimeException("Localhost should always be reachable");
+            NetworkInterface inf = NetworkInterface.getByInetAddress(addr);
+            if (inf != null) {
+                if (!addr.isReachable(inf, 20, 10000)) {
+                    throw new RuntimeException("Localhost should always be reachable");
+                } else {
+                    System.out.println(addr + "  is reachable");
+                }
+                if (remoteAddr.isReachable(inf, 20, 10000)) {
+                    throw new RuntimeException(remoteAddr + " is reachable");
+                } else {
+                    System.out.println(remoteAddr + "  is NOT reachable");
+                }
+            } else {
+                System.out.println("inf == null");
+            }
+
+        } catch (IOException e) {
+            throw new RuntimeException("Unexpected exception:" + e);
+        }
+        System.out.println("IsReachableViaLoopbackTest EXIT");
+    }
+}
+
--- a/jdk/test/java/net/NetworkInterface/NetworkInterfaceStreamTest.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/java/net/NetworkInterface/NetworkInterfaceStreamTest.java	Wed Jul 05 20:52:37 2017 +0200
@@ -28,6 +28,7 @@
  * @build java.util.stream.OpTestCase
  * @run testng/othervm NetworkInterfaceStreamTest
  * @run testng/othervm -Djava.net.preferIPv4Stack=true NetworkInterfaceStreamTest
+ * @key intermittent
  */
 
 import org.testng.annotations.Test;
--- a/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java	Wed Jul 05 20:52:37 2017 +0200
@@ -23,32 +23,39 @@
 
 /**
  * @test
- * @bug 8137121
+ * @bug 8137121 8137230
  * @summary (fc) Infinite loop FileChannel.truncate
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.Utils
  * @run main/othervm LoopingTruncate
  */
 
 import java.nio.ByteBuffer;
 import java.nio.channels.FileChannel;
+import java.nio.channels.ClosedByInterruptException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import static java.nio.file.StandardOpenOption.*;
+import static jdk.testlibrary.Utils.adjustTimeout;
 
 public class LoopingTruncate {
 
     // (int)FATEFUL_SIZE == -3 == IOStatus.INTERRUPTED
     static long FATEFUL_SIZE = 0x1FFFFFFFDL;
 
-    static long TIMEOUT = 10_000; // 10 seconds
+    // At least 20 seconds
+    static long TIMEOUT = adjustTimeout(20_000);
 
     public static void main(String[] args) throws Throwable {
         Path path = Files.createTempFile("LoopingTruncate.tmp", null);
-        try {
+        try (FileChannel fc = FileChannel.open(path, CREATE, WRITE)) {
+            fc.position(FATEFUL_SIZE + 1L);
+            fc.write(ByteBuffer.wrap(new byte[] {0}));
+
             Thread th = new Thread(() -> {
-                try (FileChannel fc = FileChannel.open(path, CREATE, WRITE)) {
-                    fc.position(FATEFUL_SIZE + 1L);
-                    fc.write(ByteBuffer.wrap(new byte[] {0}));
+                try {
                     fc.truncate(FATEFUL_SIZE);
+                } catch (ClosedByInterruptException ignore) {
                 } catch (Exception e) {
                     throw new RuntimeException(e);
                 }});
@@ -56,7 +63,14 @@
             th.join(TIMEOUT);
 
             if (th.isAlive()) {
+                System.err.println("=== Stack trace of the guilty thread:");
+                for (StackTraceElement el : th.getStackTrace()) {
+                    System.err.println("\t" + el);
+                }
+                System.err.println("===");
+
                 th.interrupt();
+                th.join();
                 throw new RuntimeException("Failed to complete on time");
             }
         } finally {
--- a/jdk/test/java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java	Wed Jul 05 20:52:37 2017 +0200
@@ -36,6 +36,7 @@
  *          java.rmi/sun.rmi.transport.tcp
  * @build TestLibrary RMID ActivationLibrary
  * @run main/othervm/timeout=240 InheritedChannelNotServerSocket
+ * @key intermittent
  */
 
 import java.io.IOException;
--- a/jdk/test/java/security/ProtectionDomain/PreserveCombinerTest.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/java/security/ProtectionDomain/PreserveCombinerTest.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,7 +26,7 @@
 import java.security.DomainCombiner;
 import java.security.PrivilegedAction;
 import java.security.ProtectionDomain;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.SharedSecrets;
 
 /*
  * @test
@@ -34,7 +34,7 @@
  * @summary Make sure that JavaSecurityAccess.doIntersectionPrivilege()
  *          is not dropping the information about the domain combiner of
  *          the stack ACC
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.misc
  */
 
 public class PreserveCombinerTest {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/text/Format/DateFormat/Bug8081794.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8081794
+ * @summary ParsePosition getErrorIndex should return correct index
+ */
+import java.text.ParsePosition;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+
+public class Bug8081794 {
+
+    public static void main(String[] args) {
+        String date = "13 Jan 2005 21:45:34 ABC";
+        String format = "dd MMM yyyy HH:mm:ss z";
+        ParsePosition pp = new ParsePosition(0);
+        pp.setIndex(0);
+        SimpleDateFormat sd = new SimpleDateFormat(format, Locale.ENGLISH);
+        Date d = sd.parse(date, pp);
+        int errorIndex = pp.getErrorIndex();
+        if (errorIndex == 21) {
+            System.out.println(": passed");
+        } else {
+            System.out.println(": failed");
+            throw new RuntimeException("Failed with wrong index: " + errorIndex);
+        }
+    }
+}
--- a/jdk/test/java/text/Format/DecimalFormat/RoundingAndPropertyTest.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/java/text/Format/DecimalFormat/RoundingAndPropertyTest.java	Wed Jul 05 20:52:37 2017 +0200
@@ -25,6 +25,7 @@
  * @bug 7050528
  * @summary Test java.text.DecimalFormat fast-path for format(double...)
  * @author Olivier Lagneau
+ * @build GoldenDoubleValues GoldenFormattedValues
  * @run main RoundingAndPropertyTest
  *
  */
--- a/jdk/test/java/util/Locale/Bug8008577.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/java/util/Locale/Bug8008577.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8008577
+ * @bug 8008577 8138613
  * @summary Check whether CLDR locale provider adapter is enabled by default
  * @compile -XDignore.symbol.file Bug8008577.java
  * @run main Bug8008577
@@ -38,7 +38,6 @@
     static final LocaleProviderAdapter.Type[] expected = {
         LocaleProviderAdapter.Type.CLDR,
         LocaleProviderAdapter.Type.JRE,
-        LocaleProviderAdapter.Type.SPI,
     };
 
     public static void main(String[] args) {
--- a/jdk/test/java/util/logging/DrainFindDeadlockTest.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/java/util/logging/DrainFindDeadlockTest.java	Wed Jul 05 20:52:37 2017 +0200
@@ -35,7 +35,7 @@
  * @summary check for deadlock between findLogger() and drainLoggerRefQueueBounded()
  * @author jim.gish@oracle.com
  * @build DrainFindDeadlockTest
- * @run main/othervm/timeout=10 DrainFindDeadlockTest
+ * @run main/othervm DrainFindDeadlockTest
  * @key randomness
  */
 
@@ -109,9 +109,13 @@
         public void run() {
             System.out.println("Running " + Thread.currentThread().getName());
 
-            for (int i=0; i < MAX_ITERATIONS; i++) {
-                logger = Logger.getLogger("DrainFindDeadlockTest"+i);
-                DrainFindDeadlockTest.randomDelay();
+            try {
+                for (int i=0; i < MAX_ITERATIONS; i++) {
+                    logger = Logger.getLogger("DrainFindDeadlockTest"+i);
+                    DrainFindDeadlockTest.randomDelay();
+                }
+            } finally {
+                System.out.println("Completed " + Thread.currentThread().getName());
             }
         }
     }
@@ -120,13 +124,17 @@
         @Override
         public void run() {
             System.out.println("Running " + Thread.currentThread().getName());
-            for (int i=0; i < MAX_ITERATIONS; i++) {
-                try {
-                    mgr.readConfiguration();
-                } catch (IOException | SecurityException ex) {
-                    throw new RuntimeException("FAILED: test setup problem", ex);
+            try {
+                for (int i=0; i < MAX_ITERATIONS; i++) {
+                    try {
+                        mgr.readConfiguration();
+                    } catch (IOException | SecurityException ex) {
+                        throw new RuntimeException("FAILED: test setup problem", ex);
+                    }
+                    DrainFindDeadlockTest.randomDelay();
                 }
-                DrainFindDeadlockTest.randomDelay();
+            } finally {
+                System.out.println("Completed " + Thread.currentThread().getName());
             }
         }
     }
@@ -185,12 +193,16 @@
         @Override
         public void run() {
             System.out.println("Running " + Thread.currentThread().getName());
-            for (int i=0; i < MAX_ITERATIONS*2; i++) {
-                checkState(t1, t2);
-                try {
-                    Thread.sleep(10);
-                } catch (InterruptedException ex) {
-                };
+            try {
+                for (int i=0; i < MAX_ITERATIONS*2; i++) {
+                    checkState(t1, t2);
+                    try {
+                        Thread.sleep(10);
+                    } catch (InterruptedException ex) {
+                    }
+                }
+            } finally {
+                System.out.println("Completed " + Thread.currentThread().getName());
             }
         }
     }
--- a/jdk/test/java/util/logging/LogManagerAppContextDeadlock.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/java/util/logging/LogManagerAppContextDeadlock.java	Wed Jul 05 20:52:37 2017 +0200
@@ -35,13 +35,15 @@
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.logging.LogManager;
 import java.util.logging.Logger;
+import jdk.internal.misc.JavaAWTAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * @test
  * @bug 8065991
  * @summary check that when LogManager is initialized, a deadlock similar
  *          to that described in 8065709 will not occur.
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.misc
  * @run main/othervm LogManagerAppContextDeadlock UNSECURE
  * @run main/othervm LogManagerAppContextDeadlock SECURE
  *
@@ -97,7 +99,7 @@
         }
 
         static {
-            sun.misc.SharedSecrets.setJavaAWTAccess(new sun.misc.JavaAWTAccess() {
+            SharedSecrets.setJavaAWTAccess(new JavaAWTAccess() {
                 @Override
                 public Object getAppletContext() {
                     if (numAppContexts.get() == 0) return null;
@@ -341,7 +343,7 @@
             // FileHandlers because we're passing invalid parameters
             // which will make the creation fail...
             permissions = new Permissions();
-            permissions.add(new RuntimePermission("accessClassInPackage.sun.misc"));
+            permissions.add(new RuntimePermission("accessClassInPackage.jdk.internal.misc"));
 
             // these are used for configuring the test itself...
             allPermissions = new Permissions();
--- a/jdk/test/java/util/logging/RootLogger/RootLevelInConfigFile.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/java/util/logging/RootLogger/RootLevelInConfigFile.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,15 +34,15 @@
 import java.util.logging.LogManager;
 import java.util.logging.Logger;
 import java.util.logging.LoggingPermission;
-import sun.misc.JavaAWTAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaAWTAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * @test
  * @bug 8030850
  * @summary Tests that setting .level=FINEST for the root logger in logging
  *      configuration file does work.
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.misc
  * @run main/othervm RootLevelInConfigFile
  *
  * @author danielfuchs
@@ -181,7 +181,7 @@
             perms.add(new PropertyPermission("java.util.logging.config.class","read"));
             perms.add(new PropertyPermission("java.util.logging.config.file","read"));
             perms.add(new FilePermission(configFile, "read"));
-            perms.add(new RuntimePermission("accessClassInPackage.sun.misc"));
+            perms.add(new RuntimePermission("accessClassInPackage.jdk.internal.misc"));
         }
 
         @Override
--- a/jdk/test/java/util/logging/TestAppletLoggerContext.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/java/util/logging/TestAppletLoggerContext.java	Wed Jul 05 20:52:37 2017 +0200
@@ -33,8 +33,8 @@
 import java.util.logging.LogManager;
 import java.util.logging.Logger;
 import java.util.logging.LoggingPermission;
-import sun.misc.JavaAWTAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaAWTAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /*
  * @test
@@ -42,7 +42,7 @@
  * @summary  NPE when using Logger.getAnonymousLogger or
  *           LogManager.getLogManager().getLogger
  *
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.misc
  * @run main/othervm -Dtest.security=off TestAppletLoggerContext LoadingApplet
  * @run main/othervm -Dtest.security=on TestAppletLoggerContext  LoadingApplet
  * @run main/othervm -Dtest.security=off TestAppletLoggerContext LoadingMain
--- a/jdk/test/java/util/logging/TestGetLoggerNPE.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/java/util/logging/TestGetLoggerNPE.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,8 +26,8 @@
 import java.security.ProtectionDomain;
 import java.util.logging.LogManager;
 import java.util.logging.Logger;
-import sun.misc.JavaAWTAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaAWTAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /*
  * @test
@@ -35,7 +35,7 @@
  *
  * @summary NPE with logging while launching webstart
  *
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.misc
  * @build TestGetLoggerNPE
  * @run main/othervm TestGetLoggerNPE getLogger
  * @run main/othervm TestGetLoggerNPE getLogManager
--- a/jdk/test/javax/rmi/PortableRemoteObject/ConcurrentHashMapTest.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/javax/rmi/PortableRemoteObject/ConcurrentHashMapTest.java	Wed Jul 05 20:52:37 2017 +0200
@@ -29,6 +29,7 @@
  * @build jdk.testlibrary.*
  * @build Test HelloInterface HelloServer HelloClient HelloImpl _HelloImpl_Tie _HelloInterface_Stub ConcurrentHashMapTest
  * @run main/othervm -Djava.naming.provider.url=iiop://localhost:1050 -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory  ConcurrentHashMapTest
+ * @key intermittent
  */
 
 
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Skip.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Skip.java	Wed Jul 05 20:52:37 2017 +0200
@@ -29,9 +29,8 @@
 import java.io.File;
 import java.io.FileInputStream;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class Skip {
 
@@ -42,6 +41,11 @@
     }
 
     public static void main(String[] args) throws Exception {
+        test(false);
+        test(true);
+    }
+
+    private static void test(boolean customStream) throws Exception {
         RIFFWriter writer = null;
         RIFFReader reader = null;
         File tempfile = File.createTempFile("test",".riff");
@@ -53,7 +57,17 @@
             chunk.write((byte)44);
             writer.close();
             writer = null;
-            FileInputStream fis = new FileInputStream(tempfile);
+            final FileInputStream fis;
+            if (customStream) {
+                fis = new FileInputStream(tempfile);
+            } else {
+                fis = new FileInputStream(tempfile) {
+                    @Override
+                    public long skip(long n) {
+                        return 0;
+                    }
+                };
+            }
             reader = new RIFFReader(fis);
             RIFFReader readchunk = reader.nextChunk();
             reader.skip(1);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/sound/sampled/spi/AudioFileReader/EndlessLoopHugeLengthWave.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.ByteArrayInputStream;
+
+import javax.sound.sampled.AudioSystem;
+import javax.sound.sampled.UnsupportedAudioFileException;
+
+/**
+ * @test
+ * @bug 8135160
+ */
+public final class EndlessLoopHugeLengthWave {
+
+    // some data wich can cause an endless loop in RiffReader.java
+    private static byte[] headerWAV = {0x52, 0x49, 0x46, 0x46, // RIFF_MAGIC
+            0x7, 0xF, 0xF, 0xF, // fileLength
+            0x57, 0x41, 0x56, 0x45, //  waveMagic
+            0x66, 0x6d, 0x74, 0x20, // FMT_MAGIC
+            1, 2, 3, 4, // format
+            3, 0,// wav_type  WAVE_FORMAT_IEEE_FLOAT
+            1, 0, // channels
+            1, 1, // sampleRate
+            1, 0, 0, 0, // avgBytesPerSec
+            0, 1, // blockAlign
+            1, 0, // sampleSizeInBits
+            0x64, 0x61, 0x74, 0x61, // DATA_MAGIC
+    };
+
+    public static void main(final String[] args) throws Exception {
+        try {
+            AudioSystem.getAudioFileFormat(new ByteArrayInputStream(headerWAV));
+        } catch (final UnsupportedAudioFileException ignored) {
+            // Expected
+        }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JTextPane/JTextPaneDocumentWrapping.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+   @bug 8133108
+   @summary [PIT] Container size is wrong in JEditorPane
+   @author Semyon Sadetsky
+  */
+
+import javax.swing.*;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.SimpleAttributeSet;
+import javax.swing.text.html.CSS;
+import java.awt.*;
+
+public class JTextPaneDocumentWrapping {
+
+    private static JFrame frame;
+    private static JTextPane jTextPane;
+    private static int position;
+
+    public static void main(String[] args) throws Exception{
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                frame = new JFrame();
+                frame.setUndecorated(true);
+                frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
+                frame.setSize(200, 200);
+                jTextPane = new JTextPane();
+                jTextPane.setContentType("text/html");
+                jTextPane.setText(
+                        "<html><body><b id='test'>Test Test Test Test Test Test " +
+                                "Test Test Test Test Test Test Test Test Test Test " +
+                                "Test Test Test Test Test Test Test Test Test Test" +
+                                "</b></body></html>");
+                frame.getContentPane().add(jTextPane);
+                frame.setVisible(true);
+            }
+        });
+        Robot robot = new Robot();
+        robot.waitForIdle();
+        robot.delay(200);
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    position = jTextPane.modelToView(100).y;
+                    SimpleAttributeSet wrap = new SimpleAttributeSet();
+                    wrap.addAttribute(CSS.Attribute.WHITE_SPACE, "nowrap");
+                    jTextPane.getStyledDocument()
+                            .setParagraphAttributes(0, 10, wrap, true);
+                } catch (BadLocationException e) {
+                    e.printStackTrace();
+                }
+            }
+        });
+        if(position < 40) {
+            throw  new RuntimeException("Text is not wrapped " + position);
+        }
+        robot.waitForIdle();
+        robot.delay(200);
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    position = jTextPane.modelToView(100).y;
+                } catch (BadLocationException e) {
+                    e.printStackTrace();
+                }
+                frame.dispose();
+            }
+        });
+        if(position > 20) {
+            throw  new RuntimeException("Text is wrapped " + position);
+        }
+        System.out.println("ok");
+
+    }
+}
--- a/jdk/test/javax/swing/plaf/windows/6921687/bug6921687.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/javax/swing/plaf/windows/6921687/bug6921687.java	Wed Jul 05 20:52:37 2017 +0200
@@ -21,22 +21,27 @@
  * questions.
  */
 
-/* @test
-   @bug 6921687 8079428
-   @summary Mnemonic disappears after repeated attempts to open menu items using
-   mnemonics
-   @author Semyon Sadetsky
-   @library /lib/testlibrary
-   @build jdk.testlibrary.OSInfo
-   @run main bug6921687
-  */
-
-
-import jdk.testlibrary.OSInfo;
-import javax.swing.*;
-import java.awt.*;
+/*
+ * @test
+ * @bug 6921687 8079428
+ * @summary Mnemonic disappears after repeated attempts to open menu items using
+ *          mnemonics
+ * @author Semyon Sadetsky
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.Platform
+ * @requires (os.family == "windows")
+ * @modules java.desktop/com.sun.java.swing.plaf.windows
+ * @run main bug6921687
+ */
+import java.awt.Robot;
 import java.awt.event.KeyEvent;
-
+import javax.swing.JFrame;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import jdk.testlibrary.Platform;
 
 public class bug6921687 {
 
@@ -44,24 +49,24 @@
     private static JFrame frame;
 
     public static void main(String[] args) throws Exception {
-        if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) {
+        if (!Platform.isWindows()) {
             System.out.println("Only Windows platform test. Test is skipped.");
             System.out.println("ok");
             return;
         }
-        lafClass = Class.forName(UIManager.getSystemLookAndFeelClassName());
-        UIManager.setLookAndFeel((LookAndFeel) lafClass.newInstance());
+        final String lafClassName = UIManager.getSystemLookAndFeelClassName();
+        lafClass  = Class.forName(lafClassName);
+        UIManager.setLookAndFeel(lafClassName);
         try {
-            SwingUtilities.invokeAndWait(new Runnable() {
-                public void run() {
-                    frame = new JFrame();
-                    frame.setUndecorated(true);
-                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-                    setup(frame);
-                }
+            SwingUtilities.invokeAndWait(() -> {
+                frame = new JFrame();
+                frame.setUndecorated(true);
+                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                setup(frame);
             });
 
             final Robot robot = new Robot();
+            robot.waitForIdle();
             robot.setAutoDelay(20);
             robot.keyPress(KeyEvent.VK_ALT);
             robot.keyPress(KeyEvent.VK_F);
@@ -108,6 +113,5 @@
 
         frame.setSize(350, 250);
         frame.setVisible(true);
-
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/transaction/testng/TEST.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,4 @@
+# JDBC unit tests uses TestNG
+TestNG.dirs= .
+othervm.dirs= .
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/transaction/testng/test/transaction/InvalidTransactionExceptionTests.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.transaction;
+
+import java.io.ByteArrayInputStream;
+import java.io.ObjectInputStream;
+import javax.transaction.InvalidTransactionException;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+import util.SerializedTransactionExceptions;
+
+public class InvalidTransactionExceptionTests {
+
+    protected final String reason = "reason";
+
+    /**
+     * Create InvalidTransactionException with no-arg constructor
+     */
+    @Test
+    public void test1() {
+        InvalidTransactionException ex = new InvalidTransactionException();
+        assertTrue(ex.getMessage() == null
+                && ex.getCause() == null);
+    }
+
+    /**
+     * Create InvalidTransactionException with message
+     */
+    @Test
+    public void test2() {
+        InvalidTransactionException ex = new InvalidTransactionException(reason);
+        assertTrue(ex.getMessage().equals(reason)
+                && ex.getCause() == null);
+    }
+
+    /**
+     * De-Serialize a InvalidTransactionException from JDBC 4.0 and make sure
+     * you can read it back properly
+     */
+    @Test
+    public void test3() throws Exception {
+
+        ObjectInputStream ois = new ObjectInputStream(
+                new ByteArrayInputStream(SerializedTransactionExceptions.ITE_DATA));
+        InvalidTransactionException ex = (InvalidTransactionException) ois.readObject();
+        assertTrue(reason.equals(ex.getMessage())
+                && ex.getCause() == null);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/transaction/testng/test/transaction/TransactionRequiredExceptionTests.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.transaction;
+
+import java.io.ByteArrayInputStream;
+import java.io.ObjectInputStream;
+import javax.transaction.TransactionRequiredException;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+import util.SerializedTransactionExceptions;
+
+public class TransactionRequiredExceptionTests {
+
+    protected final String reason = "reason";
+
+    /**
+     * Create TransactionRequiredException with no-arg constructor
+     */
+    @Test
+    public void test1() {
+        TransactionRequiredException ex = new TransactionRequiredException();
+        assertTrue(ex.getMessage() == null
+                && ex.getCause() == null);
+    }
+
+    /**
+     * Create TransactionRequiredException with message
+     */
+    @Test
+    public void test2() {
+        TransactionRequiredException ex = new TransactionRequiredException(reason);
+        assertTrue(ex.getMessage().equals(reason)
+                && ex.getCause() == null);
+    }
+
+    /**
+     * De-Serialize a TransactionRequiredException from JDBC 4.0 and make sure
+     * you can read it back properly
+     */
+    @Test
+    public void test3() throws Exception {
+
+        ObjectInputStream ois = new ObjectInputStream(
+                new ByteArrayInputStream(SerializedTransactionExceptions.TRE_DATA));
+        TransactionRequiredException ex = (TransactionRequiredException) ois.readObject();
+        assertTrue(reason.equals(ex.getMessage())
+                && ex.getCause() == null);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/transaction/testng/test/transaction/TransactionRolledbackExceptionTests.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.transaction;
+
+import java.io.ByteArrayInputStream;
+import java.io.ObjectInputStream;
+import javax.transaction.TransactionRolledbackException;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+import util.SerializedTransactionExceptions;
+
+public class TransactionRolledbackExceptionTests {
+
+    protected final String reason = "reason";
+
+    /**
+     * Create TransactionRolledbackException with no-arg constructor
+     */
+    @Test
+    public void test1() {
+        TransactionRolledbackException ex = new TransactionRolledbackException();
+        assertTrue(ex.getMessage() == null
+                && ex.getCause() == null);
+    }
+
+    /**
+     * Create TransactionRolledbackException with message
+     */
+    @Test
+    public void test2() {
+        TransactionRolledbackException ex = new TransactionRolledbackException(reason);
+        assertTrue(ex.getMessage().equals(reason)
+                && ex.getCause() == null);
+    }
+
+    /**
+     * De-Serialize a TransactionRolledbackException from JDBC 4.0 and make sure
+     * you can read it back properly
+     */
+    @Test
+    public void test3() throws Exception {
+
+        ObjectInputStream ois = new ObjectInputStream(
+                new ByteArrayInputStream(SerializedTransactionExceptions.TRBE_DATA));
+        TransactionRolledbackException ex = (TransactionRolledbackException) ois.readObject();
+        assertTrue(reason.equals(ex.getMessage())
+                && ex.getCause() == null);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/transaction/testng/test/transaction/XAExceptionTests.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.transaction;
+
+import java.io.ByteArrayInputStream;
+import java.io.ObjectInputStream;
+import javax.transaction.xa.XAException;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+import util.SerializedTransactionExceptions;
+
+public class XAExceptionTests {
+
+    protected final String reason = "reason";
+
+    /**
+     * Create XAException with no-arg constructor
+     */
+    @Test
+    public void test1() {
+        XAException ex = new XAException();
+        assertTrue(ex.getMessage() == null
+                && ex.getCause() == null
+                && ex.errorCode == 0);
+    }
+
+    /**
+     * Create XAException with message
+     */
+    @Test
+    public void test2() {
+        XAException ex = new XAException(reason);
+        assertTrue(ex.getMessage().equals(reason)
+                && ex.getCause() == null
+                && ex.errorCode == 0);
+    }
+
+    /**
+     * De-Serialize a XAException from JDBC 4.0 and make sure you can read it
+     * back properly
+     */
+    @Test
+    public void test3() throws Exception {
+
+        ObjectInputStream ois = new ObjectInputStream(
+                new ByteArrayInputStream(SerializedTransactionExceptions.XAE_DATA));
+        XAException ex = (XAException) ois.readObject();
+        assertTrue(reason.equals(ex.getMessage())
+                && ex.getCause() == null
+                && ex.errorCode == 0);
+    }
+
+    /**
+     * Create TransactionRolledbackException specifying an error code
+     */
+    @Test
+    public void test4() {
+        int error = 21;
+        XAException ex = new XAException(error);
+        assertTrue(ex.getMessage() == null
+                && ex.getCause() == null
+                && ex.errorCode == error);
+    }
+
+    /**
+     * Create TransactionRolledbackException specifying an error code
+     */
+    @Test
+    public void test5() {
+        int error = 21;
+        XAException ex = new XAException(error);
+        ex.errorCode = error;
+        assertTrue(ex.getMessage() == null
+                && ex.getCause() == null
+                && ex.errorCode == error);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/transaction/testng/util/SerializedTransactionExceptions.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package util;
+
+public class SerializedTransactionExceptions {
+
+    /**
+     * Serialized XAException from JDK 8 with the following values:
+     * reason = "This was the error msg"
+     * cause = null
+     */
+    public static byte[] XAE_DATA = {
+        (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x20, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x78, (byte) 0x61, (byte) 0x2e, (byte) 0x58, (byte) 0x41, (byte) 0x45,
+        (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x8d, (byte) 0x83, (byte) 0x3c, (byte) 0xc2, (byte) 0xda, (byte) 0xf, (byte) 0x2a, (byte) 0x59, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x9, (byte) 0x65, (byte) 0x72, (byte) 0x72, (byte) 0x6f, (byte) 0x72, (byte) 0x43, (byte) 0x6f, (byte) 0x64, (byte) 0x65, (byte) 0x78,
+        (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0,
+        (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb,
+        (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62,
+        (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67,
+        (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c,
+        (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73,
+        (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b,
+        (byte) 0x78, (byte) 0x70, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x7, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72, (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e,
+        (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0,
+        (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65,
+        (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2, (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63,
+        (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4,
+        (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x4, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x39, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65,
+        (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a,
+        (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xb, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xe, (byte) 0x74, (byte) 0x0, (byte) 0x4,
+        (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e,
+        (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74,
+        (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55,
+        (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1,
+        (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73,
+        (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0,
+        (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x17, (byte) 0x78, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0
+    };
+
+    /**
+     * Serialized InvalidTransactionException from JDK 8 with the following
+     * values:
+     * reason = "This was the error msg"
+     * cause = null
+     */
+    public static byte[] ITE_DATA = {
+        (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x2d, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x49, (byte) 0x6e, (byte) 0x76, (byte) 0x61, (byte) 0x6c, (byte) 0x69,
+        (byte) 0x64, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x31, (byte) 0xec, (byte) 0x3f, (byte) 0xae, (byte) 0x54, (byte) 0x8e, (byte) 0xdb, (byte) 0x68, (byte) 0x2, (byte) 0x0, (byte) 0x0,
+        (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8, (byte) 0x8c, (byte) 0x9d, (byte) 0x4e,
+        (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54, (byte) 0x68,
+        (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x6c,
+        (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f,
+        (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61,
+        (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64, (byte) 0x65,
+        (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x3b,
+        (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63,
+        (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70,
+        (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72, (byte) 0x65,
+        (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c,
+        (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e,
+        (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2, (byte) 0x0,
+        (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73, (byte) 0x71,
+        (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61, (byte) 0x6d,
+        (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3a, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x74,
+        (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71, (byte) 0x0,
+        (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
+        (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c, (byte) 0x69,
+        (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
+        (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x43,
+        (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
+        (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c,
+        (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0,
+        (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
+    };
+
+    /**
+     * Serialized TransactionRequiredException from JDK 8 with the following
+     * values:
+     * reason = "This was the error msg"
+     * cause = null
+     */
+    public static byte[] TRE_DATA = {
+        (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61,
+        (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x52, (byte) 0x65, (byte) 0x71, (byte) 0x75, (byte) 0x69, (byte) 0x72, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xe5, (byte) 0xa6, (byte) 0x15, (byte) 0x9f, (byte) 0x12, (byte) 0x65, (byte) 0xb5, (byte) 0xd9, (byte) 0x2, (byte) 0x0,
+        (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8, (byte) 0x8c, (byte) 0x9d,
+        (byte) 0x4e, (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x54,
+        (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e,
+        (byte) 0x6c, (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69,
+        (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77,
+        (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0, (byte) 0xd, (byte) 0x64,
+        (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67,
+        (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x61,
+        (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65,
+        (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0, (byte) 0x6, (byte) 0x72,
+        (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45,
+        (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
+        (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd, (byte) 0x85, (byte) 0x2,
+        (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73,
+        (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64, (byte) 0x4e, (byte) 0x61,
+        (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3c, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31,
+        (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e, (byte) 0x73, (byte) 0x71,
+        (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
+        (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x4c,
+        (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c, (byte) 0x6a, (byte) 0x61,
+        (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65,
+        (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
+        (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69,
+        (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78, (byte) 0x70, (byte) 0x0,
+        (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
+    };
+
+    /**
+     * Serialized TransactionRolledbackException from JDK 8 with the
+     * following values:
+     * reason = "This was the error msg"
+     * cause = null
+     */
+    public static byte[] TRBE_DATA = {
+        (byte) 0xac, (byte) 0xed, (byte) 0x0, (byte) 0x5, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x30, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2e, (byte) 0x74, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x6e, (byte) 0x73, (byte) 0x61,
+        (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x52, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x64, (byte) 0x62, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd4, (byte) 0x62, (byte) 0x89, (byte) 0xbe, (byte) 0x47, (byte) 0x2, (byte) 0xe7, (byte) 0xdf,
+        (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x18, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x72, (byte) 0x6d, (byte) 0x69, (byte) 0x2e, (byte) 0x52, (byte) 0x65, (byte) 0x6d, (byte) 0x6f, (byte) 0x74, (byte) 0x65, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xb8,
+        (byte) 0x8c, (byte) 0x9d, (byte) 0x4e, (byte) 0xde, (byte) 0xe4, (byte) 0x7a, (byte) 0x22, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x6, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67,
+        (byte) 0x2f, (byte) 0x54, (byte) 0x68, (byte) 0x72, (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x3b, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x69, (byte) 0x6f, (byte) 0x2e, (byte) 0x49, (byte) 0x4f, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69,
+        (byte) 0x6f, (byte) 0x6e, (byte) 0x6c, (byte) 0x80, (byte) 0x73, (byte) 0x64, (byte) 0x65, (byte) 0x25, (byte) 0xf0, (byte) 0xab, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x45, (byte) 0x78, (byte) 0x63, (byte) 0x65, (byte) 0x70,
+        (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0xd0, (byte) 0xfd, (byte) 0x1f, (byte) 0x3e, (byte) 0x1a, (byte) 0x3b, (byte) 0x1c, (byte) 0xc4, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x54, (byte) 0x68, (byte) 0x72,
+        (byte) 0x6f, (byte) 0x77, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0xd5, (byte) 0xc6, (byte) 0x35, (byte) 0x27, (byte) 0x39, (byte) 0x77, (byte) 0xb8, (byte) 0xcb, (byte) 0x3, (byte) 0x0, (byte) 0x4, (byte) 0x4c, (byte) 0x0, (byte) 0x5, (byte) 0x63, (byte) 0x61, (byte) 0x75, (byte) 0x73, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x2, (byte) 0x4c, (byte) 0x0,
+        (byte) 0xd, (byte) 0x64, (byte) 0x65, (byte) 0x74, (byte) 0x61, (byte) 0x69, (byte) 0x6c, (byte) 0x4d, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x12, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69,
+        (byte) 0x6e, (byte) 0x67, (byte) 0x3b, (byte) 0x5b, (byte) 0x0, (byte) 0xa, (byte) 0x73, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x74, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2f, (byte) 0x53,
+        (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x4c, (byte) 0x0, (byte) 0x14, (byte) 0x73, (byte) 0x75, (byte) 0x70, (byte) 0x70, (byte) 0x72, (byte) 0x65, (byte) 0x73, (byte) 0x73, (byte) 0x65, (byte) 0x64, (byte) 0x45, (byte) 0x78,
+        (byte) 0x63, (byte) 0x65, (byte) 0x70, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x70, (byte) 0x74, (byte) 0x0,
+        (byte) 0x6, (byte) 0x72, (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x6f, (byte) 0x6e, (byte) 0x75, (byte) 0x72, (byte) 0x0, (byte) 0x1e, (byte) 0x5b, (byte) 0x4c, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63,
+        (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x3b, (byte) 0x2, (byte) 0x46, (byte) 0x2a, (byte) 0x3c, (byte) 0x3c, (byte) 0xfd, (byte) 0x22, (byte) 0x39, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x1b, (byte) 0x6a, (byte) 0x61,
+        (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67, (byte) 0x2e, (byte) 0x53, (byte) 0x74, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x54, (byte) 0x72, (byte) 0x61, (byte) 0x63, (byte) 0x65, (byte) 0x45, (byte) 0x6c, (byte) 0x65, (byte) 0x6d, (byte) 0x65, (byte) 0x6e, (byte) 0x74, (byte) 0x61, (byte) 0x9, (byte) 0xc5, (byte) 0x9a, (byte) 0x26, (byte) 0x36, (byte) 0xdd,
+        (byte) 0x85, (byte) 0x2, (byte) 0x0, (byte) 0x4, (byte) 0x49, (byte) 0x0, (byte) 0xa, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x65, (byte) 0x4e, (byte) 0x75, (byte) 0x6d, (byte) 0x62, (byte) 0x65, (byte) 0x72, (byte) 0x4c, (byte) 0x0, (byte) 0xe, (byte) 0x64, (byte) 0x65, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x43, (byte) 0x6c, (byte) 0x61,
+        (byte) 0x73, (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0x8, (byte) 0x66, (byte) 0x69, (byte) 0x6c, (byte) 0x65, (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x4c, (byte) 0x0, (byte) 0xa, (byte) 0x6d, (byte) 0x65, (byte) 0x74, (byte) 0x68, (byte) 0x6f, (byte) 0x64,
+        (byte) 0x4e, (byte) 0x61, (byte) 0x6d, (byte) 0x65, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x6, (byte) 0x78, (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3e, (byte) 0x74, (byte) 0x0, (byte) 0x10, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74,
+        (byte) 0x61, (byte) 0x31, (byte) 0x74, (byte) 0x0, (byte) 0x15, (byte) 0x57, (byte) 0x72, (byte) 0x69, (byte) 0x74, (byte) 0x65, (byte) 0x53, (byte) 0x65, (byte) 0x72, (byte) 0x69, (byte) 0x61, (byte) 0x6c, (byte) 0x44, (byte) 0x61, (byte) 0x74, (byte) 0x61, (byte) 0x31, (byte) 0x2e, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x74, (byte) 0x0, (byte) 0x3, (byte) 0x72, (byte) 0x75, (byte) 0x6e,
+        (byte) 0x73, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x24, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0xf, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x10, (byte) 0x74, (byte) 0x0, (byte) 0x4, (byte) 0x6d, (byte) 0x61, (byte) 0x69, (byte) 0x6e, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x26, (byte) 0x6a,
+        (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62, (byte) 0x6c,
+        (byte) 0x65, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0xfc, (byte) 0xf, (byte) 0x25, (byte) 0x31, (byte) 0xb5, (byte) 0xec, (byte) 0x8e, (byte) 0x10, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x4, (byte) 0x6c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x8, (byte) 0x78, (byte) 0x72, (byte) 0x0, (byte) 0x2c,
+        (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x73, (byte) 0x24, (byte) 0x55, (byte) 0x6e, (byte) 0x6d, (byte) 0x6f, (byte) 0x64, (byte) 0x69, (byte) 0x66, (byte) 0x69, (byte) 0x61, (byte) 0x62,
+        (byte) 0x6c, (byte) 0x65, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x19, (byte) 0x42, (byte) 0x0, (byte) 0x80, (byte) 0xcb, (byte) 0x5e, (byte) 0xf7, (byte) 0x1e, (byte) 0x2, (byte) 0x0, (byte) 0x1, (byte) 0x4c, (byte) 0x0, (byte) 0x1, (byte) 0x63, (byte) 0x74, (byte) 0x0, (byte) 0x16, (byte) 0x4c, (byte) 0x6a,
+        (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x75, (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2f, (byte) 0x43, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x3b, (byte) 0x78, (byte) 0x70, (byte) 0x73, (byte) 0x72, (byte) 0x0, (byte) 0x13, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2e, (byte) 0x75,
+        (byte) 0x74, (byte) 0x69, (byte) 0x6c, (byte) 0x2e, (byte) 0x41, (byte) 0x72, (byte) 0x72, (byte) 0x61, (byte) 0x79, (byte) 0x4c, (byte) 0x69, (byte) 0x73, (byte) 0x74, (byte) 0x78, (byte) 0x81, (byte) 0xd2, (byte) 0x1d, (byte) 0x99, (byte) 0xc7, (byte) 0x61, (byte) 0x9d, (byte) 0x3, (byte) 0x0, (byte) 0x1, (byte) 0x49, (byte) 0x0, (byte) 0x4, (byte) 0x73, (byte) 0x69, (byte) 0x7a, (byte) 0x65, (byte) 0x78,
+        (byte) 0x70, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x77, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x78, (byte) 0x71, (byte) 0x0, (byte) 0x7e, (byte) 0x0, (byte) 0x19, (byte) 0x78, (byte) 0x70
+    };
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/jdk/internal/misc/JavaLangAccess/FormatUnsigned.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
+
+/*
+ * @test
+ * @bug 8050114
+ * @summary Test JavaLangAccess.formatUnsignedInt/-Long
+ * @modules java.base/jdk.internal.misc
+ */
+public class FormatUnsigned {
+
+    static final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
+
+    public static void testFormatUnsignedInt() {
+        testFormatUnsignedInt("7fffffff", Integer.MAX_VALUE, 8, 4, 0, 8);
+        testFormatUnsignedInt("80000000", Integer.MIN_VALUE, 8, 4, 0, 8);
+        testFormatUnsignedInt("4711", 04711, 4, 3, 0, 4);
+        testFormatUnsignedInt("4711", 0x4711, 4, 4, 0, 4);
+        testFormatUnsignedInt("1010", 0b1010, 4, 1, 0, 4);
+        testFormatUnsignedInt("00001010", 0b1010, 8, 1, 0, 8);
+        testFormatUnsignedInt("\u0000\u000000001010", 0b1010, 10, 1, 2, 8);
+    }
+
+    public static void testFormatUnsignedLong() {
+        testFormatUnsignedLong("7fffffffffffffff", Long.MAX_VALUE, 16, 4, 0, 16);
+        testFormatUnsignedLong("8000000000000000", Long.MIN_VALUE, 16, 4, 0, 16);
+        testFormatUnsignedLong("4711", 04711L, 4, 3, 0, 4);
+        testFormatUnsignedLong("4711", 0x4711L, 4, 4, 0, 4);
+        testFormatUnsignedLong("1010", 0b1010L, 4, 1, 0, 4);
+        testFormatUnsignedLong("00001010", 0b1010L, 8, 1, 0, 8);
+        testFormatUnsignedLong("\u0000\u000000001010", 0b1010L, 10, 1, 2, 8);
+    }
+
+    public static void testFormatUnsignedInt(String expected, int value, int arraySize, int shift, int offset, int length) {
+        char[] chars = new char[arraySize];
+        jla.formatUnsignedInt(value, shift, chars, offset, length);
+        String s = new String(chars);
+        if (!expected.equals(s)) {
+            throw new Error(s + " should be equal to expected " + expected);
+        }
+    }
+
+    public static void testFormatUnsignedLong(String expected, long value, int arraySize, int shift, int offset, int length) {
+        char[] chars = new char[arraySize];
+        jla.formatUnsignedLong(value, shift, chars, offset, length);
+        String s = new String(chars);
+        if (!expected.equals(s)) {
+            throw new Error(s + " should be equal to expected " + expected);
+        }
+    }
+
+    public static void main(String[] args) {
+        testFormatUnsignedInt();
+        testFormatUnsignedLong();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/jdk/internal/misc/JavaLangAccess/NewUnsafeString.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.Objects;
+import java.util.Comparator;
+import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
+
+/*
+ * @test
+ * @bug 8013528
+ * @summary Test JavaLangAccess.newUnsafeString
+ * @modules java.base/jdk.internal.misc
+ * @compile -XDignore.symbol.file NewUnsafeString.java
+ */
+public class NewUnsafeString {
+
+    static final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
+
+    public static void testNewUnsafeString() {
+        String benchmark = "exemplar";
+        String constructorCopy = new String(benchmark);
+        char[] jlaChars = benchmark.toCharArray();
+        String jlaCopy = jla.newStringUnsafe(jlaChars);
+
+        if (benchmark == constructorCopy) {
+            throw new Error("should be different instances");
+        }
+        if (!benchmark.equals(constructorCopy)) {
+            throw new Error("Copy not equal");
+        }
+        if (0 != Objects.compare(benchmark, constructorCopy, Comparator.naturalOrder())) {
+            throw new Error("Copy not equal");
+        }
+
+        if (benchmark == jlaCopy) {
+            throw new Error("should be different instances");
+        }
+        if (!benchmark.equals(jlaCopy)) {
+            throw new Error("Copy not equal");
+        }
+        if (0 != Objects.compare(benchmark, jlaCopy, Comparator.naturalOrder())) {
+            throw new Error("Copy not equal");
+        }
+
+        if (constructorCopy == jlaCopy) {
+            throw new Error("should be different instances");
+        }
+        if (!constructorCopy.equals(jlaCopy)) {
+            throw new Error("Copy not equal");
+        }
+        if (0 != Objects.compare(constructorCopy, jlaCopy, Comparator.naturalOrder())) {
+            throw new Error("Copy not equal");
+        }
+
+        // The following is extremely "evil". Never ever do this in non-test code.
+        jlaChars[0] = 'X';
+        if (!"Xxemplar".equals(jlaCopy)) {
+            throw new Error("jla.newStringUnsafe did not use provided string");
+        }
+
+    }
+
+    public static void main(String[] args) {
+        testNewUnsafeString();
+    }
+}
--- a/jdk/test/sun/misc/JavaLangAccess/FormatUnsigned.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import sun.misc.JavaLangAccess;
-import sun.misc.SharedSecrets;
-
-/*
- * @test
- * @bug 8050114
- * @summary Test JavaLangAccess.formatUnsignedInt/-Long
- * @modules java.base/sun.misc
- */
-public class FormatUnsigned {
-
-    static final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
-
-    public static void testFormatUnsignedInt() {
-        testFormatUnsignedInt("7fffffff", Integer.MAX_VALUE, 8, 4, 0, 8);
-        testFormatUnsignedInt("80000000", Integer.MIN_VALUE, 8, 4, 0, 8);
-        testFormatUnsignedInt("4711", 04711, 4, 3, 0, 4);
-        testFormatUnsignedInt("4711", 0x4711, 4, 4, 0, 4);
-        testFormatUnsignedInt("1010", 0b1010, 4, 1, 0, 4);
-        testFormatUnsignedInt("00001010", 0b1010, 8, 1, 0, 8);
-        testFormatUnsignedInt("\u0000\u000000001010", 0b1010, 10, 1, 2, 8);
-    }
-
-    public static void testFormatUnsignedLong() {
-        testFormatUnsignedLong("7fffffffffffffff", Long.MAX_VALUE, 16, 4, 0, 16);
-        testFormatUnsignedLong("8000000000000000", Long.MIN_VALUE, 16, 4, 0, 16);
-        testFormatUnsignedLong("4711", 04711L, 4, 3, 0, 4);
-        testFormatUnsignedLong("4711", 0x4711L, 4, 4, 0, 4);
-        testFormatUnsignedLong("1010", 0b1010L, 4, 1, 0, 4);
-        testFormatUnsignedLong("00001010", 0b1010L, 8, 1, 0, 8);
-        testFormatUnsignedLong("\u0000\u000000001010", 0b1010L, 10, 1, 2, 8);
-    }
-
-    public static void testFormatUnsignedInt(String expected, int value, int arraySize, int shift, int offset, int length) {
-        char[] chars = new char[arraySize];
-        jla.formatUnsignedInt(value, shift, chars, offset, length);
-        String s = new String(chars);
-        if (!expected.equals(s)) {
-            throw new Error(s + " should be equal to expected " + expected);
-        }
-    }
-
-    public static void testFormatUnsignedLong(String expected, long value, int arraySize, int shift, int offset, int length) {
-        char[] chars = new char[arraySize];
-        jla.formatUnsignedLong(value, shift, chars, offset, length);
-        String s = new String(chars);
-        if (!expected.equals(s)) {
-            throw new Error(s + " should be equal to expected " + expected);
-        }
-    }
-
-    public static void main(String[] args) {
-        testFormatUnsignedInt();
-        testFormatUnsignedLong();
-    }
-}
--- a/jdk/test/sun/misc/JavaLangAccess/NewUnsafeString.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import java.util.Objects;
-import java.util.Comparator;
-import sun.misc.JavaLangAccess;
-import sun.misc.SharedSecrets;
-
-/*
- * @test
- * @bug 8013528
- * @summary Test JavaLangAccess.newUnsafeString
- * @modules java.base/sun.misc
- * @compile -XDignore.symbol.file NewUnsafeString.java
- */
-public class NewUnsafeString {
-
-    static final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
-
-    public static void testNewUnsafeString() {
-        String benchmark = "exemplar";
-        String constructorCopy = new String(benchmark);
-        char[] jlaChars = benchmark.toCharArray();
-        String jlaCopy = jla.newStringUnsafe(jlaChars);
-
-        if (benchmark == constructorCopy) {
-            throw new Error("should be different instances");
-        }
-        if (!benchmark.equals(constructorCopy)) {
-            throw new Error("Copy not equal");
-        }
-        if (0 != Objects.compare(benchmark, constructorCopy, Comparator.naturalOrder())) {
-            throw new Error("Copy not equal");
-        }
-
-        if (benchmark == jlaCopy) {
-            throw new Error("should be different instances");
-        }
-        if (!benchmark.equals(jlaCopy)) {
-            throw new Error("Copy not equal");
-        }
-        if (0 != Objects.compare(benchmark, jlaCopy, Comparator.naturalOrder())) {
-            throw new Error("Copy not equal");
-        }
-
-        if (constructorCopy == jlaCopy) {
-            throw new Error("should be different instances");
-        }
-        if (!constructorCopy.equals(jlaCopy)) {
-            throw new Error("Copy not equal");
-        }
-        if (0 != Objects.compare(constructorCopy, jlaCopy, Comparator.naturalOrder())) {
-            throw new Error("Copy not equal");
-        }
-
-        // The following is extremely "evil". Never ever do this in non-test code.
-        jlaChars[0] = 'X';
-        if (!"Xxemplar".equals(jlaCopy)) {
-            throw new Error("jla.newStringUnsafe did not use provided string");
-        }
-
-    }
-
-    public static void main(String[] args) {
-        testNewUnsafeString();
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/net/www/http/HttpURLConnection/NTLMAuthWithSM.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.Authenticator;
+import java.net.InetSocketAddress;
+import java.net.PasswordAuthentication;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.List;
+import sun.net.www.protocol.http.ntlm.NTLMAuthenticationCallback;
+
+/*
+ * @test
+ * @bug 8137174
+ * @summary Checks if NTLM auth works fine if security manager set
+ * @run main/othervm/java.security.policy=NTLMAuthWithSM.policy NTLMAuthWithSM
+ */
+public class NTLMAuthWithSM {
+
+    public static void main(String[] args) throws Exception {
+        // security manager is required
+        if (System.getSecurityManager() == null) {
+            throw new RuntimeException("Security manager not specified");
+        }
+
+        if (System.getProperty("os.name").startsWith("Windows")) {
+            // disable transparent NTLM authentication on Windows
+            NTLMAuthenticationCallback.setNTLMAuthenticationCallback(
+                    new NTLMAuthenticationCallbackImpl());
+        }
+
+        try (LocalHttpServer server = LocalHttpServer.startServer()) {
+            // set authenticator
+            Authenticator.setDefault(new AuthenticatorImpl());
+
+            String url = String.format("http://localhost:%d/test/",
+                    server.getPort());
+
+            // load a document which is protected with NTML authentication
+            System.out.println("load() called: " + url);
+            URLConnection conn = new URL(url).openConnection();
+            try (BufferedReader reader = new BufferedReader(
+                    new InputStreamReader(conn.getInputStream()))) {
+
+                String line = reader.readLine();
+                if (line == null) {
+                    throw new IOException("Couldn't read a response");
+                }
+                do {
+                    System.out.println(line);
+                } while ((line = reader.readLine()) != null);
+            }
+        }
+
+        System.out.println("Test passed");
+    }
+
+    private static class AuthenticatorImpl extends Authenticator {
+
+        @Override
+        public PasswordAuthentication getPasswordAuthentication() {
+            System.out.println("getPasswordAuthentication() called, scheme: "
+                    + getRequestingScheme());
+            if (getRequestingScheme().equalsIgnoreCase("ntlm")) {
+                return new PasswordAuthentication("test", "test".toCharArray());
+            }
+            return null;
+        }
+    }
+
+    // local http server which pretends to support NTLM auth
+    static class LocalHttpServer implements HttpHandler, AutoCloseable {
+
+        private final HttpServer server;
+
+        private LocalHttpServer(HttpServer server) {
+            this.server = server;
+        }
+
+        static LocalHttpServer startServer() throws IOException {
+            HttpServer httpServer = HttpServer.create(
+                    new InetSocketAddress(0), 0);
+            LocalHttpServer localHttpServer = new LocalHttpServer(httpServer);
+            localHttpServer.start();
+
+            return localHttpServer;
+        }
+
+        void start() {
+            server.createContext("/test", this);
+            server.start();
+            System.out.println("HttpServer: started on port " + getPort());
+        }
+
+        void stop() {
+            server.stop(0);
+            System.out.println("HttpServer: stopped");
+        }
+
+        int getPort() {
+            return server.getAddress().getPort();
+        }
+
+        @Override
+        public void handle(HttpExchange t) throws IOException {
+            System.out.println("HttpServer: handle connection");
+
+            // read a request
+            try (InputStream is = t.getRequestBody()) {
+                while (is.read() > 0);
+            }
+
+            try {
+                List<String> headers = t.getRequestHeaders()
+                        .get("Authorization");
+                if (headers != null && !headers.isEmpty()
+                        && headers.get(0).trim().contains("NTLM")) {
+                    byte[] output = "hello".getBytes();
+                    t.sendResponseHeaders(200, output.length);
+                    t.getResponseBody().write(output);
+                    System.out.println("HttpServer: return 200");
+                } else {
+                    t.getResponseHeaders().set("WWW-Authenticate", "NTLM");
+                    byte[] output = "forbidden".getBytes();
+                    t.sendResponseHeaders(401, output.length);
+                    t.getResponseBody().write(output);
+                    System.out.println("HttpServer: return 401");
+                }
+            } catch (IOException e) {
+                System.out.println("HttpServer: exception: " + e);
+                System.out.println("HttpServer: return 500");
+                t.sendResponseHeaders(500, 0);
+            } finally {
+                t.close();
+            }
+        }
+
+        @Override
+        public void close() {
+            stop();
+        }
+    }
+
+    private static class NTLMAuthenticationCallbackImpl
+            extends NTLMAuthenticationCallback {
+
+        // don't trust any site, so that no transparent NTLM auth happens
+        @Override
+        public boolean isTrustedSite(URL url) {
+            System.out.println(
+                    "NTLMAuthenticationCallbackImpl.isTrustedSite() called: "
+                        + "return false");
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/net/www/http/HttpURLConnection/NTLMAuthWithSM.policy	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,7 @@
+grant {
+    permission java.net.NetPermission "setDefaultAuthenticator";
+    permission java.net.SocketPermission "localhost:*",
+            "connect,resolve,listen,accept";
+    permission java.lang.RuntimePermission
+            "accessClassInPackage.sun.net.www.protocol.http.ntlm";
+};
--- a/jdk/test/sun/security/krb5/auto/tools/KinitConfPlusProps.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/sun/security/krb5/auto/tools/KinitConfPlusProps.java	Wed Jul 05 20:52:37 2017 +0200
@@ -22,7 +22,6 @@
  */
 
 import java.io.File;
-import java.net.PortUnreachableException;
 import java.util.HashMap;
 import java.util.Map;
 import jdk.testlibrary.ProcessTools;
@@ -86,7 +85,6 @@
         try {
             OutputAnalyzer out = ProcessTools.executeCommand(command);
             out.shouldHaveExitValue(-1);
-            out.shouldContain(PortUnreachableException.class.getName());
         } catch(Throwable e) {
             System.out.println("Unexpected exception: " + e);
             e.printStackTrace(System.out);
--- a/jdk/test/sun/util/calendar/zi/tzdata/VERSION	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/sun/util/calendar/zi/tzdata/VERSION	Wed Jul 05 20:52:37 2017 +0200
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2015f
+tzdata2015g
--- a/jdk/test/sun/util/calendar/zi/tzdata/asia	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/sun/util/calendar/zi/tzdata/asia	Wed Jul 05 20:52:37 2017 +0200
@@ -154,7 +154,8 @@
 # Azerbaijan
 # From Rustam Aliyev of the Azerbaijan Internet Forum (2005-10-23):
 # According to the resolution of Cabinet of Ministers, 1997
-# Resolution available at: http://aif.az/docs/daylight_res.pdf
+# From Paul Eggert (2015-09-17): It was Resolution No. 21 (1997-03-17).
+# http://code.az/files/daylight_res.pdf
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Azer	1997	max	-	Mar	lastSun	 4:00	1:00	S
 Rule	Azer	1997	max	-	Oct	lastSun	 5:00	0	-
@@ -1740,11 +1741,12 @@
 # the 8:30 time zone on August 15, one example:
 # http://www.bbc.com/news/world-asia-33815049
 #
-# From Paul Eggert (2015-08-07):
-# No transition time is specified; assume 00:00.
+# From Paul Eggert (2015-08-15):
+# Bells rang out midnight (00:00) Friday as part of the celebrations.  See:
+# Talmadge E. North Korea celebrates new time zone, 'Pyongyang Time'
+# http://news.yahoo.com/north-korea-celebrates-time-zone-pyongyang-time-164038128.html
 # There is no common English-language abbreviation for this time zone.
-# Use %z rather than invent one.  We can't assume %z works everywhere yet,
-# so for now substitute its output manually.
+# Use KST, as that's what we already use for 1954-1961 in ROK.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Seoul	8:27:52	-	LMT	1908 Apr  1
@@ -1758,7 +1760,7 @@
 			8:30	-	KST	1912 Jan  1
 			9:00	-	JCST	1937 Oct  1
 			9:00	-	JST	1945 Aug 24
-			9:00	-	KST	2015 Aug 15
+			9:00	-	KST	2015 Aug 15 00:00
 			8:30	-	KST
 
 ###############################################################################
--- a/jdk/test/sun/util/calendar/zi/tzdata/australasia	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/sun/util/calendar/zi/tzdata/australasia	Wed Jul 05 20:52:37 2017 +0200
@@ -358,10 +358,17 @@
 # DST will start Nov. 2 this year.
 # http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-NOVEMBER-2ND.aspx
 
-# From Paul Eggert (2014-10-20):
+# From a government order dated 2015-08-26 and published as Legal Notice No. 77
+# in the Government of Fiji Gazette Supplement No. 24 (2015-08-28),
+# via Ken Rylander (2015-09-02):
+# the daylight saving period is 1 hour in advance of the standard time
+# commencing at 2.00 am on Sunday 1st November, 2015 and ending at
+# 3.00 am on Sunday 17th January, 2016.
+
+# From Paul Eggert (2015-09-01):
 # For now, guess DST from 02:00 the first Sunday in November to
-# 03:00 the first Sunday on or after January 18.  Although ad hoc, it
-# matches this year's plan and seems more likely to match future
+# 03:00 the third Sunday in January.  Although ad hoc, it matches
+# transitions since late 2014 and seems more likely to match future
 # practice than guessing no DST.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -374,7 +381,7 @@
 Rule	Fiji	2012	2013	-	Jan	Sun>=18	3:00	0	-
 Rule	Fiji	2014	only	-	Jan	Sun>=18	2:00	0	-
 Rule	Fiji	2014	max	-	Nov	Sun>=1	2:00	1:00	S
-Rule	Fiji	2015	max	-	Jan	Sun>=18	3:00	0	-
+Rule	Fiji	2015	max	-	Jan	Sun>=15	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:55:44 -	LMT	1915 Oct 26 # Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -533,7 +540,10 @@
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Norfolk	11:11:52 -	LMT	1901 # Kingston
 			11:12	-	NMT	1951 # Norfolk Mean Time
-			11:30	-	NFT	# Norfolk Time
+			11:30	-	NFT	1974 Oct 27 02:00 # Norfolk T.
+			11:30	1:00	NFST	1975 Mar  2 02:00
+			11:30	-	NFT	2015 Oct  4 02:00
+			11:00	-	NFT
 
 # Palau (Belau)
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1573,6 +1583,20 @@
 # started DST on June 3.  Possibly DST was observed other years
 # in Midway, but we have no record of it.
 
+# Norfolk
+
+# From Alexander Krivenyshev (2015-09-23):
+# Norfolk Island will change ... from +1130 to +1100:
+# https://www.comlaw.gov.au/Details/F2015L01483/Explanatory%20Statement/Text
+# ... at 12.30 am (by legal time in New South Wales) on 4 October 2015.
+# http://www.norfolkisland.gov.nf/nia/MediaRelease/Media%20Release%20Norfolk%20Island%20Standard%20Time%20Change.pdf
+
+# From Paul Eggert (2015-09-23):
+# Transitions before 2015 are from timeanddate.com, which consulted
+# the Norfolk Island Museum and the Australian Bureau of Meteorology's
+# Norfolk Island station, and found no record of Norfolk observing DST
+# other than in 1974/5.  See:
+# http://www.timeanddate.com/time/australia/norfolk-island.html
 
 # Pitcairn
 
--- a/jdk/test/sun/util/calendar/zi/tzdata/europe	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/sun/util/calendar/zi/tzdata/europe	Wed Jul 05 20:52:37 2017 +0200
@@ -3173,6 +3173,11 @@
 # http://www.balkaneu.com/eventful-elections-turkey/ 2014-03-30.
 # I guess the best we can do is document the official time.
 
+# From Fatih (2015-09-29):
+# It's officially announced now by the Ministry of Energy.
+# Turkey delays winter time to 8th of November 04:00
+# http://www.aa.com.tr/tr/turkiye/yaz-saati-uygulamasi-8-kasimda-sona-erecek/362217
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Turkey	1916	only	-	May	 1	0:00	1:00	S
 Rule	Turkey	1916	only	-	Oct	 1	0:00	0	-
@@ -3242,6 +3247,8 @@
 			2:00	-	EET	2011 Mar 28  1:00u
 			2:00	EU	EE%sT	2014 Mar 30  1:00u
 			2:00	-	EET	2014 Mar 31  1:00u
+			2:00	EU	EE%sT	2015 Oct 25  1:00u
+			2:00	1:00	EEST	2015 Nov  8  1:00u
 			2:00	EU	EE%sT
 Link	Europe/Istanbul	Asia/Istanbul	# Istanbul is in both continents.
 
--- a/jdk/test/sun/util/calendar/zi/tzdata/northamerica	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/sun/util/calendar/zi/tzdata/northamerica	Wed Jul 05 20:52:37 2017 +0200
@@ -1849,6 +1849,22 @@
 
 # The transition dates (and times) are guesses.
 
+# From Matt Johnson (2015-09-21):
+# Fort Nelson, BC, Canada will cancel DST this year.  So while previously they
+# were aligned with America/Vancouver, they're now aligned with
+# America/Dawson_Creek.
+# http://www.northernrockies.ca/EN/meta/news/archives/2015/northern-rockies-time-change.html
+#
+# From Tim Parenti (2015-09-23):
+# This requires a new zone for the Northern Rockies Regional Municipality,
+# America/Fort_Nelson.  The resolution of 2014-12-08 was reached following a
+# 2014-11-15 poll with nearly 75% support.  Effectively, the municipality has
+# been on MST (-0700) like Dawson Creek since it advanced its clocks on
+# 2015-03-08.
+#
+# From Paul Eggert (2015-09-23):
+# Shanks says Fort Nelson did not observe DST in 1946, unlike Vancouver.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Vanc	1918	only	-	Apr	14	2:00	1:00	D
 Rule	Vanc	1918	only	-	Oct	27	2:00	0	S
@@ -1867,6 +1883,12 @@
 			-8:00	Canada	P%sT	1947
 			-8:00	Vanc	P%sT	1972 Aug 30  2:00
 			-7:00	-	MST
+Zone America/Fort_Nelson	-8:10:47 -	LMT	1884
+			-8:00	Vanc	P%sT	1946
+			-8:00	-	PST	1947
+			-8:00	Vanc	P%sT	1987
+			-8:00	Canada	P%sT	2015 Mar  8  2:00
+			-7:00	-	MST
 Zone America/Creston	-7:46:04 -	LMT	1884
 			-7:00	-	MST	1916 Oct 1
 			-8:00	-	PST	1918 Jun 2
--- a/jdk/test/sun/util/calendar/zi/tzdata/zone.tab	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/sun/util/calendar/zi/tzdata/zone.tab	Wed Jul 05 20:52:37 2017 +0200
@@ -152,6 +152,7 @@
 CA	+682059-1334300	America/Inuvik	Mountain Time - west Northwest Territories
 CA	+4906-11631	America/Creston	Mountain Standard Time - Creston, British Columbia
 CA	+5946-12014	America/Dawson_Creek	Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia
+CA	+5848-12242	America/Fort_Nelson	Mountain Standard Time - Fort Nelson, British Columbia
 CA	+4916-12307	America/Vancouver	Pacific Time - west British Columbia
 CA	+6043-13503	America/Whitehorse	Pacific Time - south Yukon
 CA	+6404-13925	America/Dawson	Pacific Time - north Yukon
--- a/jdk/test/tools/pack200/Pack200Props.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/jdk/test/tools/pack200/Pack200Props.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -88,8 +88,6 @@
     private static void verifyDefaults() {
         Map<String, String> expectedDefaults = new HashMap<>();
         Packer p = Pack200.newPacker();
-        expectedDefaults.put("com.sun.java.util.jar.pack.default.timezone",
-                p.FALSE);
         expectedDefaults.put("com.sun.java.util.jar.pack.disable.native",
                 p.FALSE);
         expectedDefaults.put("com.sun.java.util.jar.pack.verbose", "0");
--- a/langtools/.hgtags	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/.hgtags	Wed Jul 05 20:52:37 2017 +0200
@@ -326,3 +326,4 @@
 ead8b7192f00417185f0e64d0cb332f0f8ad4ae1 jdk9-b81
 d68904d5a00e7e6c714e11f7ec9d0689af959d79 jdk9-b82
 6b3b94a2ebca4a99b2effefb2a1556cee954fd2f jdk9-b83
+e3445ccab58f741801021dec9aa46e7f2c09efd9 jdk9-b84
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Wed Jul 05 20:52:37 2017 +0200
@@ -3781,11 +3781,24 @@
      * Compute a hash code on a type.
      */
     public int hashCode(Type t) {
-        return hashCode.visit(t);
+        return hashCode(t, false);
+    }
+
+    public int hashCode(Type t, boolean strict) {
+        return strict ?
+                hashCodeStrictVisitor.visit(t) :
+                hashCodeVisitor.visit(t);
     }
     // where
-        private static final UnaryVisitor<Integer> hashCode = new UnaryVisitor<Integer>() {
-
+        private static final HashCodeVisitor hashCodeVisitor = new HashCodeVisitor();
+        private static final HashCodeVisitor hashCodeStrictVisitor = new HashCodeVisitor() {
+            @Override
+            public Integer visitTypeVar(TypeVar t, Void ignored) {
+                return System.identityHashCode(t);
+            }
+        };
+
+        private static class HashCodeVisitor extends UnaryVisitor<Integer> {
             public Integer visitType(Type t, Void ignored) {
                 return t.getTag().ordinal();
             }
@@ -3841,7 +3854,7 @@
             public Integer visitErrorType(ErrorType t, Void ignored) {
                 return 0;
             }
-        };
+        }
     // </editor-fold>
 
     // <editor-fold defaultstate="collapsed" desc="Return-Type-Substitutable">
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -29,6 +29,7 @@
 import com.sun.tools.javac.code.Source;
 import com.sun.tools.javac.code.Type;
 import com.sun.tools.javac.code.Types;
+import com.sun.tools.javac.comp.ArgumentAttr.LocalCacheContext;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.tree.JCTree.JCBlock;
 import com.sun.tools.javac.tree.JCTree.JCClassDecl;
@@ -54,7 +55,6 @@
 import com.sun.tools.javac.util.Context;
 import com.sun.tools.javac.util.DefinedBy;
 import com.sun.tools.javac.util.DefinedBy.Api;
-import com.sun.tools.javac.util.Filter;
 import com.sun.tools.javac.util.JCDiagnostic;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticType;
 import com.sun.tools.javac.util.List;
@@ -72,7 +72,6 @@
 import static com.sun.tools.javac.code.Flags.SYNTHETIC;
 import static com.sun.tools.javac.code.TypeTag.CLASS;
 import static com.sun.tools.javac.tree.JCTree.Tag.APPLY;
-import static com.sun.tools.javac.tree.JCTree.Tag.CLASSDEF;
 import static com.sun.tools.javac.tree.JCTree.Tag.METHODDEF;
 import static com.sun.tools.javac.tree.JCTree.Tag.NEWCLASS;
 import static com.sun.tools.javac.tree.JCTree.Tag.TYPEAPPLY;
@@ -88,6 +87,7 @@
     final Log log;
     final Attr attr;
     final DeferredAttr deferredAttr;
+    final ArgumentAttr argumentAttr;
     final TreeMaker make;
     final Names names;
     private final boolean allowDiamondWithAnonymousClassCreation;
@@ -107,6 +107,7 @@
         log = Log.instance(context);
         attr = Attr.instance(context);
         deferredAttr = DeferredAttr.instance(context);
+        argumentAttr = ArgumentAttr.instance(context);
         make = TreeMaker.instance(context);
         names = Names.instance(context);
         Options options = Options.instance(context);
@@ -363,8 +364,13 @@
 
             TreeMapper treeMapper = new TreeMapper(context);
             //TODO: to further refine the analysis, try all rewriting combinations
-            deferredAttr.attribSpeculative(fakeBlock, env, attr.statInfo, treeMapper,
-                    t -> new AnalyzeDeferredDiagHandler(context));
+            LocalCacheContext localCacheContext = argumentAttr.withLocalCacheContext();
+            try {
+                deferredAttr.attribSpeculative(fakeBlock, env, attr.statInfo, treeMapper,
+                        t -> new AnalyzeDeferredDiagHandler(context));
+            } finally {
+                localCacheContext.leave();
+            }
 
             context.treeMap.entrySet().forEach(e -> {
                 context.treesToAnalyzer.get(e.getKey())
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java	Wed Jul 05 20:52:37 2017 +0200
@@ -109,9 +109,6 @@
     /** Cache for argument types; behavior is influences by the currrently selected cache policy. */
     Map<UniquePos, ArgumentType<?>> argumentTypeCache = new LinkedHashMap<>();
 
-    /** Cache policy: should argument types be cached? */
-    private CachePolicy cachePolicy = CachePolicy.CACHE;
-
     public static ArgumentAttr instance(Context context) {
         ArgumentAttr instance = context.get(methodAttrKey);
         if (instance == null)
@@ -160,12 +157,29 @@
     }
 
     /**
-     * Sets given ache policy and returns current policy.
+     * Returns a local caching context in which argument types can safely be cached without
+     * the risk of polluting enclosing contexts. This is useful when attempting speculative
+     * attribution of potentially erroneous expressions, which could end up polluting the cache.
+     */
+    LocalCacheContext withLocalCacheContext() {
+        return new LocalCacheContext();
+    }
+
+    /**
+     * Local cache context; this class keeps track of the previous cache and reverts to it
+     * when the {@link LocalCacheContext#leave()} method is called.
      */
-    CachePolicy withCachePolicy(CachePolicy newPolicy) {
-        CachePolicy oldPolicy = this.cachePolicy;
-        this.cachePolicy = newPolicy;
-        return oldPolicy;
+    class LocalCacheContext {
+        Map<UniquePos, ArgumentType<?>> prevCache;
+
+        public LocalCacheContext() {
+            this.prevCache = argumentTypeCache;
+            argumentTypeCache = new HashMap<>();
+        }
+
+        public void leave() {
+            argumentTypeCache = prevCache;
+        }
     }
 
     /**
@@ -226,9 +240,7 @@
             setResult(that, cached.dup(that, env));
         } else {
             Z res = argumentTypeFactory.get();
-            if (cachePolicy == CachePolicy.CACHE) {
-                argumentTypeCache.put(pos, res);
-            }
+            argumentTypeCache.put(pos, res);
             setResult(that, res);
         }
     }
@@ -341,7 +353,7 @@
                 speculativeTypes.put(resultInfo, t);
                 return t;
             } else {
-                if (!env.info.isSpeculative && cachePolicy == CachePolicy.CACHE) {
+                if (!env.info.isSpeculative) {
                     argumentTypeCache.remove(new UniquePos(dt.tree));
                 }
                 return deferredAttr.basicCompleter.complete(dt, resultInfo, deferredAttrContext);
@@ -663,17 +675,4 @@
             return source.getFile().getName() + " @ " + source.getLineNumber(pos);
         }
     }
-
-    /**
-     * Argument type caching policy.
-     */
-    enum CachePolicy {
-        /** Cache argument types. */
-        CACHE,
-        /**
-         * Don't cache argument types. This is useful when performing speculative attribution on
-         * a tree that is known to contain erroneous info.
-         */
-        NO_CACHE;
-    }
 }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Wed Jul 05 20:52:37 2017 +0200
@@ -2215,7 +2215,7 @@
                 inferenceContext.addFreeTypeListener(List.of(tree.constructorType, tree.clazz.type),
                         instantiatedContext -> {
                             tree.constructorType = instantiatedContext.asInstType(tree.constructorType);
-                            clazz.type = instantiatedContext.asInstType(clazz.type);
+                            tree.clazz.type = clazz.type = instantiatedContext.asInstType(clazz.type);
                             ResultInfo prevResult = this.resultInfo;
                             try {
                                 this.resultInfo = resultInfoForClassDefinition;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Wed Jul 05 20:52:37 2017 +0200
@@ -808,7 +808,7 @@
      */
     List<Type> checkDiamondDenotable(ClassType t) {
         ListBuffer<Type> buf = new ListBuffer<>();
-        for (Type arg : t.getTypeArguments()) {
+        for (Type arg : t.allparams()) {
             if (!diamondTypeChecker.visit(arg, null)) {
                 buf.append(arg);
             }
@@ -831,7 +831,7 @@
                 if (t.isCompound()) {
                     return false;
                 }
-                for (Type targ : t.getTypeArguments()) {
+                for (Type targ : t.allparams()) {
                     if (!visit(targ, s)) {
                         return false;
                     }
@@ -842,13 +842,16 @@
             @Override
             public Boolean visitTypeVar(TypeVar t, Void s) {
                 /* Any type variable mentioned in the inferred type must have been declared as a type parameter
-                  (i.e cannot have been produced by capture conversion (5.1.10) or by inference (18.4)
+                  (i.e cannot have been produced by inference (18.4))
                 */
                 return t.tsym.owner.type.getTypeArguments().contains(t);
             }
 
             @Override
             public Boolean visitCapturedType(CapturedType t, Void s) {
+                /* Any type variable mentioned in the inferred type must have been declared as a type parameter
+                  (i.e cannot have been produced by capture conversion (5.1.10))
+                */
                 return false;
             }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java	Wed Jul 05 20:52:37 2017 +0200
@@ -29,7 +29,7 @@
 import com.sun.source.tree.NewClassTree;
 import com.sun.tools.javac.code.*;
 import com.sun.tools.javac.code.Type.TypeMapping;
-import com.sun.tools.javac.comp.ArgumentAttr.CachePolicy;
+import com.sun.tools.javac.comp.ArgumentAttr.LocalCacheContext;
 import com.sun.tools.javac.comp.Resolve.ResolveError;
 import com.sun.tools.javac.resources.CompilerProperties.Fragments;
 import com.sun.tools.javac.tree.*;
@@ -777,14 +777,14 @@
 
             boolean canLambdaBodyCompleteNormally(JCLambda tree) {
                 List<JCVariableDecl> oldParams = tree.params;
-                CachePolicy prevPolicy = argumentAttr.withCachePolicy(CachePolicy.NO_CACHE);
+                LocalCacheContext localCacheContext = argumentAttr.withLocalCacheContext();
                 try {
                     tree.params = tree.params.stream()
                             .map(vd -> make.VarDef(vd.mods, vd.name, make.Erroneous(), null))
                             .collect(List.collector());
                     return attribSpeculativeLambda(tree, env, attr.unknownExprInfo).canCompleteNormally;
                 } finally {
-                    argumentAttr.withCachePolicy(prevPolicy);
+                    localCacheContext.leave();
                     tree.params = oldParams;
                 }
             }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -1254,9 +1254,9 @@
         public int hashCode() {
             int result = opKind.hashCode();
             result *= 127;
-            result += types.hashCode(op1);
+            result += types.hashCode(op1, true);
             result *= 127;
-            result += types.hashCode(op2);
+            result += types.hashCode(op2, true);
             return result;
         }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -194,7 +194,7 @@
 
             dependencies.push((ClassSymbol) sym, CompletionCause.MEMBER_ENTER);
             try {
-                queue = completeClass.runPhase(List.of(typeEnvs.get((ClassSymbol) sym)));
+                queue = completeClass.completeEnvs(List.of(typeEnvs.get((ClassSymbol) sym)));
             } finally {
                 dependencies.pop();
             }
@@ -237,9 +237,22 @@
             this.next = next;
         }
 
-        public List<Env<AttrContext>> runPhase(List<Env<AttrContext>> envs) {
+        public final List<Env<AttrContext>> completeEnvs(List<Env<AttrContext>> envs) {
             boolean firstToComplete = queue.isEmpty();
 
+            doCompleteEnvs(envs);
+
+            if (firstToComplete) {
+                List<Env<AttrContext>> out = queue.toList();
+
+                queue.clear();
+                return next != null ? next.completeEnvs(out) : out;
+            } else {
+                return List.nil();
+            }
+        }
+
+        protected void doCompleteEnvs(List<Env<AttrContext>> envs) {
             for (Env<AttrContext> env : envs) {
                 JCClassDecl tree = (JCClassDecl)env.tree;
 
@@ -249,7 +262,7 @@
                 DiagnosticPosition prevLintPos = deferredLintHandler.setPos(tree.pos());
                 try {
                     dependencies.push(env.enclClass.sym, phaseName);
-                    doRunPhase(env);
+                    runPhase(env);
                 } catch (CompletionFailure ex) {
                     chk.completionError(tree.pos(), ex);
                 } finally {
@@ -258,18 +271,9 @@
                     log.useSource(prev);
                 }
             }
-
-            if (firstToComplete) {
-                List<Env<AttrContext>> out = queue.toList();
+        }
 
-                queue.clear();
-                return next != null ? next.runPhase(out) : out;
-            } else {
-                return List.nil();
-            }
-       }
-
-        protected abstract void doRunPhase(Env<AttrContext> env);
+        protected abstract void runPhase(Env<AttrContext> env);
     }
 
     private final ImportsPhase completeClass = new ImportsPhase();
@@ -289,7 +293,7 @@
                 (imp, cf) -> chk.completionError(imp.pos(), cf);
 
         @Override
-        protected void doRunPhase(Env<AttrContext> env) {
+        protected void runPhase(Env<AttrContext> env) {
             JCClassDecl tree = env.enclClass;
             ClassSymbol sym = tree.sym;
 
@@ -699,14 +703,29 @@
             }
     }
 
-    private final class HierarchyPhase extends AbstractHeaderPhase {
+    private final class HierarchyPhase extends AbstractHeaderPhase implements Completer {
 
         public HierarchyPhase() {
             super(CompletionCause.HIERARCHY_PHASE, new HeaderPhase());
         }
 
         @Override
-        protected void doRunPhase(Env<AttrContext> env) {
+        protected void doCompleteEnvs(List<Env<AttrContext>> envs) {
+            //The ClassSymbols in the envs list may not be in the dependency order.
+            //To get proper results, for every class or interface C, the supertypes of
+            //C must be processed by the HierarchyPhase phase before C.
+            //To achieve that, the HierarchyPhase is registered as the Completer for
+            //all the classes first, and then all the classes are completed.
+            for (Env<AttrContext> env : envs) {
+                env.enclClass.sym.completer = this;
+            }
+            for (Env<AttrContext> env : envs) {
+                env.enclClass.sym.complete();
+            }
+        }
+
+        @Override
+        protected void runPhase(Env<AttrContext> env) {
             JCClassDecl tree = env.enclClass;
             ClassSymbol sym = tree.sym;
             ClassType ct = (ClassType)sym.type;
@@ -760,6 +779,14 @@
                 }
                 return false;
             }
+
+        @Override
+        public void complete(Symbol sym) throws CompletionFailure {
+            Env<AttrContext> env = typeEnvs.get((ClassSymbol) sym);
+
+            super.doCompleteEnvs(List.of(env));
+        }
+
     }
 
     private final class HeaderPhase extends AbstractHeaderPhase {
@@ -769,7 +796,7 @@
         }
 
         @Override
-        protected void doRunPhase(Env<AttrContext> env) {
+        protected void runPhase(Env<AttrContext> env) {
             JCClassDecl tree = env.enclClass;
             ClassSymbol sym = tree.sym;
             ClassType ct = (ClassType)sym.type;
@@ -824,7 +851,7 @@
         }
 
         @Override
-        protected void doRunPhase(Env<AttrContext> env) {
+        protected void runPhase(Env<AttrContext> env) {
             JCClassDecl tree = env.enclClass;
             ClassSymbol sym = tree.sym;
             ClassType ct = (ClassType)sym.type;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -320,9 +320,9 @@
 
 javac.msg.bug=\
 An exception has occurred in the compiler ({0}). \
-Please file a bug at the Java Bug Database (http://bugreport.java.com/bugreport/) \
-after checking the database for duplicates. \
-Include your program and the following diagnostic in your report.  Thank you.
+Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) \
+after checking the Bug Database (http://bugs.java.com) for duplicates. \
+Include your program and the following diagnostic in your report. Thank you.
 
 javac.msg.io=\
 \n\nAn input/output error occurred.\n\
--- a/langtools/test/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTestBase.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTestBase.java	Wed Jul 05 20:52:37 2017 +0200
@@ -23,6 +23,7 @@
 
 import com.sun.tools.classfile.*;
 
+import java.nio.file.Paths;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -62,6 +63,7 @@
         boolean failed = false;
         for (TestCase testCase : testCases) {
             try {
+                writeToFileIfEnabled(Paths.get(testCase.getName() + ".java"), testCase.src);
                 Set<Integer> coveredLines = new HashSet<>();
                 for (JavaFileObject file : compile(testCase.src).getClasses().values()) {
                     ClassFile classFile = ClassFile.read(file.openInputStream());
--- a/langtools/test/tools/javac/classfiles/attributes/annotations/AnnotationsTestBase.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/annotations/AnnotationsTestBase.java	Wed Jul 05 20:52:37 2017 +0200
@@ -218,7 +218,7 @@
                 String source = testCase.generateSource();
                 Path sourceFile = Paths.get(getClass().getSimpleName() + i + ".java");
                 addTestCase(sourceFile.toAbsolutePath().toString());
-                writeToFile(sourceFile, source);
+                writeToFileIfEnabled(sourceFile, source);
                 echo("Testing: " + sourceFile.toString());
                 try {
                     test(testCase, compile(source).getClasses());
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesTestBase.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesTestBase.java	Wed Jul 05 20:52:37 2017 +0200
@@ -26,8 +26,10 @@
 import com.sun.tools.classfile.InnerClasses_attribute;
 import com.sun.tools.classfile.InnerClasses_attribute.Info;
 
+import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -87,8 +89,13 @@
      */
     public void test(String classToTest, String...skipClasses) throws TestFailedException {
         try {
-            for (TestCase test : generateTestCases()) {
-                addTestCase(test.getSource());
+            String testName = getClass().getName();
+            List<TestCase> testCases = generateTestCases();
+            for (int i = 0; i < testCases.size(); ++i) {
+                TestCase test = testCases.get(i);
+                String testCaseName = testName + i + ".java";
+                addTestCase(testCaseName);
+                writeToFileIfEnabled(Paths.get(testCaseName), test.getSource());
                 test(classToTest, test, skipClasses);
             }
         } catch (Exception e) {
@@ -330,7 +337,7 @@
                     list.add(Arrays.asList(access, mod1, mod2));
                 }
                 if (mod1 == Modifier.EMPTY) {
-                    list.add(Arrays.asList(access));
+                    list.add(Collections.singletonList(access));
                 }
             }
         }
@@ -413,7 +420,7 @@
 
         private final String classType;
 
-        private ClassType(String clazz) {
+        ClassType(String clazz) {
             this.classType = clazz;
         }
 
@@ -435,7 +442,7 @@
 
         private final String str;
 
-        private Modifier(String str) {
+        Modifier(String str) {
             this.str = str;
         }
 
--- a/langtools/test/tools/javac/classfiles/attributes/lib/TestBase.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/lib/TestBase.java	Wed Jul 05 20:52:37 2017 +0200
@@ -44,6 +44,7 @@
 public class TestBase {
 
     public static final String LINE_SEPARATOR = System.lineSeparator();
+    public static final boolean isDumpOfSourceEnabled = Boolean.getBoolean("dump.src");
 
     private <S> InMemoryFileManager compile(
             List<String> options,
@@ -176,7 +177,9 @@
      * @throws ConstantPoolException if constant pool error occurs
      */
     public ClassFile readClassFile(File file) throws IOException, ConstantPoolException {
-        return readClassFile(new FileInputStream(file));
+        try (InputStream is = new FileInputStream(file)) {
+            return readClassFile(is);
+        }
     }
 
     public void assertEquals(Object actual, Object expected, String message) {
@@ -215,6 +218,14 @@
         }
     }
 
+    public void writeToFileIfEnabled(Path path, String source) throws IOException {
+        if (isDumpOfSourceEnabled) {
+            writeToFile(path, source);
+        } else {
+            System.err.println("Source dumping disabled. To enable, run the test with '-Ddump.src=true'");
+        }
+    }
+
     public File getSourceDir() {
         return new File(System.getProperty("test.src", "."));
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg21.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,15 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8132535
+ * @summary Compiler fails with diamond anonymous class creation with intersection bound of enclosing class.
+ * @compile/fail/ref=Neg21.out Neg21.java -XDrawDiagnostics
+ */
+
+public class Neg21 <T extends java.io.Serializable & Cloneable> {
+
+    class A <X>{}
+
+    public void foo(){
+        new Neg21<>().new A<>(){} ;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg21.out	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,2 @@
+Neg21.java:13:28: compiler.err.cant.apply.diamond.1: (compiler.misc.diamond: Neg21.A), (compiler.misc.diamond.invalid.arg: java.lang.Object&java.io.Serializable&java.lang.Cloneable, (compiler.misc.diamond: Neg21.A))
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg22.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,21 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8132535
+ * @summary Compiler fails with diamond anonymous class creation with intersection bound of enclosing class.
+ * @compile/fail/ref=Neg22.out Neg22.java -XDrawDiagnostics
+ */
+
+public class Neg22  {
+
+    class Outer<X extends Runnable & java.io.Serializable> {
+        class Inner<Y> { }
+    }
+
+    class Box<Z> {
+        Box(Z z) { }
+    }
+
+    {
+        new Box<>(new Outer<>().new Inner<>()) { };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg22.out	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,2 @@
+Neg22.java:19:16: compiler.err.cant.apply.diamond.1: (compiler.misc.diamond: Neg22.Box), (compiler.misc.diamond.invalid.arg: Neg22.Outer<java.lang.Object&java.io.Serializable&java.lang.Runnable>.Inner<java.lang.Object>, (compiler.misc.diamond: Neg22.Box))
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg23.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,12 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8132535
+ * @summary Compiler fails with diamond anonymous class creation with intersection bound of enclosing class.
+ * @compile/fail/ref=Neg23.out Neg23.java -XDrawDiagnostics
+ */
+
+public class Neg23  {
+    {
+        new pkg.Neg23_01<>().new Inner<>();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg23.out	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,2 @@
+Neg23.java:10:39: compiler.err.not.def.public.cant.access: pkg.Neg23_02, pkg
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/pkg/Neg23_01.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+public class Neg23_01<X extends Neg23_02> {
+    public class Inner<Y> { }
+}
+
+class Neg23_02 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/pos/Pos08.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8133135
+ *
+ * @summary Compiler internall error (NPE) on anonymous class defined by qualified instance creation expression with diamond
+ * @author sadayapalam
+ * @compile Pos08.java
+ *
+ */
+
+class Pos08 {
+
+    static class List<T> {
+    }
+
+    static class FooOuter {
+        class Foo<T> {
+            public Foo(){}
+        }
+    }
+
+    public static <T> List<T> m(List<T> list, T item) {
+        return list;
+    }
+
+
+    public static void run() {
+        m(new List<FooOuter.Foo<String>>(), new FooOuter().new Foo<>(){ });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8075274/C.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package P.Q;
+
+public class C extends D {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8075274/D.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package P.Q;
+
+public class D {
+  public interface I {
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8075274/Outer.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8075274
+ * @summary Ensuring order of imports or inputs does not affect compilability of the sources
+ * @compile C.java D.java Outer.java
+ * @compile C.java Outer.java D.java
+ * @compile D.java C.java Outer.java
+ * @compile D.java Outer.java C.java
+ * @compile Outer.java D.java C.java
+ * @compile Outer.java C.java D.java
+ */
+package P;
+
+import static P.Outer.Nested.*;
+import static P.Q.C.*;
+
+public class Outer {
+  public static class Nested implements I {
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8133235/A.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8133235
+ * @summary Ensuring order of inputs does not affect compilability of the sources
+ * @compile A.java B.java C.java D.java
+ * @compile A.java B.java D.java C.java
+ * @compile A.java C.java B.java D.java
+ * @compile A.java C.java D.java B.java
+ * @compile A.java D.java B.java C.java
+ * @compile A.java D.java C.java B.java
+ * @compile D.java A.java B.java C.java
+ * @compile D.java A.java C.java B.java
+ * @compile D.java B.java A.java C.java
+ * @compile D.java B.java C.java A.java
+ * @compile D.java C.java B.java A.java
+ * @compile D.java C.java A.java B.java
+ */
+package pkg;
+
+public class A {
+  public interface One {
+      public interface N2 {
+          public class N3 { }
+      }
+
+      public class Foo extends D {}
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8133235/B.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+import pkg.A;
+
+public class B extends A {
+  public static interface Two {
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8133235/C.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+import pkg.B.Two;
+
+public class C implements B.One {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8133235/D.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+import static pkg.C.*;
+
+public class D implements C.N2 {
+}
--- a/make/Main.gmk	Wed Jul 05 20:51:37 2017 +0200
+++ b/make/Main.gmk	Wed Jul 05 20:52:37 2017 +0200
@@ -72,9 +72,6 @@
 interim-langtools:
 	+($(CD) $(LANGTOOLS_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterim.gmk)
 
-interim-corba:
-	+($(CD) $(CORBA_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterim.gmk)
-
 interim-rmic:
 	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk)
 
@@ -84,7 +81,7 @@
 buildtools-jdk:
 	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Tools.gmk java-tools)
 
-ALL_TARGETS += buildtools-langtools interim-langtools interim-corba \
+ALL_TARGETS += buildtools-langtools interim-langtools \
     interim-rmic interim-cldrconverter buildtools-jdk
 
 ################################################################################
@@ -357,13 +354,11 @@
 
   $(JDK_GENSRC_TARGETS): interim-langtools buildtools-jdk
 
-  interim-corba: $(CORBA_GENSRC_TARGETS)
-
   $(GENDATA_TARGETS): interim-langtools buildtools-jdk
 
   interim-rmic: interim-langtools
 
-  $(RMIC_TARGETS): interim-langtools interim-corba interim-rmic
+  $(RMIC_TARGETS): interim-langtools interim-rmic
 
   $(JAVA_TARGETS): interim-langtools
 
@@ -463,7 +458,7 @@
 ################################################################################
 # Virtual targets without recipes
 
-buildtools: buildtools-langtools interim-langtools interim-corba interim-rmic \
+buildtools: buildtools-langtools interim-langtools interim-rmic \
     buildtools-jdk
 
 gensrc: $(GENSRC_TARGETS)
--- a/make/StripBinaries.gmk	Wed Jul 05 20:51:37 2017 +0200
+++ b/make/StripBinaries.gmk	Wed Jul 05 20:52:37 2017 +0200
@@ -38,13 +38,13 @@
 MODULES_CMDS_STRIPPED := $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped
 MODULES_LIBS_STRIPPED := $(SUPPORT_OUTPUTDIR)/modules_libs-stripped
 
-ifneq ($(POST_STRIP_CMD), )
+ifneq ($(STRIP), )
   define StripRecipe
 	$(ECHO) Stripping $(LOG_INFO) $(patsubst $(OUTPUT_ROOT)/%,%,$<)
 	$(MKDIR) -p $(@D)
 	$(CP) $< $@.tmp
 	$(CHMOD) u+w $@.tmp
-	$(POST_STRIP_CMD) $@.tmp
+	$(STRIP) $(STRIPFLAGS) $@.tmp
 	$(CHMOD) go-w $@.tmp
 	$(MV) $@.tmp $@
   endef
--- a/make/common/JavaCompilation.gmk	Wed Jul 05 20:51:37 2017 +0200
+++ b/make/common/JavaCompilation.gmk	Wed Jul 05 20:52:37 2017 +0200
@@ -122,9 +122,9 @@
       $1_GREP_INCLUDES:=| ( $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS)) \
           || test "$$$$?" = "1" )
     else
-      $1_GREP_INCLUDE_OUTPUT:=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include $$(NEWLINE) \
-          $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS,\n, \
-          >> $$($1_BIN)/_the.$$($1_JARNAME)_include)
+      $1_GREP_INCLUDE_OUTPUT = \
+          $$(eval $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS, \
+              $$($1_BIN)/_the.$$($1_JARNAME)_include))
       $1_GREP_INCLUDES:=| ( $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include \
           || test "$$$$?" = "1" )
     endif
@@ -138,9 +138,9 @@
       $1_GREP_EXCLUDES:=| ( $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS)) \
           || test "$$$$?" = "1" )
     else
-      $1_GREP_EXCLUDE_OUTPUT=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude $$(NEWLINE) \
-          $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS,\n, \
-          >> $$($1_BIN)/_the.$$($1_JARNAME)_exclude)
+      $1_GREP_EXCLUDE_OUTPUT = \
+          $$(eval $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS, \
+              $$($1_BIN)/_the.$$($1_JARNAME)_exclude))
       $1_GREP_EXCLUDES:=| ( $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude \
           || test "$$$$?" = "1" )
     endif
@@ -190,13 +190,12 @@
   # The EXTRA_FILES_RESOLVED varible must be set in the macro so that it's evaluated
   # in the recipe when the files are guaranteed to exist.
   $1_CAPTURE_EXTRA_FILES=\
-      $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_contents.extra $$(NEWLINE) \
-      $$(eval $1_EXTRA_FILES_RESOLVED:=$$(call DoubleDollar, $$(call DoubleDollar, \
+      $$(eval $1_EXTRA_FILES_RESOLVED:=$$(call DoubleDollar, \
           $$(wildcard $$(foreach src, $$($1_SRCS), \
-          $$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES))))) \
+          $$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES)))) \
       $$(if $$($1_EXTRA_FILES_RESOLVED), \
-        $$(call ListPathsSafely,$1_EXTRA_FILES_RESOLVED,\n, \
-            >> $$($1_BIN)/_the.$$($1_JARNAME)_contents.extra) $$(NEWLINE) \
+        $$(eval $$(call ListPathsSafely,$1_EXTRA_FILES_RESOLVED, \
+            $$($1_BIN)/_the.$$($1_JARNAME)_contents.extra)) \
         $(SED) $$(foreach src,$$($1_SRCS), -e 's|$$(src)/|-C $$(src) |g') \
             $$($1_BIN)/_the.$$($1_JARNAME)_contents.extra \
             >> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE))
@@ -577,7 +576,7 @@
 
     $$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
 	$(MKDIR) -p $$(@D) $$(dir $$($1_SJAVAC_PORTFILE))
-	$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.$1_batch.tmp)
+	$$(eval $$(call ListPathsSafely,$1_SRCS, $$($1_BIN)/_the.$1_batch.tmp))
 	$(ECHO) Compiling $1
 	$(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch.log, $$($1_SAFE_NAME), \
 	    $$($1_JVM) $$($1_SJAVAC) \
@@ -636,8 +635,7 @@
     # When not using sjavac, pass along all sources to javac using an @file.
     $$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
 	$(MKDIR) -p $$(@D)
-	$(RM) $$($1_BIN)/_the.$1_batch $$($1_BIN)/_the.$1_batch.tmp
-	$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.$1_batch.tmp)
+	$$(eval $$(call ListPathsSafely,$1_SRCS, $$($1_BIN)/_the.$1_batch.tmp))
 	$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.$1_batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
 	$(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch.log, $$($1_SAFE_NAME), \
 	    $$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) \
--- a/make/common/MakeBase.gmk	Wed Jul 05 20:51:37 2017 +0200
+++ b/make/common/MakeBase.gmk	Wed Jul 05 20:52:37 2017 +0200
@@ -64,6 +64,11 @@
 
 endef
 
+# In GNU Make 4.0 and higher, there is a file function for writing to files.
+ifeq (4.0, $(firstword $(sort 4.0 $(MAKE_VERSION))))
+  HAS_FILE_FUNCTION := true
+endif
+
 ##############################
 # Functions
 ##############################
@@ -122,266 +127,111 @@
 DoubleDollar = $(subst $$,$$$$,$(strip $1))
 
 ################################################################################
+# ListPathsSafely can be used to print command parameters to a file. This is
+# typically done if the command line lenght risk being too long for the
+# OS/shell. In later make versions, the file function can be used for this
+# purpose. For earlier versions, a more complex implementation is provided.
+#
+# The function ListPathsSafely can be called either directly or, more commonly
+# from a recipe line. If called from a recipe, it will be executed in the
+# evaluation phase of that recipe, which means that it will write to the file
+# before any other line in the recipe has been run.
+ifeq ($(HAS_FILE_FUNCTION), true)
+  # Param 1 - Name of variable containing paths/arguments to output
+  # Param 2 - File to print to
+  # Param 3 - Set to true to append to file instead of overwriting
+  define ListPathsSafely
+    $$(call MakeDir, $$(dir $$(strip $2)))
+    $$(file $$(if $$(filter true, $$(strip $3)),>>,>) \
+        $$(strip $2),$$(subst $$(SPACE),$$(NEWLINE),$$(strip $$($$(strip $1)))))
+  endef
 
-# If the variable that you want to send to stdout for piping into a file or otherwise,
-# is potentially long, for example the a list of file paths, eg a list of all package directories.
-# Then you need to use ListPathsSafely, which optimistically splits the output into several shell
-# calls as well as use compression on recurrent file paths segments, to get around the potential
-# command line length problem that exists in cygwin and other shells.
-compress_pre:=$(strip $(shell $(CAT) $(SRC_ROOT)/make/common/support/ListPathsSafely-pre-compress.incl))
-compress_post:=$(strip $(shell $(CAT) $(SRC_ROOT)/make/common/support/ListPathsSafely-post-compress.incl))
-compress_paths=$(compress_pre)\
+else # HAS_FILE_FUNCTION
+
+  $(eval compress_paths = \
+      $(strip $(shell $(CAT) $(SRC_ROOT)/make/common/support/ListPathsSafely-pre-compress.incl)))
+  compress_paths += \
 $(subst $(SRC_ROOT),X97,\
 $(subst $(OUTPUT_ROOT),X98,\
 $(subst X,X00,\
-$(subst $(SPACE),\n,$(strip $1)))))\
-$(compress_post)
-
-decompress_paths=$(SED) -f $(SRC_ROOT)/make/common/support/ListPathsSafely-uncompress.sed -e 's|X99|\\n|g' \
-    -e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
-    -e 's|X00|X|g' | tr '\n' '$2'
-
-define ListPathsSafely_If
-	$(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(wordlist $3,$4,$($1)))))
-endef
-
-define ListPathsSafely_Printf
-	$(if $(strip $($1_LPS$4)),$(if $(findstring $(LOG_LEVEL),trace),,@)printf \
-	    -- "$(strip $(call EscapeDollar, $($1_LPS$4)))\n" | $(decompress_paths) $3)
-endef
-
-# Receipt example:
-#   rm -f thepaths
-#   $(call ListPathsSafely,THEPATHS,\n, >> thepaths)
-# The \n argument means translate spaces into \n
-# if instead , , (a space) is supplied, then spaces remain spaces.
-define ListPathsSafely
-	$(if $(word 16001,$($1)),$(error Cannot list safely more than 16000 paths. $1 has $(words $($1)) paths!))
-	$(ECHO) $(LOG_DEBUG) Writing $(words $($1)) paths to '$3'
-	$(call ListPathsSafely_If,$1,$2,1,250)
-	$(call ListPathsSafely_If,$1,$2,251,500)
-	$(call ListPathsSafely_If,$1,$2,501,750)
-	$(call ListPathsSafely_If,$1,$2,751,1000)
-
-	$(call ListPathsSafely_If,$1,$2,1001,1250)
-	$(call ListPathsSafely_If,$1,$2,1251,1500)
-	$(call ListPathsSafely_If,$1,$2,1501,1750)
-	$(call ListPathsSafely_If,$1,$2,1751,2000)
-
-	$(call ListPathsSafely_If,$1,$2,2001,2250)
-	$(call ListPathsSafely_If,$1,$2,2251,2500)
-	$(call ListPathsSafely_If,$1,$2,2501,2750)
-	$(call ListPathsSafely_If,$1,$2,2751,3000)
-
-	$(call ListPathsSafely_If,$1,$2,3001,3250)
-	$(call ListPathsSafely_If,$1,$2,3251,3500)
-	$(call ListPathsSafely_If,$1,$2,3501,3750)
-	$(call ListPathsSafely_If,$1,$2,3751,4000)
+      $(subst $(SPACE),\n,$(strip $1)))))
+  $(eval compress_paths += \
+      $(strip $(shell $(CAT) $(SRC_ROOT)/make/common/support/ListPathsSafely-post-compress.incl)))
 
-	$(call ListPathsSafely_If,$1,$2,4001,4250)
-	$(call ListPathsSafely_If,$1,$2,4251,4500)
-	$(call ListPathsSafely_If,$1,$2,4501,4750)
-	$(call ListPathsSafely_If,$1,$2,4751,5000)
-
-	$(call ListPathsSafely_If,$1,$2,5001,5250)
-	$(call ListPathsSafely_If,$1,$2,5251,5500)
-	$(call ListPathsSafely_If,$1,$2,5501,5750)
-	$(call ListPathsSafely_If,$1,$2,5751,6000)
-
-	$(call ListPathsSafely_If,$1,$2,6001,6250)
-	$(call ListPathsSafely_If,$1,$2,6251,6500)
-	$(call ListPathsSafely_If,$1,$2,6501,6750)
-	$(call ListPathsSafely_If,$1,$2,6751,7000)
-
-	$(call ListPathsSafely_If,$1,$2,7001,7250)
-	$(call ListPathsSafely_If,$1,$2,7251,7500)
-	$(call ListPathsSafely_If,$1,$2,7501,7750)
-	$(call ListPathsSafely_If,$1,$2,7751,8000)
-
-	$(call ListPathsSafely_If,$1,$2,8001,8250)
-	$(call ListPathsSafely_If,$1,$2,8251,8500)
-	$(call ListPathsSafely_If,$1,$2,8501,8750)
-	$(call ListPathsSafely_If,$1,$2,8751,9000)
-
-	$(call ListPathsSafely_If,$1,$2,9001,9250)
-	$(call ListPathsSafely_If,$1,$2,9251,9500)
-	$(call ListPathsSafely_If,$1,$2,9501,9750)
-	$(call ListPathsSafely_If,$1,$2,9751,10000)
-
-	$(call ListPathsSafely_If,$1,$2,10001,10250)
-	$(call ListPathsSafely_If,$1,$2,10251,10500)
-	$(call ListPathsSafely_If,$1,$2,10501,10750)
-	$(call ListPathsSafely_If,$1,$2,10751,11000)
-
-	$(call ListPathsSafely_If,$1,$2,11001,11250)
-	$(call ListPathsSafely_If,$1,$2,11251,11500)
-	$(call ListPathsSafely_If,$1,$2,11501,11750)
-	$(call ListPathsSafely_If,$1,$2,11751,12000)
-
-	$(call ListPathsSafely_If,$1,$2,12001,12250)
-	$(call ListPathsSafely_If,$1,$2,12251,12500)
-	$(call ListPathsSafely_If,$1,$2,12501,12750)
-	$(call ListPathsSafely_If,$1,$2,12751,13000)
-
-	$(call ListPathsSafely_If,$1,$2,13001,13250)
-	$(call ListPathsSafely_If,$1,$2,13251,13500)
-	$(call ListPathsSafely_If,$1,$2,13501,13750)
-	$(call ListPathsSafely_If,$1,$2,13751,14000)
+  decompress_paths=$(SED) -f $(SRC_ROOT)/make/common/support/ListPathsSafely-uncompress.sed \
+      -e 's|X99|\\n|g' \
+    -e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
+      -e 's|X00|X|g'
 
-	$(call ListPathsSafely_If,$1,$2,14001,14250)
-	$(call ListPathsSafely_If,$1,$2,14251,14500)
-	$(call ListPathsSafely_If,$1,$2,14501,14750)
-	$(call ListPathsSafely_If,$1,$2,14751,15000)
-
-	$(call ListPathsSafely_If,$1,$2,15001,15250)
-	$(call ListPathsSafely_If,$1,$2,15251,15500)
-	$(call ListPathsSafely_If,$1,$2,15501,15750)
-	$(call ListPathsSafely_If,$1,$2,15751,16000)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,1)
-	$(call ListPathsSafely_Printf,$1,$2,$3,251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,1001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,1251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,1501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,1751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,2001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,2251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,2501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,2751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,3001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,3251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,3501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,3751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,4001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,4251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,4501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,4751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,5001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,5251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,5501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,5751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,6001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,6251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,6501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,6751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,7001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,7251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,7501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,7751)
+  ListPathsSafely_IfPrintf = \
+      $(if $(word $3,$($(strip $1))), \
+          $(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \
+              $(call compress_paths, $(wordlist $3,$4,$($(strip $1))))))\n" \
+              | $(decompress_paths) >> $2))
 
-	$(call ListPathsSafely_Printf,$1,$2,$3,8001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,8251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,8501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,8751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,9001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,9251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,9501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,9751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,10001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,10251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,10501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,10751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,11001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,11251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,11501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,11751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,12001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,12251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,12501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,12751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,13001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,13251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,13501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,13751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,14001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,14251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,14501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,14751)
-
-	$(call ListPathsSafely_Printf,$1,$2,$3,15001)
-	$(call ListPathsSafely_Printf,$1,$2,$3,15251)
-	$(call ListPathsSafely_Printf,$1,$2,$3,15501)
-	$(call ListPathsSafely_Printf,$1,$2,$3,15751)
-endef
-
-define ListPathsSafelyNow_IfPrintf
-  ifneq (,$$(word $4,$$($1)))
-    $$(eval $1_LPS$4:=$$(call compress_paths,$$(wordlist $4,$5,$$($1))))
-    $$(shell printf -- "$$(strip $$($1_LPS$4))\n" | $(decompress_paths) $3)
-  endif
-endef
-
-# And an non-receipt version:
-define ListPathsSafelyNow
+  # Param 1 - Name of variable containing paths/arguments to output
+  # Param 2 - File to print to
+  # Param 3 - Set to true to append to file instead of overwriting
+define ListPathsSafely
   ifneq (,$$(word 10001,$$($1)))
     $$(error Cannot list safely more than 10000 paths. $1 has $$(words $$($1)) paths!)
   endif
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1,250)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,251,500)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,501,750)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,751,1000)
+    $$(call MakeDir, $$(dir $2))
+    ifneq ($$(strip $3), true)
+      $$(shell $(RM) $$(strip $2))
+    endif
 
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1001,1250)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1251,1500)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1501,1750)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1751,2000)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,1,250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,251,500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,501,750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,751,1000)
 
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2001,2250)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2251,2500)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2501,2750)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2751,3000)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,1001,1250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,1251,1500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,1501,1750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,1751,2000)
 
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3001,3250)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3251,3500)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3501,3750)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3751,4000)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,2001,2250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,2251,2500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,2501,2750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,2751,3000)
 
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4001,4250)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4251,4500)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4501,4750)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4751,5000)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,3001,3250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,3251,3500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,3501,3750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,3751,4000)
 
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5001,5250)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5251,5500)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5501,5750)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5751,6000)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,4001,4250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,4251,4500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,4501,4750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,4751,5000)
 
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6001,6250)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6251,6500)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6501,6750)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6751,7000)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,5001,5250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,5251,5500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,5501,5750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,5751,6000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,6001,6250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,6251,6500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,6501,6750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,6751,7000)
 
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7001,7250)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7251,7500)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7501,7750)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7751,8000)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,7001,7250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,7251,7500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,7501,7750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,7751,8000)
 
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8001,8250)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8251,8500)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8501,8750)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8751,9000)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,8001,8250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,8251,8500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,8501,8750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,8751,9000)
 
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9001,9250)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9251,9500)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9501,9750)
-  $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9751,10000)
-
+    $$(call ListPathsSafely_IfPrintf,$1,$2,9001,9250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,9251,9500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,9501,9750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,9751,10000)
 endef
+endif # HAS_FILE_FUNCTION
 
 # The source tips can come from the Mercurial repository, or in the files
 # $(HGTIP_FILENAME) which contains the tip but is also positioned in the same
@@ -674,6 +524,10 @@
   $3 += $2
 endef
 
+# Returns the value of the first argument
+identity = \
+    $(strip $1)
+
 # Setup make rules for copying files, with an option to do more complex
 # processing instead of copying.
 #
@@ -688,6 +542,8 @@
 #   FLATTEN : Set to flatten the directory structure in the DEST dir.
 #   MACRO   : Optionally override the default macro used for making the copy.
 #             Default is 'install-file'
+#   NAME_MACRO : Optionally supply a macro that rewrites the target file name
+#                based on the source file name
 SetupCopyFiles = $(NamedParamsMacroTemplate)
 define SetupCopyFilesBody
 
@@ -700,12 +556,17 @@
     $1_SRC := $$(dir $$(firstword $$($1_FILES)))
   endif
 
+  ifeq ($$($1_NAME_MACRO), )
+    $1_NAME_MACRO := identity
+  endif
+
   # Remove any trailing slash from SRC
   $1_SRC := $$(patsubst %/,%,$$($1_SRC))
 
   $$(foreach f, $$(patsubst $$($1_SRC)/%,%,$$($1_FILES)), \
       $$(eval $$(call AddFileToCopy, $$($1_SRC)/$$f, \
-      $$($1_DEST)/$$(if $$($1_FLATTEN),$$(notdir $$f),$$f), $1, $$($1_MACRO))))
+      $$($1_DEST)/$$(call $$(strip $$($1_NAME_MACRO)),$$(if $$($1_FLATTEN),$$(notdir $$f),$$f)), \
+      $1, $$($1_MACRO))))
 
 endef
 
@@ -727,9 +588,14 @@
 
 # Param 1 - Text to write
 # Param 2 - File to write to
+ifeq ($(HAS_FILE_FUNCTION), true)
+  WriteFile = \
+      $(file >$2,$(strip $1))
+else
 # Use printf to get consistent behavior on all platforms.
 WriteFile = \
     $(shell $(PRINTF) "%s" $(call ShellQuote, $1) > $2)
+endif
 
 ################################################################################
 # DependOnVariable
@@ -767,15 +633,16 @@
 # Param 1 - Name of variable
 # Param 2 - (optional) name of file to store value in
 DependOnVariableHelper = \
-    $(strip $(if $(and $(wildcard $(call DependOnVariableFileName, $1, $2)),\
-        $(call equals, $(strip $($1)), \
-            $(call ReadFile, $(call DependOnVariableFileName, $1, $2)))),,\
-      $(call MakeDir, $(dir $(call DependOnVariableFileName, $1, $2))) \
-      $(if $(findstring $(LOG_LEVEL), trace), \
-          $(info Variable $1: >$(strip $($1))<) \
-          $(info File: >$(call ReadFile, $(call DependOnVariableFileName, $1, $2))<)) \
-      $(call WriteFile, $($1), $(call DependOnVariableFileName, $1, $2))) \
-    $(call DependOnVariableFileName, $1, $2))
+    $(strip \
+        $(eval -include $(call DependOnVariableFileName, $1, $2)) \
+        $(if $(call equals, $(strip $($1)), $(strip $($1_old))),,\
+          $(call MakeDir, $(dir $(call DependOnVariableFileName, $1, $2))) \
+          $(if $(findstring $(LOG_LEVEL), trace), \
+              $(info NewVariable $1: >$(strip $($1))<) \
+              $(info OldVariable $1: >$(strip $($1_old))<)) \
+          $(call WriteFile, $1_old:=$($1), $(call DependOnVariableFileName, $1, $2))) \
+        $(call DependOnVariableFileName, $1, $2) \
+    )
 
 # Main macro
 # Param 1 - Name of variable
--- a/make/common/NativeCompilation.gmk	Wed Jul 05 20:51:37 2017 +0200
+++ b/make/common/NativeCompilation.gmk	Wed Jul 05 20:52:37 2017 +0200
@@ -49,6 +49,7 @@
 #   AS - Assembler
 #   MT - Windows MT tool
 #   RC - Windows RC tool
+#   STRIP - The tool to use for stripping debug symbols
 #   SYSROOT_CFLAGS - Compiler flags for using the specific sysroot
 #   SYSROOT_LDFLAGS - Linker flags for using the specific sysroot
 DefineNativeToolchain = $(NamedParamsMacroTemplate)
@@ -64,6 +65,7 @@
     $$(call SetIfEmpty, $1_AS, $$($$($1_EXTENDS)_AS))
     $$(call SetIfEmpty, $1_MT, $$($$($1_EXTENDS)_MT))
     $$(call SetIfEmpty, $1_RC, $$($$($1_EXTENDS)_RC))
+    $$(call SetIfEmpty, $1_STRIP, $$($$($1_EXTENDS)_STRIP))
     $$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $$($$($1_EXTENDS)_SYSROOT_CFLAGS))
     $$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $$($$($1_EXTENDS)_SYSROOT_LDFLAGS))
   endif
@@ -78,6 +80,7 @@
     AS := $(AS), \
     MT := $(MT), \
     RC := $(RC), \
+    STRIP := $(STRIP), \
     SYSROOT_CFLAGS := $(SYSROOT_CFLAGS), \
     SYSROOT_LDFLAGS := $(SYSROOT_LDFLAGS), \
 ))
@@ -211,23 +214,25 @@
 	    $(call LogFailures, $$($1_$2_OBJ).log, $$($1_SAFE_NAME)_$$(notdir $2), \
 	        $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2)
           endif
+          # Create a dependency target file from the dependency file.
+          # Solution suggested by http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
+          ifneq ($$($1_$2_DEP),)
+	    $(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_$2_DEP) > $$($1_$2_DEP_TARGETS)
+          endif
         else
           # The Visual Studio compiler lacks a feature for generating make dependencies, but by
           # setting -showIncludes, all included files are printed. These are filtered out and
           # parsed into make dependences.
+          # Keep as much as possible on one execution line for best performance on Windows
 	  ($(call LogFailures, $$($1_$2_OBJ).log, $$($1_SAFE_NAME)_$$(notdir $2), \
 	      $$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \
 	          $(CC_OUT_OPTION)$$($1_$2_OBJ) $2) ; echo $$$$? > $$($1_$2_DEP).exitvalue) \
 	      | $(TEE) $$($1_$2_DEP).raw | $(GREP) -v -e "^Note: including file:" \
 	          -e "^$(notdir $2)$$$$" || test "$$$$?" = "1" ; \
-	      exit `cat $$($1_$2_DEP).exitvalue`
-	  $(RM) $$($1_$2_DEP).exitvalue
-	  ($(ECHO) $$@: \\ \
-	  && $(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_$2_DEP).raw) | $(SORT) -u > $$($1_$2_DEP)
-        endif
-        # Create a dependency target file from the dependency file.
-        # Solution suggested by http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
-        ifneq ($$($1_$2_DEP),)
+	      exit `cat $$($1_$2_DEP).exitvalue` ; \
+	  $(RM) $$($1_$2_DEP).exitvalue ; \\
+	  ($(ECHO) $$@: \\ ; \
+	  $(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_$2_DEP).raw) | $(SORT) -u > $$($1_$2_DEP) ; \
 	  $(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_$2_DEP) > $$($1_$2_DEP_TARGETS)
         endif
   endif
@@ -265,6 +270,8 @@
 #   LD the linker to use, default is $(LD)
 #   OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
 #   DISABLED_WARNINGS_<toolchain> Disable the given warnings for the specified toolchain
+#   STRIP_SYMBOLS Set to true to strip the final binary if the toolchain allows for it
+#   STRIPFLAGS Optionally change the flags given to the strip command
 SetupNativeCompilation = $(NamedParamsMacroTemplate)
 define SetupNativeCompilationBody
 
@@ -368,6 +375,7 @@
   $$(call SetIfEmpty, $1_AS, $$($$($1_TOOLCHAIN)_AS))
   $$(call SetIfEmpty, $1_MT, $$($$($1_TOOLCHAIN)_MT))
   $$(call SetIfEmpty, $1_RC, $$($$($1_TOOLCHAIN)_RC))
+  $$(call SetIfEmpty, $1_STRIP, $$($$($1_TOOLCHAIN)_STRIP))
   $$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_CFLAGS))
   $$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_LDFLAGS))
 
@@ -628,6 +636,10 @@
                 "-map:$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map"
             $1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb \
                 $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map
+            # No separate command is needed for debuginfo on windows, instead
+            # touch target to make sure it has a later time stamp than the debug
+            # symbol files to avoid unnecessary relinking on rebuild.
+            $1_CREATE_DEBUGINFO_CMDS := $(TOUCH) $$($1_TARGET)
 
           else ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), )
             $1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).debuginfo
@@ -662,6 +674,14 @@
     endif # $1_DEBUG_SYMBOLS
   endif # !STATIC_LIBRARY
 
+  ifeq ($$($1_STRIP_SYMBOLS), true)
+    ifneq ($$($1_STRIP), )
+      # Default to using the global STRIPFLAGS. Allow for overriding with an empty value
+      $1_STRIPFLAGS ?= $(STRIPFLAGS)
+      $1_STRIP_CMD := $$($1_STRIP) $$($1_STRIPFLAGS) $$($1_TARGET)
+    endif
+  endif
+
   ifneq (,$$($1_LIBRARY))
     # Generating a dynamic library.
     $1_EXTRA_LDFLAGS += $$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
@@ -672,19 +692,21 @@
     $1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
 
     $1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
-        $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX) $$($1_CREATE_DEBUGINFO_CMDS)
+        $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX) $$($1_CREATE_DEBUGINFO_CMDS) \
+        $$($1_STRIP_CMD)
     $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
         $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
 
     $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \
         $$($1_VARDEPS_FILE)
-		$(ECHO) $(LOG_INFO) "Linking $$($1_BASENAME)"
+		$(ECHO) $(LOG_INFO) "Linking $$($1_BASENAME)" ; \
 		$(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link.log, $$($1_SAFE_NAME)_link, \
 		    $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
 		    $(LD_OUT_OPTION)$$@ \
 		    $$($1_EXPECTED_OBJS) $$($1_RES) \
-		    $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX))
+		    $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)) ; \
 		$$($1_CREATE_DEBUGINFO_CMDS)
+		$$($1_STRIP_CMD)
                 # Touch target to make sure it has a later time stamp than the debug
                 # symbol files to avoid unnecessary relinking on rebuild.
                 ifeq ($(OPENJDK_TARGET_OS), windows)
@@ -713,13 +735,14 @@
 
     $1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
         $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX) $$($1_MT) \
-        $$($1_CODESIGN) $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION)
+        $$($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)
 
     $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_MANIFEST) \
         $$($1_VARDEPS_FILE)
-		$(ECHO) $(LOG_INFO) "Linking executable $$($1_BASENAME)"
+		$(ECHO) $(LOG_INFO) "Linking executable $$($1_BASENAME)" ; \
 		$(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link.log, $$($1_SAFE_NAME)_link, \
 		    $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
 		        $(EXE_OUT_OPTION)$$($1_TARGET) \
@@ -738,6 +761,7 @@
                   endif
                 endif
 		$$($1_CREATE_DEBUGINFO_CMDS)
+		$$($1_STRIP_CMD)
                 # Touch target to make sure it has a later time stamp than the debug
                 # symbol files to avoid unnecessary relinking on rebuild.
                 ifeq ($(OPENJDK_TARGET_OS), windows)
--- a/make/common/RMICompilation.gmk	Wed Jul 05 20:51:37 2017 +0200
+++ b/make/common/RMICompilation.gmk	Wed Jul 05 20:52:37 2017 +0200
@@ -34,8 +34,6 @@
 #   STUB_CLASSES_DIR:=Directory in where to put stub classes
 #   RUN_V11:=Set to run rmic with -v1.1
 #   RUN_V12:=Set to run rmic with -v1.2
-#   RUN_IIOP:=Set to run rmic with -iiop
-#   RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
 #   KEEP_GENERATED:=Set to keep generated sources around
 SetupRMICompilation = $(NamedParamsMacroTemplate)
 define SetupRMICompilationBody
@@ -60,15 +58,6 @@
   $1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
   $1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
 
-  ifneq (,$$($1_RUN_IIOP))
-    $1_TARGETS += $$($1_TIE_FILES)
-    $1_ARGS += -iiop -emitPermissionCheck
-  endif
-  ifneq (,$$($1_RUN_IIOP_STDPKG))
-    $1_TARGETS += $$($1_TIE_STDPKG_FILES)
-    $1_ARGS2 := -iiop -emitPermissionCheck -standardPackage
-  endif
-
   ifneq (,$$($1_KEEP_GENERATED))
     $1_ARGS += -keepgenerated
     $1_TARGETS += $$(subst .class,.java,$$($1_TARGETS))
--- a/modules.xml	Wed Jul 05 20:51:37 2017 +0200
+++ b/modules.xml	Wed Jul 05 20:52:37 2017 +0200
@@ -223,6 +223,16 @@
       <to>jdk.dev</to>
     </export>
     <export>
+      <name>jdk.internal.misc</name>
+      <to>java.corba</to>
+      <to>java.desktop</to>
+      <to>java.logging</to>
+      <to>java.management</to>
+      <to>java.naming</to>
+      <to>java.sql</to>
+      <to>jdk.management.resource</to>
+    </export>
+    <export>
       <name>jdk.internal.org.objectweb.asm</name>
       <to>java.instrument</to>
       <to>jdk.jfr</to>
@@ -265,7 +275,6 @@
       <to>java.rmi</to>
       <to>java.security.jgss</to>
       <to>java.security.sasl</to>
-      <to>java.sql</to>
       <to>java.xml</to>
       <to>java.xml.ws</to>
       <to>jdk.charsets</to>
--- a/nashorn/.hgtags	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/.hgtags	Wed Jul 05 20:52:37 2017 +0200
@@ -317,3 +317,4 @@
 42d8ed4651b62572b39e6fed3fafcb7ee93f9dc2 jdk9-b81
 8bab0a9d8a638affdd680c5ec783373f71c19267 jdk9-b82
 21b86b980a5f0d27f1f758a3e4818d3331387172 jdk9-b83
+214b97ba911f4d768c0214098739e32ab54c8503 jdk9-b84
--- a/nashorn/make/build.xml	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/make/build.xml	Wed Jul 05 20:52:37 2017 +0200
@@ -219,13 +219,14 @@
 
   <!-- generate javadoc for all Nashorn and ASM classes -->
   <target name="javadoc" depends="jar">
-    <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
+    <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${nashorn.module.src.dir}/overview.html"
         extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
         additionalparam="-quiet" failonerror="true" useexternalfile="true">
       <classpath>
         <pathelement location="${build.classes.dir}"/>
       </classpath>
-      <fileset dir="${src.dir}" includes="**/*.java"/>
+      <fileset dir="${nashorn.module.src.dir}" includes="**/*.java"/>
+      <fileset dir="${nashorn.shell.module.src.dir}" includes="**/*.java"/>
       <fileset dir="${jdk.asm.src.dir}" includes="**/*.java"/>
       <link href="http://docs.oracle.com/javase/8/docs/api/"/>
       <!-- The following tags are used only in ASM sources - just ignore these -->
@@ -251,13 +252,13 @@
 
   <!-- generate javadoc only for nashorn extension api classes -->
   <target name="javadocapi" depends="jar">
-    <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
+    <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${nashorn.module.src.dir}/overview.html"
         extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
         additionalparam="-quiet" failonerror="true" useexternalfile="true">
       <classpath>
         <pathelement location="${build.classes.dir}"/>
       </classpath>
-      <fileset dir="${src.dir}" includes="jdk/nashorn/api/**/*.java"/>
+      <fileset dir="${nashorn.module.src.dir}" includes="jdk/nashorn/api/**/*.java"/>
       <link href="http://docs.oracle.com/javase/8/docs/api/"/>
     </javadoc>
   </target>
--- a/nashorn/make/nbproject/project.xml	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/make/nbproject/project.xml	Wed Jul 05 20:52:37 2017 +0200
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -20,157 +20,175 @@
  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.
--->
-<project xmlns="http://www.netbeans.org/ns/project/1">
-    <type>org.netbeans.modules.ant.freeform</type>
-    <configuration>
-        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
-            <name>nashorn</name>
-        </general-data>
-        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/2">
-            <!-- Do not use Project Properties customizer when editing this file manually. -->
-            <name>nashorn</name>
-            <properties/>
-            <folders>
-                <source-folder>
-                    <label>nashorn</label>
-                    <location>.</location>
-                    <encoding>UTF-8</encoding>
-                </source-folder>
-                <source-folder>
-                    <label>../test/src</label>
-                    <location>../test/src</location>
-                </source-folder>
-                <source-folder>
-                    <label>../buildtools/nasgen/src</label>
-                    <location>../buildtools/nasgen/src</location>
-                </source-folder>
-                <source-folder>
-                    <label>../src/jdk.scripting.nashorn/share/classes</label>
-                    <location>../src/jdk.scripting.nashorn/share/classes</location>
-                </source-folder>
-                <source-folder>
-                    <label>../test/src</label>
-                    <type>java</type>
-                    <location>../test/src</location>
-                    <encoding>UTF-8</encoding>
-                </source-folder>
-                <source-folder>
-                    <label>../buildtools/nasgen/src</label>
-                    <type>java</type>
-                    <location>../buildtools/nasgen/src</location>
-                    <encoding>UTF-8</encoding>
-                </source-folder>
-                <source-folder>
-                    <label>../src/jdk.scripting.nashorn/share/classes</label>
-                    <type>java</type>
-                    <location>../src/jdk.scripting.nashorn/share/classes</location>
-                    <encoding>UTF-8</encoding>
-                </source-folder>
-            </folders>
-            <ide-actions>
-                <action name="build">
-                    <script>nbproject/nbjdk.xml</script>
-                    <target>jar</target>
-                </action>
-                <action name="clean">
-                    <script>nbproject/nbjdk.xml</script>
-                    <target>clean</target>
-                </action>
-                <action name="javadoc">
-                    <script>nbproject/nbjdk.xml</script>
-                    <target>javadoc</target>
-                </action>
-                <action name="test">
-                    <script>nbproject/nbjdk.xml</script>
-                    <target>test</target>
-                </action>
-                <action name="rebuild">
-                    <script>nbproject/nbjdk.xml</script>
-                    <target>clean</target>
-                    <target>jar</target>
-                </action>
-                <action name="run">
-                    <script>nbproject/nbjdk.xml</script>
-                    <target>run</target>
-                </action>
-                <action name="debug">
-                    <script>nbproject/nbjdk.xml</script>
-                    <target>debug-nb</target>
-                </action>
-                <action name="run.single">
-                    <script>build.xml</script>
-                    <target>test</target>
-                    <context>
-                        <property>test.class</property>
-                        <folder>../test/src</folder>
-                        <pattern>\.java$</pattern>
-                        <format>relative-path-noext</format>
-                        <arity>
-                            <one-file-only/>
-                        </arity>
-                    </context>
-                </action>
-                <action name="debug.single">
-                    <script>nbproject/ide-file-targets.xml</script>
-                    <target>debug-selected-file-in-src</target>
-                    <context>
-                        <property>test.class</property>
-                        <folder>../test/src</folder>
-                        <pattern>\.java$</pattern>
-                        <format>relative-path-noext</format>
-                        <arity>
-                            <one-file-only/>
-                        </arity>
-                    </context>
-                </action>
-            </ide-actions>
-            <view>
-                <items>
-                    <source-folder style="packages">
-                        <label>../test/src</label>
-                        <location>../test/src</location>
-                    </source-folder>
-                    <source-folder style="packages">
-                        <label>../buildtools/nasgen/src</label>
-                        <location>../buildtools/nasgen/src</location>
-                    </source-folder>
-                    <source-folder style="packages">
-                        <label>../src/jdk.scripting.nashorn/share/classes</label>
-                        <location>../src/jdk.scripting.nashorn/share/classes</location>
-                    </source-folder>
-                    <source-file>
-                        <location>build.xml</location>
-                    </source-file>
-                </items>
-                <context-menu>
-                    <ide-action name="build"/>
-                    <ide-action name="rebuild"/>
-                    <ide-action name="clean"/>
-                    <ide-action name="javadoc"/>
-                    <ide-action name="run"/>
-                    <ide-action name="test"/>
-                    <ide-action name="debug"/>
-                </context-menu>
-            </view>
-            <subprojects/>
-        </general-data>
-        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/4">
-            <compilation-unit>
-                <package-root>../test/src</package-root>
-                <unit-tests/>
-                <classpath mode="compile">../test/lib/testng.jar:../build/classes:../src/jdk.scripting.nashorn/share/classes</classpath>
-                <source-level>1.8</source-level>
-            </compilation-unit>
-            <compilation-unit>
-                <package-root>../buildtools/nasgen/src</package-root>
-                <classpath mode="compile">../build/classes:../src</classpath>
-                <source-level>1.8</source-level>
-            </compilation-unit>
-            <compilation-unit>
-                <package-root>../src/jdk.scripting.nashorn/share/classes</package-root>
-                <source-level>1.8</source-level>
-            </compilation-unit>
-        </java-data>
-    </configuration>
-</project>
+-->
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.ant.freeform</type>
+    <configuration>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+            <name>nashorn</name>
+        </general-data>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/2">
+            <!-- Do not use Project Properties customizer when editing this file manually. -->
+            <name>nashorn</name>
+            <properties/>
+            <folders>
+                <source-folder>
+                    <label>nashorn</label>
+                    <location>.</location>
+                    <encoding>UTF-8</encoding>
+                </source-folder>
+                <source-folder>
+                    <label>../test/src</label>
+                    <location>../test/src</location>
+                </source-folder>
+                <source-folder>
+                    <label>../buildtools/nasgen/src</label>
+                    <location>../buildtools/nasgen/src</location>
+                </source-folder>
+                <source-folder>
+                    <label>../src/jdk.scripting.nashorn/share/classes</label>
+                    <location>../src/jdk.scripting.nashorn/share/classes</location>
+                </source-folder>
+                <source-folder>
+                    <label>../test/src</label>
+                    <type>java</type>
+                    <location>../test/src</location>
+                    <encoding>UTF-8</encoding>
+                </source-folder>
+                <source-folder>
+                    <label>../buildtools/nasgen/src</label>
+                    <type>java</type>
+                    <location>../buildtools/nasgen/src</location>
+                    <encoding>UTF-8</encoding>
+                </source-folder>
+                <source-folder>
+                    <label>../src/jdk.scripting.nashorn/share/classes</label>
+                    <type>java</type>
+                    <location>../src/jdk.scripting.nashorn/share/classes</location>
+                    <encoding>UTF-8</encoding>
+                </source-folder>
+                <source-folder>
+                    <label>../src/jdk.scripting.nashorn.shell/share/classes</label>
+                    <type>java</type>
+                    <location>../src/jdk.scripting.nashorn.shell/share/classes</location>
+                    <encoding>UTF-8</encoding>
+                </source-folder>
+                <source-folder>
+                    <label>../src/jdk.scripting.nashorn.shell/share/classes</label>
+                    <location>../src/jdk.scripting.nashorn.shell/share/classes</location>
+                </source-folder>
+            </folders>
+            <ide-actions>
+                <action name="build">
+                    <script>nbproject/nbjdk.xml</script>
+                    <target>jar</target>
+                </action>
+                <action name="clean">
+                    <script>nbproject/nbjdk.xml</script>
+                    <target>clean</target>
+                </action>
+                <action name="javadoc">
+                    <script>nbproject/nbjdk.xml</script>
+                    <target>javadoc</target>
+                </action>
+                <action name="test">
+                    <script>nbproject/nbjdk.xml</script>
+                    <target>test</target>
+                </action>
+                <action name="rebuild">
+                    <script>nbproject/nbjdk.xml</script>
+                    <target>clean</target>
+                    <target>jar</target>
+                </action>
+                <action name="run">
+                    <script>nbproject/nbjdk.xml</script>
+                    <target>run</target>
+                </action>
+                <action name="debug">
+                    <script>nbproject/nbjdk.xml</script>
+                    <target>debug-nb</target>
+                </action>
+                <action name="run.single">
+                    <script>build.xml</script>
+                    <target>test</target>
+                    <context>
+                        <property>test.class</property>
+                        <folder>../test/src</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path-noext</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+                <action name="debug.single">
+                    <script>nbproject/ide-file-targets.xml</script>
+                    <target>debug-selected-file-in-src</target>
+                    <context>
+                        <property>test.class</property>
+                        <folder>../test/src</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path-noext</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+            </ide-actions>
+            <view>
+                <items>
+                    <source-folder style="packages">
+                        <label>../test/src</label>
+                        <location>../test/src</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>../buildtools/nasgen/src</label>
+                        <location>../buildtools/nasgen/src</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>../src/jdk.scripting.nashorn/share/classes</label>
+                        <location>../src/jdk.scripting.nashorn/share/classes</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>../src/jdk.scripting.nashorn.shell/share/classes</label>
+                        <location>../src/jdk.scripting.nashorn.shell/share/classes</location>
+                    </source-folder>
+                    <source-file>
+                        <location>build.xml</location>
+                    </source-file>
+                </items>
+                <context-menu>
+                    <ide-action name="build"/>
+                    <ide-action name="rebuild"/>
+                    <ide-action name="clean"/>
+                    <ide-action name="javadoc"/>
+                    <ide-action name="run"/>
+                    <ide-action name="test"/>
+                    <ide-action name="debug"/>
+                </context-menu>
+            </view>
+            <subprojects/>
+        </general-data>
+        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/4">
+            <compilation-unit>
+                <package-root>../test/src</package-root>
+                <unit-tests/>
+                <classpath mode="compile">../test/lib/testng.jar:../build/classes:../src/jdk.scripting.nashorn/share/classes</classpath>
+                <source-level>1.8</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>../buildtools/nasgen/src</package-root>
+                <classpath mode="compile">../build/classes:../src</classpath>
+                <source-level>1.8</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>../src/jdk.scripting.nashorn/share/classes</package-root>
+                <source-level>1.8</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>../src/jdk.scripting.nashorn.shell/share/classes</package-root>
+                <source-level>1.8</source-level>
+            </compilation-unit>
+        </java-data>
+    </configuration>
+</project>
--- a/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java	Wed Jul 05 20:52:37 2017 +0200
@@ -154,6 +154,10 @@
                     break;
                 }
 
+                if (source == null) {
+                    break;
+                }
+
                 if (source.isEmpty()) {
                     continue;
                 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornScriptEngine.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornScriptEngine.java	Wed Jul 05 20:52:37 2017 +0200
@@ -140,7 +140,7 @@
         this._global_per_engine = nashornContext.getEnv()._global_per_engine;
 
         // create new global object
-        this.global = createNashornGlobal(context);
+        this.global = createNashornGlobal();
         // set the default ENGINE_SCOPE object for the default context
         context.setBindings(new ScriptObjectMirror(global, global), ScriptContext.ENGINE_SCOPE);
     }
@@ -167,7 +167,7 @@
             // We use same 'global' for all Bindings.
             return new SimpleBindings();
         }
-        return createGlobalMirror(null);
+        return createGlobalMirror();
     }
 
     // Compilable methods
@@ -317,7 +317,7 @@
 
         // We didn't find associated nashorn global mirror in the Bindings given!
         // Create new global instance mirror and associate with the Bindings.
-        final ScriptObjectMirror mirror = createGlobalMirror(ctxt);
+        final ScriptObjectMirror mirror = createGlobalMirror();
         bindings.put(NASHORN_GLOBAL, mirror);
         return mirror.getHomeGlobal();
     }
@@ -333,13 +333,13 @@
     }
 
     // Create a new ScriptObjectMirror wrapping a newly created Nashorn Global object
-    private ScriptObjectMirror createGlobalMirror(final ScriptContext ctxt) {
-        final Global newGlobal = createNashornGlobal(ctxt);
+    private ScriptObjectMirror createGlobalMirror() {
+        final Global newGlobal = createNashornGlobal();
         return new ScriptObjectMirror(newGlobal, newGlobal);
     }
 
     // Create a new Nashorn Global object
-    private Global createNashornGlobal(final ScriptContext ctxt) {
+    private Global createNashornGlobal() {
         final Global newGlobal = AccessController.doPrivileged(new PrivilegedAction<Global>() {
             @Override
             public Global run() {
@@ -354,7 +354,7 @@
             }
         }, CREATE_GLOBAL_ACC_CTXT);
 
-        nashornContext.initGlobal(newGlobal, this, ctxt);
+        nashornContext.initGlobal(newGlobal, this);
 
         return newGlobal;
     }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IRTranslator.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IRTranslator.java	Wed Jul 05 20:52:37 2017 +0200
@@ -47,7 +47,6 @@
 import jdk.nashorn.internal.ir.IfNode;
 import jdk.nashorn.internal.ir.IndexNode;
 import jdk.nashorn.internal.ir.LabelNode;
-import jdk.nashorn.internal.ir.LexicalContext;
 import jdk.nashorn.internal.ir.LiteralNode;
 import jdk.nashorn.internal.ir.Node;
 import jdk.nashorn.internal.ir.ObjectNode;
@@ -64,7 +63,7 @@
 import jdk.nashorn.internal.ir.VarNode;
 import jdk.nashorn.internal.ir.WhileNode;
 import jdk.nashorn.internal.ir.WithNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.parser.Lexer;
 import jdk.nashorn.internal.parser.TokenType;
 
@@ -72,10 +71,9 @@
  * This class translates from nashorn IR Node objects
  * to nashorn parser API Tree objects.
  */
-final class IRTranslator extends NodeVisitor<LexicalContext> {
+final class IRTranslator extends SimpleNodeVisitor {
 
     public IRTranslator() {
-        super(new LexicalContext());
     }
 
     // currently translated Statement
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ApplySpecialization.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ApplySpecialization.java	Wed Jul 05 20:52:37 2017 +0200
@@ -41,9 +41,8 @@
 import jdk.nashorn.internal.ir.Expression;
 import jdk.nashorn.internal.ir.FunctionNode;
 import jdk.nashorn.internal.ir.IdentNode;
-import jdk.nashorn.internal.ir.LexicalContext;
 import jdk.nashorn.internal.ir.Node;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.objects.Global;
 import jdk.nashorn.internal.runtime.Context;
 import jdk.nashorn.internal.runtime.logging.DebugLogger;
@@ -81,7 +80,7 @@
  */
 
 @Logger(name="apply2call")
-public final class ApplySpecialization extends NodeVisitor<LexicalContext> implements Loggable {
+public final class ApplySpecialization extends SimpleNodeVisitor implements Loggable {
 
     private static final boolean USE_APPLY2CALL = Options.getBooleanProperty("nashorn.apply2call", true);
 
@@ -105,7 +104,6 @@
      * @param compiler compiler
      */
     public ApplySpecialization(final Compiler compiler) {
-        super(new LexicalContext());
         this.compiler = compiler;
         this.log = initLogger(compiler.getContext());
     }
@@ -138,7 +136,7 @@
 
     private boolean hasApplies(final FunctionNode functionNode) {
         try {
-            functionNode.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+            functionNode.accept(new SimpleNodeVisitor() {
                 @Override
                 public boolean enterFunctionNode(final FunctionNode fn) {
                     return fn == functionNode;
@@ -172,7 +170,7 @@
         final Deque<Set<Expression>> stack = new ArrayDeque<>();
 
         //ensure that arguments is only passed as arg to apply
-        functionNode.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+        functionNode.accept(new SimpleNodeVisitor() {
 
             private boolean isCurrentArg(final Expression expr) {
                 return !stack.isEmpty() && stack.peek().contains(expr); //args to current apply call
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java	Wed Jul 05 20:52:37 2017 +0200
@@ -67,7 +67,6 @@
 import jdk.nashorn.internal.ir.FunctionNode;
 import jdk.nashorn.internal.ir.IdentNode;
 import jdk.nashorn.internal.ir.IndexNode;
-import jdk.nashorn.internal.ir.LexicalContext;
 import jdk.nashorn.internal.ir.LexicalContextNode;
 import jdk.nashorn.internal.ir.LiteralNode;
 import jdk.nashorn.internal.ir.Node;
@@ -81,7 +80,7 @@
 import jdk.nashorn.internal.ir.UnaryNode;
 import jdk.nashorn.internal.ir.VarNode;
 import jdk.nashorn.internal.ir.WithNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.parser.TokenType;
 import jdk.nashorn.internal.runtime.Context;
 import jdk.nashorn.internal.runtime.ECMAErrors;
@@ -102,7 +101,7 @@
  * visitor.
  */
 @Logger(name="symbols")
-final class AssignSymbols extends NodeVisitor<LexicalContext> implements Loggable {
+final class AssignSymbols extends SimpleNodeVisitor implements Loggable {
     private final DebugLogger log;
     private final boolean     debug;
 
@@ -150,7 +149,6 @@
     private final boolean isOnDemand;
 
     public AssignSymbols(final Compiler compiler) {
-        super(new LexicalContext());
         this.compiler = compiler;
         this.log   = initLogger(compiler.getContext());
         this.debug = log.isEnabled();
@@ -187,7 +185,7 @@
      */
     private void acceptDeclarations(final FunctionNode functionNode, final Block body) {
         // This visitor will assign symbol to all declared variables.
-        body.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+        body.accept(new SimpleNodeVisitor() {
             @Override
             protected boolean enterDefault(final Node node) {
                 // Don't bother visiting expressions; var is a statement, it can't be inside an expression.
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CacheAst.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CacheAst.java	Wed Jul 05 20:52:37 2017 +0200
@@ -29,19 +29,17 @@
 import java.util.Collections;
 import java.util.Deque;
 import jdk.nashorn.internal.ir.FunctionNode;
-import jdk.nashorn.internal.ir.LexicalContext;
 import jdk.nashorn.internal.ir.Node;
 import jdk.nashorn.internal.ir.Statement;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.runtime.RecompilableScriptFunctionData;
 
-class CacheAst extends NodeVisitor<LexicalContext> {
+class CacheAst extends SimpleNodeVisitor {
     private final Deque<RecompilableScriptFunctionData> dataStack = new ArrayDeque<>();
 
     private final Compiler compiler;
 
     CacheAst(final Compiler compiler) {
-        super(new LexicalContext());
         this.compiler = compiler;
         assert !compiler.isOnDemandCompilation();
     }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java	Wed Jul 05 20:52:37 2017 +0200
@@ -129,7 +129,7 @@
 import jdk.nashorn.internal.ir.WhileNode;
 import jdk.nashorn.internal.ir.WithNode;
 import jdk.nashorn.internal.ir.visitor.NodeOperatorVisitor;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.objects.Global;
 import jdk.nashorn.internal.parser.Lexer.RegexToken;
 import jdk.nashorn.internal.parser.TokenType;
@@ -1433,8 +1433,7 @@
         final Block currentBlock = lc.getCurrentBlock();
         final CodeGeneratorLexicalContext codegenLexicalContext = lc;
 
-        function.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
-
+        function.accept(new SimpleNodeVisitor() {
             private MethodEmitter sharedScopeCall(final IdentNode identNode, final int flags) {
                 final Symbol symbol = identNode.getSymbol();
                 final boolean isFastScope = isFastScope(symbol);
@@ -2461,7 +2460,7 @@
 
             @Override
             public Boolean get() {
-                value.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+                value.accept(new SimpleNodeVisitor() {
                     @Override
                     public boolean enterFunctionNode(final FunctionNode functionNode) {
                         return false;
@@ -2799,7 +2798,7 @@
             boolean contains;
             @Override
             public Boolean get() {
-                rootExpr.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+                rootExpr.accept(new SimpleNodeVisitor() {
                     @Override
                     public boolean enterFunctionNode(final FunctionNode functionNode) {
                         return false;
@@ -4347,7 +4346,7 @@
              * on the stack throughout the store and used at the end to execute it
              */
 
-            target.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+            target.accept(new SimpleNodeVisitor() {
                 @Override
                 public boolean enterIdentNode(final IdentNode node) {
                     if (node.getSymbol().isScope()) {
@@ -4446,7 +4445,7 @@
              * need to do a conversion on non-equivalent types exists, but is
              * very rare. See for example test/script/basic/access-specializer.js
              */
-            target.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+            target.accept(new SimpleNodeVisitor() {
                 @Override
                 protected boolean enterDefault(final Node node) {
                     throw new AssertionError("Unexpected node " + node + " in store epilogue");
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompilationPhase.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompilationPhase.java	Wed Jul 05 20:52:37 2017 +0200
@@ -36,13 +36,13 @@
 import jdk.nashorn.internal.codegen.Compiler.CompilationPhases;
 import jdk.nashorn.internal.ir.Block;
 import jdk.nashorn.internal.ir.FunctionNode;
-import jdk.nashorn.internal.ir.LexicalContext;
 import jdk.nashorn.internal.ir.LiteralNode;
 import jdk.nashorn.internal.ir.Node;
 import jdk.nashorn.internal.ir.Symbol;
 import jdk.nashorn.internal.ir.debug.ASTWriter;
 import jdk.nashorn.internal.ir.debug.PrintVisitor;
 import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.runtime.CodeInstaller;
 import jdk.nashorn.internal.runtime.RecompilableScriptFunctionData;
 import jdk.nashorn.internal.runtime.ScriptEnvironment;
@@ -118,7 +118,7 @@
             FunctionNode newFunctionNode;
 
             //ensure elementTypes, postsets and presets exist for splitter and arraynodes
-            newFunctionNode = transformFunction(fn, new NodeVisitor<LexicalContext>(new LexicalContext()) {
+            newFunctionNode = transformFunction(fn, new SimpleNodeVisitor() {
                 @Override
                 public LiteralNode<?> leaveLiteralNode(final LiteralNode<?> literalNode) {
                     return literalNode.initialize(lc);
@@ -222,7 +222,7 @@
             // correctness, it's just an optimization -- runtime type calculation is not used when the compilation
             // is not an on-demand optimistic compilation, so we can skip locals marking then.
             if (compiler.useOptimisticTypes() && compiler.isOnDemandCompilation()) {
-                fn.getBody().accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+                fn.getBody().accept(new SimpleNodeVisitor() {
                     @Override
                     public boolean enterFunctionNode(final FunctionNode functionNode) {
                         // OTOH, we must not declare symbols from nested functions to be locals. As we're doing on-demand
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/FindScopeDepths.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/FindScopeDepths.java	Wed Jul 05 20:52:37 2017 +0200
@@ -39,7 +39,7 @@
 import jdk.nashorn.internal.ir.Node;
 import jdk.nashorn.internal.ir.Symbol;
 import jdk.nashorn.internal.ir.WithNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.runtime.Context;
 import jdk.nashorn.internal.runtime.RecompilableScriptFunctionData;
 import jdk.nashorn.internal.runtime.logging.DebugLogger;
@@ -53,7 +53,7 @@
  * FunctionNode being compiled
  */
 @Logger(name="scopedepths")
-final class FindScopeDepths extends NodeVisitor<LexicalContext> implements Loggable {
+final class FindScopeDepths extends SimpleNodeVisitor implements Loggable {
 
     private final Compiler compiler;
     private final Map<Integer, Map<Integer, RecompilableScriptFunctionData>> fnIdToNestedFunctions = new HashMap<>();
@@ -66,7 +66,6 @@
     private int dynamicScopeCount;
 
     FindScopeDepths(final Compiler compiler) {
-        super(new LexicalContext());
         this.compiler = compiler;
         this.log      = initLogger(compiler.getContext());
     }
@@ -273,7 +272,7 @@
 
         //get all symbols that are referenced inside this function body
         final Set<Symbol> symbols = new HashSet<>();
-        block.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+        block.accept(new SimpleNodeVisitor() {
             @Override
             public boolean enterIdentNode(final IdentNode identNode) {
                 final Symbol symbol = identNode.getSymbol();
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/FoldConstants.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/FoldConstants.java	Wed Jul 05 20:52:37 2017 +0200
@@ -38,7 +38,6 @@
 import jdk.nashorn.internal.ir.Expression;
 import jdk.nashorn.internal.ir.FunctionNode;
 import jdk.nashorn.internal.ir.IfNode;
-import jdk.nashorn.internal.ir.LexicalContext;
 import jdk.nashorn.internal.ir.LiteralNode;
 import jdk.nashorn.internal.ir.LiteralNode.ArrayLiteralNode;
 import jdk.nashorn.internal.ir.Node;
@@ -47,7 +46,7 @@
 import jdk.nashorn.internal.ir.TernaryNode;
 import jdk.nashorn.internal.ir.UnaryNode;
 import jdk.nashorn.internal.ir.VarNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.runtime.Context;
 import jdk.nashorn.internal.runtime.JSType;
 import jdk.nashorn.internal.runtime.ScriptRuntime;
@@ -59,12 +58,11 @@
  * Simple constant folding pass, executed before IR is starting to be lowered.
  */
 @Logger(name="fold")
-final class FoldConstants extends NodeVisitor<LexicalContext> implements Loggable {
+final class FoldConstants extends SimpleNodeVisitor implements Loggable {
 
     private final DebugLogger log;
 
     FoldConstants(final Compiler compiler) {
-        super(new LexicalContext());
         this.log = initLogger(compiler.getContext());
     }
 
@@ -194,7 +192,7 @@
      * initializers removed.
      */
     static void extractVarNodesFromDeadCode(final Node deadCodeRoot, final List<Statement> statements) {
-        deadCodeRoot.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+        deadCodeRoot.accept(new SimpleNodeVisitor() {
             @Override
             public boolean enterVarNode(final VarNode varNode) {
                 statements.add(varNode.setInit(null));
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/LocalVariableTypesCalculator.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/LocalVariableTypesCalculator.java	Wed Jul 05 20:52:37 2017 +0200
@@ -87,6 +87,7 @@
 import jdk.nashorn.internal.ir.WhileNode;
 import jdk.nashorn.internal.ir.WithNode;
 import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.parser.TokenType;
 
 /**
@@ -105,7 +106,7 @@
  * instances of the calculator to be run on nested functions (when not lazy compiling).
  *
  */
-final class LocalVariableTypesCalculator extends NodeVisitor<LexicalContext>{
+final class LocalVariableTypesCalculator extends SimpleNodeVisitor {
 
     private static class JumpOrigin {
         final JoinPredecessor node;
@@ -425,7 +426,6 @@
     private final Deque<Label> catchLabels = new ArrayDeque<>();
 
     LocalVariableTypesCalculator(final Compiler compiler) {
-        super(new LexicalContext());
         this.compiler = compiler;
     }
 
@@ -1330,7 +1330,7 @@
         // Sets the return type of the function and also performs the bottom-up pass of applying type and conversion
         // information to nodes as well as doing the calculation on nested functions as required.
         FunctionNode newFunction = functionNode;
-        final NodeVisitor<LexicalContext> applyChangesVisitor = new NodeVisitor<LexicalContext>(new LexicalContext()) {
+        final SimpleNodeVisitor applyChangesVisitor = new SimpleNodeVisitor() {
             private boolean inOuterFunction = true;
             private final Deque<JoinPredecessor> joinPredecessors = new ArrayDeque<>();
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Lower.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Lower.java	Wed Jul 05 20:52:37 2017 +0200
@@ -74,7 +74,7 @@
 import jdk.nashorn.internal.ir.WhileNode;
 import jdk.nashorn.internal.ir.WithNode;
 import jdk.nashorn.internal.ir.visitor.NodeOperatorVisitor;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.parser.Token;
 import jdk.nashorn.internal.parser.TokenType;
 import jdk.nashorn.internal.runtime.Context;
@@ -331,7 +331,7 @@
 
     @SuppressWarnings("unchecked")
     private static <T extends Node> T ensureUniqueNamesIn(final T node) {
-        return (T)node.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+        return (T)node.accept(new SimpleNodeVisitor() {
             @Override
             public Node leaveFunctionNode(final FunctionNode functionNode) {
                 final String name = functionNode.getName();
@@ -396,7 +396,7 @@
         final Block finallyBlock = createFinallyBlock(finallyBody);
         final ArrayList<Block> inlinedFinallies = new ArrayList<>();
         final FunctionNode fn = lc.getCurrentFunction();
-        final TryNode newTryNode = (TryNode)tryNode.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+        final TryNode newTryNode = (TryNode)tryNode.accept(new SimpleNodeVisitor() {
 
             @Override
             public boolean enterFunctionNode(final FunctionNode functionNode) {
@@ -539,7 +539,7 @@
         final Block catchAll = catchAllBlock(tryNode);
 
         final List<ThrowNode> rethrows = new ArrayList<>(1);
-        catchAll.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+        catchAll.accept(new SimpleNodeVisitor() {
             @Override
             public boolean enterThrowNode(final ThrowNode throwNode) {
                 rethrows.add(throwNode);
@@ -686,7 +686,7 @@
     private static boolean controlFlowEscapes(final LexicalContext lex, final Block loopBody) {
         final List<Node> escapes = new ArrayList<>();
 
-        loopBody.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+        loopBody.accept(new SimpleNodeVisitor() {
             @Override
             public Node leaveBreakNode(final BreakNode node) {
                 escapes.add(node);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesCalculator.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesCalculator.java	Wed Jul 05 20:52:37 2017 +0200
@@ -42,7 +42,6 @@
 import jdk.nashorn.internal.ir.IfNode;
 import jdk.nashorn.internal.ir.IndexNode;
 import jdk.nashorn.internal.ir.JoinPredecessorExpression;
-import jdk.nashorn.internal.ir.LexicalContext;
 import jdk.nashorn.internal.ir.LoopNode;
 import jdk.nashorn.internal.ir.Node;
 import jdk.nashorn.internal.ir.Optimistic;
@@ -52,7 +51,7 @@
 import jdk.nashorn.internal.ir.UnaryNode;
 import jdk.nashorn.internal.ir.VarNode;
 import jdk.nashorn.internal.ir.WhileNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.parser.TokenType;
 import jdk.nashorn.internal.runtime.ScriptObject;
 
@@ -61,7 +60,7 @@
  * must not ever be marked as optimistic, assigning narrowest non-invalidated types to program points from the
  * compilation environment, as well as initializing optimistic types of global properties for scripts.
  */
-final class OptimisticTypesCalculator extends NodeVisitor<LexicalContext> {
+final class OptimisticTypesCalculator extends SimpleNodeVisitor {
 
     final Compiler compiler;
 
@@ -69,7 +68,6 @@
     final Deque<BitSet> neverOptimistic = new ArrayDeque<>();
 
     OptimisticTypesCalculator(final Compiler compiler) {
-        super(new LexicalContext());
         this.compiler = compiler;
     }
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ProgramPoints.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ProgramPoints.java	Wed Jul 05 20:52:37 2017 +0200
@@ -37,25 +37,20 @@
 import jdk.nashorn.internal.ir.FunctionNode;
 import jdk.nashorn.internal.ir.IdentNode;
 import jdk.nashorn.internal.ir.IndexNode;
-import jdk.nashorn.internal.ir.LexicalContext;
 import jdk.nashorn.internal.ir.Node;
 import jdk.nashorn.internal.ir.Optimistic;
 import jdk.nashorn.internal.ir.UnaryNode;
 import jdk.nashorn.internal.ir.VarNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 
 /**
  * Find program points in the code that are needed for optimistic assumptions
  */
-class ProgramPoints extends NodeVisitor<LexicalContext> {
+class ProgramPoints extends SimpleNodeVisitor {
 
     private final IntDeque nextProgramPoint = new IntDeque();
     private final Set<Node> noProgramPoint = new HashSet<>();
 
-    ProgramPoints() {
-        super(new LexicalContext());
-    }
-
     private int next() {
         final int next = nextProgramPoint.getAndIncrement();
         if(next > MAX_PROGRAM_POINT_VALUE) {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ReplaceCompileUnits.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ReplaceCompileUnits.java	Wed Jul 05 20:52:37 2017 +0200
@@ -27,24 +27,19 @@
 
 import java.util.ArrayList;
 import java.util.List;
-
 import jdk.nashorn.internal.ir.CompileUnitHolder;
 import jdk.nashorn.internal.ir.FunctionNode;
-import jdk.nashorn.internal.ir.LexicalContext;
 import jdk.nashorn.internal.ir.LiteralNode;
 import jdk.nashorn.internal.ir.LiteralNode.ArrayLiteralNode;
 import jdk.nashorn.internal.ir.Node;
 import jdk.nashorn.internal.ir.ObjectNode;
 import jdk.nashorn.internal.ir.Splittable;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 
 /**
  * Base class for a node visitor that replaces {@link CompileUnit}s in {@link CompileUnitHolder}s.
  */
-abstract class ReplaceCompileUnits extends NodeVisitor<LexicalContext> {
-    ReplaceCompileUnits() {
-        super(new LexicalContext());
-    }
+abstract class ReplaceCompileUnits extends SimpleNodeVisitor {
 
     /**
      * Override to provide a replacement for an old compile unit.
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Splitter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Splitter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -33,7 +33,6 @@
 import java.util.Map;
 import jdk.nashorn.internal.ir.Block;
 import jdk.nashorn.internal.ir.FunctionNode;
-import jdk.nashorn.internal.ir.LexicalContext;
 import jdk.nashorn.internal.ir.LiteralNode;
 import jdk.nashorn.internal.ir.LiteralNode.ArrayLiteralNode;
 import jdk.nashorn.internal.ir.Node;
@@ -42,7 +41,7 @@
 import jdk.nashorn.internal.ir.SplitNode;
 import jdk.nashorn.internal.ir.Splittable;
 import jdk.nashorn.internal.ir.Statement;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.runtime.Context;
 import jdk.nashorn.internal.runtime.logging.DebugLogger;
 import jdk.nashorn.internal.runtime.logging.Loggable;
@@ -53,7 +52,7 @@
  * Split the IR into smaller compile units.
  */
 @Logger(name="splitter")
-final class Splitter extends NodeVisitor<LexicalContext> implements Loggable {
+final class Splitter extends SimpleNodeVisitor implements Loggable {
     /** Current compiler. */
     private final Compiler compiler;
 
@@ -79,7 +78,6 @@
      * @param outermostCompileUnit  compile unit for outermost function, if non-lazy this is the script's compile unit
      */
     public Splitter(final Compiler compiler, final FunctionNode functionNode, final CompileUnit outermostCompileUnit) {
-        super(new LexicalContext());
         this.compiler             = compiler;
         this.outermost            = functionNode;
         this.outermostCompileUnit = outermostCompileUnit;
@@ -142,7 +140,7 @@
         final Block body = functionNode.getBody();
         final List<FunctionNode> dc = directChildren(functionNode);
 
-        final Block newBody = (Block)body.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+        final Block newBody = (Block)body.accept(new SimpleNodeVisitor() {
             @Override
             public boolean enterFunctionNode(final FunctionNode nestedFunction) {
                 return dc.contains(nestedFunction);
@@ -164,7 +162,7 @@
 
     private static List<FunctionNode> directChildren(final FunctionNode functionNode) {
         final List<FunctionNode> dc = new ArrayList<>();
-        functionNode.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+        functionNode.accept(new SimpleNodeVisitor() {
             @Override
             public boolean enterFunctionNode(final FunctionNode child) {
                 if (child == functionNode) {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/debug/JSONWriter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/debug/JSONWriter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -49,7 +49,6 @@
 import jdk.nashorn.internal.ir.IndexNode;
 import jdk.nashorn.internal.ir.JoinPredecessorExpression;
 import jdk.nashorn.internal.ir.LabelNode;
-import jdk.nashorn.internal.ir.LexicalContext;
 import jdk.nashorn.internal.ir.LiteralNode;
 import jdk.nashorn.internal.ir.Node;
 import jdk.nashorn.internal.ir.ObjectNode;
@@ -66,7 +65,7 @@
 import jdk.nashorn.internal.ir.VarNode;
 import jdk.nashorn.internal.ir.WhileNode;
 import jdk.nashorn.internal.ir.WithNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.parser.JSONParser;
 import jdk.nashorn.internal.parser.Lexer.RegexToken;
 import jdk.nashorn.internal.parser.Parser;
@@ -78,7 +77,7 @@
 /**
  * This IR writer produces a JSON string that represents AST as a JSON string.
  */
-public final class JSONWriter extends NodeVisitor<LexicalContext> {
+public final class JSONWriter extends SimpleNodeVisitor {
 
     /**
      * Returns AST as JSON compatible string.
@@ -945,7 +944,6 @@
     // Internals below
 
     private JSONWriter(final boolean includeLocation) {
-        super(new LexicalContext());
         this.buf             = new StringBuilder();
         this.includeLocation = includeLocation;
     }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/debug/PrintVisitor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/debug/PrintVisitor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -41,7 +41,6 @@
 import jdk.nashorn.internal.ir.JoinPredecessor;
 import jdk.nashorn.internal.ir.JoinPredecessorExpression;
 import jdk.nashorn.internal.ir.LabelNode;
-import jdk.nashorn.internal.ir.LexicalContext;
 import jdk.nashorn.internal.ir.LocalVariableConversion;
 import jdk.nashorn.internal.ir.Node;
 import jdk.nashorn.internal.ir.SplitNode;
@@ -53,7 +52,7 @@
 import jdk.nashorn.internal.ir.VarNode;
 import jdk.nashorn.internal.ir.WhileNode;
 import jdk.nashorn.internal.ir.WithNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 
 /**
  * Print out the AST as human readable source code.
@@ -61,7 +60,7 @@
  *
  * see the flags --print-parse and --print-lower-parse
  */
-public final class PrintVisitor extends NodeVisitor<LexicalContext> {
+public final class PrintVisitor extends SimpleNodeVisitor {
     /** Tab width */
     private static final int TABWIDTH = 4;
 
@@ -96,7 +95,6 @@
      * @param printTypes        should we print optimistic and inferred types?
      */
     public PrintVisitor(final boolean printLineNumbers, final boolean printTypes) {
-        super(new LexicalContext());
         this.EOLN             = System.lineSeparator();
         this.sb               = new StringBuilder();
         this.printLineNumbers = printLineNumbers;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/visitor/NodeOperatorVisitor.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/visitor/NodeOperatorVisitor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,7 +34,7 @@
  * Like NodeVisitor but navigating further into operators.
  * @param <T> Lexical context class for this NodeOperatorVisitor
  */
-public class NodeOperatorVisitor<T extends LexicalContext> extends NodeVisitor<T> {
+public abstract class NodeOperatorVisitor<T extends LexicalContext> extends NodeVisitor<T> {
     /**
      * Constructor
      *
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/visitor/SimpleNodeVisitor.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.nashorn.internal.ir.visitor;
+
+import jdk.nashorn.internal.ir.LexicalContext;
+
+/**
+ * Convenience base class for a {@link NodeVisitor} with a plain {@link LexicalContext}.
+ */
+public abstract class SimpleNodeVisitor extends NodeVisitor<LexicalContext> {
+
+    /**
+     * Creates a new simple node visitor.
+     */
+    public SimpleNodeVisitor() {
+        super(new LexicalContext());
+    }
+}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java	Wed Jul 05 20:52:37 2017 +0200
@@ -928,8 +928,6 @@
     private ThreadLocal<ScriptContext> scontext;
     // current ScriptEngine associated - can be null.
     private ScriptEngine engine;
-    // initial ScriptContext - can be null
-    private volatile ScriptContext initscontext;
 
     // ES6 global lexical scope.
     private final LexicalScope lexicalScope;
@@ -957,7 +955,7 @@
 
     private ScriptContext currentContext() {
         final ScriptContext sc = scontext != null? scontext.get() : null;
-        return sc == null? initscontext : sc;
+        return (sc != null)? sc : (engine != null? engine.getContext() : null);
     }
 
     @Override
@@ -1067,16 +1065,14 @@
      * of the global scope object.
      *
      * @param eng ScriptEngine to initialize
-     * @param ctxt ScriptContext to initialize
      */
-    public void initBuiltinObjects(final ScriptEngine eng, final ScriptContext ctxt) {
+    public void initBuiltinObjects(final ScriptEngine eng) {
         if (this.builtinObject != null) {
             // already initialized, just return
             return;
         }
 
         this.engine = eng;
-        this.initscontext = ctxt;
         if (this.engine != null) {
             this.scontext = new ThreadLocal<>();
         }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java	Wed Jul 05 20:52:37 2017 +0200
@@ -140,7 +140,7 @@
 
     private static final LongAdder NAMED_INSTALLED_SCRIPT_COUNT = new LongAdder();
     private static final LongAdder ANONYMOUS_INSTALLED_SCRIPT_COUNT = new LongAdder();
-    private static final boolean DISABLE_VM_ANONYMOUS_CLASSES = Options.getBooleanProperty("nashorn.disableVmAnonymousClasses");
+
     /**
      * Should scripts use only object slots for fields, or dual long/object slots? The default
      * behaviour is to couple this to optimistic types, using dual representation if optimistic types are enabled
@@ -775,7 +775,7 @@
      * @return reusable compiled script across many global scopes.
      */
     public MultiGlobalCompiledScript compileScript(final Source source) {
-        final Class<?> clazz = compile(source, this.errors, this._strict);
+        final Class<?> clazz = compile(source, this.errors, this._strict, false);
         final MethodHandle createProgramFunctionHandle = getCreateProgramFunctionHandle(clazz);
 
         return new MultiGlobalCompiledScript() {
@@ -829,7 +829,7 @@
 
         Class<?> clazz = null;
         try {
-            clazz = compile(source, new ThrowErrorManager(), strictFlag);
+            clazz = compile(source, new ThrowErrorManager(), strictFlag, true);
         } catch (final ParserException e) {
             e.throwAsEcmaException(global);
             return null;
@@ -1264,17 +1264,16 @@
      *
      * @param global the global
      * @param engine the associated ScriptEngine instance, can be null
-     * @param ctxt the initial ScriptContext, can be null
      * @return the initialized global scope object.
      */
-    public Global initGlobal(final Global global, final ScriptEngine engine, final ScriptContext ctxt) {
+    public Global initGlobal(final Global global, final ScriptEngine engine) {
         // Need only minimal global object, if we are just compiling.
         if (!env._compile_only) {
             final Global oldGlobal = Context.getGlobal();
             try {
                 Context.setGlobal(global);
                 // initialize global scope with builtin global objects
-                global.initBuiltinObjects(engine, ctxt);
+                global.initBuiltinObjects(engine);
             } finally {
                 Context.setGlobal(oldGlobal);
             }
@@ -1290,7 +1289,7 @@
      * @return the initialized global scope object.
      */
     public Global initGlobal(final Global global) {
-        return initGlobal(global, null, null);
+        return initGlobal(global, null);
     }
 
     /**
@@ -1380,10 +1379,10 @@
     }
 
     private ScriptFunction compileScript(final Source source, final ScriptObject scope, final ErrorManager errMan) {
-        return getProgramFunction(compile(source, errMan, this._strict), scope);
+        return getProgramFunction(compile(source, errMan, this._strict, false), scope);
     }
 
-    private synchronized Class<?> compile(final Source source, final ErrorManager errMan, final boolean strict) {
+    private synchronized Class<?> compile(final Source source, final ErrorManager errMan, final boolean strict, final boolean isEval) {
         // start with no errors, no warnings.
         errMan.reset();
 
@@ -1435,7 +1434,7 @@
         final URL          url    = source.getURL();
         final CodeSource   cs     = new CodeSource(url, (CodeSigner[])null);
         final CodeInstaller installer;
-        if (DISABLE_VM_ANONYMOUS_CLASSES || env._persistent_cache || !env._lazy_compilation) {
+        if (!env.useAnonymousClasses(isEval) || env._persistent_cache || !env._lazy_compilation) {
             // Persistent code cache and eager compilation preclude use of VM anonymous classes
             final ScriptLoader loader = env._loader_per_compile ? createNewLoader() : scriptLoader;
             installer = new NamedContextCodeInstaller(this, cs, loader);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/PropertyMap.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/PropertyMap.java	Wed Jul 05 20:52:37 2017 +0200
@@ -34,7 +34,9 @@
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.lang.invoke.SwitchPoint;
+import java.lang.ref.Reference;
 import java.lang.ref.SoftReference;
+import java.lang.ref.WeakReference;
 import java.util.Arrays;
 import java.util.BitSet;
 import java.util.Collection;
@@ -43,6 +45,7 @@
 import java.util.NoSuchElementException;
 import java.util.WeakHashMap;
 import java.util.concurrent.atomic.LongAdder;
+import jdk.nashorn.internal.runtime.options.Options;
 import jdk.nashorn.internal.scripts.JO;
 
 /**
@@ -55,6 +58,9 @@
  * will return a new map.
  */
 public class PropertyMap implements Iterable<Object>, Serializable {
+    private static final int INITIAL_SOFT_REFERENCE_DERIVATION_LIMIT =
+            Math.max(0, Options.getIntProperty("nashorn.propertyMap.softReferenceDerivationLimit", 32));
+
     /** Used for non extensible PropertyMaps, negative logic as the normal case is extensible. See {@link ScriptObject#preventExtensions()} */
     private static final int NOT_EXTENSIBLE         = 0b0000_0001;
     /** Does this map contain valid array keys? */
@@ -78,6 +84,13 @@
     /** Structure class name */
     private final String className;
 
+    /**
+     * Countdown of number of times this property map has been derived from another property map. When it
+     * reaches zero, the property map will start using weak references instead of soft references to hold on
+     * to its history elements.
+     */
+    private final int softReferenceDerivationLimit;
+
     /** A reference to the expected shared prototype property map. If this is set this
      * property map should only be used if it the same as the actual prototype map. */
     private transient SharedPropertyMap sharedProtoMap;
@@ -86,7 +99,7 @@
     private transient HashMap<String, SwitchPoint> protoSwitches;
 
     /** History of maps, used to limit map duplication. */
-    private transient WeakHashMap<Property, SoftReference<PropertyMap>> history;
+    private transient WeakHashMap<Property, Reference<PropertyMap>> history;
 
     /** History of prototypes, used to limit map duplication. */
     private transient WeakHashMap<ScriptObject, SoftReference<PropertyMap>> protoHistory;
@@ -114,6 +127,7 @@
         this.fieldMaximum = fieldMaximum;
         this.spillLength  = spillLength;
         this.flags        = flags;
+        this.softReferenceDerivationLimit = INITIAL_SOFT_REFERENCE_DERIVATION_LIMIT;
 
         if (Context.DEBUG) {
             count.increment();
@@ -126,7 +140,7 @@
      * @param propertyMap Existing property map.
      * @param properties  A {@link PropertyHashMap} with a new set of properties.
      */
-    private PropertyMap(final PropertyMap propertyMap, final PropertyHashMap properties, final int flags, final int fieldCount, final int spillLength) {
+    private PropertyMap(final PropertyMap propertyMap, final PropertyHashMap properties, final int flags, final int fieldCount, final int spillLength, final int softReferenceDerivationLimit) {
         this.properties   = properties;
         this.flags        = flags;
         this.spillLength  = spillLength;
@@ -137,6 +151,7 @@
         this.listeners    = propertyMap.listeners;
         this.freeSlots    = propertyMap.freeSlots;
         this.sharedProtoMap = propertyMap.sharedProtoMap;
+        this.softReferenceDerivationLimit = softReferenceDerivationLimit;
 
         if (Context.DEBUG) {
             count.increment();
@@ -150,7 +165,7 @@
      * @param propertyMap Existing property map.
       */
     protected PropertyMap(final PropertyMap propertyMap) {
-        this(propertyMap, propertyMap.properties, propertyMap.flags, propertyMap.fieldCount, propertyMap.spillLength);
+        this(propertyMap, propertyMap.properties, propertyMap.flags, propertyMap.fieldCount, propertyMap.spillLength, propertyMap.softReferenceDerivationLimit);
     }
 
     private void writeObject(final ObjectOutputStream out) throws IOException {
@@ -438,11 +453,7 @@
      */
     public final PropertyMap addPropertyNoHistory(final Property property) {
         propertyAdded(property, true);
-        final PropertyHashMap newProperties = properties.immutableAdd(property);
-        final PropertyMap newMap = new PropertyMap(this, newProperties, newFlags(property), newFieldCount(property), newSpillLength(property));
-        newMap.updateFreeSlots(null, property);
-
-        return newMap;
+        return addPropertyInternal(property);
     }
 
     /**
@@ -457,15 +468,24 @@
         PropertyMap newMap = checkHistory(property);
 
         if (newMap == null) {
-            final PropertyHashMap newProperties = properties.immutableAdd(property);
-            newMap = new PropertyMap(this, newProperties, newFlags(property), newFieldCount(property), newSpillLength(property));
-            newMap.updateFreeSlots(null, property);
+            newMap = addPropertyInternal(property);
             addToHistory(property, newMap);
         }
 
         return newMap;
     }
 
+    private PropertyMap deriveMap(final PropertyHashMap newProperties, final int newFlags, final int newFieldCount, final int newSpillLength) {
+        return new PropertyMap(this, newProperties, newFlags, newFieldCount, newSpillLength, softReferenceDerivationLimit == 0 ? 0 : softReferenceDerivationLimit - 1);
+    }
+
+    private PropertyMap addPropertyInternal(final Property property) {
+        final PropertyHashMap newProperties = properties.immutableAdd(property);
+        final PropertyMap newMap = deriveMap(newProperties, newFlags(property), newFieldCount(property), newSpillLength(property));
+        newMap.updateFreeSlots(null, property);
+        return newMap;
+    }
+
     /**
      * Remove a property from a map. Cloning or using an existing map if available.
      *
@@ -485,13 +505,13 @@
             // If deleted property was last field or spill slot we can make it reusable by reducing field/slot count.
             // Otherwise mark it as free in free slots bitset.
             if (isSpill && slot >= 0 && slot == spillLength - 1) {
-                newMap = new PropertyMap(this, newProperties, flags, fieldCount, spillLength - 1);
+                newMap = deriveMap(newProperties, flags, fieldCount, spillLength - 1);
                 newMap.freeSlots = freeSlots;
             } else if (!isSpill && slot >= 0 && slot == fieldCount - 1) {
-                newMap = new PropertyMap(this, newProperties, flags, fieldCount - 1, spillLength);
+                newMap = deriveMap(newProperties, flags, fieldCount - 1, spillLength);
                 newMap.freeSlots = freeSlots;
             } else {
-                newMap = new PropertyMap(this, newProperties, flags, fieldCount, spillLength);
+                newMap = deriveMap(newProperties, flags, fieldCount, spillLength);
                 newMap.updateFreeSlots(property, null);
             }
             addToHistory(property, newMap);
@@ -539,7 +559,7 @@
 
         // Add replaces existing property.
         final PropertyHashMap newProperties = properties.immutableReplace(oldProperty, newProperty);
-        final PropertyMap newMap = new PropertyMap(this, newProperties, flags, fieldCount, newSpillLength);
+        final PropertyMap newMap = deriveMap(newProperties, flags, fieldCount, newSpillLength);
 
         if (!sameType) {
             newMap.updateFreeSlots(oldProperty, newProperty);
@@ -584,7 +604,7 @@
         final Property[] otherProperties = other.properties.getProperties();
         final PropertyHashMap newProperties = properties.immutableAdd(otherProperties);
 
-        final PropertyMap newMap = new PropertyMap(this, newProperties, flags, fieldCount, spillLength);
+        final PropertyMap newMap = deriveMap(newProperties, flags, fieldCount, spillLength);
         for (final Property property : otherProperties) {
             // This method is only safe to use with non-slotted, native getter/setter properties
             assert property.getSlot() == -1;
@@ -618,7 +638,7 @@
      * @return New map with {@link #NOT_EXTENSIBLE} flag set.
      */
     PropertyMap preventExtensions() {
-        return new PropertyMap(this, properties, flags | NOT_EXTENSIBLE, fieldCount, spillLength);
+        return deriveMap(properties, flags | NOT_EXTENSIBLE, fieldCount, spillLength);
     }
 
     /**
@@ -634,7 +654,7 @@
             newProperties = newProperties.immutableAdd(oldProperty.addFlags(Property.NOT_CONFIGURABLE));
         }
 
-        return new PropertyMap(this, newProperties, flags | NOT_EXTENSIBLE, fieldCount, spillLength);
+        return deriveMap(newProperties, flags | NOT_EXTENSIBLE, fieldCount, spillLength);
     }
 
     /**
@@ -656,7 +676,7 @@
             newProperties = newProperties.immutableAdd(oldProperty.addFlags(propertyFlags));
         }
 
-        return new PropertyMap(this, newProperties, flags | NOT_EXTENSIBLE, fieldCount, spillLength);
+        return deriveMap(newProperties, flags | NOT_EXTENSIBLE, fieldCount, spillLength);
     }
 
     /**
@@ -743,7 +763,7 @@
             history = new WeakHashMap<>();
         }
 
-        history.put(property, new SoftReference<>(newMap));
+        history.put(property, softReferenceDerivationLimit == 0 ? new WeakReference<>(newMap) : new SoftReference<>(newMap));
     }
 
     /**
@@ -756,7 +776,7 @@
     private PropertyMap checkHistory(final Property property) {
 
         if (history != null) {
-            final SoftReference<PropertyMap> ref = history.get(property);
+            final Reference<PropertyMap> ref = history.get(property);
             final PropertyMap historicMap = ref == null ? null : ref.get();
 
             if (historicMap != null) {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java	Wed Jul 05 20:52:37 2017 +0200
@@ -62,7 +62,7 @@
 import jdk.nashorn.internal.ir.SwitchNode;
 import jdk.nashorn.internal.ir.Symbol;
 import jdk.nashorn.internal.ir.TryNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
 import jdk.nashorn.internal.objects.Global;
 import jdk.nashorn.internal.parser.Parser;
 import jdk.nashorn.internal.parser.Token;
@@ -518,8 +518,7 @@
         // don't cache non-split functions from the eager pass); those already cached, or those not split
         // don't need this step.
         final Set<Symbol> blockDefinedSymbols = fn.isSplit() && !cached ? Collections.newSetFromMap(new IdentityHashMap<>()) : null;
-        FunctionNode newFn = (FunctionNode)fn.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
-
+        FunctionNode newFn = (FunctionNode)fn.accept(new SimpleNodeVisitor() {
             private Symbol getReplacement(final Symbol original) {
                 if (original == null) {
                     return null;
@@ -757,7 +756,7 @@
 
     private FunctionNode extractFunctionFromScript(final FunctionNode script) {
         final Set<FunctionNode> fns = new HashSet<>();
-        script.getBody().accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+        script.getBody().accept(new SimpleNodeVisitor() {
             @Override
             public boolean enterFunctionNode(final FunctionNode fn) {
                 fns.add(fn);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptEnvironment.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptEnvironment.java	Wed Jul 05 20:52:37 2017 +0200
@@ -213,6 +213,14 @@
     /** Timing */
     public final Timing _timing;
 
+    /** Whether to use anonymous classes. See {@link #useAnonymousClasses(boolean)}. */
+    private final AnonymousClasses _anonymousClasses;
+    private enum AnonymousClasses {
+        AUTO,
+        OFF,
+        ON
+    }
+
     /**
      * Constructor
      *
@@ -279,6 +287,18 @@
         _version              = options.getBoolean("version");
         _verify_code          = options.getBoolean("verify.code");
 
+        final String anonClasses = options.getString("anonymous.classes");
+        if (anonClasses == null || anonClasses.equals("auto")) {
+            _anonymousClasses = AnonymousClasses.AUTO;
+        } else if (anonClasses.equals("true")) {
+            _anonymousClasses = AnonymousClasses.ON;
+        } else if (anonClasses.equals("false")) {
+            _anonymousClasses = AnonymousClasses.OFF;
+        } else {
+            throw new RuntimeException("Unsupported value for anonymous classes: " + anonClasses);
+        }
+
+
         final String language = options.getString("language");
         if (language == null || language.equals("es5")) {
             _es6 = false;
@@ -411,4 +431,13 @@
         return _timing != null ? _timing.isEnabled() : false;
     }
 
+    /**
+     * Returns true if compilation should use anonymous classes.
+     * @param isEval true if compilation is an eval call.
+     * @return true if anonymous classes should be used
+     */
+    public boolean useAnonymousClasses(final boolean isEval) {
+        return _anonymousClasses == AnonymousClasses.ON || (_anonymousClasses == AnonymousClasses.AUTO && isEval);
+    }
+
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java	Wed Jul 05 20:52:37 2017 +0200
@@ -710,8 +710,7 @@
         final long longIndex = ArrayIndex.toLongIndex(index);
         final long oldLength = getArray().length();
         if (longIndex >= oldLength) {
-            setArray(getArray().ensure(longIndex));
-            doesNotHaveEnsureDelete(longIndex, oldLength, false);
+            setArray(getArray().ensure(longIndex).safeDelete(oldLength, longIndex - 1, false));
         }
         setArray(getArray().set(index, value, false));
     }
@@ -2693,11 +2692,7 @@
         }
 
         if (newLength > arrayLength) {
-            data = data.ensure(newLength - 1);
-            if (data.canDelete(arrayLength, newLength - 1, false)) {
-               data = data.delete(arrayLength, newLength - 1);
-            }
-            setArray(data);
+            setArray(data.ensure(newLength - 1).safeDelete(arrayLength, newLength - 1, false));
             return;
         }
 
@@ -3118,23 +3113,12 @@
         return false;
     }
 
-    private void doesNotHaveEnsureDelete(final long longIndex, final long oldLength, final boolean strict) {
-        if (longIndex > oldLength) {
-            ArrayData array = getArray();
-            if (array.canDelete(oldLength, longIndex - 1, strict)) {
-                array = array.delete(oldLength, longIndex - 1);
-            }
-            setArray(array);
-        }
-    }
-
     private void doesNotHave(final int index, final int value, final int callSiteFlags) {
         final long oldLength = getArray().length();
         final long longIndex = ArrayIndex.toLongIndex(index);
         if (!doesNotHaveCheckArrayKeys(longIndex, value, callSiteFlags) && !doesNotHaveEnsureLength(longIndex, oldLength, callSiteFlags)) {
             final boolean strict = isStrictFlag(callSiteFlags);
-            setArray(getArray().set(index, value, strict));
-            doesNotHaveEnsureDelete(longIndex, oldLength, strict);
+            setArray(getArray().set(index, value, strict).safeDelete(oldLength, longIndex - 1, strict));
         }
     }
 
@@ -3143,8 +3127,7 @@
         final long longIndex = ArrayIndex.toLongIndex(index);
         if (!doesNotHaveCheckArrayKeys(longIndex, value, callSiteFlags) && !doesNotHaveEnsureLength(longIndex, oldLength, callSiteFlags)) {
             final boolean strict = isStrictFlag(callSiteFlags);
-            setArray(getArray().set(index, value, strict));
-            doesNotHaveEnsureDelete(longIndex, oldLength, strict);
+            setArray(getArray().set(index, value, strict).safeDelete(oldLength, longIndex - 1, strict));
         }
     }
 
@@ -3153,8 +3136,7 @@
         final long longIndex = ArrayIndex.toLongIndex(index);
         if (!doesNotHaveCheckArrayKeys(longIndex, value, callSiteFlags) && !doesNotHaveEnsureLength(longIndex, oldLength, callSiteFlags)) {
             final boolean strict = isStrictFlag(callSiteFlags);
-            setArray(getArray().set(index, value, strict));
-            doesNotHaveEnsureDelete(longIndex, oldLength, strict);
+            setArray(getArray().set(index, value, strict).safeDelete(oldLength, longIndex - 1, strict));
         }
     }
 
@@ -3163,8 +3145,7 @@
         final long longIndex = ArrayIndex.toLongIndex(index);
         if (!doesNotHaveCheckArrayKeys(longIndex, value, callSiteFlags) && !doesNotHaveEnsureLength(longIndex, oldLength, callSiteFlags)) {
             final boolean strict = isStrictFlag(callSiteFlags);
-            setArray(getArray().set(index, value, strict));
-            doesNotHaveEnsureDelete(longIndex, oldLength, strict);
+            setArray(getArray().set(index, value, strict).safeDelete(oldLength, longIndex - 1, strict));
         }
     }
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/ArrayData.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/ArrayData.java	Wed Jul 05 20:52:37 2017 +0200
@@ -258,7 +258,7 @@
      * Factory method for unspecified array - start as int
      * @return ArrayData
      */
-    public final static ArrayData initialArray() {
+    public static ArrayData initialArray() {
         return new IntArrayData();
     }
 
@@ -278,7 +278,7 @@
      * @param size size required
      * @return size given, always &gt;= size
      */
-    protected final static int alignUp(final int size) {
+    protected static int alignUp(final int size) {
         return size + CHUNK_SIZE - 1 & ~(CHUNK_SIZE - 1);
     }
 
@@ -288,7 +288,7 @@
      * @param length the initial length
      * @return ArrayData
      */
-    public static final ArrayData allocate(final int length) {
+    public static ArrayData allocate(final int length) {
         if (length == 0) {
             return new IntArrayData();
         } else if (length >= SparseArrayData.MAX_DENSE_LENGTH) {
@@ -304,7 +304,7 @@
      * @param  array the array
      * @return ArrayData wrapping this array
      */
-    public static final ArrayData allocate(final Object array) {
+    public static ArrayData allocate(final Object array) {
         final Class<?> clazz = array.getClass();
 
         if (clazz == int[].class) {
@@ -324,7 +324,7 @@
      * @param array the array to use for initial elements
      * @return the ArrayData
      */
-    public static final ArrayData allocate(final int[] array) {
+    public static ArrayData allocate(final int[] array) {
          return new IntArrayData(array, array.length);
     }
 
@@ -334,7 +334,7 @@
      * @param array the array to use for initial elements
      * @return the ArrayData
      */
-    public static final ArrayData allocate(final long[] array) {
+    public static ArrayData allocate(final long[] array) {
         return new LongArrayData(array, array.length);
     }
 
@@ -344,7 +344,7 @@
      * @param array the array to use for initial elements
      * @return the ArrayData
      */
-    public static final ArrayData allocate(final double[] array) {
+    public static ArrayData allocate(final double[] array) {
         return new NumberArrayData(array, array.length);
     }
 
@@ -354,7 +354,7 @@
      * @param array the array to use for initial elements
      * @return the ArrayData
      */
-    public static final ArrayData allocate(final Object[] array) {
+    public static ArrayData allocate(final Object[] array) {
         return new ObjectArrayData(array, array.length);
     }
 
@@ -364,7 +364,7 @@
      * @param buf the nio ByteBuffer to wrap
      * @return the ArrayData
      */
-    public static final ArrayData allocate(final ByteBuffer buf) {
+    public static ArrayData allocate(final ByteBuffer buf) {
         return new ByteBufferArrayData(buf);
     }
 
@@ -374,7 +374,7 @@
      * @param underlying  the underlying ArrayData to wrap in the freeze filter
      * @return the frozen ArrayData
      */
-    public static final ArrayData freeze(final ArrayData underlying) {
+    public static ArrayData freeze(final ArrayData underlying) {
         return new FrozenArrayFilter(underlying);
     }
 
@@ -384,7 +384,7 @@
      * @param underlying  the underlying ArrayData to wrap in the seal filter
      * @return the sealed ArrayData
      */
-    public static final ArrayData seal(final ArrayData underlying) {
+    public static ArrayData seal(final ArrayData underlying) {
         return new SealedArrayFilter(underlying);
     }
 
@@ -394,7 +394,7 @@
      * @param  underlying the underlying ArrayData to wrap in the non extensible filter
      * @return new array data, filtered
      */
-    public static final ArrayData preventExtension(final ArrayData underlying) {
+    public static ArrayData preventExtension(final ArrayData underlying) {
         return new NonExtensibleArrayFilter(underlying);
     }
 
@@ -404,7 +404,7 @@
      * @param underlying the underlying ArrayDAta to wrap in the non extensible filter
      * @return new array data, filtered
      */
-    public static final ArrayData setIsLengthNotWritable(final ArrayData underlying) {
+    public static ArrayData setIsLengthNotWritable(final ArrayData underlying) {
         return new LengthNotWritableFilter(underlying);
     }
 
@@ -676,19 +676,34 @@
     }
 
     /**
-     * Returns if element at specific index range can be deleted or not.
+     * Returns if element at specific index can be deleted or not.
      *
-     * @param fromIndex  the start index
-     * @param toIndex    the end index
+     * @param longIndex  the index
      * @param strict     are we in strict mode
      *
      * @return true if range can be deleted
      */
-    public boolean canDelete(final long fromIndex, final long toIndex, final boolean strict) {
+    public boolean canDelete(final long longIndex, final boolean strict) {
         return true;
     }
 
     /**
+     * Delete a range from the array if {@code fromIndex} is less than or equal to {@code toIndex}
+     * and the array supports deletion.
+     *
+     * @param fromIndex  the start index (inclusive)
+     * @param toIndex    the end index (inclusive)
+     * @param strict     are we in strict mode
+     * @return an array with the range deleted, or this array if no deletion took place
+     */
+    public final ArrayData safeDelete(final long fromIndex, final long toIndex, final boolean strict) {
+        if (fromIndex <= toIndex && canDelete(fromIndex, strict)) {
+            return delete(fromIndex, toIndex);
+        }
+        return this;
+    }
+
+    /**
      * Returns property descriptor for element at a given index
      *
      * @param global the global object
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/ByteBufferArrayData.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/ByteBufferArrayData.java	Wed Jul 05 20:52:37 2017 +0200
@@ -164,7 +164,7 @@
     }
 
     @Override
-    public boolean canDelete(final long fromIndex, final long toIndex, final boolean strict) {
+    public boolean canDelete(final long longIndex, final boolean strict) {
         return false;
     }
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/SealedArrayFilter.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/SealedArrayFilter.java	Wed Jul 05 20:52:37 2017 +0200
@@ -50,15 +50,15 @@
 
     @Override
     public boolean canDelete(final int index, final boolean strict) {
-        if (strict) {
-            throw typeError("cant.delete.property", Integer.toString(index), "sealed array");
-        }
-        return false;
+        return canDelete(ArrayIndex.toLongIndex(index), strict);
     }
 
     @Override
-    public boolean canDelete(final long fromIndex, final long toIndex, final boolean strict) {
-        return canDelete((int) fromIndex, strict);
+    public boolean canDelete(final long longIndex, final boolean strict) {
+        if (strict) {
+            throw typeError("cant.delete.property", Long.toString(longIndex), "sealed array");
+        }
+        return false;
     }
 
     @Override
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/SparseArrayData.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/SparseArrayData.java	Wed Jul 05 20:52:37 2017 +0200
@@ -36,7 +36,7 @@
  * Handle arrays where the index is very large.
  */
 class SparseArrayData extends ArrayData {
-    static final int MAX_DENSE_LENGTH = 8 * 1024 * 1024;
+    static final int MAX_DENSE_LENGTH = 1024 * 1024;
 
     /** Underlying array. */
     private ArrayData underlying;
@@ -48,7 +48,7 @@
     private TreeMap<Long, Object> sparseMap;
 
     SparseArrayData(final ArrayData underlying, final long length) {
-        this(underlying, length, new TreeMap<Long, Object>());
+        this(underlying, length, new TreeMap<>());
     }
 
     SparseArrayData(final ArrayData underlying, final long length, final TreeMap<Long, Object> sparseMap) {
@@ -166,8 +166,9 @@
     @Override
     public ArrayData set(final int index, final Object value, final boolean strict) {
         if (index >= 0 && index < maxDenseLength) {
+            final long oldLength = underlying.length();
             ensure(index);
-            underlying = underlying.set(index, value, strict);
+            underlying = underlying.set(index, value, strict).safeDelete(oldLength, index - 1, strict);
             setLength(Math.max(underlying.length(), length()));
         } else {
             final Long longIndex = indexToKey(index);
@@ -181,8 +182,9 @@
     @Override
     public ArrayData set(final int index, final int value, final boolean strict) {
         if (index >= 0 && index < maxDenseLength) {
+            final long oldLength = underlying.length();
             ensure(index);
-            underlying = underlying.set(index, value, strict);
+            underlying = underlying.set(index, value, strict).safeDelete(oldLength, index - 1, strict);
             setLength(Math.max(underlying.length(), length()));
         } else {
             final Long longIndex = indexToKey(index);
@@ -195,8 +197,9 @@
     @Override
     public ArrayData set(final int index, final long value, final boolean strict) {
         if (index >= 0 && index < maxDenseLength) {
+            final long oldLength = underlying.length();
             ensure(index);
-            underlying = underlying.set(index, value, strict);
+            underlying = underlying.set(index, value, strict).safeDelete(oldLength, index - 1, strict);
             setLength(Math.max(underlying.length(), length()));
         } else {
             final Long longIndex = indexToKey(index);
@@ -209,8 +212,9 @@
     @Override
     public ArrayData set(final int index, final double value, final boolean strict) {
         if (index >= 0 && index < maxDenseLength) {
+            final long oldLength = underlying.length();
             ensure(index);
-            underlying = underlying.set(index, value, strict);
+            underlying = underlying.set(index, value, strict).safeDelete(oldLength, index - 1, strict);
             setLength(Math.max(underlying.length(), length()));
         } else {
             final Long longIndex = indexToKey(index);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/TypedArrayData.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/TypedArrayData.java	Wed Jul 05 20:52:37 2017 +0200
@@ -83,7 +83,7 @@
     }
 
     @Override
-    public boolean canDelete(final long fromIndex, final long toIndex, final boolean strict) {
+    public boolean canDelete(final long longIndex, final boolean strict) {
         return false;
     }
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/BrowserJSObjectLinker.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/BrowserJSObjectLinker.java	Wed Jul 05 20:52:37 2017 +0200
@@ -107,9 +107,10 @@
             return null;
         }
 
-        final GuardedInvocation inv;
+        GuardedInvocation inv;
         if (jsObjectClass.isInstance(self)) {
             inv = lookup(desc, request, linkerServices);
+            inv = inv.replaceMethods(linkerServices.filterInternalObjects(inv.getInvocation()), inv.getGuard());
         } else {
             throw new AssertionError(); // Should never reach here.
         }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java	Wed Jul 05 20:52:37 2017 +0200
@@ -77,9 +77,10 @@
             return null;
         }
 
-        final GuardedInvocation inv;
+        GuardedInvocation inv;
         if (self instanceof JSObject) {
             inv = lookup(desc, request, linkerServices);
+            inv = inv.replaceMethods(linkerServices.filterInternalObjects(inv.getInvocation()), inv.getGuard());
         } else if (self instanceof Map || self instanceof Bindings) {
             // guard to make sure the Map or Bindings does not turn into JSObject later!
             final GuardedInvocation beanInv = nashornBeansLinker.getGuardedInvocation(request, linkerServices);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/regexp/joni/EncodingHelper.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/regexp/joni/EncodingHelper.java	Wed Jul 05 20:52:37 2017 +0200
@@ -278,8 +278,9 @@
                     case 0x0d:
                         return true;
                     default:
-                        // true if Unicode separator or BOM
-                        return (1 << Character.getType(code) & CharacterType.SPACE_MASK) != 0 || code == 0xfeff;
+                        // true if Unicode separator or BOM or U+180E (see JDK-8138758)
+                        return (1 << Character.getType(code) & CharacterType.SPACE_MASK) != 0
+                                || code == 0xfeff || code == 0x180e;
                 }
             case CharacterType.UPPER:
                 return Character.isUpperCase(code);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Options.properties	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Options.properties	Wed Jul 05 20:52:37 2017 +0200
@@ -380,6 +380,15 @@
     enterexit [trace callsite enter/exit], objects [print object properties]."   \
 }
 
+nashorn.option.anonymous.classes = {                      \
+    name="--anonymous-classes",                           \
+    is_undocumented=true,                                 \
+    params=[auto|true|false],                             \
+    default=auto,                                         \
+    type=string,                                          \
+    desc="Use VM anonymous classes for compiled scripts." \
+}
+
 nashorn.option.verify.code = {              \
     name="--verify-code",                   \
     is_undocumented=true,                   \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8137281.js	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8137281: OutOfMemoryError with large numeric keys in JSON.parse
+ *
+ * @test
+ * @run
+ */
+
+function createObject(startKey, level1, level2) {
+    var root = {};
+    var key = startKey;
+    for (var i = 0; i < level1; i++) {
+        var child = {};
+        for (var j = 0; j < level2; j++) {
+            child[key++] = {};
+        }
+        root[key++] = child;
+    }
+    return root;
+}
+
+JSON.parse(JSON.stringify(createObject(500000, 20, 20)));
+JSON.parse(JSON.stringify(createObject(1000000, 20, 20)));
+JSON.parse(JSON.stringify(createObject(2000000, 20, 20)));
+JSON.parse(JSON.stringify(createObject(4000000, 20, 20)));
+JSON.parse(JSON.stringify(createObject(8000000, 20, 20)));
+JSON.parse(JSON.stringify(createObject(16000000, 20, 20)));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8138632.js	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8138632: Sparse array does not handle growth of underlying dense array
+ *
+ * @test
+ * @run
+ */
+
+var x = [];
+x[10000000] = 1;
+x[10] = 1;
+x[20] = 1;
+print(Object.keys(x));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8138632.js.EXPECTED	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,1 @@
+10,20,10000000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8138758.js	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8138758: U+180E not recognized as whitespace by Joni
+ *
+ * @test
+ * @run
+ */
+
+
+Assert.assertEquals("\u180e".replace(/\s/, "OK"), "OK");
+
--- a/nashorn/test/script/nosecurity/JDK-8044798.js	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/test/script/nosecurity/JDK-8044798.js	Wed Jul 05 20:52:37 2017 +0200
@@ -126,12 +126,12 @@
 
 // private compile method of Context class
 var compileMethod = Context.class.getDeclaredMethod("compile",
-                sourceCls, errorMgrCls, booleanCls);
+                sourceCls, errorMgrCls, booleanCls, booleanCls);
 compileMethod.accessible = true;
 
 var scriptCls = compileMethod.invoke(Context.context,
     Source.sourceFor("test", "print('hello')"),
-    new Context.ThrowErrorManager(), false);
+    new Context.ThrowErrorManager(), false, false);
 
 var SCRIPT_CLASS_NAME_PREFIX = "jdk.nashorn.internal.scripts.Script$";
 print("script class name pattern satisfied? " +
--- a/nashorn/test/src/jdk/nashorn/api/scripting/JSONCompatibleTest.java	Wed Jul 05 20:51:37 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.nashorn.api.scripting;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import javax.script.ScriptEngine;
-import javax.script.ScriptException;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-public class JSONCompatibleTest {
-
-    /**
-     * Wrap a top-level array as a list.
-     */
-    @Test
-    public void testWrapArray() throws ScriptException {
-        final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
-        final Object val = engine.eval("Java.asJSONCompatible([1, 2, 3])");
-        assertEquals(asList(val), Arrays.asList(1, 2, 3));
-    }
-
-    /**
-     * Wrap an embedded array as a list.
-     */
-    @Test
-    public void testWrapObjectWithArray() throws ScriptException {
-        final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
-        final Object val = engine.eval("Java.asJSONCompatible({x: [1, 2, 3]})");
-        assertEquals(asList(asMap(val).get("x")), Arrays.asList(1, 2, 3));
-    }
-
-    /**
-     * Check it all works transitively several more levels down.
-     */
-    @Test
-    public void testDeepWrapping() throws ScriptException {
-        final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
-        final Object val = engine.eval("Java.asJSONCompatible({x: [1, {y: [2, {z: [3]}]}, [4, 5]]})");
-        final Map<String, Object> root = asMap(val);
-        final List<Object> x = asList(root.get("x"));
-        assertEquals(x.get(0), 1);
-        final Map<String, Object> x1 = asMap(x.get(1));
-        final List<Object> y = asList(x1.get("y"));
-        assertEquals(y.get(0), 2);
-        final Map<String, Object> y1 = asMap(y.get(1));
-        assertEquals(asList(y1.get("z")), Arrays.asList(3));
-        assertEquals(asList(x.get(2)), Arrays.asList(4, 5));
-    }
-
-    /**
-     * Ensure that the old behaviour (every object is a Map) is unchanged.
-     */
-    @Test
-    public void testNonWrapping() throws ScriptException {
-        final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
-        final Object val = engine.eval("({x: [1, {y: [2, {z: [3]}]}, [4, 5]]})");
-        final Map<String, Object> root = asMap(val);
-        final Map<String, Object> x = asMap(root.get("x"));
-        assertEquals(x.get("0"), 1);
-        final Map<String, Object> x1 = asMap(x.get("1"));
-        final Map<String, Object> y = asMap(x1.get("y"));
-        assertEquals(y.get("0"), 2);
-        final Map<String, Object> y1 = asMap(y.get("1"));
-        final Map<String, Object> z = asMap(y1.get("z"));
-        assertEquals(z.get("0"), 3);
-        final Map<String, Object> x2 = asMap(x.get("2"));
-        assertEquals(x2.get("0"), 4);
-        assertEquals(x2.get("1"), 5);
-    }
-
-    @SuppressWarnings("unchecked")
-    private static List<Object> asList(final Object obj) {
-        assertJSObject(obj);
-        Assert.assertTrue(obj instanceof List);
-        return (List)obj;
-    }
-
-    @SuppressWarnings("unchecked")
-    private static Map<String, Object> asMap(final Object obj) {
-        assertJSObject(obj);
-        Assert.assertTrue(obj instanceof Map);
-        return (Map)obj;
-    }
-
-    private static void assertJSObject(final Object obj) {
-        assertTrue(obj instanceof JSObject);
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/src/jdk/nashorn/api/scripting/test/JSONCompatibleTest.java	Wed Jul 05 20:52:37 2017 +0200
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.nashorn.api.scripting.test;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import javax.script.ScriptEngine;
+import javax.script.ScriptException;
+import jdk.nashorn.api.scripting.JSObject;
+import jdk.nashorn.api.scripting.NashornScriptEngine;
+import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class JSONCompatibleTest {
+
+    /**
+     * Wrap a top-level array as a list.
+     */
+    @Test
+    public void testWrapArray() throws ScriptException {
+        final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
+        final Object val = engine.eval("Java.asJSONCompatible([1, 2, 3])");
+        assertEquals(asList(val), Arrays.asList(1, 2, 3));
+    }
+
+    /**
+     * Wrap an embedded array as a list.
+     */
+    @Test
+    public void testWrapObjectWithArray() throws ScriptException {
+        final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
+        final Object val = engine.eval("Java.asJSONCompatible({x: [1, 2, 3]})");
+        assertEquals(asList(asMap(val).get("x")), Arrays.asList(1, 2, 3));
+    }
+
+    /**
+     * Check it all works transitively several more levels down.
+     */
+    @Test
+    public void testDeepWrapping() throws ScriptException {
+        final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
+        final Object val = engine.eval("Java.asJSONCompatible({x: [1, {y: [2, {z: [3]}]}, [4, 5]]})");
+        final Map<String, Object> root = asMap(val);
+        final List<Object> x = asList(root.get("x"));
+        assertEquals(x.get(0), 1);
+        final Map<String, Object> x1 = asMap(x.get(1));
+        final List<Object> y = asList(x1.get("y"));
+        assertEquals(y.get(0), 2);
+        final Map<String, Object> y1 = asMap(y.get(1));
+        assertEquals(asList(y1.get("z")), Arrays.asList(3));
+        assertEquals(asList(x.get(2)), Arrays.asList(4, 5));
+    }
+
+    /**
+     * Ensure that the old behaviour (every object is a Map) is unchanged.
+     */
+    @Test
+    public void testNonWrapping() throws ScriptException {
+        final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
+        final Object val = engine.eval("({x: [1, {y: [2, {z: [3]}]}, [4, 5]]})");
+        final Map<String, Object> root = asMap(val);
+        final Map<String, Object> x = asMap(root.get("x"));
+        assertEquals(x.get("0"), 1);
+        final Map<String, Object> x1 = asMap(x.get("1"));
+        final Map<String, Object> y = asMap(x1.get("y"));
+        assertEquals(y.get("0"), 2);
+        final Map<String, Object> y1 = asMap(y.get("1"));
+        final Map<String, Object> z = asMap(y1.get("z"));
+        assertEquals(z.get("0"), 3);
+        final Map<String, Object> x2 = asMap(x.get("2"));
+        assertEquals(x2.get("0"), 4);
+        assertEquals(x2.get("1"), 5);
+    }
+
+    @SuppressWarnings("unchecked")
+    private static List<Object> asList(final Object obj) {
+        assertJSObject(obj);
+        Assert.assertTrue(obj instanceof List);
+        return (List)obj;
+    }
+
+    @SuppressWarnings("unchecked")
+    private static Map<String, Object> asMap(final Object obj) {
+        assertJSObject(obj);
+        Assert.assertTrue(obj instanceof Map);
+        return (Map)obj;
+    }
+
+    private static void assertJSObject(final Object obj) {
+        assertTrue(obj instanceof JSObject);
+    }
+}
--- a/nashorn/test/src/jdk/nashorn/api/scripting/test/PluggableJSObjectTest.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/test/src/jdk/nashorn/api/scripting/test/PluggableJSObjectTest.java	Wed Jul 05 20:52:37 2017 +0200
@@ -27,6 +27,7 @@
 
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
 
 import java.nio.IntBuffer;
@@ -34,9 +35,11 @@
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Set;
+import javax.script.Invocable;
 import javax.script.ScriptEngine;
 import javax.script.ScriptEngineManager;
 import jdk.nashorn.api.scripting.AbstractJSObject;
+import jdk.nashorn.api.scripting.ScriptObjectMirror;
 import org.testng.annotations.Test;
 
 /**
@@ -286,4 +289,23 @@
             fail(exp.getMessage());
         }
     }
+
+    // @bug 8137258: JSObjectLinker and BrowserJSObjectLinker should not expose internal JS objects
+    @Test
+    public void hidingInternalObjectsForJSObjectTest() throws Exception {
+        final ScriptEngineManager engineManager = new ScriptEngineManager();
+        final ScriptEngine e = engineManager.getEngineByName("nashorn");
+
+        final String code = "function func(obj) { obj.foo = [5, 5]; obj.bar = {} }";
+        e.eval(code);
+
+        // call the exposed function but pass user defined JSObject impl as argument
+        ((Invocable)e).invokeFunction("func", new AbstractJSObject() {
+            @Override
+            public void setMember(final String name, final Object value) {
+                // make sure that wrapped objects are passed (and not internal impl. objects)
+                assertTrue(value.getClass() == ScriptObjectMirror.class);
+            }
+        });
+    }
 }
--- a/nashorn/test/src/jdk/nashorn/api/scripting/test/ScopeTest.java	Wed Jul 05 20:51:37 2017 +0200
+++ b/nashorn/test/src/jdk/nashorn/api/scripting/test/ScopeTest.java	Wed Jul 05 20:52:37 2017 +0200
@@ -30,6 +30,7 @@
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
 import javax.script.Bindings;
+import javax.script.Invocable;
 import javax.script.ScriptContext;
 import javax.script.ScriptEngine;
 import javax.script.ScriptEngineFactory;
@@ -855,4 +856,59 @@
             assertTrue(ret, "Expected true in iteration " + i);
         }
     }
+
+    // @bug 8138616: invokeFunction fails if function calls a function defined in GLOBAL_SCOPE
+    @Test
+    public void invokeFunctionInGlobalScopeTest() throws Exception {
+         final ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn");
+         final ScriptContext ctxt = engine.getContext();
+
+         // define a function called "func"
+         engine.eval("func = function() { return 42 }");
+
+         // move ENGINE_SCOPE Bindings to GLOBAL_SCOPE
+         ctxt.setBindings(ctxt.getBindings(ScriptContext.ENGINE_SCOPE), ScriptContext.GLOBAL_SCOPE);
+
+         // create a new Bindings and set as ENGINE_SCOPE
+         ctxt.setBindings(engine.createBindings(), ScriptContext.ENGINE_SCOPE);
+
+         // define new function that calls "func" now in GLOBAL_SCOPE
+         engine.eval("newfunc = function() { return func() }");
+
+         // call "newfunc" and check the return value
+         Object value = ((Invocable)engine).invokeFunction("newfunc");
+         assertTrue(((Number)value).intValue() == 42);
+    }
+
+
+    // @bug 8138616: invokeFunction fails if function calls a function defined in GLOBAL_SCOPE
+    // variant of above that replaces default ScriptContext of the engine with a fresh instance!
+    @Test
+    public void invokeFunctionInGlobalScopeTest2() throws Exception {
+         final ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn");
+
+         // create a new ScriptContext instance
+         final ScriptContext ctxt = new SimpleScriptContext();
+         // set it as 'default' ScriptContext
+         engine.setContext(ctxt);
+
+         // create a new Bindings and set as ENGINE_SCOPE
+         ctxt.setBindings(engine.createBindings(), ScriptContext.ENGINE_SCOPE);
+
+         // define a function called "func"
+         engine.eval("func = function() { return 42 }");
+
+         // move ENGINE_SCOPE Bindings to GLOBAL_SCOPE
+         ctxt.setBindings(ctxt.getBindings(ScriptContext.ENGINE_SCOPE), ScriptContext.GLOBAL_SCOPE);
+
+         // create a new Bindings and set as ENGINE_SCOPE
+         ctxt.setBindings(engine.createBindings(), ScriptContext.ENGINE_SCOPE);
+
+         // define new function that calls "func" now in GLOBAL_SCOPE
+         engine.eval("newfunc = function() { return func() }");
+
+         // call "newfunc" and check the return value
+         Object value = ((Invocable)engine).invokeFunction("newfunc");
+         assertTrue(((Number)value).intValue() == 42);
+    }
 }
--- a/test/make/TestMakeBase.gmk	Wed Jul 05 20:51:37 2017 +0200
+++ b/test/make/TestMakeBase.gmk	Wed Jul 05 20:52:37 2017 +0200
@@ -213,23 +213,20 @@
 VARDEP_TEST_VAR2 := value3
 
 VARDEP_RETURN_VALUE := $(call DependOnVariable, VARDEP_TEST_VAR2, $(VARDEP_VALUE_FILE))
-ifneq ($(VARDEP_VALUE_FILE), $(VARDEP_RETURN_VALUE))
-  $(error Expected: $(VARDEP_VALUE_FILE) - DependOnVariable: $(VARDEP_RETURN_VALUE))
-endif
+$(eval $(call assert-equals, $(VARDEP_RETURN_VALUE), $(VARDEP_VALUE_FILE), \
+    Wrong filename returned))
 VARDEP_FILE_CONTENTS := $(shell $(CAT) $(VARDEP_VALUE_FILE))
-ifneq ($(VARDEP_TEST_VAR2), $(VARDEP_FILE_CONTENTS))
-  $(error Expected: $(VARDEP_TEST_VAR2) - DependOnVariable file contained: \
-      $(VARDEP_FILE_CONTENTS))
-endif
+$(eval $(call assert-equals, $(VARDEP_FILE_CONTENTS), \
+    VARDEP_TEST_VAR2_old:=$(VARDEP_TEST_VAR2), \
+    Wrong contents in vardeps file))
 
 # Test with a variable value containing some problematic characters
 VARDEP_TEST_VAR3 := foo '""' "''" bar
 VARDEP_VALUE_FILE := $(call DependOnVariable, VARDEP_TEST_VAR3)
 VARDEP_FILE_CONTENTS := $(shell $(CAT) $(VARDEP_VALUE_FILE))
-ifneq ($(VARDEP_TEST_VAR3), $(VARDEP_FILE_CONTENTS))
-  $(error Expected: >$(VARDEP_TEST_VAR3)< - DependOnVariable file contained: \
-      >$(VARDEP_FILE_CONTENTS)<)
-endif
+$(eval $(call assert-equals, $(VARDEP_FILE_CONTENTS), \
+    VARDEP_TEST_VAR3_old:=$(VARDEP_TEST_VAR3), \
+    Wrong contents in vardep file))
 
 TEST_TARGETS += test-vardep